var menuLimg=new Array();
var menuHimg=new Array();
var menuTimer=null;
var menuActive=0;


function StopError() { return true; }
// window.onerror=StopError;

function MenuHi(menuNr) {
 if (menuTimer != null) { clearTimeout(menuTimer);menuTimer=null; }
 if (menuActive > 0) document['menu'+menuActive].src = menuLimg[menuActive].src;
 document['menu'+menuNr].src = menuHimg[menuNr].src;
}

function MenuHi_NoHide(menuNr) {
 document['menu'+menuNr].src = menuHimg[menuNr].src;
}

function MenuLo(menuNr) {
 document['menu'+menuNr].src = menuLimg[menuNr].src;
 if (menuActive > 0) menuTimer = setTimeout("document['menu'+menuActive].src = menuHimg[menuActive].src", 200);
}

function MenuInit() {
 for (a=0;a<=60;a++) { menuLimg[a]=new Image; menuHimg[a]=new Image; }
}

ZoomWindow=0;
function ZoomWin(theImage) 
 { 
 if (ZoomWindow)
  if(ZoomWindow.closed == false) 
   ZoomWindow.close();

 ZoomWindow = window.open("/zoom.asp?picture="+theImage, "ZoomWindow", "width=100,height=100,resizable=yes"); 
 ZoomWindow.focus(); 
 } 


function GimmickHi(gimmickNr, gimmickName) {
 document['gimmick'+gimmickNr].src = gimmickName;
 alert("sdjfjj");
}

function GimmickLo(gimmickNr, gimmickName) {
 document['gimmick'+gimmickNr].src = gimmickName;
}



// gimmick

 function stopError() { return true; }
 window.onerror = stopError;

PopupWindow=0;
function PopupWin(theFile) 
 { 
 if (PopupWindow)
  if(PopupWindow.closed == false) 
   PopupWindow.close();

 PopupWindow = window.open(theFile, "PWin", "width=472,height=420,scrollbars"); 
 PopupWindow.focus(); 
 } 


isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");  
  hotDog=isIE ? event.srcElement : e.target;  
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }  
  if (hotDog.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function div_ref_style (id) {
    if      (document.layers)         return document.layers[id];              
    else if (document.all)            return document.all[id].style;           
    else if (document.getElementById) return document.getElementById(id).style;
    else                              return null;        
  }

function fbPageInit(){
// populate(); // Newsticker


 
 if (isIE||isNN) winxx = document.body.offsetWidth;
 else if (isN4) winxx = document.body.offsetWidth+15;
 xbl = winxx - 800;
 xbl = xbl/2 + 790;
 if (xbl > winxx-170) xbl = winxx -160;
 
 div_ref_style("theLayer").left = xbl;
 div_ref_style("theLayer").visibility="visible";
}


function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false"); 





// --></script>


