//*******************************************************************************************
// function cancelEvent()
// assigning this function to an elements onmouseover prevents the event from propigating 
// to parent objects.
//*******************************************************************************************
function cancelEvent(myEvent){
	// blocks the enter key value from being processed when assigned to an objects event
	// Mozilla sends the event as the first parameter while IE does not
	if (myEvent == null){
		//IE
		myEvent = window.event;
		myEvent.cancelBubble = true;
		//alert(myEvent.srcElement.name);
	} else {
		//DOM2
		myEvent.stopPropagation();
		//alert(myEvent.target);
	}

	return false;
};


//*******************************************************************************************
// function cancelEvent()
// assigning this function to an elements onmouseover prevents the event from propigating 
// to parent objects.
//*******************************************************************************************
function openWindow(strURL,strWinName,strFeatures){
	window.open(strURL,strWinName,strFeatures);
}
function openWindowCentered(strURL,strWinName,intWidth,intHeight,strFeatures){
	if(strFeatures.length < 1) strFeatures = 'resizable=1,scrollbars=1, status=1, toolbar=1,location=1,menubar=1';
	return window.open(strURL,strWinName,'left='+ (screen.width - intWidth) / 2 +',top='+(screen.height - intHeight ) / 2 +',width='+intWidth+',height='+intHeight+','+strFeatures);
}


// returns a URL passed variable via javascript and name
function getValue(varname)
{
  var url = window.location.href;
  var qparts = url.split("?");
  if (qparts.length == 1)
  {
    return "";
  }
  var query = qparts[1];
  var vars = query.split("&");
  var value = "";
  for (i=0;i<vars.length;i++)
  {
    var parts = vars[i].split("=");
    if (parts[0] == varname)
    {
      value = parts[1];
      break;
    }
  }
  value = unescape(value);
  value.replace(/\+/g," ");
  return value;
}