function setWidth() {
	var screenWidth=screen.width;
	if(screenWidth>=1024) {
		document.getElementById('body').style.width='1000px';
	}
	else {
		document.getElementById('body').style.width='770px';
	}	
}

var xmlHttp

function dynshowHint(str,sitename,geturl,element_name) {
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request");
		return;
	}
	
	document.getElementById(element_name).innerHTML="<b>Please Wait....</b>";
	
	var url=sitename+geturl;
	url=url+"&q="+str;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=
	function dynstateChanged() {
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
			document.getElementById(element_name).innerHTML=xmlHttp.responseText;
		} 
	};
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null)
}

function GetXmlHttpObject() { 
	var objXMLHttp=null;
	if (window.XMLHttpRequest) {
		objXMLHttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	return (objXMLHttp);
} 
// <<< set val >>
function setval(val){
	window.status=val;
	window.defaultStatus=val;
}

function frmshow(val){
	window.document.frmsrch.wcnt.value=val;
	window.document.frmsrch.submit();
}

// <<<< Pop Up Open Win >>>>>
var pop='';
function openwin(nm,width,height) {

	var name=nm;
	var NewWIN1='';

		if (pop && !pop.closed) {
		pop.close();
    }
    pop=eval("window.open('"+name+"','NewWIN1','chrome[4],top=5,left=5,toolbar=no,width="+width+",height="+height+",directories=no,menubar=no,SCROLLBARS=yes')");
    if (!pop.opener) popUpWin.opener = self;
}

var opened=false;
var win;
function openWin1(nm1,nm,wd,ht){
	if(opened == false){
		win = open(nm1,nm,"status=0,scrollbars=1,menubar=0,toolbar=0,location=0,resizeable=0,width="+wd+",height="+ht);
	}
	else if(opened == true){
		if(win.closed == false) {
			win.close();
		}
		win = window.open(nm1,nm,"status=0,scrollbars=1,menubar=0,toolbar=0,location=0,resizeable=0,width="+wd+",height="+ht);
	}
	opened = true;
}

// <<<<< Check Username + Pwd + selected profiles before sending PMS from basket, stand query page>>>>>

function pms_chk(spl_val) {
	len=document.formn.elements.length;
   	var i=0;
   	var ii=0;
   	var iii='start';
   	for (i=0; i<len; i++) {
	   	if (document.formn.elements[i].type == "checkbox") {
			if (iii=='start') {
				iii=i;
			}
			if (document.formn.elements[i].checked) {
	        	ii=ii+1;
        	}
	 	}
   	}
   	if (ii==0) {
	 	alert('Please select the profiles');
	 	document.formn.elements[iii].focus();
		return false;
   	}
	if (spl_val=="free") {

		if (document.formn.to_em.value.length <= 0) {
			alert('Please Enter your E-mail address');
			document.formn.to_em.focus();
			return false;
		}
		if (document.formn.to_em.value.indexOf('@') == -1) {
			alert('Error in E-mail address');
			document.formn.to_em.focus();
			return false;
		}
		if (document.formn.to_em.value.indexOf('.') == -1) {
			alert('Error in E-mail address');
			document.formn.to_em.focus();
			return false;
		}
		if (document.formn.to_pass.value.length <= 0) {
			alert('Please Enter your Password');
			document.formn.to_pass.focus();
			return false;
		}
	}
	if (document.formn.to_desc.value.length <= 0) {
		alert('Please Enter your Details');
		document.formn.to_desc.focus();
		return false;
	}
}







var pop = '';
function livewin(nm,width,height) {
	
	var name=nm;
	
	if (pop && !pop.closed) {
		
		pop.close();
	}
	
	pop=eval("window.open('"+name+"','NewWIN','chrome[4],toolbar=no,left=10,top=5,width="+width+",height="+height+",directories=no,menubar=no,SCROLLBARS=yes')");
	if (!pop.opener) popUpWin.opener = self;
}

function obtainvalue(val) {
	
	var vak;
	
	var radios = document.getElementsByName(val);
	
	for(var i=0;i<radios.length;i++) {
		
		if(radios[i].checked) {
			
			vak = radios[i];
			break;
		}
	}
	
	return vak;
}


function chk_email_pwd() {
	if (!document.formn.user1.value.length) {
		alert("Please enter your E-Mail");
		document.formn.user1.focus();
		return false;
	}
	if (document.formn.user1.value.indexOf('@') == -1) {
		alert("Error in E-Mail address");
		document.formn.user1.focus();
		return false;
	}
	if (document.formn.user1.value.indexOf('.') == -1) {
		alert("Error in E-Mail address");
		document.formn.user1.focus();
		return false;
	}
	if (!document.formn.pwd.value.length) {
		alert("Please enter your Password");
		document.formn.pwd.focus();
		return false;
	}

}

// <<<<<<<<< Sorting >>>>>>> //

function sort_criteria () {
   if (document.frs.arrange.options[document.frs.arrange.selectedIndex].value == "") {
	  alert("Please Select a Sort Criteria");
	  document.frs.arrange.focus();
	  return false;
   }
}



// << chk the registration form (update + new)









function sms_chk_email() {
	if (document.formn2.to_em.value.length <= 0) {
		alert('Please Enter your E-mail address');
		document.formn2.to_em.focus();
		return false;
	}
	if (document.formn2.to_em.value.indexOf('@') == -1) {
		alert('Error in E-mail address');
		document.formn2.to_em.focus();
		return false;
	}
	if (document.formn2.to_em.value.indexOf('.') == -1) {
		alert('Error in E-mail address');
		document.formn2.to_em.focus();
		return false;
	}
	if (document.formn2.to_pass.value.length <= 0) {
		alert('Please Enter your Password');
		document.formn2.to_pass.focus();
		return false;
	}
}



// ============= used in ccard.php ================

function orderChk2(id1) {

	if(document.form1.payment_for.value=="blank") {
		alert("Invalid Selection !!");
		document.form1.payment_for.focus();
		return false;
	}

	if(document.form1.payment_for.value=="icc") {
		alert("Please Select Your Paid Membership Plan From => Paid Membership Section");
		document.form1.payment_for.focus();
		return false;
	}

	if(document.form1.payment_for.value=="pre") {
		alert("Please Select Your Premium Display Plan From => Premium Display Section");
		document.form1.payment_for.focus();
		return false;
	}

	if(document.form1.payment_for.value=="bld") {
		alert("Please Select Your Bold Listing Plan From => Bold Listing Section");
		document.form1.payment_for.focus();
		return false;
	}

	if(document.form1.payment_for.value=="oth") {
		alert("Please Select Any Other Payment Option From => Other Payments Section");
		document.form1.payment_for.focus();
		return false;
	}

	if(document.form1.payment_for.value=="othPay") {
		if (document.form1.curr_type.options[document.form1.curr_type.selectedIndex].value == "") {
			alert("Please Specify The Currency Type");
			document.form1.curr_type.focus();
			return false;
		}
		if(document.form1.oth_amt.value==0) {
			alert("Please Specify The Amount");
			document.form1.oth_amt.focus();
			return false;
		}
	}

    if (document.form1.your_name.value==0) {
	   alert("Please Specify Your Name.");
	   document.form1.your_name.focus();
	   return false;
	}

	if (document.form1.address.value==0) {
	   alert("Please Specify Your Address");
	   document.form1.address.focus();
	   return false;
	}

	if (document.form1.postal_code.value==0) {
		alert("Please Specify The Zip / Postal Code");
		document.form1.postal_code.focus();
		return false;
	}
	else {
		if (isNaN(document.form1.postal_code.value)) {
	   		alert(" Zip / Postal Code Can Be Numeric Only");
	   		document.form1.postal_code.focus();
	   		return false;
		}
	}

	if (document.form1.ph_ccode.value==0) {
		alert("Please Specify The Country Code");
		document.form1.ph_ccode.focus();
		return false;
	}
	else {
		if (isNaN(document.form1.ph_ccode.value)) {
			alert("Country Code Can Be Only Numeric");
			document.form1.ph_ccode.focus();
			return false;
		}
	}

	if (document.form1.ph_acode.value==0) {
		alert("Please Specify The City Code");
		document.form1.ph_acode.focus();
		return false;
	}
	else {
		if (isNaN(document.form1.ph_acode.value)) {
			alert("City Code Can Be Only Numeric");
			document.form1.ph_acode.focus();
			return false;
		}
	}

	if (document.form1.ph_number.value==0) {
		alert("Please Specify Your Phone number");
		document.form1.ph_number.focus();
		return false;
	}
	else {
		if (isNaN(document.form1.ph_number.value)) {
			alert("Phone Number Can Be Only Numeric");
			document.form1.ph_number.focus();
			return false;
		}
	}

	if (!document.form1.username.value.length) {
		alert ("Please Specify Your Email Address");
		document.form1.username.focus();
		return false;
	}

	if (document.form1.username.value.indexOf('@') == -1) {
		alert("Error in Email Address");
		document.form1.username.focus();
		return false;
	}

	if (document.form1.username.value.indexOf('.') == -1) {
		alert("Error in Email Address");
		document.form1.username.focus();
		return false;
	}

	if (document.form1.username.value.indexOf('@') != document.form1.username.value.lastIndexOf('@')) {
		alert("Please Specify One Email Address Only");
		document.form1.username.focus();
		return false;
	}
	if (!document.form1.pymt_mode[0].checked && !document.form1.pymt_mode[1].checked && !document.form1.pymt_mode[2].checked && !document.form1.pymt_mode[3].checked && !document.form1.pymt_mode[4].checked && !document.form1.pymt_mode[5].checked && !document.form1.pymt_mode[6].checked && !document.form1.pymt_mode[7].checked && !document.form1.pymt_mode[8].checked && !document.form1.pymt_mode[9].checked && !document.form1.pymt_mode[10].checked && !document.form1.pymt_mode[11].checked) {
		document.form1.pymt_mode[0].focus();
		alert("Please Check Your Mode Of Payment");
		return false;
	}

}

// photo chk 4 upload

function photo_chk() {
	if (!document.f1.photo.value.length) {
		alert("Please select the photo you wish to upload");
		document.f1.photo.focus();
		return false;
	}
}

// photo chk 4 deletion

function photo_chk_del() {
	if (!document.f2.del_photo.checked) {
		alert("Please Check the box to Delete the Photo");
		document.f2.del_photo.focus();
		return false;
	}
}



function perfectmatch() {
	getLocations('y');
}

function addLocation(num) {
	if (num==1) {
		var lidx = document.mat.l_cont.selectedIndex;
		var lval = document.mat.l_cont.options[lidx].value;
		var ltex = document.mat.l_cont.options[lidx].text;
		if (document.mat.l_cont1.options[0].value == "") {
			document.mat.l_cont1.options[0] = null;
		}
		if(document.mat.l_cont1.options.length >= 9) { return false;  }

		for(i=0; i<document.mat.l_cont1.options.length; i++) {
			if (lval == document.mat.l_cont1.options[i].value) {
		    	return false;
		    }
		}
		var sidx = document.mat.l_cont1.options.length;
		document.mat.l_cont1.options[sidx] = new Option(ltex, lval, 0 ,0);
	}
	else if(num==2) {
		var lidx = document.mat.l_state.selectedIndex;
		var lval = document.mat.l_state.options[lidx].value;
		var ltex = document.mat.l_state.options[lidx].text;
		if(document.mat.l_state1.options[0].value == "") {
			document.mat.l_state1.options[0] = null;
		}
		if(document.mat.l_state1.options.length >= 34) { return false;  }

		for(i=0; i<document.mat.l_state1.options.length; i++) {
			if (lval == document.mat.l_state1.options[i].value) {
		    	return false;
		    }
		}
		var sidx = document.mat.l_state1.options.length;
		document.mat.l_state1.options[sidx] = new Option(ltex, lval, 0 ,0);
	}
	else if(num==3) {
		var lidx = document.mat.l_reli.selectedIndex;
		var lval = document.mat.l_reli.options[lidx].value;
		var ltex = document.mat.l_reli.options[lidx].text;
		if(document.mat.l_reli1.options[0].value == "") {
			document.mat.l_reli1.options[0] = null;
		}
		if(document.mat.l_reli1.options.length >= 15) { return false;  }

		for(i=0; i<document.mat.l_reli1.options.length; i++) {
			if (lval == document.mat.l_reli1.options[i].value) {
		    	return false;
		    }
		}
		var sidx = document.mat.l_reli1.options.length;
		document.mat.l_reli1.options[sidx] = new Option(ltex, lval, 0 ,0);
	}
	else if(num==4) {
		var lidx = document.mat.l_tong.selectedIndex;
		var lval = document.mat.l_tong.options[lidx].value;
		var ltex = document.mat.l_tong.options[lidx].text;
		if(document.mat.l_tong1.options[0].value == "") {
			document.mat.l_tong1.options[0] = null;
		}
		if(document.mat.l_tong1.options.length >= 59) { return false;  }

		for(i=0; i<document.mat.l_tong1.options.length; i++) {
			if (lval == document.mat.l_tong1.options[i].value) {
		    	return false;
		    }
		}
		var sidx = document.mat.l_tong1.options.length;
		document.mat.l_tong1.options[sidx] = new Option(ltex, lval, 0 ,0);
	}
	else if(num==5) {
		var lidx = document.mat.l_occu.selectedIndex;
		var lval = document.mat.l_occu.options[lidx].value;
		var ltex = document.mat.l_occu.options[lidx].text;
		if(document.mat.l_occu1.options[0].value == "") {
			document.mat.l_occu1.options[0] = null;
		}
		if(document.mat.l_occu1.options.length >= 22) { return false;  }

		for(i=0; i<document.mat.l_occu1.options.length; i++) {
			if (lval == document.mat.l_occu1.options[i].value) {
		    	return false;
		    }
		}

		var sidx = document.mat.l_occu1.options.length;
		document.mat.l_occu1.options[sidx] = new Option(ltex, lval, 0 ,0);
	}
	else if(num==6) {
		var lidx = document.mat.l_caste.selectedIndex;
		var lval = document.mat.l_caste.options[lidx].value;
		var ltex = document.mat.l_caste.options[lidx].text;
		if(document.mat.l_caste1.options[0].value == "") {
			document.mat.l_caste1.options[0] = null;
		}
		if(document.mat.l_caste1.options.length >= 225) { return false;  }

		for(i=0; i<document.mat.l_caste1.options.length; i++) {
		    if (lval == document.mat.l_caste1.options[i].value) {
				return false;
			}
		}
		var sidx = document.mat.l_caste1.options.length;
		document.mat.l_caste1.options[sidx] = new Option(ltex, lval, 0 ,0);
	}
}

function remLocation(num) {
	if (num==1) {
		var sidx  = document.mat.l_cont1.selectedIndex;
		document.mat.l_cont1.options[sidx] = null;
		if (document.mat.l_cont1.options.length == 0) {
			document.mat.l_cont1.options[0] = new Option("   Selections List", "", 0 ,0);
		}
	}
	else if(num==2){
		var sidx  = document.mat.l_state1.selectedIndex;
		document.mat.l_state1.options[sidx] = null;
		if (document.mat.l_state1.options.length == 0) {
			document.mat.l_state1.options[0] = new Option("   Selections List", "", 0 ,0);
		}
	}
	else if(num==3){
		var sidx  = document.mat.l_reli1.selectedIndex;
		document.mat.l_reli1.options[sidx] = null;
		if (document.mat.l_reli1.options.length == 0) {
			document.mat.l_reli1.options[0] = new Option("   Selections List", "", 0 ,0);
		}
	}
	else if(num==4){
		var sidx  = document.mat.l_tong1.selectedIndex;
		document.mat.l_tong1.options[sidx] = null;
		if (document.mat.l_tong1.options.length == 0) {
			document.mat.l_tong1.options[0] = new Option("   Selections List", "", 0 ,0);
		}
	}
	else if(num==5){
		var sidx  = document.mat.l_occu1.selectedIndex;
		document.mat.l_occu1.options[sidx] = null;
		if (document.mat.l_occu1.options.length == 0) {
			document.mat.l_occu1.options[0] = new Option("   Selections List", "", 0 ,0);
		}
	}
	else if(num==6){
		var sidx  = document.mat.l_caste1.selectedIndex;
		document.mat.l_caste1.options[sidx] = null;
		if (document.mat.l_caste1.options.length == 0) {
			document.mat.l_caste1.options[0] = new Option("   Selections List", "", 0 ,0);
		}
	}
}

function loadLocation(num) {
	if(num==1) {
		if(document.mat.l_cont1.options.length > 1) {
			document.mat.l_cont1.options[0] = null;
		}
	 }
	 else if(num==2){
		if(document.mat.l_state1.options.length > 1) {
			document.mat.l_state1.options[0] = null;
		}
	 }
	 else if(num==3){
		 if(document.mat.l_reli1.options.length > 1) {
		 	document.mat.l_reli1.options[0] = null;
		 }
	 }
	 else if(num==4) {
		if(document.mat.l_tong1.options.length > 1) {
			document.mat.l_tong1.options[0] = null;
		}
	 }
	 else if(num==5) {
		if(document.mat.l_occu1.options.length > 1) {
			document.mat.l_occu1.options[0] = null;
		}
	 }
	 else if(num==6) {
		if(document.mat.l_caste1.options.length > 1) {
			document.mat.l_caste1.options[0] = null;
		}
	 }
}

function getLocations(opt) {
	if (opt=="y") {
		var loclist = '';
		for(i=0; i<document.mat.l_occu1.options.length; i++) {
			loclist += document.mat.l_occu1.options[i].value + "^";
		}
		document.mat.l_occu2.value = loclist;

		var loclist = '';
		for(i=0; i<document.mat.l_caste1.options.length; i++) {
			loclist += document.mat.l_caste1.options[i].value + "^";
		}
		document.mat.l_caste2.value = loclist;

	}

	else {
		var loclist = '';
		for(i=0; i<document.mat.l_cont1.options.length; i++) {
			loclist += document.mat.l_cont1.options[i].value + "^";
		}
		document.mat.l_cont2.value = loclist;

		var loclist = '';
		for(i=0; i<document.mat.l_state1.options.length; i++) {
			loclist += document.mat.l_state1.options[i].value + "^";
		}
		document.mat.l_state2.value = loclist;

		var loclist = '';
		for(i=0; i<document.mat.l_reli1.options.length; i++) {
			loclist += document.mat.l_reli1.options[i].value + "^";
		}
		document.mat.l_reli2.value = loclist;

		var loclist = '';
		for(i=0; i<document.mat.l_tong1.options.length; i++) {
			loclist += document.mat.l_tong1.options[i].value + "^";
		}
		document.mat.l_tong2.value = loclist;

		var loclist = '';
		for(i=0; i<document.mat.l_occu1.options.length; i++) {
			loclist += document.mat.l_occu1.options[i].value + "^";
		}
		document.mat.l_occu2.value = loclist;

		var loclist = '';
		for(i=0; i<document.mat.l_caste1.options.length; i++) {
			loclist += document.mat.l_caste1.options[i].value + "^";
		}
		document.mat.l_caste2.value = loclist;
	}
}




// Turning on / off any as per other selections //
function F_Selected(obj) {

	var docF=document.mat;
	if(obj.checked) {
		if (obj.name=="l_feature_0") {
			docF.l_feature_1.checked=false;
			docF.l_feature_2.checked=false;
			docF.l_feature_3.checked=false;
			docF.l_feature_4.checked=false;
		}
		if (obj.name=="l_feature_1" || obj.name=="l_feature_2" || obj.name=="l_feature_3" || obj.name=="l_feature_4") {
			docF.l_feature_0.checked=false;
		}
	}
}
function C_Selected(obj) {

	var docF=document.mat;
	if(obj.checked) {
		if (obj.name=="l_complexion_0") {
			docF.l_complexion_1.checked=false;
			docF.l_complexion_2.checked=false;
			docF.l_complexion_3.checked=false;
		}
		if (obj.name=="l_complexion_1" || obj.name=="l_complexion_2" || obj.name=="l_complexion_3") {
			docF.l_complexion_0.checked=false;
		}
	}
}
function B_Selected(obj) {

	var docF=document.mat;
	if(obj.checked) {
		if (obj.name=="l_built_0") {
			docF.l_built_1.checked=false;
			docF.l_built_2.checked=false;
			docF.l_built_3.checked=false;
			docF.l_built_4.checked=false;
			docF.l_built_5.checked=false;
			docF.l_built_6.checked=false;
		}
		if (obj.name=="l_built_1" || obj.name=="l_built_2" || obj.name=="l_built_3" || obj.name=="l_built_4" || obj.name=="l_built_5" || obj.name=="l_built_6") {
			docF.l_built_0.checked=false;
		}
	}
}
function M_Selected(obj) {

	var docF=document.mat;
	if(obj.checked) {
		if (obj.name=="l_mstatus_0") {
			docF.l_mstatus_1.checked=false;
			docF.l_mstatus_2.checked=false;
			docF.l_mstatus_3.checked=false;
		}
		if (obj.name=="l_mstatus_1" || obj.name=="l_mstatus_2" || obj.name=="l_mstatus_3") {
			docF.l_mstatus_0.checked=false;
		}
	}
}
function MM_Selected(obj) {

	var docF=document.mat;
	if(obj.checked) {
		if (obj.name=="l_mstatus_0") {
			docF.l_mstatus_1.checked=false;
			docF.l_mstatus_2.checked=false;
			docF.l_mstatus_3.checked=false;
			docF.l_mstatus_4.checked=false;
		}
		if (obj.name=="l_mstatus_1" || obj.name=="l_mstatus_2" || obj.name=="l_mstatus_3" || obj.name=="l_mstatus_4") {
			docF.l_mstatus_0.checked=false;
		}
	}
}


function chkListKeyword1(selcont,selrel,upd_sts)  {
	getLoc('l_reli1[]','l_reli2');
	if (selrel=="Hindu" || selrel=="Sikh" || selrel=="Jain" || selrel=="Christian" || selrel=="Muslim") {
		getLoc('l_caste1[]','l_caste2');
	}
	getLoc('l_tong1[]','l_tong2');
	getLoc('l_occu1[]','l_occu2');
	getLoc('l_cont1[]','l_cont2');
	getLoc('l_state1[]','l_state2');
	getLoc('l_citizenship1[]','l_citizenship2');
	getLoc('l_spcases1[]','l_spcases2');
	
	if (!document.mat.posted_for[0].checked && !document.mat.posted_for[1].checked && !document.mat.posted_for[2].checked && !document.mat.posted_for[3].checked && !document.mat.posted_for[4].checked) {
		alert("Please select the Posted For field");
		document.mat.posted_for[0].focus();
		return false;
	}

	if (upd_sts!="Y") {
		if (!document.mat.gender[0].checked && !document.mat.gender[1].checked) {
			alert("Please select the Gender field");
			document.mat.gender[0].focus();
			return false;
		}

		if (document.mat.gender[0].checked==true) {
			form_11=document.mat.gender[0].value;
		}
		else {
			form_11=document.mat.gender[1].value;
		}
	}
	else {
		form_11=document.mat.gender.value;
	}

	if (document.mat.cname.value==0) {
		alert("Please select the First Name field");
		document.mat.cname.focus();
		return false;
	}

	if (document.mat.lname.value==0) {
		alert("Please select the Last Name field");
		document.mat.lname.focus();
		return false;
	}

	
	if (upd_sts!="Y") {
		form_2  = document.mat.day.selectedIndex;
		form_22 = document.mat.day.options[form_2].value;
		dy = document.mat.day.options[form_2].value;
		if (form_22 == "x") {
			alert("Please select the Day field");
			document.mat.day.focus();
			return false;
		}
		form_222  = document.mat.month.selectedIndex;
		form_2222 = document.mat.month.options[form_222].value;
		mn = document.mat.month.options[form_222].value;
		if (form_2222 == "x") {
			alert("Please select the Month field");
			document.mat.month.focus();
			return false;
		}

		form_2222  = document.mat.year.selectedIndex;
		form_22222 = document.mat.year.options[form_2222].value;
		yr = document.mat.year.options[form_2222].value;
		if (form_22222 == "x") {
			alert("Please select the Year field");
			document.mat.year.focus();
			return false;
		}

		if ((form_222 ==4)||(form_222 ==6)||(form_222 ==9)||(form_222 ==11)) {
			if (form_22 > 30) {
				alert ("The date selected is not valid");
				document.mat.day.focus();
				return false;
			}
		}

		if (form_222 ==2) {
			if ((form_22222 % 4 == 0 && form_22222 % 100 != 0) || (form_22222 % 400 == 0)) {
				if (form_22 > 29) {
					alert ("The date selected is not valid. It should be less than 30");
					document.mat.day.focus();
					return false;
				}
			}
			else {
				if (form_22 > 28) {
					alert ("The date selected is not valid. It should be less than 29");
					document.mat.day.focus();
					return false;
				}
			}
		}
		curyr=document.mat.curyr.value;
		curmn=document.mat.curmn.value;
		curdy=document.mat.curdy.value;

		if (selcont=="India") {
			if (form_11 =="Female") {
				acc_age=18;
			}
			else {
				acc_age=21;
			}
			if(mn<10) {
				mn=mn.substring(1,2);
			}
			jmn=mn;
			jmn=parseInt(jmn);

			if (curyr-yr<acc_age) {
				alert("Error In Date of Birth!! Acceptable Age is "+acc_age+" yrs or above");
				document.mat.year.focus();
				return false;
			}
			else if (curyr-yr==acc_age) {
				if (curmn<jmn) {
					alert("Error In Date of Birth!! Acceptable Age is "+acc_age+" yrs or above");
					document.mat.year.focus();
					return false;
				}
				else if (curmn==jmn) {
					if (curdy < dy) {
						alert("Error In Date of Birth!! Acceptable Age is "+acc_age+" yrs or above");
						document.mat.year.focus();
						return false;
					}
				}
			}
		}
		else {
			acc_age=18;
			if(mn<10) {
				mn=mn.substring(1,2);
			}
			jmn=mn;
			jmn=parseInt(jmn);

			if (curyr-yr<acc_age) {
				alert("Error In Date of Birth!! Acceptable Age is "+acc_age+" yrs or above");
				document.mat.year.focus();
				return false;
			}
			else if (curyr-yr==acc_age) {
				if (curmn<jmn) {
					alert("Error In Date of Birth!! Acceptable Age is "+acc_age+" yrs or above");
					document.mat.year.focus();
					return false;
				}
				else if (curmn==jmn) {
					if (curdy < dy) {
						alert("Error In Date of Birth!! Acceptable Age is "+acc_age+" yrs or above");
						document.mat.year.focus();
						return false;
					}
				}
			}
		}
	}
	if (selrel == "Muslim") {
		if (!document.mat.marital_status[0].checked && !document.mat.marital_status[1].checked && !document.mat.marital_status[2].checked && !document.mat.marital_status[3].checked) {
			alert("Please Select the Marital Status");
			document.mat.marital_status[0].focus();
			return false;
		}
	}
	else {
		if (!document.mat.marital_status[0].checked && !document.mat.marital_status[1].checked && !document.mat.marital_status[2].checked) {
			alert("Please Select the Marital Status");
			document.mat.marital_status[0].focus();
			return false;
		}
	}
	
	/*
	if (document.mat.ptitle.value == 0) {
		alert("Please Enter the Profile Title");
		document.mat.ptitle.focus();
		return false;
	}
	*/

	if (selcont == "India") {
		form_3  = document.mat.state.selectedIndex;
		form_33 = document.mat.state.options[form_3].value;

		if (form_33 == "x") {
			alert("Please select the State field");
			document.mat.state.focus();
			return false;
		}
		/*
		if (form_33 == "Not Applicable") {
			alert ("State cannot be Not Applicable if Country is India");
			document.mat.state.focus();
			return false;
		}
		*/

		form_4  = document.mat.city.selectedIndex;
		form_44 = document.mat.city.options[form_4].value;
		if (form_44 == 'x') {
			alert("Please select the City field");
			document.mat.city.focus();
			return false;
		}
		if (form_44 == "Others") {
			if (document.mat.oth_city.value==0) {
				alert("Please enter your City");
				document.mat.oth_city.focus();
				return false;
			}
		}
		/*
		else {
			if (document.mat.oth_city.value.length>0) {
				alert("Do not fill anything in the City (If Other) field");
				document.mat.oth_city.focus();
				return false;
			}
		}
		*/
	}
	else {
		if (document.mat.oth_city.value==0) {
			alert("Please enter your City");
			document.mat.oth_city.focus();
			return false;
		}
	}

	if (!document.mat.citizenship[0].checked && !document.mat.citizenship[1].checked && !document.mat.citizenship[2].checked) {
		alert("Please select Citizenship field");
		document.mat.citizenship[0].focus();
		return false;
	}

	/*
	if ((document.mat.immigration_status.options[document.mat.immigration_status.selectedIndex].value) == "x") {
		alert("Please select Immigration Status field");
   		document.mat.immigration_status.focus();
   		return false;
	}
	*/

	if ((document.mat.living_situation.options[document.mat.living_situation.selectedIndex].value) == "x") {
		alert("Please select Living Situation field");
   		document.mat.living_situation.focus();
   		return false;
	}

	if ((document.mat.house_ownership.options[document.mat.house_ownership.selectedIndex].value) == "x") {
  	alert("Please select House Ownership field");
   	document.mat.house_ownership.focus();
   	return false;
	}

	/*
	if (selrel == "Other Religion") {
		if (!document.mat.oth_religion.value.length) {
			alert("Do not leave the Specific Religion field blank");
			document.mat.oth_religion.focus();
			return false;
		}
	}
	*/

	if (selrel == "Muslim" || selrel == "Hindu" || selrel == "Christian" || selrel == "Jain" || selrel == "Sikh") {
		if (selrel == "Muslim") {
			form_81  = document.mat.caste.selectedIndex;
			form_881 = document.mat.caste.options[form_81].value;
			if (form_881 == "x") {
				alert("Please select the Mazhab field");
				document.mat.caste.focus();
				return false;
			}
		}
		else {
			form_81  = document.mat.caste.selectedIndex;
			form_881 = document.mat.caste.options[form_81].value;
			if (form_881 == "x") {
				alert("Please select the Caste field");
				document.mat.caste.focus();
				return false;
			}
		}
	}

	form_8  = document.mat.mother_tongue.selectedIndex;
	form_88 = document.mat.mother_tongue.options[form_8].value;
	if (form_88 == "x") {
		alert("Please select the Mother Tongue field");
		document.mat.mother_tongue.focus();
		return false;
	}
	
	/*
	if (selrel=="Hindu" || selrel=="Sikh" || selrel=="Jain" || selrel=="Buddhist") {
		if (document.mat.hour.options[document.mat.hour.selectedIndex].value != "x" && document.mat.minute.options[document.mat.minute.selectedIndex].value == "x") {
			alert("Please Select Minutes");
			document.mat.minute.focus();
			return false;
		}
		if (document.mat.hour.options[document.mat.hour.selectedIndex].value != "x" && document.mat.minute.options[document.mat.minute.selectedIndex].value != "x" && document.mat.ampm.options[document.mat.ampm.selectedIndex].value == "x") {
			alert("Please Select AM or PM");
			document.mat.ampm.focus();
			return false;
		}
		if (document.mat.horo.value!=0) {
			if ((document.mat.horo.value.lastIndexOf('.jpg')==-1) && (document.mat.horo.value.lastIndexOf('.gif')==-1) && (document.mat.horo.value.lastIndexOf('.bmp')==-1) && (document.mat.horo.value.lastIndexOf('.png')==-1)) {
				alert('Please Upload Only .JPG Or .GIF File in Horoscope Field');
				document.mat.horo.focus();
				return false;
			}
		}
	}
	*/
	
	form_101 = document.mat.education.selectedIndex;
	form_121 = document.mat.education.options[form_101].value;
	if (form_121 == "x") {
  	alert("Please select the Education field");
   	document.mat.education.focus();
   	return false;
	}
	/*
	else if (form_121 == "Others") {
		if (document.mat.oth_education.value==0) {
			alert("Education (If Other) cannot be left blank");
			document.mat.oth_education.focus();
			return false;
		}
	}
	else {
		if (document.mat.oth_education.value.length > 0) {
			alert("Do not fill anything in the Education (If Other) field");
			document.mat.oth_education.focus();
			return false;
		}
	}
	*/

	form_11  = document.mat.occupation.selectedIndex;
	form_111 = document.mat.occupation.options[form_11].value;
	if (form_111 == "x") {
		alert("Please select the Occupation field");
		document.mat.occupation.focus();
		return false;
	}
	
	if (document.mat.occupation.options[document.mat.occupation.selectedIndex].value == "x") {
		alert("Please select the Occupation field");
		document.mat.occupation.focus();
		return false;
	}
	
	/*
	else if (form_111 == "Others") {
		if (document.mat.oth_occupation.value==0) {
			alert("Occupation (If Other) cannot be left blank");
			document.mat.oth_occupation.focus();
			return false;
		}
	}
	else {
		if (document.mat.oth_occupation.value.length > 0) {
			alert("Do not fill anything in the Occupation (If Other) field");
			document.mat.oth_occupation.focus();
			return false;
		}
	}
	*/

	form_12  = document.mat.income.selectedIndex;
	form_122 = document.mat.income.options[form_12].value;
	if (form_122 == "x") {
		alert("Please select the Monthly Income field");
   	document.mat.income.focus();
   	return false;
	}

	form_12  = document.mat.income.selectedIndex;
	form_122 = document.mat.income.options[form_12].value;
	if (form_122 == "x") {
		alert("Please select the Monthly Income field");
		document.mat.income.focus();
		return false;
	}

	if ((form_122==0) && (form_111 != "Student") && (form_111 != "Non-Working")) {
		alert("Income can't be selected as Nil for the Selected Occupation");
		document.mat.income.focus();
		return false;
	}
	if ((form_122 != 0) && ((form_111=="Student") || (form_111=="Non-Working"))) {
		alert("Income has to be selected as Nil for the Selected Occupation");
		document.mat.income.focus();
		return false;
	}

	if (!document.mat.features[0].checked && !document.mat.features[1].checked && !document.mat.features[2].checked && !document.mat.features[3].checked && !document.mat.features[4].checked) {
		alert("Please select the Features field");
		document.mat.features[0].focus();
		return false;
	}

	if (!document.mat.complexion[0].checked && !document.mat.complexion[1].checked && !document.mat.complexion[2].checked && !document.mat.complexion[3].checked) {
		alert("Please select the Complexion field");
		document.mat.complexion[0].focus();
		return false;
	}

	if (!document.mat.built[0].checked && !document.mat.built[1].checked && !document.mat.built[2].checked && !document.mat.built[3].checked && !document.mat.built[4].checked && !document.mat.built[5].checked && !document.mat.built[6].checked) {
		alert("Please select the Built field");
		document.mat.built[0].focus();
		return false;
	}

	form_13  = document.mat.height.selectedIndex;
	form_133 = document.mat.height.options[form_13].value;
	if (form_133 == "x") {
		alert("Please select the Height field");
		document.mat.height.focus();
		return false;
	}
	if (document.mat.weight.value == 0) {
		alert("Do not leave the Weight field blank");
		document.mat.weight.focus();
		return false;
	}
	
	if (document.mat.weight.value < 30) {
		alert("This seems to be a wrong value. Please enter the correct value");
		document.mat.weight.focus();
		return false;
	}

	if (isNaN(document.mat.weight.value)) {
		alert("Weight must be Numeric only");
   	document.mat.weight.focus();
   	return false;
	}

	/*
	if (document.mat.spcases.options[document.mat.spcases.selectedIndex].value == "x") {
		alert("Please select Special Cases field");
	  document.mat.spcases.focus();
	  return false;
	}	
	
	if (document.mat.blood_group.options[document.mat.blood_group.selectedIndex].value == "x") {
		alert("Please select your blood group");
	  document.mat.blood_group.focus();
	  return false;
	}	

	if ((document.mat.vehicle_ownership.options[document.mat.vehicle_ownership.selectedIndex].value) == "x") {
		alert("Please select Vehicle Ownership field");
		document.mat.vehicle_ownership.focus();
		return false;
	}
	*/

	if (document.mat.about_self.value== 0) {
		alert("Please specify details about yourself. This field can not be left blank.");
		document.mat.ch_len.value=0;
		document.mat.about_self.focus();
		return false;
	}
	
	if (document.mat.about_self.value.length >= 750) {
		alert("Details about yourself cannot exceed 750 characters");
		document.mat.about_self.focus();
		return false;
	}
	
	if (document.mat.photo.value!=0) {
		if ((document.mat.photo.value.lastIndexOf('.jpg')==-1) && (document.mat.photo.value.lastIndexOf('.gif')==-1) && (document.mat.photo.value.lastIndexOf('.bmp')==-1) && (document.mat.photo.value.lastIndexOf('.png')==-1)) {
			alert('Please Upload Only .JPG Or .GIF File in Photograph Field');
			document.mat.photo.focus();
			return false;
		}
	}
	
	if ((document.mat.l_dob1.options[document.mat.l_dob1.selectedIndex].value) == "x") {
		alert("Please select Age [From] field");
   	document.mat.l_dob1.focus();
   	return false;
	}

	if ((document.mat.l_dob2.options[document.mat.l_dob2.selectedIndex].value) == "x") {
		alert("Please select Age [To] field");
   	document.mat.l_dob2.focus();
   	return false;
	}

	if ((document.mat.l_dob2.options[document.mat.l_dob2.selectedIndex].value) < (document.mat.l_dob1.options[document.mat.l_dob1.selectedIndex].value)) {
		alert("Age [To] has to be greater than Age [From]");
   	document.mat.l_dob2.focus();
   	return false;
	}

	if ((document.mat.l_height1.options[document.mat.l_height1.selectedIndex].value) == "x") {
  	alert("Please select Height [From] field");
   	document.mat.l_height1.focus();
   	return false;
	}

	if ((document.mat.l_height2.options[document.mat.l_height2.selectedIndex].value) == "x") {
  	alert("Please select Height [To] field");
   	document.mat.l_height2.focus();
   	return false;
	}

	if ((document.mat.l_height2.options[document.mat.l_height2.selectedIndex].value) < (document.mat.l_height1.options[document.mat.l_height1.selectedIndex].value)) {
		alert("Height [To] has to be greater than Height [From]");
		document.mat.l_height2.focus();
		return false;
	}

	/*
	if ((!document.mat.l_feature_0.checked) && (!document.mat.l_feature_1.checked) && (!document.mat.l_feature_2.checked) && (!document.mat.l_feature_3.checked) && (!document.mat.l_feature_4.checked)) {
	 	alert("Check the Features that you are Looking For");
   	document.mat.l_feature_0.focus();
	  return false;
	}
	if ((!document.mat.l_complexion_0.checked) && (!document.mat.l_complexion_1.checked) && (!document.mat.l_complexion_2.checked) && (!document.mat.l_complexion_3.checked)) {
		alert("Check the Complexion that you are Looking For");
   	document.mat.l_complexion_0.focus();
	  return false;
	}

	if ((!document.mat.l_built_0.checked) && (!document.mat.l_built_1.checked) && (!document.mat.l_built_2.checked) && (!document.mat.l_built_3.checked) && (!document.mat.l_built_4.checked) && (!document.mat.l_built_5.checked) && (!document.mat.l_built_6.checked)) {
  	alert("Check the Built that you are Looking For");
   	document.mat.l_built_0.focus();
   	return false;
	}
	*/

	if (selrel=="Muslim") {
		if ((!document.mat.l_mstatus_0.checked) && (!document.mat.l_mstatus_1.checked) && (!document.mat.l_mstatus_2.checked) && (!document.mat.l_mstatus_3.checked) && (!document.mat.l_mstatus_4.checked)) {
			alert("Check the Martial Status that you are Looking For");
   		document.mat.l_mstatus_0.focus();
   		return false;
		}
	}
	else {
		if ((!document.mat.l_mstatus_0.checked) && (!document.mat.l_mstatus_1.checked) && (!document.mat.l_mstatus_2.checked) && (!document.mat.l_mstatus_3.checked)) {
			alert("Check the Martial Status that you are Looking For");
   		document.mat.l_mstatus_0.focus();
   		return false;
		}
	}
	
	if (document.mat.l_reli2.value=="") {
	 	alert ("Please select atleast one Religion");
		document.mat.addrel.focus();
	 	return false;
	}

	if (selrel == "Muslim") {
		if (document.mat.l_caste2.value=="") {
	 		alert ("Please select atleast one Mazhab");
	 		document.mat.addcaste.focus();
	 		return false;
		}
	}
	else if (selrel == "Hindu" || selrel == "Sikh" || selrel == "Jain" || selrel == "Christian") {
		if (document.mat.l_caste2.value=="") {
	 		alert ("Please select atleast one Caste");
	 		document.mat.addcaste.focus();
	 		return false;
		}
	}

	if (document.mat.l_tong2.value=="") {
		alert ("Please select atleast one Mother Tongue");
	 	document.mat.addtong.focus();
	 	return false;
	}

	if (document.mat.l_occu2.value=="") {
	 	alert ("Please select atleast one Occupation");
	 	document.mat.addocc.focus();
	 	return false;
	}
	if (document.mat.l_cont2.value=="") {
	 	alert ("Please select atleast one Country");
	 	document.mat.addcont.focus();
	 	return false;
	}
	if (document.mat.l_cont2.value.indexOf('India^') != -1) {
		if (document.mat.l_state2.value=="") {
			alert ("Please select a State of your choice");
			document.mat.addstate.focus();
			return false;
		}
	}
	
	if (document.mat.l_citizenship2.value=="") {
	 	alert ("Please select atleast one Citizenship");
	 	document.mat.addczship.focus();
	 	return false;
	}
	
	if (document.mat.l_spcases2.value=="") {
	 	alert ("Please select atleast one Option");
	 	document.mat.addspcases.focus();
	 	return false;
	}
	
	form_1122  = document.mat.l_income.selectedIndex;
	form_11222 = document.mat.l_income.options[form_1122].value;
	if (form_11222 == "x") {
		alert("Please select the MONTHLY INCOME field");
	  document.mat.l_income.focus();
	  return false;
	}

	
  var msg = "\nDo not leave the following fields blank\n";
  var key = "";
}






function chk_login()  {
	if ((!document.place.mode[0].checked) && (!document.place.mode[1].checked) && (!document.place.mode[2].checked) && (!document.place.mode[3].checked) && (!document.place.mode[4].checked) && (!document.place.mode[5].checked) && (!document.place.mode[6].checked) && (!document.place.mode[7].checked) && (!document.place.mode[8].checked) && (!document.place.mode[9].checked) && (!document.place.mode[10].checked) && (!document.place.mode[11].checked) && (!document.place.mode[12].checked) && (!document.place.mode[13].checked) && (!document.place.mode[14].checked) && (!document.place.mode[15].checked) && (!document.place.mode[16].checked) && (!document.place.mode[17].checked) && (!document.place.mode[18].checked)) {
  	document.place.mode[0].focus();
	  alert("Please check Your Mode Of Payment");
 	  return false;
	}

	if (!document.place.terms.checked) {
		alert("Please read the terms of use and check the box to procced");
		document.place.terms.focus();
		return false;
	}
}



function chk2() {
	document.mat.char_len.value=document.mat.family_background.value.length;
	if (document.mat.family_background.value.length>=750) {
  		alert("You can't enter more information. You can't exceed the limit of 750.");
   		document.mat.family_background.focus();
   		return false;
  	}
}

function chk3() {
	document.mat.ch_len.value=document.mat.about_self.value.length;
	if (document.mat.about_self.value.length>=750) {
	 	alert("You can't enter more information. You can't exceed the limit of 750.");
		document.mat.about_self.focus();
	  	return false;
	}
}

function chk_pymt()  {

	if (!document.place.cp.value.length) {
		alert("Contact Person can not be left blank");
		document.place.cp.focus();
		return false;
	}
	if (!document.place.add1.value.length) {
		alert('Postal Address can not be left blank');
		document.place.add1.focus();
		return false;
	}
	if ((!document.place.mode[0].checked) && (!document.place.mode[1].checked) && (!document.place.mode[2].checked) && (!document.place.mode[3].checked) && (!document.place.mode[4].checked) && (!document.place.mode[5].checked) && (!document.place.mode[6].checked) && (!document.place.mode[7].checked) && (!document.place.mode[8].checked) && (!document.place.mode[9].checked) && (!document.place.mode[10].checked) && (!document.place.mode[11].checked) && (!document.place.mode[12].checked) && (!document.place.mode[13].checked) && (!document.place.mode[14].checked) && (!document.place.mode[15].checked) && (!document.place.mode[16].checked) && (!document.place.mode[17].checked) && (!document.place.mode[18].checked)) {
		document.place.mode[0].focus();
		alert("Please check Your Mode Of Payment");
		return false;
	}

	if (!document.place.terms.checked) {
		alert("Please read the terms of use and check the box to procced");
		document.place.terms.focus();
		return false;
	}
}

function bank_chk() {
	if (!document.place.branch.value.length) {
		alert("Bank Branch can not be left blank");
		document.place.branch.focus();
		return false;
	}
	if (!document.place.date.value.length) {
		alert('Enter the date of depositing the amount');
		document.place.date.focus();
		return false;
	}
}

function match_pymt_chk() {
	if (!document.horoscope.name_bride.value.length) {
		alert("Please do not leave the Full Name field blank in Bride Section.");
		document.horoscope.name_bride.focus();
		return false;
	}
	if (document.horoscope.date_bride.options[document.horoscope.date_bride.selectedIndex].value == "x") {
		alert("Please select the Day field in Bride Section");
		document.horoscope.date_bride.focus();
		return false;
	}
	if (document.horoscope.month_bride.options[document.horoscope.month_bride.selectedIndex].value == "x") {
		alert("Please select the Month field in Bride Section");
		document.horoscope.month_bride.focus();
		return false;
	}
	if (document.horoscope.year_bride.options[document.horoscope.year_bride.selectedIndex].value == "x") {
		alert("Please select the Year field in Bride section");
		document.horoscope.year_bride.focus();
		return false;
	}

	if (document.horoscope.cob_bride.options[document.horoscope.cob_bride.selectedIndex].value == "x") {
		alert("Please select the Country of Birth in Bride Section");
		document.horoscope.cob_bride.focus();
		return false;
	}

	if (!document.horoscope.name_groom.value.length) {
		alert("Please do not leave the Name field blank in Groom Section.");
		document.horoscope.name_groom.focus();
		return false;
	}
	if (document.horoscope.date_groom.options[document.horoscope.date_groom.selectedIndex].value == "x") {
		alert("Please select the Day field in Groom Section.");
		document.horoscope.date_groom.focus();
		return false;
	}

	if (document.horoscope.month_groom.options[document.horoscope.month_groom.selectedIndex].value == "x") {
		alert("Please select the Month field in Groom Section.");
		document.horoscope.month_groom.focus();
		return false;
	}

	if (document.horoscope.year_groom.options[document.horoscope.year_groom.selectedIndex].value == "x") {
		alert("Please select the Year field in Groom Section.");
		document.horoscope.year_groom.focus();
		return false;
	}
	if (document.horoscope.cob_groom.options[document.horoscope.cob_groom.selectedIndex].value == "x") {
		alert("Please select the Country of Birth of Groom section.");
		document.horoscope.cob_groom.focus();
		return false;
	}

	if ((!document.horoscope.mode[0].checked) && (!document.horoscope.mode[1].checked) && (!document.horoscope.mode[2].checked) && (!document.horoscope.mode[3].checked) && (!document.horoscope.mode[4].checked) && (!document.horoscope.mode[5].checked) && (!document.horoscope.mode[6].checked) && (!document.horoscope.mode[7].checked) && (!document.horoscope.mode[8].checked) && (!document.horoscope.mode[9].checked) && (!document.horoscope.mode[10].checked) && (!document.horoscope.mode[11].checked) && (!document.horoscope.mode[12].checked) && (!document.horoscope.mode[13].checked) && (!document.horoscope.mode[14].checked) && (!document.horoscope.mode[15].checked) && (!document.horoscope.mode[16].checked) && (!document.horoscope.mode[17].checked) && (!document.horoscope.mode[18].checked)) {
		document.horoscope.mode[0].focus();
		alert("Please Check Your Mode Of Payment");
 	  	return false;
	}

	if (!document.horoscope.terms.checked) {
		document.horoscope.terms.focus();
		alert("Please check the Terms Of Use to proceed");
		return false;
	}
}

function horo_pymt_chk() {
	if (!document.horoscope.name_groom.value.length) {
		alert("Please do not leave the Name field blank.");
		document.horoscope.name_groom.focus();
		return false;
	}
	if (document.horoscope.date_groom.options[document.horoscope.date_groom.selectedIndex].value == "x") {
		alert("Please select the Day field");
		document.horoscope.date_groom.focus();
		return false;
	}
	if (document.horoscope.month_groom.options[document.horoscope.month_groom.selectedIndex].value == "x") {
		alert("Please select the Month field");
		document.horoscope.month_groom.focus();
		return false;
	}
	if (document.horoscope.year_groom.options[document.horoscope.year_groom.selectedIndex].value == "x") {
		alert("Please select the Year field");
		document.horoscope.year_groom.focus();
		return false;
	}
	if (document.horoscope.cob_groom.options[document.horoscope.cob_groom.selectedIndex].value == "x") {
		alert("Please select the Country of Birth");
		document.horoscope.cob_groom.focus();
		return false;
	}
	if ((!document.horoscope.mode[0].checked) && (!document.horoscope.mode[1].checked) && (!document.horoscope.mode[2].checked) && (!document.horoscope.mode[3].checked) && (!document.horoscope.mode[4].checked) && (!document.horoscope.mode[5].checked) && (!document.horoscope.mode[6].checked) && (!document.horoscope.mode[7].checked) && (!document.horoscope.mode[8].checked) && (!document.horoscope.mode[9].checked) && (!document.horoscope.mode[10].checked) && (!document.horoscope.mode[11].checked) && (!document.horoscope.mode[12].checked) && (!document.horoscope.mode[13].checked) && (!document.horoscope.mode[14].checked) && (!document.horoscope.mode[15].checked) && (!document.horoscope.mode[16].checked) && (!document.horoscope.mode[17].checked) && (!document.horoscope.mode[18].checked)) {
    document.horoscope.mode[0].focus();
	  alert("Please check Your Mode Of Payment");
 	  return false;
	}
	if (!document.horoscope.terms.checked) {
		document.horoscope.terms.focus();
		alert("Please check the Terms Of Use to proceed");
		return false;
	}
}

function match_pymt_chk1(mode)  {
	if (!document.place.cp.value.length) {
		alert("Contact Person can not be left blank");
		document.place.cp.focus();
		return false;
	}
	if (!document.place.add1.value.length) {
		alert('Postal Address can not be left blank');
		document.place.add1.focus();
		return false;
	}
	if (mode=="h" || mode=="ic" || mode=="cb" || mode=="ut") {
		if (!document.place.branch.value.length) {
			alert("Bank Branch can not be left blank");
			document.place.branch.focus();
			return false;
		}
		if (!document.place.date.value.length) {
			alert('Enter the date of depositing the amount');
			document.place.date.focus();
			return false;
		}
	}
	var flag=0;
	len=document.formn.elements.length;

}

function chk_banner() {
	if ((!document.banner.mode[0].checked) && (!document.banner.mode[1].checked) && (!document.banner.mode[2].checked) && (!document.banner.mode[3].checked) && (!document.banner.mode[4].checked) && (!document.banner.mode[5].checked) && (!document.banner.mode[6].checked) && (!document.banner.mode[7].checked) && (!document.banner.mode[8].checked) && (!document.banner.mode[9].checked) && (!document.banner.mode[10].checked) && (!document.banner.mode[11].checked) && (!document.banner.mode[12].checked) && (!document.banner.mode[13].checked) && (!document.banner.mode[14].checked) && (!document.banner.mode[15].checked) && (!document.banner.mode[16].checked) && (!document.banner.mode[17].checked) && (!document.banner.mode[18].checked)) {
		document.banner.mode[0].focus();
		alert("Please check Your Mode Of Payment");
		return false;
	}
	if (document.banner.your_nm.value.length<=0) {
		alert("Unable to submit !! Enter Your Name ");
		document.banner.your_nm.focus();
		return false;
	}
	if (document.banner.comp_nm.value.length<=0) {
		alert("Unable to submit !! Enter Company Name ");
		document.banner.comp_nm.focus();
		return false;
	}
	if (document.banner.email.value.indexOf('@') != document.banner.email.value.lastIndexOf('@')) {
		alert("Please specify only 1 email");
		document.banner.email.focus();
		return false;
	}
	if (document.banner.email.value.indexOf('@') == -1) {
		alert("The E-mail you have mentioned is not correct");
		document.banner.email.focus();
		return false;
	}
	if (document.banner.email.value.indexOf('.') == -1) {
		alert("The E-mail you have mentioned is not correct");
		document.banner.email.focus();
		return false;
	}
	if (document.banner.banner_from.value=="folder") {
		if (document.banner.main_catg.options[document.banner.main_catg.selectedIndex].value == "x") {
			alert("Please select a Main Category in which you wish to place your banner")
			document.banner.main_catg.focus();
			return false;
		}
		if (document.banner.recv_from.options[document.banner.recv_from.selectedIndex].value == "x") {
			alert("Please select the pages where you wish to display the banner");
			document.banner.recv_from.focus();
			return false;
		}
	}
	if (((document.banner.ban_nm.value.length>0) && (document.banner.ban_url.value.length>7)) || ((document.banner.ban_nm.value.length>0) && ((document.banner.ban1_nm1.value.length>0) || (document.banner.ban1_nm2.value.length>0))) || ((document.banner.ban_url.value.length>7) && ((document.banner.ban1_nm1.value.length>0) || (document.banner.ban1_nm2.value.length>0))))  {
		alert("Unable to submit !! Select ONLY ONE of the Banner Details Option");
		document.banner.ban_nm.focus();
		return false;
	}
	if ((document.banner.ban_nm.value.length<=0) && (document.banner.ban_url.value.length<=7) && (document.banner.ban1_nm1.value.length<=0)) {
		alert("Unable to submit !! Select one of the Banner Details Option");
		document.banner.ban_nm.focus();
		return false;
	}
	if (document.banner.oth_detl.value.length>1000) {
		alert("Unable to submit !! DESCRIPTION (Field limit upto 1000 characters) ");
		document.banner.oth_detl.focus();
		return false;
	}
	if ((document.banner.ban_link.value.length<=7) && (!document.banner.c1.checked)){
		alert("Enter Banner HyperLink Field or check the box");
		document.banner.ban_link.focus();
		return false;
	}
	if ((document.banner.ban_link.value.length>7) && (document.banner.c1.checked)){
		alert("Either Enter Banner HyperLink Field or check the box");
		document.banner.c1.focus();
		return false;
	}
}

function chk_wwwicon() {
	if ((!document.banner.mode[0].checked) && (!document.banner.mode[1].checked) && (!document.banner.mode[2].checked) && (!document.banner.mode[3].checked) && (!document.banner.mode[4].checked) && (!document.banner.mode[5].checked) && (!document.banner.mode[6].checked) && (!document.banner.mode[7].checked) && (!document.banner.mode[8].checked) && (!document.banner.mode[9].checked) && (!document.banner.mode[10].checked) && (!document.banner.mode[11].checked) && (!document.banner.mode[12].checked) && (!document.banner.mode[13].checked) && (!document.banner.mode[14].checked) && (!document.banner.mode[15].checked) && (!document.banner.mode[16].checked) && (!document.banner.mode[17].checked) && (!document.banner.mode[18].checked)) {
		document.banner.mode[0].focus();
	  alert("Please check Your Mode Of Payment");
 	  return false;
	}
	if (document.banner.your_nm.value.length<=0) {
		alert("Unable to submit !! Enter Your Name ");
		document.banner.your_nm.focus();
		return false;
	}
	if (document.banner.comp_nm.value.length<=0) {
		alert("Unable to submit !! Enter Company Name ");
		document.banner.comp_nm.focus();
		return false;
	}
	if (document.banner.email.value.indexOf('@') != document.banner.email.value.lastIndexOf('@')) {
		alert("Please specify only 1 email");
		document.banner.email.focus();
		return false;
	}
	if (document.banner.email.value.indexOf('@') == -1) {
		alert("The E-mail you have mentioned is not correct");
		document.banner.email.focus();
		return false;
	}
	if (document.banner.email.value.indexOf('.') == -1) {
		alert("The E-mail you have mentioned is not correct");
		document.banner.email.focus();
		return false;
	}
	if ((document.banner.www_link.value.length<=7) && (!document.banner.c1.checked)){
		alert("Enter WWW Icon HyperLink Field or check the box");
		document.banner.www_link.focus();
		return false;
	}
	if ((document.banner.www_link.value.length>7) && (document.banner.c1.checked)){
		alert("Either Enter WWW Icon HyperLink Field or check the box");
		document.banner.c1.focus();
		return false;
	}
	if (document.banner.oth_detl.value.length>1000) {
		alert("Unable to submit !! DESCRIPTION (Field limit upto 1000 characters) ");
		document.banner.oth_detl.focus();
		return false;
	}
}

function login_chk3() {
	if (document.form3.username.value.length == 0) {
		alert("E-mail address can't be left blank");
		document.form3.username.focus();
		return false;
	}
	if (document.form3.username.value.indexOf('@') == -1) {
		alert("Error in e-mail address");
		document.form3.username.focus();
		return false;
	}
	if (document.form3.username.value.indexOf('.') == -1) {
		alert("Error in e-mail address");
		document.form3.username.focus();
		return false;
	}
	if (document.form3.username.value.indexOf('@') != document.form3.username.value.lastIndexOf('@')) {
		alert("Please Specify One E-mail address only");
		document.form3.username.focus();
		return false;
	}
	if (document.form3.pass_word.value.length <= 0) {
		alert("Do not leave the PASSWORD field blank");
		document.form3.pass_word.focus();
		return false;
	}
}

function horo_chk() {
	if (document.horoscope.person_name.value==0) {
		alert("Please do not leave the Name field blank.");
		document.horoscope.person_name.focus();
		return false;
	}
	if (document.horoscope.day.options[document.horoscope.day.selectedIndex].value == "x") {
		alert("Please select the Day field");
		document.horoscope.day.focus();
		return false;
	}
	if (document.horoscope.month.options[document.horoscope.month.selectedIndex].value == "x") {
		alert("Please select the Month field");
		document.horoscope.month.focus();
		return false;
	}
	if (document.horoscope.year.options[document.horoscope.year.selectedIndex].value == "x") {
		alert("Please select the Year field");
		document.horoscope.year.focus();
		return false;
	}
	if (document.horoscope.country.options[document.horoscope.country.selectedIndex].value == "x") {
		alert("Please select the country of birth field");
		document.horoscope.country.focus();
		return false;
	}
	if (document.horoscope.email.value == 0) {
		alert("E-mail address can't be left blank");
		document.horoscope.email.focus();
		return false;
	}
	if (document.horoscope.email.value.indexOf('@') == -1) {
		alert("Error in e-mail address");
		document.horoscope.email.focus();
		return false;
	}
	if (document.horoscope.email.value.indexOf('.') == -1) {
		alert("Error in e-mail address");
		document.horoscope.email.focus();
		return false;
	}
	if (document.horoscope.email.value.indexOf('@') != document.horoscope.email.value.lastIndexOf('@')) {
		alert("Please Specify One E-mail address only");
		document.horoscope.email.focus();
		return false;
	}
	if (document.horoscope.cont_nos.value==0) {
		alert("Please Specify Contact Nos.");
		document.horoscope.cont_nos.focus();
		return false;
	}	
}

function match_chk() {
	if (document.matchmaking.name_groom.value==0) {
		alert("Please do not leave the Name field blank in Groom Section.");
		document.matchmaking.name_groom.focus();
		return false;
	}
	if (document.matchmaking.day_groom.options[document.matchmaking.day_groom.selectedIndex].value == "x") {
		alert("Please select the Day field in Groom Section.");
		document.matchmaking.day_groom.focus();
		return false;
	}

	if (document.matchmaking.month_groom.options[document.matchmaking.month_groom.selectedIndex].value == "x") {
		alert("Please select the Month field in Groom Section.");
		document.matchmaking.month_groom.focus();
		return false;
	}

	if (document.matchmaking.year_groom.options[document.matchmaking.year_groom.selectedIndex].value == "x") {
		alert("Please select the Year field in Groom Section.");
		document.matchmaking.year_groom.focus();
		return false;
	}
	if (document.matchmaking.cob_groom.options[document.matchmaking.cob_groom.selectedIndex].value == "x") {
		alert("Please select the Country of Birth of Groom section.");
		document.matchmaking.cob_groom.focus();
		return false;
	}
	
	if (document.matchmaking.name_bride.value==0) {
		alert("Please do not leave the Full Name field blank in Bride Section.");
		document.matchmaking.name_bride.focus();
		return false;
	}
	if (document.matchmaking.day_bride.options[document.matchmaking.day_bride.selectedIndex].value == "x") {
		alert("Please select the Day field in Bride Section");
		document.matchmaking.day_bride.focus();
		return false;
	}
	if (document.matchmaking.month_bride.options[document.matchmaking.month_bride.selectedIndex].value == "x") {
		alert("Please select the Month field in Bride Section");
		document.matchmaking.month_bride.focus();
		return false;
	}
	if (document.matchmaking.year_bride.options[document.matchmaking.year_bride.selectedIndex].value == "x") {
		alert("Please select the Year field in Bride section");
		document.matchmaking.year_bride.focus();
		return false;
	}

	if (document.matchmaking.cob_bride.options[document.matchmaking.cob_bride.selectedIndex].value == "x") {
		alert("Please select the Country of Birth in Bride Section");
		document.matchmaking.cob_bride.focus();
		return false;
	}
	if (document.matchmaking.email.value == 0) {
		alert("E-mail address can't be left blank");
		document.matchmaking.email.focus();
		return false;
	}
	if (document.matchmaking.email.value.indexOf('@') == -1) {
		alert("Error in e-mail address");
		document.matchmaking.email.focus();
		return false;
	}
	if (document.matchmaking.email.value.indexOf('.') == -1) {
		alert("Error in e-mail address");
		document.matchmaking.email.focus();
		return false;
	}
	if (document.matchmaking.email.value.indexOf('@') != document.matchmaking.email.value.lastIndexOf('@')) {
		alert("Please Specify One E-mail address only");
		document.matchmaking.email.focus();
		return false;
	}
	if (document.matchmaking.cont_nos.value==0) {
		alert("Please Specify Contact Nos.");
		document.matchmaking.cont_nos.focus();
		return false;
	}
}

function horo_mode_chk() {
	if ((!document.horoscope.mode[0].checked) && (!document.horoscope.mode[1].checked) && (!document.horoscope.mode[2].checked) && (!document.horoscope.mode[3].checked) && (!document.horoscope.mode[4].checked) && (!document.horoscope.mode[5].checked) && (!document.horoscope.mode[6].checked) && (!document.horoscope.mode[7].checked) && (!document.horoscope.mode[8].checked) && (!document.horoscope.mode[9].checked) && (!document.horoscope.mode[10].checked) && (!document.horoscope.mode[11].checked) && (!document.horoscope.mode[12].checked) && (!document.horoscope.mode[13].checked) && (!document.horoscope.mode[14].checked) && (!document.horoscope.mode[15].checked) && (!document.horoscope.mode[16].checked) && (!document.horoscope.mode[17].checked) && (!document.horoscope.mode[18].checked)) {
    document.horoscope.mode[0].focus();
	  alert("Please check Your Mode Of Payment");
 	  return false;
	}
	if (!document.horoscope.terms.checked) {
		document.horoscope.terms.focus();
		alert("Please check the Terms Of Use to proceed");
		return false;
	}
}

function match_pymt_chk2(mode)  {
	if (mode=="h" || mode=="ic" || mode=="cb" || mode=="ut") {
		if (!document.place.branch.value.length) {
			alert("Bank Branch can not be left blank");
			document.place.branch.focus();
			return false;
		}
		if (!document.place.date.value.length) {
			alert('Enter the date of depositing the amount');
			document.place.date.focus();
			return false;
		}
	}	
}

function chk_post_order() {
	if (document.mat.user[0].checked) {
		if (document.mat.contact_person.value.length == 0) {
			alert("CONTACT PERSON can't be left blank");
			document.mat.contact_person.focus();
			return false;
		}
		if (document.mat.username.value.length == 0) {
			alert("E-mail address can't be left blank");
			document.mat.username.focus();
			return false;
		}
		if (document.mat.username.value.indexOf('@') == -1) {
			alert("Error in e-mail address");
			document.mat.username.focus();
			return false;
		}
		if (document.mat.username.value.indexOf('.') == -1) {
			alert("Error in e-mail address");
			document.mat.username.focus();
			return false;
		}
		if (document.mat.username.value.indexOf('@') != document.mat.username.value.lastIndexOf('@')) {
			alert("Please Specify One E-mail address only");
			document.mat.username.focus();
			return false;
		}
		/*
		if (document.mat.altemail.value.length!=0) {
			if (document.mat.altemail.value.indexOf('@') == -1) {
				alert("Error in Alternate e-mail address");
				document.mat.altemail.focus();
				return false;
			}
			if (document.mat.altemail.value.indexOf('.') == -1) {
				alert("Error in Alternate e-mail address");
				document.mat.altemail.focus();
				return false;
			}
		}
		*/
		if (document.mat.pass_word.value.length < 6) {
			alert("Password should be minimum of 6 characters");
			document.mat.pass_word.focus();
			return false;
		}
		/*
		if ((document.mat.pass_word.value) != (document.mat.repass_word.value)) {
			alert("The PASSWORD & RE-ENTERED PASSWORD need to be the same");
			document.mat.repass_word.focus();
			return false;
		}
		*/
		if (document.mat.mphone.value.length > 0) {
			if (isNaN(document.mat.mphone.value)) {
				alert("Mobile Number can be numeric only.");
				document.mat.mphone.focus();
				return false;
			}
		}
		if (document.mat.postal_address.value.length == 0) {
			alert("POSTAL ADDRESS can't be left blank");
			document.mat.postal_address.focus();
			return false;
		}
		fr=document.mat.country.selectedIndex;
		fr1=document.mat.country.options[fr].value;
		if (fr1 == "x") {
			alert("Please select the COUNTRY field");
			document.mat.country.focus();
			return false;
		}
		fr2=document.mat.religion.selectedIndex;
		fr3=document.mat.religion.options[fr2].value;
		if (fr3 == "x") {
			alert("Please select the RELIGION field");
			document.mat.religion.focus();
			return false;
		}
	}
	else {
		if (document.mat.username1.value.length == 0) {
			alert("E-mail address can't be left blank");
			document.mat.username1.focus();
			return false;
		}
		if (document.mat.username1.value.indexOf('@') == -1) {
			alert("Error in e-mail address");
			document.mat.username1.focus();
			return false;
		}
		if (document.mat.username1.value.indexOf('.') == -1) {
			alert("Error in e-mail address");
			document.mat.username1.focus();
			return false;
		}
		if (document.mat.username1.value.indexOf('@') != document.mat.username1.value.lastIndexOf('@')) {
			alert("Please Specify One E-mail address only");
			document.mat.username1.focus();
			return false;
		}
		if (document.mat.pass_word1.value == 0) {
			alert("Please enter your Password");
			document.mat.pass_word1.focus();
			return false;
		}
	}
	
	if ((!document.mat.mode[0].checked) && (!document.mat.mode[1].checked) && (!document.mat.mode[2].checked) && (!document.mat.mode[3].checked) && (!document.mat.mode[4].checked) && (!document.mat.mode[5].checked) && (!document.mat.mode[6].checked) && (!document.mat.mode[7].checked) && (!document.mat.mode[8].checked) && (!document.mat.mode[9].checked) && (!document.mat.mode[10].checked) && (!document.mat.mode[11].checked) && (!document.mat.mode[12].checked) && (!document.mat.mode[13].checked) && (!document.mat.mode[14].checked) && (!document.mat.mode[15].checked) && (!document.mat.mode[16].checked) && (!document.mat.mode[17].checked) && (!document.mat.mode[18].checked)) {
  	document.mat.mode[0].focus();
	  alert("Please check Your Mode Of Payment");
 	  return false;
	}
	if (!document.mat.terms.checked) {
		alert("Please read the terms of use and check the box to procced");
		document.mat.terms.focus();
		return false;
	}	
}

function disp_reg(nm,obj) {
	style = "inline";	
	var obj=obj;

	if(obj=="new_user") {
		var obj1="existing_user";
		if (navigator.appName=="Netscape") {
			document.getElementById(obj).style.visibility = 'visible';
			document.getElementById(obj1).style.visibility = 'collapse';
		}
		else {
			document.getElementById(obj).style.display = style;
			document.getElementById(obj1).style.display = 'none';
		}
	}
	else {
		var obj1="new_user";
		if (navigator.appName=="Netscape") {
			document.getElementById(obj).style.visibility = 'visible';
			document.getElementById(obj1).style.visibility = 'collapse';
			
		}
		else {
			document.getElementById(obj).style.display = style;
			document.getElementById(obj1).style.display = 'none';
		}
	}
}



function chknew() {
	
	if(document.frmcontact.nam.value.length==0) {
		
		alert("Please Mention Your name!");
		
		document.frmcontact.nam.focus();
		
		return false;
	}
	else if(document.frmcontact.emailid.value.length==0) {
		
		alert("Please Mention Your Email-id!");
		
		document.frmcontact.emailid.focus();
		
		return false;
	}
	else if(document.frmcontact.emailid.value.indexOf('.')==-1) {
		
		alert("Please Mention Correct Email-id!");
		
		document.frmcontact.emailid.focus();
		
		return false;
	}
	else if(document.frmcontact.emailid.value.indexOf('@')==-1) {
		
		alert("Please Mention Correct Email-id!");
		
		document.frmcontact.emailid.focus();
		
		return false;
	}
	else if(document.frmcontact.phonenum.value.length==0) {
		
		alert("Please Mention Your Phone Number!");
		
		document.frmcontact.phonenum.focus();
		
		return false;
	}
	else if(document.frmcontact.query.value.length==0) {
		
		alert("Please Write the query");
		
		document.frmcontact.query.focus();
		
		return false;
	}
}








