function Img(p,dp) {
  return eval("document.image"+p+".src='images/"+dp+"'");
}


function Res(s,ds) {
  return eval("document.image"+s+".src='images/"+ds+"'");
}

function getLeftPos(Obj)
{
   var aaa = aObj.offsetLeft;
   while(aObj.offsetParent!=null)
   {
     aObj= aObj.offsetParent;

     aaa+=aObj.offsetLeft;
   }
   return aaa;

}


function getTopPos(Obj)
{
   var aaa = aObj.offsetTop;
   while(aObj.offsetParent!=null)
   {
     aObj= aObj.offsetParent;

     aaa+=aObj.offsetTop;
   }
   return aaa;

}


function showObject(dId, aId, topElement)
{
  aObj = document.getElementById(aId);
  dObj = document.getElementById(dId);
  dObj.style.visibility = "visible";
   
   aObj.style.backgroundColor = "#FFFCEA";
   dObj.style.position = "absolute";
   dObj.style.top = topElement;


   dObj.style.left =  getLeftPos(aObj);
  

}

function hideObject(dId, aId)
{
  document.getElementById(dId).style.visibility = "hidden";
  document.getElementById(aId).style.backgroundColor = "#EAC58D"; 
  
}


//============================================================================

function Img(p,dp) {
  return eval("document.image"+p+".src='images/"+dp+"'");
}
function ImgN(n,dp) {
  return eval("document."+n+".src='images/"+dp+"'");
}


