function valid_field(num1){if(document.frm_useradd.uname.value==""){alert("Please Enter User Name!");document.frm_useradd.uname.focus();return false;}if(document.frm_useradd.pwd.value==""){alert("Please Enter Password!");document.frm_useradd.pwd.focus();return false;}if(document.frm_useradd.pwd.value.length < "6"){alert("Password must be atleast 6 characters!");document.frm_useradd.pwd.focus();return false;}if(document.frm_useradd.pwd_again.value==""){alert("Please Enter Confirm Password!");document.frm_useradd.pwd_again.focus();return false;}if(document.frm_useradd.pwd.value != document.frm_useradd.pwd_again.value){alert("Password AND Confirm Password must be same!");document.frm_useradd.pwd_again.focus();return false;}if(document.frm_useradd.email.value==""){alert("Please Enter Email-Id!");document.frm_useradd.email.focus();return false;}if((document.frm_useradd.email.value.indexOf(".") <= '0') || (document.frm_useradd.email.value.indexOf("@") <= '0')){alert("Please Enter Valid Email Address!");document.frm_useradd.email.focus();return false;}if(document.frm_useradd.email_again.value==""){alert("Please Enter Confirm Email-Id!");document.frm_useradd.email_again.focus();return false;}				if(document.frm_useradd.email.value != document.frm_useradd.email_again.value){alert("Email AND Confirm Email must be same!");document.frm_useradd.email_again.focus();return false;}if(document.frm_useradd.gender.value=="0"){alert("Please Select Gender !");return false;}if(document.frm_useradd.birthmonth.value=="0"){alert("Please Select Birthmonth!");return false;}if(document.frm_useradd.birthday.value=="0"){alert("Please Select Birthday!");return false;}if(document.frm_useradd.birthyear.value=="0"){alert("Please Select Birthyear!");return false;}if(document.frm_useradd.country.value=="0" || document.frm_useradd.country.value==""){alert("Please Select Country!");return false;}if((document.frm_useradd.state.value=="0" || document.frm_useradd.state.value=="") ){alert("Please Select State!");return false;}	if((document.frm_useradd.city.value=="0" || document.frm_useradd.city.value=="")){		alert("Please Select City!");return false;}	if(document.frm_useradd.ethnicity.value=="0"){alert("Please Select Ethnicity!");return false;}if(document.frm_useradd.code.value==""){alert("Please Enter Code!");document.frm_useradd.code.focus();return false;}if(document.frm_useradd.code.value!=num1){				alert("Please Enter Correct Code!");document.frm_useradd.code.focus();return false;}if(document.frm_useradd.terms.checked==false){alert("Please check Terms of Service !");	return false;}if(document.getElementById("chek_exist_user_name_id").value=='1'){alert('Username already exist.');	return false;}	if(document.getElementById("chek_exist_email_name_id").value=='1'){	alert('Email already exist.');	return false; }}//end//rate images effect
function rateBarImgSwap(n,keypress){if(n){for (i=0; i<n; i++){j = i + 1;buttonId = 'r' + j;		document.getElementById(buttonId).className = 'over';}if(keypress){document.voteForm.rate_img.value=n;				document.voteForm.submit();	}} else{for (i=0; i<10; i++){j = i + 1;	buttonId = 'r' + j;			document.getElementById(buttonId).className = 'out';}}return true;}function form_submit_rate(num){	document.getElementById("vote_1").value=num;document.voteForm1.submit(); }//eof  rate images effect
function add_msg_valid(){if(document.frm_msg.Subject.value==""){alert("Please Enter Subject!");		document.frm_msg.Subject.focus();return false;}	if(document.frm_msg.message.value==""){	alert("Please Enter message!");document.frm_msg.message.focus();return false;	}}function valid_match(){if(document.frm_match.name.value==""){alert("Please Enter Friends Name!");document.frm_match.name.focus();return false;	}if(document.frm_match.email.value==""){alert("Please Enter Email-Id!");document.frm_match.email.focus();return false;	}	if((document.frm_match.email.value.indexOf(".") <= '0') || (document.frm_match.email.value.indexOf("@") <= '0')){alert("Please Enter Valid Email Address!");	document.frm_match.email.focus();return false;	}}function search_validation(){	if(document.frm_search.sub_cat.value=="threadtitle"){	if(document.frm_search.searchval.value==""){alert("Please Enter Thread Title!");	document.frm_search.searchval.focus();	return false;	}}}//register page div display
function setVisibility(id, visibility){	document.getElementById(id).style.display = visibility;}
//end
function valid_email1(){if(document.frm_mail_set.Email.value==""){alert("Please Enter Email-Id!");		document.frm_mail_set.Email.focus();return false;}if((document.frm_mail_set.Email.value.indexOf(".") <= '0') || (document.frm_mail_set.Email.value.indexOf("@") <= '0')){alert("Please Enter Valid Email Addrss!");document.frm_mail_set.Email.focus();return false;}}function valid_del(){if(document.frm_del_act.username.value==""){alert("Please Enter username!");document.frm_del_act.username.focus();		return false;}if(document.frm_del_act.password.value==""){alert("Please Enter Password!");document.frm_del_act.password.focus();return false;	}if(document.frm_del_act.password.value.length < "6"){		alert("Password must be atleast 6 characters!");document.frm_del_act.password.focus();return false;	}		
}function msg_valid(){	if(!point_checker())	return false;	if(document.frm_sendmessage.reciever_uname.value==""){	alert("Please Enter Receiver Name!");document.frm_sendmessage.reciever_uname.focus();	return false;	}if(document.frm_sendmessage.subject.value==""){alert("Please Enter Subject!");	document.frm_sendmessage.subject.focus();return false;	}	if(document.frm_sendmessage.subject.value=="Your Subject Line here"){alert("Please Change Subject other than :- Your Subject Line here!");	document.frm_sendmessage.subject.focus();	return false;}}
function valid_fav(){	if(document.frm_add_name.friend_name.value==""){alert("Please Enter Friend Name!");document.frm_add_name.friend_name.focus();	return false;}}function valid_field_1(){if(document.frm_useradd.uname.value==""){alert("Please Enter User Name!");	document.frm_useradd.uname.focus();return false;}if(document.frm_useradd.pwd.value==""){alert("Please Enter Password!");	document.frm_useradd.pwd.focus();return false;	}	if(document.frm_useradd.pwd.value.length < "6"){		alert("Password must be atleast 6 characters!");document.frm_useradd.pwd.focus();return false;}	if(document.frm_useradd.pwd_again.value==""){	alert("Please Enter Confirm Password!");document.frm_useradd.pwd_again.focus();return false;	}	if(document.frm_useradd.pwd.value != document.frm_useradd.pwd_again.value){alert("Password AND Confirm Password must be same!");	document.frm_useradd.pwd_again.focus();	return false;}	if(document.frm_useradd.email.value==""){alert("Please Enter Email-Id!");	document.frm_useradd.email.focus();	return false;}if((document.frm_useradd.email.value.indexOf(".") <= '0') || (document.frm_useradd.email.value.indexOf("@") <= '0')){alert("Please Enter Valid Email Addrss!");document.frm_useradd.email.focus();	return false;}	if(document.frm_useradd.gender.value=="0"){	alert("Please Select Gender !");return false;} if(document.frm_useradd.birthmonth.value=="0"){alert("Please Select Birthmonth!");	return false;}if(document.frm_useradd.birthday.value=="0"){alert("Please Select Birthday!");	return false;}if(document.frm_useradd.birthyear.value=="0"){alert("Please Select Birthyear!");return false;}if(document.frm_useradd.ethnicity.value=="0"){alert("Please Select Ethnicity!");return false;}}function text_blank(){if(document.frm_testi.testi.value==""){alert("Please Enter testimonial!");document.frm_testi.testi.focus();	return false;}}function tocheck(){	if(document.frm_report.reporttype.value==""){alert("Please Select Reason!");document.frm_report.reporttype.focus();return false;}	if(document.frm_report.action.value==""){		alert("Please Select Action!");	document.frm_report.action.focus();	return false;}	if(document.frm_report.comments.value==""){alert("Please Enter comments!");document.frm_report.comments.focus();return false;}}function date_validation(){	if(document.frm_story.relmonth.value=="0"){		alert("Please Select Relationship Month!");	document.frm_story.relmonth.focus();return false;}	if(document.frm_story.relyear.value=="0"){	alert("Please Select Relationship Year!");	document.frm_story.relyear.focus();return false;	}	if(document.frm_story.coupleimage.value==""){alert("Please Select Image!");document.frm_story.coupleimage.focus();return false;}	if(document.frm_story.story.value==""){	alert("Please Enter Your Success Story!");	document.frm_story.story.focus();return false;	}
<!-- BEO CHECK IMAGE -->
did="coupleimage";	var extension = new Array();var fieldvalue =document.getElementById(did).value;	var imgSrc=document.getElementById(did).value;	extension[0] = ".gif";extension[1] = ".jpg";extension[2] = ".bmp";extension[3] = ".GIF";extension[4] = ".JPG";extension[5] = ".BMP";extension[6] = ".jpeg";extension[7] = ".JPEG";	var thisext = fieldvalue.substr(fieldvalue.lastIndexOf('.'));	for(var i = 0; i < extension.length; i++) {	if(thisext == extension[i]) { 	return true; }}	document.getElementById(did).value="";	alert("Your upload form contains an unapproved file name.");	return false;<!-- EOF CHECK FILE  -->
}//register second 
function IsNumeric(sText){	var ValidChars = "0123456789";	var IsNumber=true;	var Char;	for(i=0;i<sText.length && IsNumber==true; i++){Char = sText.charAt(i);if(ValidChars.indexOf(Char) == -1){IsNumber = false;}}	return IsNumber;	}function valid_2(){	if(!IsNumeric(document.frm_useradd.post_code.value)){ alert('Please enter only numbers in the Postalcode'); document.frm_useradd.post_code.focus(); return false;	}	//document.getElementById('myFile').value=="")
if(document.getElementById('myFile').name)	{ var extensions = new Array("jpg","jpeg","gif","png","bmp");  var image_file = document.frm_useradd.myFile.value;  var image_length = document.frm_useradd.myFile.value.length;  var pos = image_file.lastIndexOf('.') + 1;  var ext = image_file.substring(pos, image_length);  var final_ext = ext.toLowerCase();  for (i = 0; i < extensions.length; i++) {  if(extensions[i] == final_ext)  {  return true;  }  }  alert("You must upload an image file with one of the following extensions: "+ extensions.join(', ') +".");  return false;  //	alert("Please Give the Image Path");	
		}if(document.frm_useradd.description.value==""){alert("Please Enter description!");	document.frm_useradd.description.focus();return false;}}//end//user search
