var newajax;try{newajax=new XMLHttpRequest}catch(e){try{newajax=new ActiveXObject("Msxml2.XMLHTTP")}catch(e$$1){try{newajax=new ActiveXObject("Microsoft.XMLHTTP")}catch(e$$2){}}}var newajaxadv;try{newajaxadv=new XMLHttpRequest}catch(e$$3){try{newajaxadv=new ActiveXObject("Msxml2.XMLHTTP")}catch(e$$4){try{newajaxadv=new ActiveXObject("Microsoft.XMLHTTP")}catch(e$$5){}}}var ajaxreq;try{ajaxreq=new XMLHttpRequest}catch(e$$6){try{ajaxreq=new ActiveXObject("Msxml2.XMLHTTP")}catch(e$$7){try{ajaxreq=new ActiveXObject("Microsoft.XMLHTTP")}catch(e$$8){}}}var newajax1;
try{newajax1=new XMLHttpRequest}catch(e$$9){try{newajax1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e$$10){try{newajax1=new ActiveXObject("Microsoft.XMLHTTP")}catch(e$$11){}}}zn="AriTauGemCanLeoVirLibScoSagCapAquPis";d2r=Math.PI/180;r2d=180/Math.PI;var range=[1,12,1,31,1800,2100,0,23,0,59,0,12,0,59,0,0,0,179,0,59,0,0,0,89,0,59];
function calcAyanamsa(a){ln=(933060-6962911*a+7.5*a*a)/3600%360;Off=(259205536*a+2013816)/3600;Off=17.23*Math.sin(d2r*ln)+1.27*Math.sin(d2r*Off)-(5025.64+1.11*a)*a;return Off=(Off-80861.27)/3600}function mdy2julian(a,b,d){with(Math){im=12*(d+4800)+a-3;j=(2*(im-floor(im/12)*12)+7+365*im)/12;j=floor(j)+b+floor(im/48)-32083;if(j>2299171)j+=floor(im/4800)-floor(im/1200)+38;return j}}
function generatehoroscopeforviewers(a,b,d,h,l,n){if(a==""||b==""||d==""||h==""||l==""||n=="")alert("Sorry, this user data have some problem ...");else{with(Math){var k=floor(a);b=floor(b);var m=floor(d),g=floor(h);g+=floor(l)/60;var c=floor(5);c+=floor(30)/60}jd=mdy2julian(k,b,m);f=g-c;t=(jd-2415020+f/24-0.5)/36525;ay=calcAyanamsa(t);k="";k="?mn="+a+"&day="+b+"&yr="+d+"&hour="+h+"&minute="+l+"&keyword="+n+"&mn="+a+"&ay="+ay;document.getElementById("user1data").innerHTML='<b><center><img src="images/loader.gif" alt="loading"><br>Processing Please Wait ...</center></b>';
newajax.open("POST","natal_line_match.php"+k,true);newajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");newajax.setRequestHeader("Content-length",k.length);newajax.setRequestHeader("Connection","close");newajax.onreadystatechange=function(){if(newajax.readyState==4){document.getElementById("user1data").innerHTML=newajax.responseText;document.getElementById("okbtn").style.display="none";finalmatch()}};newajax.send(k)}}
function generatehoroscopeforviewers1(a,b,d,h,l,n){if(a==""||b==""||d==""||h==""||l==""||n=="")alert("Sorry, this user data have some problem ...");else{with(Math){var k=floor(a);b=floor(b);var m=floor(d),g=floor(h);g+=floor(l)/60;var c=floor(5);c+=floor(30)/60}jd=mdy2julian(k,b,m);f=g-c;t=(jd-2415020+f/24-0.5)/36525;ay=calcAyanamsa(t);k="";k="?mn="+a+"&day="+b+"&yr="+d+"&hour="+h+"&minute="+l+"&keyword="+n+"&mn="+a+"&ay="+ay;document.getElementById("user2data").innerHTML="";newajax1.open("POST",
"natal_line_match1.php"+k,true);newajax1.setRequestHeader("Content-type","application/x-www-form-urlencoded");newajax1.setRequestHeader("Content-length",k.length);newajax1.setRequestHeader("Connection","close");newajax1.onreadystatechange=function(){if(newajax1.readyState==4)document.getElementById("user2data").innerHTML=newajax1.responseText};newajax1.send(k)}}
function finalmatch(){document.getElementById("finalmatch").innerHTML='<b><center><img src="images/loader.gif" alt="loading"><br>Loading ...</center></b>';newajax1.open("POST","finalmatch.php",true);newajax1.setRequestHeader("Content-type","application/x-www-form-urlencoded");newajax1.setRequestHeader("Content-length",0);newajax1.setRequestHeader("Connection","close");newajax1.onreadystatechange=function(){if(newajax1.readyState==4)document.getElementById("finalmatch").innerHTML=newajax1.responseText};
newajax1.send("")}
function doSubmit(){var a=document.frmSignup;if(a.txtemail.value==""){alert("Please input your email ID");a.txtemail.focus();return false}else if(emailCheck(a.txtemail.value))if(a.txtpassword.value==""){alert("Please input password");a.txtpassword.focus();return false}else if(a.txtpassword.value.length<5){alert("Please enter minimum 5 password characters");a.txtpassword.focus();return false}else if(a.txtpassword2.value==""){alert("Please input confirm password");a.txtpassword2.focus();return false}else if(a.txtpassword.value!=
a.txtpassword2.value){alert("Password and Confirm Password must be same");a.txtpassword2.focus();return false}else if(Alpha(a.txtfirstname.value))if(a.txtfirstname.value.length>15){alert("Please Enter FirstName below 15 characters");a.txtfirstname.focus();return false}else if(Alpha(a.txtlastname.value))if(a.txtlastname.value.length>15){alert("Please Enter Lastname below 15 characters");a.txtlastname.focus();return false}else if(a.txtbirthMonth.selectedIndex==0||a.txtbirthDay.selectedIndex==0||a.txtbirthYear.selectedIndex==
0){alert("Please check your Date of Birth");a.txtbirthMonth.focus();return false}else if(a.txtbirthMonth.selectedIndex==2&&a.txtbirthDay.selectedIndex==30){alert("Please Check your date of birth");a.txtbirthMonth.focus();return false}else if(a.txtbirthMonth.selectedIndex==2&&a.txtbirthDay.selectedIndex==31){alert("Please Check your date of birth");a.txtbirthMonth.focus();return false}else if(a.txtheight.selectedIndex==0){alert("Please select height");a.txtheight.focus();return false}else if(a.txtreligion.selectedIndex==
0){alert("Please select Religion");a.txtreligion.focus();return false}else if(a.txtmother_tongue.selectedIndex==0){alert("Please select Mother Tongue");a.txtmother_tongue.focus();return false}else if(a.txtmobile.value==""){alert("Please input mobile number.");a.txtmobile.focus();return false}else if(IsNumeric(a.txtmobile.value))if(a.txtmobile.value.length<5||a.txtmobile.value.length>13){alert("Please Enter Valid mobile no.");a.txtmobile.focus();return false}else if(a.txtqualification.selectedIndex==0){alert("Please select highest qualification");
a.txtqualification.focus();return false}else if(a.txtoccupation.selectedIndex==0){alert("Employed In is mandatory to select");a.txtoccupation.focus();return false}else if(a.txtprofessional_str.selectedIndex==0){alert("Profession Stream is mandatory to select");a.txtprofessional_str.focus();return false}else if(a.txtincome.selectedIndex==0){alert("Please select Income");a.txtincome.focus();return false}else if(a.about_me.value==""){alert("Please Input About me");a.about_me.focus();return false}else if(a.accept_tos.checked==
false){alert("Please Accept the Terms of Service");a.accept_tos.focus();return false}else if(a.about_me.value.length<50){alert("Please enter atleast 50 characters in About Me Field");a.about_me.focus();return false}else return true;else{alert("Please input valid mobile no.");a.txtmobile.focus();return false}else{alert("Please Input Your last name, Number & Symbols are not Allowed");a.txtlastname.focus();return false}else{alert("Please Input Your first name, Number & Symbols are not Allowed");a.txtfirstname.focus();
return false}else{alert("Please input valid email");a.txtemail.focus();return false}}function checkemail(){var a=document.getElementById("txtemail").value,b;try{b=new XMLHttpRequest}catch(d){try{b=new ActiveXObject("Msxml2.XMLHTTP")}catch(h){try{b=new ActiveXObject("Microsoft.XMLHTTP")}catch(l){}}}b.open("GET","fvaliddation.php"+("?email="+a),true);b.send(null);b.onreadystatechange=function(){if(b.readyState==4)document.getElementById("bemail").innerHTML=b.responseText}}
function checkpromo(){var a=document.getElementById("txtpromocode").value;document.getElementById("rpromo").innerHTML='<img src="/images/loadbuttonsmall.gif" alt="Processing...">';ajaxreq.open("GET","promoresult.php"+("?promocode="+a),true);ajaxreq.send(null);ajaxreq.onreadystatechange=function(){if(ajaxreq.readyState==4)document.getElementById("rpromo").innerHTML=ajaxreq.responseText}}
function instatus(){var a=document.getElementById("txtoccupation").value;if(a=="Unemployed"||a=="Select")document.getElementById("compname").style.display="none";else document.getElementById("compname").style.display="block"}function ingotraother(){if(document.getElementById("txtgotra").value=="Other")document.getElementById("showothergotra").style.display="block";else document.getElementById("showothergotra").style.display="none"}
function mstatus(){if(document.getElementById("txtmaritalstatus").value!="Unmarried")document.getElementById("hscope").style.display="block";else document.getElementById("hscope").style.display="none"}function advsrch(){if(document.getElementById("txtfrom").value=="In"){document.getElementById("txtstate").disabled=false;document.getElementById("txtcity").disabled=false}else{document.getElementById("txtstate").disabled=true;document.getElementById("txtcity").disabled=true}}
function inbrother(){var a=document.getElementById("txtbrother").value;document.getElementById("brother_cases").innerHTML="Loading...";ajaxreq.open("GET","brothersval.php"+("?bval="+a),true);ajaxreq.send(null);ajaxreq.onreadystatechange=function(){if(ajaxreq.readyState==4)document.getElementById("brother_cases").innerHTML=ajaxreq.responseText};document.getElementById("brother_cases").style.visible="block"}
function insister(){var a=document.getElementById("txtsister").value;document.getElementById("sister_cases").innerHTML="Loading...";ajaxreq.open("GET","sistersval.php"+("?sval="+a),true);ajaxreq.send(null);ajaxreq.onreadystatechange=function(){if(ajaxreq.readyState==4)document.getElementById("sister_cases").innerHTML=ajaxreq.responseText};document.getElementById("sister_cases").style.visible="block"}
function textLimit(a,b){if(a.value.length>b+1)if(a.value.length>b){alert("You can not enter more than 500 characters");a.value=a.value.substring(0,b)}}
function shownext(){var a;for(i=0;i<document.pform.popt.length;i++)if(document.pform.popt[i].checked)a=document.pform.popt[i].value;if(a==2){document.getElementById("onlinebutton").style.display="none";document.getElementById("ddpayment").style.display="block"}else{document.getElementById("onlinebutton").style.display="block";document.getElementById("ddpayment").style.display="none"}}
function textCounter(a,b){if(a.value.length>b)a.value=a.value.substring(0,b);else{dispval=b-a.value.length;document.getElementById("charinfo").innerHTML=dispval}}function showfulladdress(a,b){document.getElementById("fullcontact").innerHTML="Loading...";ajaxreq.open("GET","showfullcontact.php"+("?myid="+a+"&toid="+b),true);ajaxreq.send(null);ajaxreq.onreadystatechange=function(){if(ajaxreq.readyState==4)document.getElementById("fullcontact").innerHTML=ajaxreq.responseText}}
function getmycontacts(a){a="?myid="+a;document.getElementById("innerbody").innerHTML="Loading...";newajax.open("GET","mycontacts.php"+a,true);newajax.onreadystatechange=function(){if(newajax.readyState==4)document.getElementById("innerbody").innerHTML=newajax.responseText};newajax.send(null)}var NS4=navigator.appName=="Netscape"&&parseInt(navigator.appVersion)<5;
function addOption(a,b,d,h,l,n,k,m,g,c,o,p,q){if(h=="add")if(!(b==l||b==n||b==k||b==m||b==g||b==c||b==o||b==p||b==q)){b=new Option(b,d);a.options[a.length]=b}}function deleteOption(a,b,d){var h=a.length;if(h==1&&d=="India"||h==2&&d=="India"||h==3&&d=="India"||h==4&&d=="India"||h==5&&d=="India"||h==6&&d=="India"||h==7&&d=="India"||h==8&&d=="India"||h==9&&d=="India"){document.getElementById("prefer").style.display="none";document.getElementById("multcity").value=""}if(h>0)a.options[b]=null}
function moveOptions(a,b,d){var h=a.length,l=b.length,n=[],k=[],m=[],g=0,c=0,o,p,q=b.length,r=0,s=0,u=0;for(o=l-1;o>=0;o--){s+=1;if(d=="add"){m[c]=b.options[o].text;c++}}for(c=h-1;c>=0;c--)if(a.options[c].selected)r+=1;if(r>5)alert("Please select not more than 5");else{for(c=h-1;c>=0;c--)if(a.options[c].selected){n[g]=a.options[c].text;if(n[g]=="India"){p=n[g];document.getElementById("prefer").style.display="block"}k[g]=a.options[c].value;d=="remove"&&deleteOption(a,c,p);g++}if(d=="add")if(q==1&&
b.options[0].text=="Doesn't Matter")b.options[0]=null;if(d=="add"){for(c=l-1;c>=0;c--)u+=1;for(c=g-1;c>=0;c--)s>=5||addOption(b,n[c],k[c],d,m[c],m[c+1],m[c+2],m[c+3],m[c+4],m[c-4],m[c-3],m[c-2],m[c-1])}}NS4&&history.go(0)}
function selQuallist(a,b,d,h,l,n,k,m){var g=a.length,c="";for(g=g-1;g>=0;g--)c=c+a.options[g].text+",";a=c.substring(0,c.length-1);document.getElementById("multedu").value=a;c="";for(a=b.length-1;a>=0;a--)c=c+b.options[a].text+",";b=c.substring(0,c.length-1);document.getElementById("multprof").value=b;g=d.length;c="";for(g=g-1;g>=0;g--)c=c+d.options[g].text+",";d=c.substring(0,c.length-1);document.getElementById("multloc").value=d;g=h.length;c="";for(g=g-1;g>=0;g--)c=c+h.options[g].text+",";h=c.substring(0,
c.length-1);document.getElementById("multcity").value=h;g=l.length;c="";for(g=g-1;g>=0;g--)c=c+l.options[g].text+",";l=c.substring(0,c.length-1);document.getElementById("multemp").value=l;g=n.length;c="";for(g=g-1;g>=0;g--)c=c+n.options[g].text+",";n=c.substring(0,c.length-1);document.getElementById("multreli").value=n;g=k.length;c="";for(g=g-1;g>=0;g--)c=c+k.options[g].text+",";k=c.substring(0,c.length-1);document.getElementById("multmother").value=k;g=m.length;c="";for(g=g-1;g>=0;g--)c=c+m.options[g].text+
",";m=c.substring(0,c.length-1);document.getElementById("multcaste").value=m}function charcheck(){if(document.getElementById("about_me").value.length<50){alert("Enter min 50 characters");return false}}
function showcities(){if(document.getElementById("txtfrom").value=="IN"){var a;a="?stval="+document.getElementById("txtstateprovince1").value;var b=document.getElementById("loadcity"),d=b.innerHTML;b.innerHTML="Loading...";newajax.open("GET","getcities.php"+a,true);newajax.onreadystatechange=function(){if(newajax.readyState==4)document.getElementById("loadcity").innerHTML=newajax.responseText!=""?newajax.responseText:d};newajax.send(null)}}
function showcitiesadv(){var a=document.getElementById("txtfrom").value;if(document.getElementById("txtstate").value=="NC")document.getElementById("txtcity").disabled=true;else document.getElementById("txtcity").disabled=false;if(a=="In"){a="?stval="+document.getElementById("txtstate").value;var b=document.getElementById("loadcities"),d=b.innerHTML;b.innerHTML="Loading...";newajaxadv.open("GET","getcitiessearch.php"+a,true);newajaxadv.onreadystatechange=function(){if(newajaxadv.readyState==4)document.getElementById("loadcities").innerHTML=
newajaxadv.responseText!=""?newajaxadv.responseText:d};newajaxadv.send(null)}}function showcitiesedit(a,b){if(document.getElementById("txtfrom").value=="IN"){var d;d="?stval="+a+"&cval="+b;var h=document.getElementById("txtcity"),l=h.innerHTML;h.innerHTML="Loading...";newajax.open("GET","getcities.php"+d,true);newajax.onreadystatechange=function(){if(newajax.readyState==4)document.getElementById("txtcity").innerHTML=newajax.responseText!=""?newajax.responseText:l};newajax.send(null)}}
function closeexp(){document.getElementById("exptool").style.display="none"}function showexp(){document.getElementById("exptool").style.display="block"}zn="AriTauGemCanLeoVirLibScoSagCapAquPis";d2r=Math.PI/180;r2d=180/Math.PI;range=[1,12,1,31,1800,2100,0,23,0,59,0,12,0,59,0,0,0,179,0,59,0,0,0,89,0,59];
function generatehoroscope(){document.getElementById("uploadkundali").style.display="none";var a=document.getElementById("mn").value,b=document.getElementById("day").value,d=document.getElementById("yr").value,h=document.getElementById("hour").value,l=document.getElementById("minute").value,n=document.getElementById("keyword").value;if(document.generateh.horovalue[0].checked)var k="Optional";if(document.generateh.horovalue[1].checked)k="Yes";if(document.generateh.horovalue[2].checked)k="No";if(a==
""||b==""||d==""||h==""||l==""||n=="")alert("Error... Please check whether Hour, Minute & Birth Place input selected ...");else{with(Math){var m=floor(a);b=floor(b);var g=floor(d),c=floor(h);c+=floor(l)/60;var o=floor(5);o+=floor(30)/60}jd=mdy2julian(m,b,g);f=c-o;t=(jd-2415020+f/24-0.5)/36525;ay=calcAyanamsa(t);a="?mn="+a+"&day="+b+"&yr="+d+"&hour="+h+"&minute="+l+"&keyword="+n+"&mn="+a+"&ay="+ay+"&action=save&hm="+k;document.getElementById("generatekundali").innerHTML="Processing ...";newajax.open("POST","natal_line.php"+a,true);
newajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");newajax.setRequestHeader("Content-length",a.length);newajax.setRequestHeader("Connection","close");newajax.onreadystatechange=function(){if(newajax.readyState==4)document.getElementById("generatekundali").innerHTML=newajax.responseText};newajax.send(a)}}
function showpts(){var a=document.getElementById("uid").value,b=document.getElementById("pid").value,d=document.getElementById("ugen").value;if(d=="M"){var h;h="?m1name="+a+"&m2name="+b}if(d=="F")h="?m1name="+b+"&m2name="+a;document.getElementById("pts").innerHTML="Processing ...";newajax.open("POST","matchkundali.php"+h,true);newajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");newajax.setRequestHeader("Content-length",h.length);newajax.setRequestHeader("Connection","close");
newajax.onreadystatechange=function(){if(newajax.readyState==4)document.getElementById("pts").innerHTML=newajax.responseText};newajax.send(h)}function calcAyanamsa(a){ln=(933060-6962911*a+7.5*a*a)/3600%360;Off=(259205536*a+2013816)/3600;Off=17.23*Math.sin(d2r*ln)+1.27*Math.sin(d2r*Off)-(5025.64+1.11*a)*a;return Off=(Off-80861.27)/3600}
function mdy2julian(a,b,d){with(Math){im=12*(d+4800)+a-3;j=(2*(im-floor(im/12)*12)+7+365*im)/12;j=floor(j)+b+floor(im/48)-32083;if(j>2299171)j+=floor(im/4800)-floor(im/1200)+38;return j}}function updButton(a){var b=a.className;if(b!="updBtn_Selected")b=b=="updBtn"?"updBtn_Highlight":"updBtn";a.className=b}
function selectUpd(a){for(var b=1;b<=3;b++){document.getElementById("updButton"+b).className="updBtn";document.getElementById("updContent"+b).style.display="none"}a.className="updBtn_Selected";a=a.id;a=a.substr(a.length-1);document.getElementById("updContent"+a).style.display="block"}
function showCountry(){var a;a="?cval="+document.getElementById("txtfrom").value;var b=document.getElementById("loadcountry"),d="Loading...";b.innerHTML=d;b=document.getElementById("loadcountry1");d="Loading...";b.innerHTML=d;ajaxreq.open("GET","showCountries.php"+a,true);ajaxreq.onreadystatechange=function(){if(ajaxreq.readyState==4){var h=document.getElementById("loadcountry");h.innerHTML=ajaxreq.responseText;h=document.getElementById("loadcountry1");h.innerHTML=ajaxreq.responseText}};ajaxreq.send(null)}
function restrictchar(a){for(var b=0,d=0;d<a.length;d++)if(!isNaN(a[d])){b=1;document.getElementById("txtfirstname").value=""}b==1&&alert("Please dont enter numeric in name field")}function restrictcharl(a){for(var b=0,d=0;d<a.length;d++)if(!isNaN(a[d])){b=1;document.getElementById("txtlastname").value=""}b==1&&alert("Please dont enter numeric in name field")}
function checktext(){var a=document.frmSignup;if(document.getElementById("txtin").value.length>50){alert("Please dont enter more than 50 characters");a.txtin.focus();return false}};

