function actionConfirm(q) {
  if (q=="") q="Delete this entry?";
  if (!confirm (q)){return false;}
  else return true;}

function getTimestamp(form) {
 var t = new Date();
 var timestamp;

 // Date.getTime() returns milliseconds,
 // so divide by 1000 for seconds
 timestamp = Math.floor(t.getTime() / 1000);

 form.time.value = timestamp;

 return true;
}

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}
