function getRef(obj){
  if(typeof obj == "string") {obj= document.getElementById(obj);}
  else if (typeof obj == "object") {obj = obj;}

  return obj;
}


function setStyle(obj, style, value){
  getRef(obj).style[style]= value;
}

function getStyle(e,styleProp) {
  e = getRef(e);
  var y;
  if (window.getComputedStyle)
    var y = window.getComputedStyle(e,null).getPropertyValue(styleProp);
  else if (e.currentStyle)
    var y = eval('e.currentStyle.' + styleProp);
  return y;
}


function getStyle2(obj, style){
  return getRef(obj).style[style];
}

function move(elem,x,y) {
  getRef(elem).style.left = x + "px";
  getRef(elem).style.top = y + "px";
}

function hide(elem)
{
  setStyle(elem,'display','none');
  setStyle(elem,'visibility','hidden');

}

function show(elem)
{
    setStyle(elem,'display','block');
    setStyle(elem,'visibility','visible');
}



function showhide(elem) {
  if (getStyle(elem, 'visibility') == "hidden")
    show(elem);
  else
    hide(elem);

}

