//Written by Bogdan Blaszczak/BlaTek

function preloadMenu(I,i){
  for(I=[],i=0;i<5;i++)I[i]=new Image()
  I[0].src='img/menu_about.gif'
  I[1].src='img/menu_about_on.gif'
  I[2].src='img/menu_areas_on.gif'
  I[3].src='img/menu_customers_on.gif'
  I[4].src='img/menu_contact_on.gif'
}
preloadMenu()

onload=function(t,i,l,I,T){
 if(!document.getElementById)return

 T=[];
 t=document.getElementById('menu')
 if(t){
  t=t.getElementsByTagName('a')
  for(i=0;i<t.length;i++)T[T.length]=t[i]
 }
  for(i=0;i<T.length;i++){
   if(I=T[i].getElementsByTagName('img')[0]){
    if(document.all)I.style.filter='blendTrans(duration=0.4)'
    I.onmouseover=I.onmouseout=rollMe
   }
  }

 if(window.setVisits)setVisits()
 if(l=document.getElementById('suggest'))l.checked=!0

 l=document.links
 for(i=0;i<l.length;i++)
  l[i].onfocus=lFocus

}

function lFocus(){if(window.aFocus)this.blur()}
document.onmousedown=function(){aFocus=1;setTimeout('aFocus=0',10)}
function rollMe(e,f){
 e=e||event;e=e.type=='mouseout'
 eval('try{f=this.filters}catch(Er){}')
 if(f)eval('try{f[0].Apply()}catch(Er){}')
 this.src=e?this.src.replace(/_on\.gif/i,'.gif'):this.src.replace(/.gif/i,'_on.gif')
 if(f)eval('try{f[0].Play()}catch(Er){}')
}

function popup(x,s,w,h,l,t,n,O){
s=s?'yes':'no';w=w?w:'630';h=h?h:'650';l=l?l:'50';t=t?t:'50';n=n?n:'_blank'
 O=window.open(x,n,'left='+l+',top='+t+',width='+w+',height='+h+',scrollbars='+s)
 return O&&O.opener&&O.opener==self
}
