function XMLobject()
	{
	http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
   http_request = new XMLHttpRequest();
   if (http_request.overrideMimeType) {
http_request.overrideMimeType('text/xml');
   }
} else if (window.ActiveXObject) { // IE
   try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (e) {
try {
   http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
   }
}
if (!http_request) {
//   alert('Cannot create XMLHTTP instance');
}
	return http_request;
	}

function loadXMLDoc(fname)
{
  var xmlDoc;
  // code for IE
  if (window.ActiveXObject)
  {
    xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); //OK
  }
  // code for Mozilla, Firefox, Opera, etc.
  else if (document.implementation  && document.implementation.createDocument)
  {
	xmlDoc=document.implementation.createDocument("","",null);
	alert(fname);
   }
  else
  {
    alert('Your browser cannot handle this script');
  }
//xmlDoc.async=false;
xmlDoc.load(fname);
return(xmlDoc);
}


	//global JS functions	
	function getVal(theItem)
	{
	return document.getElementById(theItem).value;
	}
function get(theItem)
	{
	return document.getElementById(theItem);
	}


function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}
// return the value of the radio button that is checked
// return an empty string if none are checked, or
// there are no radio buttons

function Trim(STRING){
STRING = LTrim(STRING);
return RTrim(STRING);
}

function RTrim(STRING){
while(STRING.charAt((STRING.length -1))==" "){
STRING = STRING.substring(0,STRING.length-1);
}
return STRING;
}


function LTrim(STRING){
while(STRING.charAt(0)==" "){
STRING = STRING.replace(STRING.charAt(0),"");
}
return STRING;
}

function left(STRING,CHARACTER_COUNT){
return STRING.substring(0,CHARACTER_COUNT);
}

function right(STRING,CHARACTER_COUNT){
return STRING.substring((STRING.length - CHARACTER_COUNT),STRING.length);
}

function len(theString)
	{	
	return	theString.length;
	}
	

function intOnly(i) {
	if(i.value.length>0) {
		i.value = i.value.replace(/[^\d]+/g, '');
	}
if(i.value.length==0) 
	{
//	i.value = 0;
	}
}