function preloadImages() {
  var d=document; 
  if(d.images){ 
    if(!d.pia) d.pia=new Array();
    var i,j=d.pia.length,a=preloadImages.arguments; 
    for(i=0; i<a.length; i++){
      if (a[i].indexOf("#")!=0){ 
        d.pia[j]=new Image; 
        d.pia[j++].src=a[i];
      }
    }
  }
}

function anfrage(){
	anfrage = window.open("ad_anfrage1.html","Anfrage","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='800',height='600'");
	anfrage.resizeTo(800,600);
	anfrage.focus();
}

function proove(){
preloadImages(
"ad_web_screen_nav_on_10.gif",
"ad_web_screen_nav_on_09.gif",
"ad_web_screen_nav_on_08.gif",
"ad_web_screen_nav_on_07.gif",
"ad_web_screen_nav_on_06.gif",
"ad_web_screen_nav_on_05.gif",
"ad_web_screen_nav_on_04.gif",
"ad_web_screen_nav_on_03.gif",
"ad_web_screen_nav_on_02.gif",
"ad_web_screen_nav_on_01.gif",
"ad_web_screen_nav_off_10.gif",
"ad_web_screen_nav_off_09.gif",
"ad_web_screen_nav_off_08.gif",
"ad_web_screen_nav_off_07.gif",
"ad_web_screen_nav_off_06.gif",
"ad_web_screen_nav_off_05.gif",
"ad_web_screen_nav_off_04.gif",
"ad_web_screen_nav_off_03.gif",
"ad_web_screen_nav_off_02.gif",
"ad_web_screen_nav_off_01.gif",
"ad_top_u_bg.gif",
"ad_top_o_bg.gif",
"ad_main_bg_sh_ur.gif",
"ad_main_bg_sh_ul.gif",
"ad_main_bg_sh_u.gif",
"ad_main_bg_sh_r.gif",
"ad_main_bg_sh_or.gif",
"ad_main_bg.gif",
"ad_bg_red_text.gif",
"ad_bg_red_64.gif",
"ad_bg_navbox.gif",
"ad_bg_logo_right.gif",
"ad_bg_logo_left.gif",
"ad_bg_black_64.gif",
"_cp.gif"
);
 if(window.innerHeight){
   ifh=window.innerHeight-48;
 }
 else{
   ifh=document.all.start.offsetHeight-24;
 }
 var ht=Math.ceil(ifh/4);
 ifh=ht*4;
 if(window.innerWidth){
   ifw=window.innerWidth-48;
 }
 else{ 
   ifw=document.all.start.offsetWidth-28;
 }
 document.getElementById('loadbox').style.height=ifh+'px';
 document.getElementById('loadbox').style.width=ifw+'px';

 document.getElementById('mainbox').style.height=ifh+'px';
 document.getElementById('navbg').style.height=(ifh-423)+'px';
 document.getElementById('navbox').style.top=(ifh-318)+'px';

 document.getElementById('servicecnt').style.height=(ifh-153)+'px';
 document.getElementById('wartungcnt').style.height=(ifh-153)+'px';
 document.getElementById('reparaturencnt').style.height=(ifh-153)+'px';
 document.getElementById('aufzugcnt').style.height=(ifh-153)+'px';
 document.getElementById('maincnt').style.height=(ifh-153)+'px';
 document.getElementById('kontaktcnt').style.height=(ifh-153)+'px';
 document.getElementById('impressumcnt').style.height=(ifh-153)+'px';

 document.getElementById('mainbox').style.width=ifw+'px';
 document.getElementById('bgtopo').style.width=(ifw-16)+'px';
 document.getElementById('bgtopu').style.width=(ifw-16)+'px';
 document.getElementById('bgbot').style.width=(ifw-16)+'px';
 document.getElementById('bgbot').style.top=(ifh-48)+'px';
 document.getElementById('bglogor').style.left=(ifw-466)+'px';

 document.getElementById('servicecnt').style.width=(ifw-216)+'px';
 document.getElementById('wartungcnt').style.width=(ifw-216)+'px';
 document.getElementById('reparaturencnt').style.width=(ifw-216)+'px';
 document.getElementById('aufzugcnt').style.width=(ifw-216)+'px';
 document.getElementById('maincnt').style.width=(ifw-216)+'px';
 document.getElementById('kontaktcnt').style.width=(ifw-216)+'px';
 document.getElementById('impressumcnt').style.width=(ifw-216)+'px';

 document.getElementById('loadbox').style.visibility="hidden";
}

function hidaAllCnt(){
 document.getElementById('servicecnt').style.display='none';
 document.getElementById('wartungcnt').style.display='none';
 document.getElementById('reparaturencnt').style.display='none';
 document.getElementById('aufzugcnt').style.display='none';
 document.getElementById('maincnt').style.display='none';
 document.getElementById('kontaktcnt').style.display='none';
 document.getElementById('impressumcnt').style.display='none';
}

function onnavover(tag,cnt,x){
 var tclass=tag.className;
 for(i=1;i<=x;i++){
  document.getElementById('nav_'+i).className='nav_'+i+'_off';
 }
 tag.className=tclass.slice(0,tclass.lastIndexOf('_')+1)+'on';
 tag.onmouseout=function(){
   for(i=1;i<=x;i++){
     document.getElementById('nav_'+i).className='nav_'+i+'_off';
   }
 }
 tag.onclick=function(){ 
   tag.className=tclass.slice(0,tclass.lastIndexOf('_')+1)+'on';
   hidaAllCnt();
   document.getElementById(cnt).style.display='block';
 }
}

