

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 showLayer( strDiv ){
  theDiv =isIE ? document.all( strDiv ) : document.getElementById( strDiv ) ;  
  if ( isIE||isNN ) theDiv.style.visibility="visible" ;
  else if ( isN4 ) document( strDiv ).visibility="show" ;
}
function hideLayer( strDiv ){
  theDiv =isIE ? document.all( strDiv ) : document.getElementById( strDiv ) ;  
  if ( isIE||isNN ) theDiv.style.visibility="hidden" ;
  else if ( isN4 ) document( strDiv ).visibility="hide" ;
}



document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");