function valid_1(){	if(document.frm.username.value==""){alert("Please Enter User Name!");		document.frm.username.focus();return false;	}}
//end<!-- ajax code for dynamic selection of country, state and city start -->
function states_pro(countrycode,statecode){	if(countrycode=='0' && statecode=='0')return;xmlHttp=GetXmlHttpObject();	if(countrycode!='0')var url='states.php?countrycode='+countrycode;	else if(statecode!='0')	var url='states.php?statecode='+statecode;	xmlHttp.onreadystatechange=stateChanged;	xmlHttp.open("GET", url, true);	xmlHttp.send(null);	function stateChanged() {		if((countrycode!='0') && (xmlHttp.readyState == 4 || xmlHttp.readyState == "completed" || xmlHttp.readyState == 200))		{if(navigator.appName=='Netscape')document.getElementById("state").innerHTML = xmlHttp.responseText;			else	document.getElementById("stateID").innerHTML =  '<select name="state" class="bigbox2"  onchange="javascript:states_pro(0,this.value)">'+xmlHttp.responseText+'</select>';	}	if((statecode!='0') && (xmlHttp.readyState == 4 || xmlHttp.readyState == "completed" || xmlHttp.readyState == 200))		{if(navigator.appName=='Netscape')document.getElementById("city").innerHTML = xmlHttp.responseText;			else document.getElementById("cityID").innerHTML =  '<select name="city" class="bigbox2">'+xmlHttp.responseText+'</select>';	}if(countrycode=='1231'){	}	}}
<!--- end  -->
function GetXmlHttpObject(){  var xmlHttp=null;var versions = ["Msxml2.XMLHTTP.7.0","Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];   for(var i=0; i<= versions.length; i++) {try	{xmlHttp=new XMLHttpRequest();		return xmlHttp;	}catch(e){	try	{xmlHttp = new ActiveXObject(versions[i]);return xmlHttp;}			catch(e){continue;}}}}<!-- ajax code for checking user name in database -->
function check_uname_pro(uname){if(uname=='')return;xmlHttp=GetXmlHttpObject();	if(uname!='0')	var url='check_username.php?uname='+uname;	xmlHttp.onreadystatechange=stateChanged;	xmlHttp.open("GET", url, true);	xmlHttp.send(null);	function stateChanged(){	if((xmlHttp.readyState == 4 || xmlHttp.readyState == "completed" || xmlHttp.readyState == 200))document.getElementById("user_msg").innerHTML = xmlHttp.responseText;	}}<!-- end --><!-- forgot password -->
function valid_email(){	if(document.frm_email.email_id.value==""){	alert("Please Enter Email-Id!");		document.frm_email.email_id.focus();return false;	}	if((document.frm_email.email_id.value.indexOf(".") <= '0') || (document.frm_email.email_id.value.indexOf("@") <= '0')){alert("Please Enter Valid Email Address!");document.frm_email.email_id.focus();return false;	}}<!-- forget password end --><!-- BEO CHECK IMAGE -->
function check_image(){	did="myFile";	var extension = new Array();	var fieldvalue =document.getElementById(did).value;	var imgSrc=document.getElementById(did).value;	extension[0] = ".gif";extension[1] = ".jpg";extension[2] = ".bmp";extension[3] = ".GIF";extension[4] = ".JPG";extension[5] = ".BMP";extension[6] = ".jpeg";extension[7] = ".JPEG";	var thisext = fieldvalue.substr(fieldvalue.lastIndexOf('.'));	for(var i = 0; i < extension.length; i++){	if(thisext == extension[i]){return true;}}	document.getElementById(did).value="";	alert("Your upload form contains an unapproved file name.");return false;}<!-- EOF CHECK IMAGE -->
function check_video(){	did="myFile";var extension = new Array();var fieldvalue =document.getElementById(did).value;	var imgSrc=document.getElementById(did).value;	extension[1] = ".mpa";extension[2] = ".wmv";extension[3] = ".swf";extension[4] = ".asf";	extension[5] = ".MPA";extension[6] = ".WMV";extension[7] = ".SWF";extension[8] = ".ASF";	extension[9] = ".mpeg";extension[10] = ".MPEG";extension[11] = ".dat";;extension[12] = ".DAT";	//extension[4] = ".JPG";extension[5] = ".BMP";extension[6] = ".jpeg";extension[7] = ".JPEG";
	var thisext = fieldvalue.substr(fieldvalue.lastIndexOf('.'));for(var i = 0; i < extension.length; i++) {	if(thisext == extension[i]) { return true; }}document.getElementById(did).value="";	alert("Your upload form contains an unapproved file name.");	return false;}
<!-- EOF CHECK IMAGE --><!-- Delete IMAGE -->
function confirmation(){var ans;ans=confirm("Do you want to delete this ?");if(ans==true)return true;	else	return false;}<!-- eof Delete IMAGE --><!-- bof popup -->
function popupwindow(url){window.open(url,'Reelfaces','width=500,height=500,top=256,left=320');	}
<!-- eofpopup -->
function showitMOZ(e){var nav4 = window.Event ? true : false;if(nav4) // Navigator 4.0x
		document.getElementById("Ypos").value=e.pageY;	else document.getElementById("Ypos").value=event.clientY + document.body.scrollTop;document.onmouseover="";}function pro(){	document.onmouseover=showitMOZ;}function mover(id){	var prod='pro'+id;	var xpo;	xpos=document.getElementById("Ypos").value;	document.getElementById(prod).style.display='block';	document.getElementById(prod).style.top=xpos-260;	pro();}function mdown(id){	var prod='pro'+id;	document.getElementById(prod).style.display='none';}function oclick(path,path1,width,height,caption){	document.getElementById("promain_img").src=path;	document.getElementById("pro_org_img").href=path1;	document.getElementById("user_m_cap").innerHTML=caption;}function checkAll(){var chkAll = document.getElementById('checkAll_del'); var checks = document.getElementsByName('sel_del[]');	var boxLength = checks.length; if(chkAll.checked==true){	for (i=0;i<boxLength;i++)	checks[i].checked = false;	}	else{	for(i=0;i<boxLength;i++)	checks[i].checked=true;	}}function latest_online_scrool_pre(from,memberid){	xmlHttp=GetXmlHttpObject();	var url='latest_online_s.php?pre='+from+'&memberid='+memberid;	xmlHttp.onreadystatechange=member_scrolled;	xmlHttp.open("GET", url, true);	xmlHttp.send(null);		function member_scrolled(){		$p=document.getElementById("pprro").innerHTML;	if((xmlHttp.readyState == 4 || xmlHttp.readyState=="completed")){	if(navigator.appName=='Netscape'){document.getElementById("SCROOL").innerHTML = xmlHttp.responseText;	document.getElementById("pprro").innerHTML=$p;	}			else{document.getElementById("SCROOL").innerHTML = xmlHttp.responseText;document.getElementById("pprro").innerHTML=$p;	}}}}function latest_online_scrool(from,memberid){xmlHttp=GetXmlHttpObject();	var url='latest_online_s.php?from='+from+'&memberid='+memberid;	xmlHttp.onreadystatechange=member_scrolled; xmlHttp.open("GET", url, true);xmlHttp.send(null);	function member_scrolled(){		$p=document.getElementById("pprro").innerHTML; if(xmlHttp.readyState == 4 || xmlHttp.readyState == "completed"){	if(navigator.appName=='Netscape'){document.getElementById("SCROOL").innerHTML = xmlHttp.responseText;document.getElementById("pprro").innerHTML=$p;	}else{document.getElementById("SCROOL").innerHTML = xmlHttp.responseText;	$split=$p.split('</OBJECT>');	document.getElementById("pprro").innerHTML=$p;	}}}}function redirect(url){	window.location=url;}function over_change_opacity(id,numid,ob_j){	JSFX.zoomIn(ob_j);	num=id;	id='projector'+id;	document.getElementById(id).style.opacity='1.0';	document.getElementById(id).style.filter='alpha(opacity=100)';	wid=87;	hht=59; 	for(i=0;i<numid;i++){	if(num!=i){	allid='projector'+i; if(document.getElementById(allid)){				document.getElementById(allid).style.opacity='0.6';	document.getElementById(allid).style.filter='alpha(opacity=100)';	}}}}function down_change_opacity(id,numid,ob_j){num=id;	JSFX.zoomOut(ob_j);	for(i=0;i<numid ;i++){allid='projector'+i; if(document.getElementById(allid)){document.getElementById(allid).style.opacity='1.0';	document.getElementById(allid).style.display="";document.getElementById(allid).style.position="";document.getElementById(allid).style.filter='alpha(opacity=100)';}	}}function check_lan(cid){	if(cid=='')	return;	xmlHttp=GetXmlHttpObject();	if(cid!='0')var url='sel_language.php?cid='+cid;	xmlHttp.onreadystatechange=ciChanged;xmlHttp.open("GET", url, true);	xmlHttp.send(null);	function ciChanged(){	if(xmlHttp.readyState == 4 || xmlHttp.readyState == "completed")document.getElementById("language_id").innerHTML =' <select name="select_language" id="select_language" class="txbx_country">'+xmlHttp.responseText;}}<!-- end -->
function selected_language(){	if(document.getElementById('select_language').value==""){	alert("First select language ");	return false;	}}function contactusin(){if(document.con.sel_prob.value==''){	   alert("Please first select Topic"); document.con.sel_prob.focus();  return false;}	if(document.con.firstname.value==''){alert("please enter your name ");document.con.firstname.focus();	   return false;}	if((document.con.sender_email.value.indexOf(".") <= '0') || (document.con.sender_email.value.indexOf("@") <= '0')){	alert("Please Enter Valid Email Address!");		document.con.sender_email.focus();return false;	}    if(document.con.comments.value==''){ alert("please enter your Message"); document.con.comments.focus(); return false;}  }<!-- check email allready exists -->
function check_uemail_pro(uemail){	if(uemail=='')return; xmlHttp=GetXmlHttpObject();if(uemail!='')		var url='check_useremail.php?uemail='+uemail;xmlHttp.onreadystatechange=stateChanged;xmlHttp.open("GET", url, true);	xmlHttp.send(null);	function stateChanged(){if(xmlHttp.readyState == 4 || xmlHttp.readyState == "completed")	document.getElementById("user_email_msg").innerHTML = xmlHttp.responseText;}}<!--  HEADER  -->
function MM_jumpMenu(targ,selObj,restore){  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");  if (restore) selObj.selectedIndex=0;}function MM_swapImgRestore(){  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_preloadImages(){  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function MM_findObj(n, d){  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_swapImage(){  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}function valid(){	if(document.chklogin.uname.value==""){alert("Please Enter User Name!");document.chklogin.uname.focus();return false;}	if(document.chklogin.pass.value==""){alert("Please Enter Password!");document.chklogin.pass.focus();		return false;}}<!--  tremplate -- >
function prorec(reid){	if(reid==1){document.getElementById("proreq1").style.visibility='visible';	document.getElementById("proreq2").style.visibility='hidden';	document.getElementById("proreq2").style.position='absolute';	document.getElementById("proreq1").style.position='';	document.getElementById("proreq1").style.height='30px';	document.getElementById("proreq2").style.height='1px';	document.getElementById("searchdatabase1").checked=true;	}	else	{document.getElementById("proreq2").style.visibility='visible';	document.getElementById("proreq1").style.visibility='hidden';	document.getElementById("proreq2").style.height='30px';	document.getElementById("proreq1").style.height='1px';	document.getElementById("proreq1").style.position='absolute';document.getElementById("proreq2").style.position='';	document.getElementById("searchdatabase2").checked=true;	} }<!--  EOF TEMPLATE>PHP -->