var cache1=new Image(); cache1.src="pics/menu1_a.png";
var cache2=new Image(); cache2.src="pics/menu2_a.png";
var cache3=new Image(); cache3.src="pics/menu3_a.png";

function SwapImage(id,mode){
  var img = document.images[id].src;
  if(mode==1) document.images[id].src=img.substr(0,img.length-4)+'_a.'+img.substr(img.length-3,img.length);
  if(mode==0) document.images[id].src=img.substr(0,img.length-6)+'.'+img.substr(img.length-3,img.length);
}

function OpenImg(src, width, height, target, scrollbars)
{
 win=window.open('',target.replace(/\./,"_"),'width='+width+',height='+height+',hotkeys=1,resizable=yes,scrollbars='+scrollbars);
 win.document.write('<html><head></head><body marginwidth=0 marginheight=0 style="margin:0 0 0 0; padding:0 0 0 0;">');
 win.document.write('<IMG src="'+src+'" alt="" width="'+width+'" height="'+height+'">');
 win.document.write("</body></html>");
 win.focus();
 win.document.close();
}
