function openIMG(){
windowOpen=window.open("",'Open','toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=1');
windowOpen.document.writeln("<head><title>Plano Actual Parque Tecnol&oacute;gico Boecillo</title></head><body>");
windowOpen.document.writeln('<img src=http://localhost:2326/WebSite/images/planoActualBoecillo.jpg border=0>');
windowOpen.document.writeln("</body></html>");
}

function onLaunch() {
	var nXMax, nXOffset;
	var szUrl, szOptions;
	
	//Prep for perfect placement
	xMax = screen.width;
	xOffset = xMax - 810;

	//Set the screen display options for our popup window
	szOptions = "location=0,menubar=0,resizable=1,height=300,width=800,";
	szOptions += "screenX=" + xOffset + ",screenY=0,top=0,left=" + xOffset;

	szUrl = "http://pw6.ipdepunto.com/acotec/gethelp.asp";
	window.open(szUrl,"WebUser",szOptions);     }
	

function cambiar() {
//    var imagenes = ["images/inicioClientes2.png", "images/inicioConsultoria2.png", "images/inicioEmpresa2.png", "images/inicioEnergia2.png", "images/inicioSoluciones2.png"];
//    var alt = ["Clientes", "Tarjeta Inteligente - Consultora", "La Empresa", "Energa", "Tarjeta Inteligente - Soluciones"];
//var links=["www.acotec.es", "www.acb.com", "www.marca.com", "www.google.es", "www.as.com"];
//    var randomArray = new Array();
//      var randomArrayAlt = new Array();
//var randomArrayLinks = new Array();
//    var sum = 0; 
//    var total = imagenes.length;
//     var rand; 
//    var randMovie;
//    var randAlt;
//    var randLinks;

//while(sum < total)
//{ 
//	rand = Math.floor(Math.random()*total);
//	 randMovie = imagenes[rand];
//	 randAlt = alt[rand];
//	randLinks = links[rand];
//    if(randomArray.indexOf(randMovie) < 0)
//	{
// 		randomArray[sum] = randMovie;
// 		randomArrayAlt[sum] = randAlt;
// 		randomArrayLinks[sum] = randLinks;
//		sum++;
// 	}
//} 

//document.images.Imagen1.src = randomArray[0];
//document.images.Imagen1.alt=randomArrayAlt[0];
//document.links[0].href = randomArrayLinks[0];
////document.getElementById('link1').href="www.acotec.es";
//document.images.Imagen2.src = randomArray[1];
//document.images.Imagen2.alt=randomArrayAlt[1];
//document.links[1].href = randomArrayLinks[1];
////document.getElementById('link2').href="www.acb.com";
//document.images.Imagen3.src = randomArray[2];
//document.images.Imagen3.alt=randomArrayAlt[2];
//document.links[2].href = randomArrayLinks[2];
////document.getElementById('link3').href="www.acb.com";
//document.images.Imagen4.src = randomArray[3];
//document.images.Imagen4.alt=randomArrayAlt[3];
//document.links[3].href = randomArrayLinks[3];
////document.getElementById('link4').href="www.acb.com";
//document.images.Imagen5.src = randomArray[4];
//document.images.Imagen5.alt=randomArrayAlt[4];
//document.links[4].href = randomArrayLinks[4];
////document.getElementById('link5').href="www.as.es";

var imagenes = ["images/inicioClientes2.png", "images/inicioConsultoria2.png", "images/inicioEmpresa2.png", "images/inicioEnergia2.png", "images/inicioSoluciones2.png"];
var links=["http://www.acotec.es/Clientes.aspx", "http://www.acotec.es/ConsultoriaTI.aspx", "http://www.acotec.es/LaEmpresa.aspx", "http://www.acotec.es/Energia.aspx", "http://www.acotec.es/SolucionesTI.aspx"];
var alt = ["Clientes", "Tarjeta Inteligente - Consultoria", "La Empresa", "Energia", "Tarjeta Inteligente - Soluciones"];
var randomArray = new Array();
var randomArrayAlt = new Array();
var randomArrayLinks = new Array();
 var sum = 0; 
var total = imagenes.length;
 var rand; 
var randMovie; 
var randAlt;
var randLinks;

while(sum < total)
{ 
	rand = Math.floor(Math.random()*total);
	 randMovie = imagenes[rand];
	 randAlt = alt[rand];
	randLinks = links[rand];
	if(randomArray.indexOf(randMovie) < 0)
	{
 		randomArray[sum] = randMovie; 
		randomArrayAlt[sum] = randAlt;
		randomArrayLinks[sum] = randLinks;
		sum++;
 	}

} 


document.images.Imagen1.src = randomArray[0];
//document.links[0].href=randomArrayLinks[0];
//document.links('a0').href=randomArrayLinks[0];
document.getElementById("a0").href = randomArrayLinks[0];
document.images.Imagen1.alt=randomArrayAlt[0];

document.images.Imagen2.src = randomArray[1];
//document.links[1].href=randomArrayLinks[1];
//document.links('a1').href=randomArrayLinks[1];
document.getElementById("a1").href = randomArrayLinks[1];
document.images.Imagen2.alt=randomArrayAlt[1];


document.images.Imagen3.src = randomArray[2];
//document.links[2].href=randomArrayLinks[2];
//document.links('a2').href=randomArrayLinks[2];
document.getElementById("a2").href = randomArrayLinks[2];
document.images.Imagen3.alt=randomArrayAlt[2];


document.images.Imagen4.src = randomArray[3];
//document.links[3].href=randomArrayLinks[3];
//document.links('a3').href=randomArrayLinks[3];
document.getElementById("a3").href = randomArrayLinks[3];
document.images.Imagen4.alt=randomArrayAlt[3];


document.images.Imagen5.src = randomArray[4];
//document.links[4].href=randomArrayLinks[4];
//document.links('a4').href=randomArrayLinks[4];
document.getElementById("a4").href = randomArrayLinks[4];
document.images.Imagen5.alt=randomArrayAlt[4];

}


if (!Array.prototype.indexOf)
{
  Array.prototype.indexOf = function(elt /*, from*/)
  {
    var len = this.length;

    var from = Number(arguments[1]) || 0;
    from = (from < 0)
         ? Math.ceil(from)
         : Math.floor(from);
    if (from < 0)
      from += len;

    for (; from < len; from++)
    {
      if (from in this &&
          this[from] === elt)
        return from;
    }
    return -1;
  };
}
