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 c=http.responseText;var d=new Array();var a=new Array();if(c.indexOf("|||"!=-1)){d=c.split("|||");for(var b=1;b<d.length;b++){a=d[b].split("|:|");document.getElementById(a[0]).innerHTML=a[1]}}}}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(a,b){if(a.value=="US"){b.rows.row_usstates.style.display="inline"}else{b.rows.row_usstates.style.display="none"}if(a.value=="CA"){b.rows.row_castates.style.display="inline"}else{b.rows.row_castates.style.display="none"}if(a.value=="AU"){b.rows.row_austates.style.display="inline"}else{b.rows.row_austates.style.display="none"}if(a.value=="GB"){b.rows.row_gbstates.style.display="inline"}else{b.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(a,b){if(a.value=="US"){b.rows.row_lookusstates.style.display="inline"}else{b.rows.row_lookusstates.style.display="none"}if(a.value=="CA"){b.rows.row_lookcastates.style.display="inline"}else{b.rows.row_lookcastates.style.display="none"}if(a.value=="AU"){b.rows.row_lookaustates.style.display="inline"}else{b.rows.row_lookaustates.style.display="none"}if(a.value=="GB"){b.rows.row_lookgbstates.style.display="inline"}else{b.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 a=550;var b=378;var d=(screen.width/2)-a/2;var c=(screen.height/2)-b/2;openpopup=window.open("viewresult.php?pollid="+e,"","width="+a+",height="+b+",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 a=600;var b=378;var d=(screen.width/2)-a/2;var c=(screen.height/2)-b/2;openpopup=window.open("previouspolls.php","popupwin","width="+a+",height="+b+",left="+d+",top="+c+",resizable=yes,scrollbars=yes,status=no");openpopup.opener.name="abc"}function launchTellFriend(){window.location.href="tellafriend.php";return}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 popUpWindow(e,d,c,a,b){if(use_popups==false){window.location.href=e;return}if(popUpWin){if(!popUpWin.closed){popUpWin.close()}}popUpWin=open(e,"popUpWin","toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,copyhistory=yes,width="+a+",height="+b+",left="+d+", top="+c+",screenX="+d+",screenY="+c+"")}function popUpWindowMessage(f,g,a,c,b){a=450;c=450;if(use_popups==false){window.location.href=f;return}if(g=="center"){var e=(screen.width/2)-a/2;var d=(screen.height/2)-c/2}else{var e=0;var d=0}popUpWin=open(f,"popUpWin"+b,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width="+a+",height="+c+",left="+e+", top="+d+",screenX="+e+",screenY="+d+"")}function showIM(a){popUpWindow("showinstantmsg.php?id="+a,"center",320,260,a)}function popUpWindow(f,g,a,c,b){if(use_popups==false){window.location.href=f;return}if(g=="center"){var e=(screen.width/2)-a/2;var d=(screen.height/2)-c/2}else{var e=0;var d=0}popUpWin=open(f,"popUpWin"+b,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,copyhistory=yes,width="+a+",height="+c+",left="+e+", top="+d+",screenX="+e+",screenY="+d+"")}function popUpScrollWindow(e,f,b,a){if(use_popups==false){window.location.href=e;return}height=screen.height-150;height=Math.min(height,a);if(f=="center"){var d=(screen.width/2)-b/2;var c=(screen.height/2)-height/2}else{if(f=="top"){var d=(screen.width/2)-b/2;var c=0}else{var d=0;var c=0}}popUpWin=open(e,"popUpWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width="+b+",height="+height+",left="+d+", top="+c+",screenX="+d+",screenY="+c+"");popUpWin.opener.name="abc1"}function popUpScrollWindow2(e,f,b,a){if(use_profilepopups==false){window.location.href=e;return}height=screen.height-150;height=Math.min(height,a);if(f=="center"){var d=(screen.width/2)-b/2;var c=(screen.height/2)-height/2}else{if(f=="top"){var d=(screen.width/2)-b/2;var c=0}else{var d=0;var c=0}}popUpWin=open(e,"popUpWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width="+b+",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 b=600;var d=378;var f=(screen.width/2)-b/2;var e=(screen.height/2)-d/2;nop=document.frmpoll.rdo.length;var a,c;c="0";for(a=0;a<nop;a++){if(document.frmpoll.rdo[a].checked){c=document.frmpoll.rdo[a].value}}if(use_popups==false){if(c==""){window.location.href="viewresult.php?t="+g+"&pollid="+h}else{window.location.href="votehere.php?t="+g+"&rdo="+c+"&pollid="+h}return}if(c==""){openpopup=window.open("viewresult.php?t="+g+"&pollid="+h,"","width="+b+",height="+d+",left="+f+",top="+e+",resizable=yes,scrollbars=yes,status=no");openpopup.opener.name="abc"}else{openpopup=window.open("votehere.php?t="+g+"&rdo="+c+"&pollid="+h,"","width="+b+",height="+d+",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,e,k,h,c,f,d){month=new Array("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC");var l=m[m.selectedIndex].value;var n=e[e.selectedIndex].value;var p=k[k.selectedIndex].value;var o=h[h.selectedIndex].value;var b=c[c.selectedIndex].value;var a=f[f.selectedIndex].value;for(var g=0;g<12;g++){if((n==month[g])){n=g}if((b==month[g])){b=g}}from_date=new Date(l,n,p);to_date=new Date(o,b,a);if(from_date>to_date){alert(d);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,b){var a=confirm(b);if(a){c.href+="&delete=Y"}return a}function confirmButton(b){var a=confirm(b);return a}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(b){var a=document.frmCmt.counter.value;document.frmCmt.counter.value=document.frmCmt.comment.value.length;if(document.frmCmt.counter.value>b&&a<=b){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<=b&&a>b&&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()};