function testNotEmpty(){
for (var i=0; i < myForm.elements.length;i++) {
	var formStr=Trim(myForm.elements[i].value);
	var strLen=formStr.length;
				if( (
					  (myForm.elements[i].type=="text") || 
					  (myForm.elements[i].type=="password") ||
					  (myForm.elements[i].type=="textarea") )&&
					  (strLen==0)
					){// if the length of the selectbox is more than 
							alert('Please fill this field');
							myForm.elements[i].focus();
							return false;
				}//end if
	}//end for
	
return true;
}//end function
							
function testEquals(t1, t2){
	var v1=document.getElementById(t1);
	    vv1=v1.value;
	var v2=document.getElementById(t2);
	    vv2=v2.value;
if(vv1==vv2) return true;
else {
	alert('Password does not match');
	v1.value='';
	v2.value='';
	return false;
	}
}
function Trim(TRIM_VALUE){
if(TRIM_VALUE.length < 1){
return"";
}
TRIM_VALUE = RTrim(TRIM_VALUE);
TRIM_VALUE = LTrim(TRIM_VALUE);
if(TRIM_VALUE==""){
return "";
}
else{
return TRIM_VALUE;
}
} //End Function

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
