// JavaScript Document

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

// Funcion para cambiar imagenes

function SwapImg(idx, img)
{
     document.images[idx].src = img;
}



//funcion para imagenes aleatorias

// JavaScript Document

<!--

pic_width=1000;   /*change to match the height of all your images */
pic_height=148;   /* change to match the width of all your images */
border_size=0;   /* change to the border size you want on the images */
alignment=1;      /* 0=left,1=center */

/* define image urls */

if (document.images)
 {
     pic1= new Image(pic_width,pic_height);
     pic1.src="img/head.jpg";  
     pic2= new Image(pic_width,pic_height); 
     pic2.src="img/head2.jpg"; 
     pic3= new Image(pic_width,pic_height);
     pic3.src="img/head3.jpg";
	 pic4= new Image(pic_width,pic_height);
     pic4.src="img/head4.jpg"; 
	 pic5= new Image(pic_width,pic_height);
     pic5.src="img/head5.jpg";
	 pic6= new Image(pic_width,pic_height);
     pic6.src="img/head6.jpg";
 }    

/* no need to edit past this point (unless you want to add more image slots) */

if (alignment==1)
 {
  cent_it="<CENTER>";
  cent_it2="<\/CENTER>";
 }
else
 {
  cent_it="";
  cent_it2="";
 }
 
function get_random(maxNum)
{
  if (Math.random && Math.round)
  {
    var ranNum= Math.round(Math.random()*(maxNum-1));
    ranNum+=1;
    return ranNum;
  }
  else
  {
  today= new Date();
  hours= today.getHours();
  mins=   today.getMinutes();
  secn=  today.getSeconds();
  if (hours==19)
   hours=18;
  var ranNum= (((hours+1)*(mins+1)*secn)%maxNum)+1;
  return ranNum;
  }
}

function get_Image()
{
 if (document.images)
 {
  var choose_one= get_random(6);  
  choose_one--;

  var pics= new Array(6) 
   pics[0]=pic1.src;
   pics[1]=pic2.src;
   pics[2]=pic3.src;
   pics[3]=pic4.src;
   pics[4]=pic5.src;
   pics[5]=pic6.src;
 

  document.write(cent_it+"<IMG SRC='"+pics[choose_one]+"' width='"+pic_width+"' height='"+pic_height+"' border='"+border_size+"' usemap='#idiomas'>"+cent_it2+"<map id ='idiomas' name='idiomas'>"+"<area shape='rect' coords='6,0,50,16' href='empresai.php'>"+"<area shape='rect' coords='54,0,102,16' href='empresa.php'>");

 }
}
//-->

//refresca la ventana parent

function refreshParent() {
  window.opener.location.href = window.opener.location.href;

  if (window.opener.progressWindow)
		
 {
    window.opener.progressWindow.close()
  }
  window.close();
}
