
//grab value of item by id
function getVal(theItem)
	{
	return document.getElementById(theItem).value;
	}

//grab handle on item by id
function get(theItem)
	{
	return document.getElementById(theItem);
	}

//matches vb trim() function
function Trim(theStr){
theStr = LTrim(theStr);
return RTrim(theStr);
}

function RTrim(theStr){
while(theStr.charAt((theStr.length -1))==" "){
theStr = theStr.subtheStr(0,theStr.length-1);
}
return theStr;
}

function LTrim(theStr){
while(theStr.charAt(0)==" "){
theStr = theStr.replace(theStr.charAt(0),"");
}
return theStr;
}

//grab x left chrs
function leftChr(theStr,CHARACTER_COUNT){

return theStr.substring(0,CHARACTER_COUNT);

}

//grab x right chrs
function rightChr(theStr,CHARACTER_COUNT){
return theStr.substring((theStr.length - CHARACTER_COUNT),theStr.length);
}

function intOnly(i) {
	if(i.value.length>0) {
		i.value = i.value.replace(/[^\d]+/g, '');
	}
if(i.value.length==0) 
	{
	i.value = 0;
	}
}
