var isOverCompany = false;
var isOverDuty = false;

function ShowDialog(parent,vID){
  isOverCompany = true;
  var obj = null;
  try{
   obj = eval(document.getElementById("div"+vID));
  }
  catch(e){}
  if(obj==null){
    return;
  }
  obj.style.visibility = "visible";
  //showDiv.innerText = "object:"+parent.id+ "<br />X:"+parent.offsetLeft+"px<br />Y:"+parent.offsetTop+"px";
}

function HideDialog(parent,vID){
  isOverCompany = false;
  if(isOverCompany || isOverDuty){
    return;
  }
  var obj = null;
  try{
   obj = eval(document.getElementById("div"+vID));
  }
  catch(e){}
  if(obj==null){
    return;
  }
  obj.style.visibility = "hidden";
}

function OverDiv(){
  isOverDuty = true;
}

function OutDiv(vID){
  isOverDuty = false;
  if(isOverCompany || isOverDuty){
    return;
  }
  var obj = eval(document.getElementById("div"+vID));
  obj.style.visibility = "hidden";
}