// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this header

thisIE=document.all;
thisNN=!document.all&&document.getElementById;
thisN4=document.layers;
thisHot=false;

function ddInit(e){
  topDog=thisIE ? "BODY" : "HTML";
  whichDog=thisIE ? document.all.theLayer : document.getElementById("theLayer");  
  hotDog=thisIE ? event.srcElement : e.target;  
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=thisIE ? hotDog.parentElement : hotDog.parentNode;
  }  
  if (hotDog.id=="titleBar"){
    offsetx=thisIE ? event.clientX : e.clientX;
    offsety=thisIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=thisIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=thisIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

function ddN4(whatDog){
  if (!thisN4) 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 (thisHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function hideMe(){
  if (thisIE||thisNN) whichDog.style.display = 'none';
  else if (thisN4) document.theLayer.display = 'none';

  document.onmousedown="";
  document.onmouseup="";
}

function showMe(){
  if (thisIE||thisNN) whichDog.style.display = 'block';
  else if (thisN4) document.theLayer.display = 'block'; 
}

