//Written by Bogdan Blaszczak/BlaTek

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]
 }
 if(T.length){
  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
  }
 }
*/ 
 l=document.links
 for(i=0;i<l.length;i++)
  l[i].onfocus=lFocus

 initGallery()
}

function lFocus(){if(window.aFocus)this.blur()}
document.onmousedown=function(){aFocus=1;setTimeout('aFocus=0',10)}




function initGallery(i){
 if(!document.getElementById)return;

 mImg=document.getElementById('main-img')
 if(document.all)mImg.style.filter='blendTrans(duration=0.5)'

 Tgl=[]
 t=document.getElementById('gt1')
 if(t){
  t=t.getElementsByTagName('a')
  for(i=0;i<t.length;i++)Tgl[Tgl.length]=t[i]
 }
// t=document.getElementById('content-g3')
// if(t){
//  t=t.getElementsByTagName('a')
//  for(i=0;i<t.length;i++)Tgl[Tgl.length]=t[i]
// }

 for(i=0;i<Tgl.length;i++){
  Tmi=Tgl[i];Tmi.I=new Image();Tmi.I.src=Tmi.href
 }
}

function loadImg(t,f){
 if(!document.getElementById)return!0
 if(!window.mImg||!t.I)return!1

 eval('try{f=mImg.filters}catch(Er){}')
 if(f)eval('try{f[0].Apply()}catch(Er){}')
 mImg.src=t.href
 if(f)eval('try{f[0].Play()}catch(Er){}')

 for(i=0;i<Tgl.length;i++){
  Tgl[i].firstChild.className=Tgl[i]==t?'here':'';
 } 
 return!1
}
