if(location.search) 
{
 go=location.search.lastIndexOf('/')+1;
 document.getElementById('aa').innerHTML="<iframe src="+location.search.substring(go)+" width=442 height=381 marginHeight=0 marginWidth=0></iframe>";
}
else if(WM_easyDetect('flash'))
{
 document.getElementById('aa').innerHTML=rtg;
}
if(document.body.clientWidth) 
{
plwh=document.body.clientWidth/2- document.getElementById('wh').clientWidth/2;
ptwh=document.body.clientHeight/2- document.getElementById('wh').clientHeight/2;
if(ptwh<0) ptwh=0;
}
else
{
plwh=0;
ptwh=0;
}
document.getElementById('wh').style.left=plwh;
document.getElementById('wh').style.top=ptwh;
document.getElementById('wh').style.visibility="visible";
document.getElementById('vgr').style.left=5 + plwh;
document.getElementById('vgr').style.top=190 + ptwh;
document.getElementById('vgr').style.visibility="visible";
document.getElementById('book').style.left=20 + plwh;
document.getElementById('book').style.top=195 + ptwh;
document.getElementById('book').style.visibility="visible";
document.getElementById('jobs').style.left=20+ plwh;
document.getElementById('jobs').style.top=345 + ptwh;
document.getElementById('jobs').style.visibility="visible";
document.getElementById('mysql').style.left=124 + parseInt(document.getElementById('vgr').style.left);
document.getElementById('mysql').style.top=70 + parseInt(document.getElementById('vgr').style.top);
document.getElementById('mysql').style.visibility="visible";
//document.getElementById('emic').style.left=240 + parseInt(document.getElementById('vgr').style.left);
//document.getElementById('emic').style.top= parseInt(document.getElementById('vgr').style.top);
//document.getElementById('emic').style.visibility="visible";
document.getElementById('seo').style.left=20 + plwh;
document.getElementById('seo').style.top=270 + ptwh;
document.getElementById('seo').style.visibility="visible";
document.getElementById('hosting').style.left=16 + plwh;
document.getElementById('hosting').style.top=305 + ptwh;
document.getElementById('hosting').style.visibility="visible";
document.getElementById('db').style.left=105 + plwh;
document.getElementById('db').style.top=210 + ptwh;
document.getElementById('db').style.visibility="visible";
/*
document.getElementById('id').style.left=70 + plwh;
document.getElementById('id').style.top=325 + ptwh;
document.getElementById('id').style.visibility="visible";
*/
if (document.getElementById) 
 var enlaces =document.getElementsByTagName("a");
else
 var enlaces = document.links; 
for (i=0;i<enlaces.length;i++) 
{
 enlaces[i].onfocus =despuntea;
 if(enlaces[i].href.lastIndexOf("javascript:")+1==0 && enlaces[i].name!="emic" )
  enlaces[i].onclick =ret;
}

function despuntea() 
{
 if (this.blur) this.blur();
 if(!this.nameProp) this.nameProp=this.pathname;
 if(this.nameProp!="www.emicnetworks.com" && this.href.lastIndexOf("javascript:")+1==0) {
 strnp=this.nameProp;
 if(strnp.lastIndexOf("html")+1==0 && strnp.lastIndexOf("swf")+1==0) 
 {if(strnp=="Christmas") strnp=strnp+".swf";
 else strnp=strnp+".html";}
 document.getElementById('aa').innerHTML="<iframe src="+strnp+" width=442 height=381 marginHeight=0 marginWidth=0></iframe>";}

}

function ret()
{
 return false;
}

function start() 
{
 if (pg=="jobs.html") tx=text[5];
 else 
 {
  if(j==5) j=0; else j++;
  changeContent('scr',text[j])
  setTimeout('start()',5000);
 }
}

function prestart()
{
 document.getElementById('pr').style.visibility="hidden";
 document.getElementById('aa').style.visibility="visible";
 start();
}

function changeContent(what,text) 
{
 if (document.getElementById)
  document.getElementById(what).innerHTML = text;
 else if (document.layers) 
 {
  document.layers[what].document.open();
  document.layers[what].document.write(text);
  document.layers[what].document.close();
 }
}
// substart();

function substart()
{
 for (i=0; i<document.images.length;i++)
 {
  if (!document.images[i].complete) 
  document.images[i].src=document.images[i].src;
 }
 prestart();
}