isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;
isHot2 = false;
function ddInit(e){
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");
  whichDog2=isIE ? document.all.theLayer2 : document.getElementById("theLayer2");
  hotDog=isIE ? event.srcElement : e.target;  
  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;
  }
  if (hotDog.id=="titleBar2"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog2.style.left);
    nowY=parseInt(whichDog2.style.top);
    ddEnabled2=true;
    document.onmousemove=dd2;
  }
}
function ddFin(e){
	ddEnabled = false;
	ddEnabled2 = false;
}
function dd(e){
  if (!ddEnabled) return;
  var temp_left = isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
  whichDog.style.left = temp_left + 'px';
  var temp_top =isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  whichDog.style.top = temp_top + 'px';
  return false;
}
function dd2(e){
  if (!ddEnabled2) return;
  var temp_left = isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
  whichDog2.style.left = temp_left + 'px';
  var temp_top =isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  whichDog2.style.top = temp_top + 'px';
  return false;
}
function hideMe(objName){
	document.getElementById(objName).style.visibility="hidden";
}
function showMe(objName){
	document.getElementById(objName).style.visibility="visible";
}
document.onmousedown=ddInit;
document.onmouseup=ddFin;
