function TRIM(TRIM_VALUE)
	{
			
				TRIM_VALUE = RTrim(TRIM_VALUE);
				TRIM_VALUE = LTrim(TRIM_VALUE);
				return TRIM_VALUE;
			
		} 
function Trim(TRIM_VALUE){
			if(TRIM_VALUE.value.length < 1){return false;}
				TRIM_VALUE.value = RTrim(TRIM_VALUE.value);
				TRIM_VALUE.value = LTrim(TRIM_VALUE.value);
				//TRIM_VALUE.value=TRIM_VALUE;
			if(TRIM_VALUE==""){return false;}else{return true;}
		} //End Function

//---------------------------Sajeesh.N -----------------------------------------//

function LogoLink(ID)
	{
		window.open("../urlRedirect.aspx?ID="+ID, "", "width=700, height=400, menubar=yes, status=yes, location=yes,toolbar=yes, scrollbars=yes, resizable=yes")
	}

//-------------------------------------------------------------------//	
function checkURL(objURL,AlertMes)
{
var var_URL=objURL.value;
if(var_URL.indexOf("http") != 0)
			{
			alert("Invalid Url. Please start with 'http'");
			objURL.select();
			return (false);
			}
else {return (true);}	
}		


function RTrim(VALUE){
var w_space = String.fromCharCode(32);
var v_length = VALUE.length;
var strTemp = "";
if(v_length < 0){return"";}
var iTemp = v_length -1;

while(iTemp > -1){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(0,iTemp +1);
break;
}
iTemp = iTemp-1;

} //End While
return strTemp;

} //End Function

function LTrim(VALUE){
var w_space = String.fromCharCode(32);
if(v_length < 1){
return"";
}
var v_length = VALUE.length;
var strTemp = "";

var iTemp = 0;

while(iTemp < v_length){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(iTemp,v_length);
break;
}
iTemp = iTemp + 1;
} //End While
return strTemp;
} //End Function