//Written by Bogdan Blaszczak/BlaTek

function preloadMenu(I,i){
  for(I=[],i=0;i<6;i++)I[i]=new Image()
  I[0].src='img/menu_home_on.gif'
  I[1].src='img/menu_collections_on.gif'
  I[2].src='img/menu_auctions_on.gif'
  I[3].src='img/menu_payment_on.gif'
  I[4].src='img/menu_about_on.gif'
  I[5].src='img/menu_contact_on.gif'
}
preloadMenu()

onload=function(t,i,l,I,T){
 if(!document.getElementById)return

 T=[]
 t=document.getElementById('menu-top')
 if(t){
  t=t.getElementsByTagName('a')
  for(i=0;i<t.length;i++)T[T.length]=t[i]
 }
/*
 t=document.getElementById('who-are-you')
 if(t){
  t=t.getElementsByTagName('a')
  for(i=0;i<t.length;i++)T[T.length]=t[i]
 }
*/
 if(T.length){
  for(i=0;i<T.length;i++){
   I=T[i].getElementsByTagName('img')[0]
   if(I){
    if(document.all)I.style.filter='blendTrans(duration=0.3)'
    I.onmouseover=I.onmouseout=rollMe
   }
  }
 }

 l=document.links
 for(i=0;i<l.length;i++)
  l[i].onfocus=lFocus

 i=document.createElement('div')
 document.getElementById('header').appendChild(i)
 with(i.style){position='absolute';left='857px';top='46px';width='10px';height='15px';overflow='hidden'}
 i.onclick=function(){location.href="admin.php"}
}

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,O){
s=s?'no':'yes';w=w?w:'640';h=h?h:'560';l=l?l:'30';t=t?t:'30'
 O=window.open(x,'popWin','left='+l+',top='+t+',width='+w+',height='+h+',scrollbars='+s)
 return O.opener&&O.opener==self
}


/*
function bookmarkit(){
 if(!window.external&&!window.sidebar){
  alert('Your browser doesn\'t support this feature. Please go to Bookmarks menu and add the site manually.')
  return!1
 }
 if(window.sidebar&&window.sidebar.addPanel){window.sidebar.addPanel(document.title, location.href,"");return!1}
 window.external.addFavorite(location.href,document.title);return!1
}
function recommend(x,O){
 O=window.open(x,'recWin','left=100,top=120,width=400,height=220')
 return O.opener&&O.opener==self
}
*/
