function ajax_error(a,c,b){Shadowbox.open({content:'<div id="welcome-msg" style="vertical-align:middle;padding:10px;padding-top:20px;text-align:center;font-size:16px;"><img src="'+c+'" alt="" width="16" height="16" style="vertical-align:middle; margin-right:5px;" />'+a+'<br><br><input type="button" class="formbutton" value="OK" onClick="document.location = \''+b+"';\"></div>",player:"html",title:"Notice",height:140,width:300})}function ajax_confirm(a,c,b){Shadowbox.open({content:'<div id="welcome-msg" style="vertical-align:middle;padding:10px;padding-top:20px;text-align:center;font-size:16px;"><img src="'+c+'" alt="" width="16" height="16" style="vertical-align:middle; margin-right:5px;" />'+a+'<br><br><input type="button" class="formbutton" value="Yes" onClick="document.location = \''+b+'\';"> <input type="button" class="formbutton" value="No" onClick="Shadowbox.close();"></div>',player:"html",title:"Notice",height:120,width:300})}function ajax_alert(a,b){Shadowbox.open({content:'<div id="welcome-msg" style="vertical-align:middle;padding:10px;padding-top:20px;text-align:center;font-size:16px;"><img src="'+b+'" alt="" width="16" height="16" style="vertical-align:middle; margin-right:5px;" />'+a+'<br><br><input type="button" class="formbutton" value="OK" onClick="Shadowbox.close();"></div>',player:"html",title:"Notice",height:120,width:300})}function createRequestObject(){if(window.XMLHttpRequest&&!(window.ActiveXObject)){return new XMLHttpRequest()}else{if(window.ActiveXObject){try{return new ActiveXObject("MSXML2.XMLHTTP")}catch(a){return new ActiveXObject("Microsoft.XMLHTTP")}}}}var http=createRequestObject();function handleResponse(){if(http.readyState==4){var b=http.responseText;if(b!="undefined"&&b!=""){var d=new Array();var a=new Array();if(b.indexOf("|||"!=-1)){d=b.split("|||");for(var c=1;c<d.length;c++){a=d[c].split("|:|");if(a[0]!="undefined"&&a[0]!=""&&document.getElementById(a[0])){document.getElementById(a[0]).innerHTML=a[1]}}}}}}function updateOnlineTime(){http.open("GET","updateonlinetime.php");http.send(null);setTimeout("updateOnlineTime()",60000)}function updateOnlineCount(){http.open("get","updateonlinecount.php");http.onreadystatechange=handleResponse;http.send(null);setTimeout("updateOnlineCount()",60000)}if(use_popups==undefined){var use_popups=true}function isValidEmail(a){if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,7})+$/.test(a)){return true}return false}function isValidURL(a){if(a==null){return false}var b="^ *";b=b+"(?:([Hh][Tt][Tt][Pp](?:[Ss]?))(?::\\/\\/))?";b=b+"(?:(\\w+\\:\\w+)(?:\\@))?";b=b+"([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}|localhost|([Ww][Ww][Ww].|[a-zA-Z0-9].)[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,6})";b=b+"(\\:\\d+)?";b=b+"((?:\\/.*)*\\/?)?";b=b+"(.*?\\.(\\w{2,4}))?";b=b+"(\\?(?:[^\\#\\?]+)*)?";b=b+"(\\#.*)?";b=b+" *$";return a.match(b)}function isValidString(a,c){if(!c){var c=""}var b=true;for(i=0;i<a.length;i++){ch=a.charAt(i);for(j=0;j<c.length;j++){if(ch==c.charAt(j)){break}}if(j==c.length){b=false;break}}return b}var alphabeticChars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var numericChars="0123456789";function isNumeric(a){if(/[0-9]/.test(a)){return true}return false}function isNumeric(b,a){return isValidString(b,numericChars+a)}function isAlphabetic(a){if(/[A-Za-z]/.test(a)){return true}return false}function isAlphabetic(b,a){return isValidString(b,alphabeticChars+a)}function isAlphaNumeric(a){if(/\w/.test(a)){return true}return false}function isAlphaNumeric(b,a){return isValidString(b,alphabeticChars+numericChars+a)}function DispDispHide(c,b,a){if(a){a.style.display="none"}if(c){c.style.display="inline"}if(b){b.style.display="inline"}}function DispHideHide(a,c,b){if(c){c.style.display="none"}if(b){b.style.display="none"}if(a){a.style.display="inline"}}function showHide(b,a){if(b.value=="US"){a.rows.row_usstates.style.display="inline"}else{a.rows.row_usstates.style.display="none"}if(b.value=="CA"){a.rows.row_castates.style.display="inline"}else{a.rows.row_castates.style.display="none"}if(b.value=="AU"){a.rows.row_austates.style.display="inline"}else{a.rows.row_austates.style.display="none"}if(b.value=="GB"){a.rows.row_gbstates.style.display="inline"}else{a.rows.row_gbstates.style.display="none"}}function showHide(a){if(a=="US"){document.getElementById("row_usstates").style.display="inline"}else{document.getElementById("row_usstates").style.display="none"}if(a=="CA"){document.getElementById("row_castates").style.display="inline"}else{document.getElementById("row_castates").style.display="none"}if(a=="AU"){document.getElementById("row_austates").style.display="inline"}else{document.getElementById("row_austates").style.display="none"}if(a=="GB"){document.getElementById("row_gbstates").style.display="inline"}else{document.getElementById("row_gbstates").style.display="none"}}function showHidePref(b,a){if(b.value=="US"){a.rows.row_lookusstates.style.display="inline"}else{a.rows.row_lookusstates.style.display="none"}if(b.value=="CA"){a.rows.row_lookcastates.style.display="inline"}else{a.rows.row_lookcastates.style.display="none"}if(b.value=="AU"){a.rows.row_lookaustates.style.display="inline"}else{a.rows.row_lookaustates.style.display="none"}if(b.value=="GB"){a.rows.row_lookgbstates.style.display="inline"}else{a.rows.row_lookgbstates.style.display="none"}}function showHidePref(a){if(a=="US"){document.getElementById("row_lookusstates").style.display="inline"}else{document.getElementById("row_lookusstates").style.display="none"}if(a=="CA"){document.getElementById("row_lookcastates").style.display="inline"}else{document.getElementById("row_lookcastates").style.display="none"}if(a=="AU"){document.getElementById("row_lookaustates").style.display="inline"}else{document.getElementById("row_lookaustates").style.display="none"}if(a=="GB"){document.getElementById("row_lookgbstates").style.display="inline"}else{document.getElementById("row_lookgbstates").style.display="none"}}function openWin(e){if(use_popups==false){window.location.href="viewresult.php?pollid="+e;return}var b=550;var a=378;var d=(screen.width/2)-b/2;var c=(screen.height/2)-a/2;openpopup=window.open("viewresult.php?pollid="+e,"","width="+b+",height="+a+",left="+d+",top="+c+",resizable=yes,scrollbars=yes,status=no");openpopup.opener.name="abc"}function previousPolls(){if(use_popups==false){window.location.href="previouspolls.php";return}var b=600;var a=378;var d=(screen.width/2)-b/2;var c=(screen.height/2)-a/2;openpopup=window.open("previouspolls.php","popupwin","width="+b+",height="+a+",left="+d+",top="+c+",resizable=yes,scrollbars=yes,status=no");openpopup.opener.name="abc"}function launchTellFriend(){if(use_popups==false){window.location.href="tellafriend.php";return}var c=(screen.width/2)-400/2;var b=(screen.height/2)-400/2;var a="width=300,height=250,left="+c+",top="+b+",copyhistory=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no";window.open("tellafriend.php","tellfriend",a)}function launchTellFriendProfile(a){if(use_popups==false){window.location.href="tellafriend.php?ID="+a;return}var d=(screen.width/2)-280/2;var c=(screen.height/2)-280/2;var b="width=280,height=300,left="+d+",top="+c+",copyhistory=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=yes";window.open("tellfriend.php?ID="+a,"tellfriendprofile",b)}var popUpWin=0;function popUpWindowMessage(g,f,b,a,c){b=450;a=450;if(use_popups==false){window.location.href=g;return}if(f=="center"){var e=(screen.width/2)-b/2;var d=(screen.height/2)-a/2}else{var e=0;var d=0}popUpWin=open(g,"popUpWin"+c,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width="+b+",height="+a+",left="+e+", top="+d+",screenX="+e+",screenY="+d+"")}function showIM(a){popUpWindow("showinstantmsg.php?id="+a,"center",320,260,a)}function popUpWindow(g,f,b,a,c){if(use_popups==false){window.location.href=g;return}if(f=="center"){var e=(screen.width/2)-b/2;var d=(screen.height/2)-a/2}else{var e=0;var d=0}popUpWin=open(g,"popUpWin"+c,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,copyhistory=yes,width="+b+",height="+a+",left="+e+", top="+d+",screenX="+e+",screenY="+d+"");popUpWin.opener.name="abc1"}function popUpScrollWindow(f,e,a,b){if(use_popups==false){window.location.href=f;return}height=screen.height-150;height=Math.min(height,b);if(e=="center"){var d=(screen.width/2)-a/2;var c=(screen.height/2)-height/2}else{if(e=="top"){var d=(screen.width/2)-a/2;var c=0}else{var d=0;var c=0}}popUpWin=open(f,"popUpWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width="+a+",height="+height+",left="+d+", top="+c+",screenX="+d+",screenY="+c+"")}function popUpScrollWindow2(f,e,a,b){if(use_profilepopups==false){window.location.href=f;return}height=screen.height-150;height=Math.min(height,b);if(e=="center"){var d=(screen.width/2)-a/2;var c=(screen.height/2)-height/2}else{if(e=="top"){var d=(screen.width/2)-a/2;var c=0}else{var d=0;var c=0}}popUpWin=open(f,"popUpWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width="+a+",height="+height+",left="+d+", top="+c+",screenX="+d+",screenY="+c+"");popUpWin.opener.name="abc1"}var prevRow=null;function toggleRow(b,a){if(prevRow!=null){prevRow.style.display="none"}prevRow=obj=document.getElementById(b);obj.style.display="inline";for(i=0;i<document.getElementById("tblSelect").length;i++){if(i==a){document.getElementById("tblSelect")[i].className="s_table_blue"}else{document.getElementById("tblSelect")[i].className="s_table_white"}}}function votesubmit(h,g){var c=600;var a=378;var f=(screen.width/2)-c/2;var e=(screen.height/2)-a/2;nop=document.frmpoll.rdo.length;var b,d;d="0";for(b=0;b<nop;b++){if(document.frmpoll.rdo[b].checked){d=document.frmpoll.rdo[b].value}}if(use_popups==false){if(d==""){window.location.href="viewresult.php?t="+g+"&pollid="+h}else{window.location.href="votehere.php?t="+g+"&rdo="+d+"&pollid="+h}return}if(d==""){openpopup=window.open("viewresult.php?t="+g+"&pollid="+h,"","width="+c+",height="+a+",left="+f+",top="+e+",resizable=yes,scrollbars=yes,status=no");openpopup.opener.name="abc"}else{openpopup=window.open("votehere.php?t="+g+"&rdo="+d+"&pollid="+h,"","width="+c+",height="+a+",left="+f+",top="+e+",resizable=yes,scrollbars=yes,status=no");openpopup.opener.name="abc"}}function selectRdo(b,a){for(i=0;i<b.length;i++){if(b.elements[i].type=="radio"&&b.elements[i].name=="searchby"&&b.elements[i].value==a){b.elements[i].checked=true}}}function checkAll(b,a,c){for(i=0;i<b.length;i++){if(b.elements[i].type=="checkbox"&&b.elements[i].name==a){b.elements[i].checked=c}}}function datefromtovalid(m,d,k,h,b,e,c){month=new Array("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC");var l=m[m.selectedIndex].value;var n=d[d.selectedIndex].value;var p=k[k.selectedIndex].value;var o=h[h.selectedIndex].value;var g=b[b.selectedIndex].value;var a=e[e.selectedIndex].value;for(var f=0;f<12;f++){if((n==month[f])){n=f}if((g==month[f])){g=f}}from_date=new Date(l,n,p);to_date=new Date(o,g,a);if(from_date>to_date){alert(c);return false}return true}function DateCheck(c,a,b,d){hdt=b[b.selectedIndex].value;hmt=a[a.selectedIndex].value;hyr=c[c.selectedIndex].value;hms_maxval=31;if((hmt=="APR")||(hmt=="JUN")||(hmt=="SEP")||(hmt=="NOV")){hms_maxval=30}if((hmt=="FEB")&&(hyr%4)==0){hms_maxval=29}if((hmt=="FEB")&&(hyr%4)!=0){hms_maxval=28}if(parseInt(hdt)>hms_maxval){alert(d);return false}return true}function validateLogin(a){ErrorMsg=new Array();ErrorMsg[0]="------------------------- The Following Errors Occured -------------------------"+String.fromCharCode(13);CheckFieldString("noblank",a.txtusername,"{$lang.signup_js_errors.username_noblank}");CheckFieldString("noblank",a.txtpassword,"{$lang.signup_js_errors.password_noblank}");CheckFieldString("alphanum",a.txtusername,"{$lang.signup_js_errors.username_charset}");CheckFieldString("alphanum",a.txtpassword,"{$lang.signup_js_errors.password_charset}");result="";if(ErrorCount>0){alert(ErrorMsg[1]);return false}return true}function confirmLink(c,a){var b=confirm(a);if(b){c.href+="&delete=Y"}return b}function confirmButton(a){var b=confirm(a);return b}function countCheck(a){if(document.frmCmt.comment.value.length>a){alert("Too many characters in the comment box!");document.frmCmt.comment.focus();return false}else{return true}}function countText(a){var b=document.frmCmt.counter.value;document.frmCmt.counter.value=document.frmCmt.comment.value.length;if(document.frmCmt.counter.value>a&&b<=a){alert("Too many characters in the comment box!");if(document.styleSheets){document.frmCmt.counter.style.fontWeight="bold";document.frmCmt.counter.style.color="#ff0000"}}else{if(document.frmCmt.counter.value<=a&&b>a&&document.styleSheets){document.frmCmt.counter.style.fontWeight="normal";document.frmCmt.counter.style.color="#000000"}}}function openInParentWindow(a){window.opener.document.location.href=a;window.opener.focus()}function CheckFieldString(f,k,g){var e;var h=k.value;var a=true;var d=false;var c,b;if(f=="noblank"){if(h==""){ErrorCount++;ErrorMsg[ErrorCount]=g}}else{if(f=="integer"){e="0123456789"}else{if(f=="decimal"){e="0123456789."}else{if(f=="text"){e=text_chars}else{if(f=="alphanumeric"){e=alphanumeric_chars}else{if(f=="full"){e=full_chars}else{if(f=="alphanum"){e=alphanum_chars}else{if(f=="email"){e="0123456789_-@.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,7})+$/.test(h)){}else{ErrorCount++;ErrorMsg[ErrorCount]=g}}else{if(f=="phone"){e="0123456789-+"}else{if(f=="URL"){e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.:/\\"}else{if(f=="path"){e="0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz () \\ "}else{ErrorCount++;ErrorMsg[ErrorCount]="Check Validation one of the mentioned validation type is wrong";return 1}}}}}}}}}}for(i=0;i<h.length;i++){ch=h.charAt(i);for(j=0;j<e.length;j++){if(ch==e.charAt(j)){break}if(j==e.length-1){a=false;break}}if(f=="decimal"){for(t=0;t<h.length;t++){dot=h.charAt(t);if(dot=="."&&d==false){d=true}else{if(dot=="."&&d==true){ErrorCount++;ErrorMsg[ErrorCount]=g;break}}}}if(!a){ErrorCount++;ErrorMsg[ErrorCount]=g;break}}}}function reloadCaptcha(){now=new Date();var a=document.getElementById("spam_code_img");if(a){a.src=a.src+(a.src.indexOf("?")>-1?"&":"?")+Math.ceil(Math.random()*(now.getTime()))}}$(function(){$(".zodiac-action").click(function(a){Shadowbox.open({player:"iframe",content:"ajax_zodiac_compatibility.php?user_id="+$(this).attr("data-user-id"),title:"",width:650,height:450});a.preventDefault()})});function error_popup(c,a){if(!a){a={}}var b="<div id='welcome-msg' style='vertical-align:middle;padding:10px;padding-top:20px;text-align:center;font-size:16px;'>"+(a.no_icon?"":"<img src='{$image_dir}{$erricon}' width='16' height='16' style='vertical-align:middle; margin-right:5px;' />")+c+(a.no_button?"":"<br><br><input type='button' class='formbutton' value='OK' onClick='Shadowbox.close();'/>")+"</div>";Shadowbox.open({content:b,player:"html",title:"Notice",height:120,width:300})};
