function trim(str) { return str.replace(/^\s+|\s+$/g, ""); }
function checkInternationalPhone(strPhone) { var cel = strPhone;var cell = cel.length;if (isNaN(strPhone)==true) {alert("Please Enter Numbers Only.");document.getElementById('txtdestination_no').focus();return false;} if(cell < 10 || cell > 10){ alert("Mobile No. should be 10 digits in length."); document.getElementById('txtdestination_no').focus();	return false; } if(strPhone.indexOf("+91") != -1 && cell > 10) {alert("Please Don't Use +91 at the begining of the mobile No.");document.getElementById('txtdestination_no').focus();return false;}	if((strPhone.slice(0,2)==91 && cell > 10)) {alert("Please Don't Use 91 at the begining of the mobile No.");	document.getElementById('txtdestination_no').focus();return false;}	if(strPhone.indexOf("0") == 0) { alert("Please Don't Use 0 at the begining of the mobile No.");document.getElementById('txtdestination_no').focus(); return false; } return true;
}
function sendmsg_validate() { var objphoneno=document.getElementById('txtdestination_no'); var objmsg=document.getElementById('txtmesg');var objwordveri=document.getElementById('txtcaptcha');var objiaccept=document.getElementById('iaccept');var mobileno=objphoneno.value;var mesg=objmsg.value;var wordveri=objwordveri.value; if(mobileno=="") {alert("Enter Mobile No");objphoneno.focus();return false;} if(mobileno!="") {var mobileno_array=mobileno.split(",");var mobilenolen=mobileno_array.length; if(mobilenolen>100) {alert("Exceeded Max limit of 100 numbers");objphoneno.focus(); return false;}	var inum=0;	for (inum=0; inum < mobileno_array.length; inum++){	phoneno=mobileno_array[inum];phoneno=trim(phoneno);	var ret = checkInternationalPhone(phoneno); if(ret == false) { return false; } } } if(mesg=="") {alert("Enter messege.");objmsg.focus();return false;}	if(wordveri=="") {alert("Enter characters.");objwordveri.focus();return false;}	if(objiaccept.checked!=true) {alert("Accept Terms of Service");objiaccept.focus();return false;} 
/***** Track Page when successful *****/
if(selLang == "ENG") {
	urchinTracker('/sms/smsEngHp.php');
} else if(selLang != "" && selLang != "ENG") {
	urchinTracker('/sms/smsLangHp.php');
}
/***** Track Page when successful *****/
return true; }
