function getVal(theItem)
	{
	return document.getElementById(theItem).value;
	}
function get(theItem)
	{
	return document.getElementById(theItem);
	}

// 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 intOnly(i) {
	if(i.value.length>0) {
		i.value = i.value.replace(/[^\d]+/g, '');
	}
if(i.value.length==0) 
	{
	i.value = 0;
	}
}



function decOnly(i) {
	if(i.value.length>0) {
		i.value = i.value.replace(/[^\d\.]+/g, '');
	}
if(i.value.length==0) 
	{
	i.value = 0;
	}
}


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;
	}
