//Written by Bogdan Blaszczak/BlaTek

function preloadMenu(I,I2,i){
 if(!document.getElementById)return

  for(I=[],i=0;i<12;i++)I[i]=new Image()
  I[0].src='img/menu_mirek.gif'
  I[1].src='img/menu_mirek_on.gif'
  I[2].src='img/menu_mirek_here.gif'
  I[3].src='img/menu_services.gif'
  I[4].src='img/menu_services_on.gif'
  I[5].src='img/menu_services_here.gif'
  I[6].src='img/menu_supplies.gif'
  I[7].src='img/menu_supplies_on.gif'
  I[8].src='img/menu_supplies_here.gif'
  I[9].src='img/menu_contact.gif'
  I[10].src='img/menu_contact_on.gif'
  I[11].src='img/menu_contact_here.gif'

  for(I2=[],i=0;i<12;i++)I2[i]=new Image()
  I2[0].src='img/services_menu_copying.gif'
  I2[1].src='img/services_menu_copying_on.gif'
  I2[2].src='img/services_menu_printing.gif'
  I2[3].src='img/services_menu_printing_on.gif'
  I2[4].src='img/services_menu_web.gif'
  I2[5].src='img/services_menu_web_on.gif'
  I2[6].src='img/services_menu_fax.gif'
  I2[7].src='img/services_menu_fax_on.gif'
  I2[8].src='img/services_menu_lamination.gif'
  I2[9].src='img/services_menu_lamination_on.gif'
  I2[10].src='img/services_menu_stationery.gif'
  I2[11].src='img/services_menu_stationery_on.gif'
}
preloadMenu()

onload=function(t,i,l,I,T){
 if(!document.getElementById)return

 t=document.getElementById('menu')
 if(t){
  t=t.getElementsByTagName('a')
  T=[];for(i=0;i<t.length;i++)T[T.length]=t[i]
  for(i=0;i<T.length;i++){
   I=T[i].getElementsByTagName('img')[0]
   if(document.all)I.style.filter='blendTrans(duration=0.3)'
   I.onmouseover=I.onmouseout=rollMe
  }
 }
 t=document.getElementById('menu-services')
 if(t){
  t=t.getElementsByTagName('a')
  for(i=0;i<t.length;i++)
   t[i].onmouseover=t[i].onmouseout=rollMeA
 }
 
 l=document.links
 for(i=0;i<l.length;i++)
  l[i].onfocus=lFocus

 if(window.init)init()

}

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 rollMeA(e,i){
 e=e||event;e=e.type=='mouseout'
 i=this.getElementsByTagName('img')[0]
 i.src=e?i.src.replace(/_on\.gif/i,'.gif'):i.src.replace(/.gif/i,'_on.gif')
}
