

function copy_clip(mytext)
{
 if (window.clipboardData) 
 {
   window.clipboardData.setData("Text", mytext);
 }
 return false;
}


function replaceText(obj_id, text)
{
  if (document.getElementById)
  {
    var o=document.getElementById(obj_id);
    if (o)
    {
      if (o.childNodes[0])
      {
        o.childNodes[0].nodeValue=text;
      }
      else if (o.value)
      {
        o.value=text;
      }
      else //if (button.innerHTML)
      {
        o.innerHTML=text;
      }
    }
  }
}


function getElem(id) {
	if (document.getElementById)
		return document.getElementById(id);
	else
		return null;
}

function hideit(id) {
	getElem(id).style.display='none';
}

function showit(id) {
  getElem(id).style.display='block';
}

function hideall(ids) {
	for (var i=0; i < ids.length; i++)
		hideit(ids[i]);
}
