
function OpenDialog(PageURL, WindowWidth, WindowHeight)
{
	// This function opens a Modal Dialog box
	// Author: SSS
		
	var dlgReturn = 0;
		
	dlgReturn = window.showModalDialog(PageURL, "", "dialogWidth:"+WindowWidth+"px;dialogHeight:"+WindowHeight+"px;help:no;resizable:no;status:no;");
	
	return dlgReturn;
} //OpenDialog()

function VerifyAction(txtMessage) {
  var blnYesNo = true;
  blnYesNo = confirm(txtMessage + "\nClick OK to confirm or Cancel to abort");
  return blnYesNo;
}

function open_new_window(url, height, width, name) {
  var mywin = window.open(url,name,'top=50, left=150, toolbar=0,location=1,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width='+width+',height='+height);
}

function expandIt(whichEl)
{
  whichEl.style.display = (whichEl.style.display == "none" ) ? "" : "none";
}

function swapText(id)
{
  var objShortText = document.getElementById('short_' + id).style;
  var objLongText = document.getElementById('long_' + id).style;

  if ((objShortText.display == 'block') || (objShortText.display == '')) {
    objShortText.display = 'none';
    objLongText.display = 'block';
  } 
  else   {
    objShortText.display = 'block';
    objLongText.display = 'none';
  }
}

function CalcChars(item) {
  var iCount = 0 
  iCount = item.value.length;
     
  if (!document.layers && !document.all)
    return;
  if (document.layers) {
    eval("document.layers." + item.name + "_count.document.write(iCount)");
    eval("document.layers." + item.name + "_count.document.close()");
  }
    else if (document.all) {
      eval(item.name + "_count").innerHTML = iCount;
  }
}
