var HOME_PATH="/";var SIGNUP_PATH="/signUp";var SEARCH_PATH="/search";var COOKIE_TTL_DAYS=730;var countryList=null;var regionList=null;var cityList=null;var currentCountryID="0";var currentRegionID="0";var currentCityID="0";function getCookie(A){var B=new RegExp(A+"=([^;]+)");var C=B.exec(document.cookie);if(C!=null){return C[1]}else{return false}}function setCookie(C,E,A,G,D,F){var B=new Date();if(A!=null){B.setTime(B.getTime()+(A*24*60*60*1000))}document.cookie=C+"="+E+((A==null)?"":"; expires="+B.toGMTString())+((G==null)?"":"; path="+G)+((D==null)?"":"; domain="+D)+((F==null)?"":"; secure")}function deleteCookie(A){if(getCookie(A)){document.cookie=A+"=; expires=Thu, 01-Jan-70 00:00:01 GMT"}}function trimWhitespace(A,B){if(B==true){A=A.replace(/\s{2,516}/g," ")}return A.replace(/^\s+|\s+$/g,"")}function verifyUsernamePasswordChars(A){if(!A.match("^\\S{2,20}$")){return false}else{if(A.indexOf("&")!=-1){return false}else{if(A.indexOf("<")!=-1){return false}else{if(A.indexOf(">")!=-1){return false}else{if(A.indexOf("#")!=-1){return false}else{if(A.indexOf("(")!=-1){return false}else{if(A.indexOf(")")!=-1){return false}else{return true}}}}}}}}function verifyEmailAddy(A){if(!A.match("^[a-zA-Z0-9._%+-]+@([a-zA-Z0-9-]+[.]{1})+[a-zA-Z]{2,4}$")){return false}else{return true}}function verifySecurityCode(A){if(!A.match("^\\w{6}$")){return false}else{return true}}function getValue(B,D,F){var A=0;var E=F.split("&");for(var C=0;C<E.length;C++){var G=E[C].split("=");if(G[0].indexOf(B)==0){if(A==D){return G[1]}else{A++}}}return false}function confirmAction(A){return confirm(A)}function addWMSBookmark(){var A="http://www.wheresmystar.com";var B="WheresMyStar.com - 100% Free Online Dating";if(window.external&&navigator.userAgent.indexOf("MSIE")!=-1){window.external.AddFavorite(A,B)}else{if(window.sidebar&&navigator.userAgent.indexOf("Safari")==-1&&navigator.userAgent.indexOf("Opera")==-1){window.sidebar.addPanel(B,A,"")}else{alert("Your browser does not support automatic bookmarking.\n\nYou'll have to manually bookmark our awesome site using your browswers' menu.  :(\n\n"+B)}}}function isCookiesAndJavascriptEnabled(){if(location.href=="http://wheresmystar.com"||location.href=="http://wheresmystar.com/"){location.href="http://www.wheresmystar.com";return true}var C="Hello!";setCookie("test",C,null,HOME_PATH,null,null);if(getCookie("test")==C){var B=document.getElementById("cookiesAndJavascriptInfo");B.style.backgroundColor="#eee";B.style.color="#000";var A=document.getElementById("cookiesAndJavascriptError");A.innerHTML="Enabled";deleteCookie("test")}else{alert("Sorry, but you must ENABLE cookies to use this site properly!")}document.getElementById("cookiesAndJavascriptInfo").style.display="block"}function saveLoginData(){if(document.getElementById("saveLoginInfo").checked==true){var A="lem="+document.getElementsByName("lem")[0].value+"&lpa="+document.getElementsByName("lpa")[0].value;setCookie("loginData",A,COOKIE_TTL_DAYS,HOME_PATH,null,null)}else{setCookie("loginData","lem=&lpa=",COOKIE_TTL_DAYS,HOME_PATH,null,null);deleteCookie("loginData")}}function showLoginDiv(){document.getElementById("topMenuDiv").style.display="none";document.getElementById("topLoginDiv").style.display="block";document.getElementsByName("lem")[0].focus()}function testBrowserForPng(){var A=0;if(navigator.appVersion.indexOf("MSIE")!=-1){var B=navigator.appVersion.split("MSIE");A=parseFloat(B[1])}if(A!=0&&A>0&&A<7){var C=getCookie("pngTest");if(C==false){setCookie("pngTest","hello there!",COOKIE_TTL_DAYS,HOME_PATH,null,null);alert("Welcome to our humble site.\n\nWe see that you are using an old web browser.\n\nIf you upgrade to something better, like Firefox or Internet Explorer 7.0, this site will look TONS better!\n\nWe just thought you would like to know.  Have fun!  :)")}}}function loadLoginData(){var D=document.getElementById("logOutLink");var C=getCookie("wmsUsername");if(C!=false&&C!=""){D.innerHTML="&#187; LOGOUT, "+C+" &#171;";D.href="/logout";D.onclick=null}else{showLoginDiv();C=getCookie("loginData");if(C!=false&&C!=""){if(getValue("lem",0,C)!=false){document.getElementById("saveLoginInfo").checked=true;document.getElementsByName("lem")[0].value=getValue("lem",0,C);document.getElementsByName("lpa")[0].value=getValue("lpa",0,C)}}}var B=new Array("<i>I never knew how to worship until I knew how to love.</i>&nbsp;-- Henry Ward Beecher","<i>A kiss is a lovely trick designed by nature to stop speech when words become superfluous.</i>&nbsp;-- Ingrid Bergman","<i>Nothing takes the taste out of peanut butter quite like unrequited love.</i>&nbsp;-- Charlie Brown","<i>Love is life. And if you miss love, you miss life.</i>&nbsp;-- Leo Buscaglia","<i>The way to love anything is to realize that it might be lost.</i>&nbsp;-- G. K. Chesterton","<i>Friendship often ends in love; but love in friendship - never.</i>&nbsp;-- Charles Caleb Colton","<i>True friendship is like sound health; the value of it is seldom known until it be lost.</i>&nbsp;-- Charles Caleb Colton","<i>We cease loving ourselves if no one loves us.</i>&nbsp;-- Madame De Staël","<i>It is the friends that you can call at 4 A.M. that matter.</i>&nbsp;-- Marlene Dietrich","<i>Gravitation can not be held responsible for people falling in love.</i>&nbsp;-- Albert Einstein","<i>A friend may well be reckoned the masterpiece of nature.</i>&nbsp;-- Ralph Waldo Emerson","<i>The only way to have a friend is to be one.</i>&nbsp;-- Ralph Waldo Emerson","<i>All mankind love a lover.</i>&nbsp;-- Ralph Waldo Emerson","<i>Thou art to me a delicious torment.</i>&nbsp;-- Ralph Waldo Emerson","<i>Real friendship is shown in times of trouble; prosperity is full of friends.</i>&nbsp;-- Euripedes","<i>My best friend is the one that brings out the best in me.</i>&nbsp;-- Henry Ford","<i>He that falls in love with himself will have no rivals.</i>&nbsp;-- Benjamin Franklin","<i>Where there is love there is life.</i>&nbsp;-- Gandhi","<i>Ever has it been that love knows not its own depth until the hour of separation.</i>&nbsp;-- Kahlil Gibran","<i>Some of us think holding on makes us strong; but sometimes it is letting go.</i>&nbsp;-- Herman Hesse","<i>The supreme happiness in life is the conviction that we are loved.</i>&nbsp;-- Victor Hugo","<i>True love is like ghosts, which everybody talks about and few have seen.</i>&nbsp;-- La Rochefoucauld","<i>Be kind whenever possible...It is always possible.</i>&nbsp;-- Dalai Lama","<i>To love another person is to see the face of God.</i>&nbsp;-- Les Miserables","<i>Am I not destroying my enemies when I make friends of them?</i>&nbsp;-- Abraham Lincoln","<i>Who ever loved that loved not at first sight?</i>&nbsp;-- Christopher Marlowe","<i>Love cures people - both the ones who give it and the ones who receive it.</i>&nbsp;-- Dr. Karl Menninger","<i>Came but for friendship, and took away love.</i>&nbsp;-- Thomas Moore","<i>Love demands infinitely less than friendship.</i>&nbsp;-- George Jean Nathan","<i>You tell a girl she looks great and what's the first thing you do? Turn out the lights!</i>&nbsp;-- Robert Orben","<i>The heart has reasons that reason cannot know.</i>&nbsp;-- Pascal","<i>Years of love have been forgot, in the hatred of a minute.</i>&nbsp;-- Edgar Allan Poe","<i>For love deceives the best of womankind.</i>&nbsp;-- Alexander Pope","<i>You can hardly make a friend in a year, but you can easily offend one in an hour.</i>&nbsp;-- Chinese Proverb","<i>Love makes the time pass. Time makes love pass.</i>&nbsp;-- French Proverb","<i>Life without a friend is death without a witness.</i>&nbsp;-- Spanish Proverb","<i>We cannot really love anybody with whom we never laugh.</i>&nbsp;-- Agnes Repplier","<i>Love sought is good, but given unsought, is better.</i>&nbsp;-- William Shakespeare","<i>The course of true love never did run smooth.</i>&nbsp;-- William Shakespeare","<i>Friendship is constant in all other things. Save in the office and affairs of love.</i>&nbsp;-- William Shakespeare","<i>Love is but the discovery of ourselves in others, and the delight in the recognition.</i>&nbsp;-- Alexander Smith","<i>Better to have loved and lost, than to have never loved at all.</i>&nbsp;-- St. Augustine","<i>To love and win is the best thing. To love and lose, the next best.</i>&nbsp;-- William M. Thackeray","<i>If you judge people, you have no time to love them.</i>&nbsp;-- Mother Theresa","<i>There is no remedy for love but to love more.</i>&nbsp;-- Thoreau","<i>Love is the irresistible desire to be irresistibly desired.</i>&nbsp;-- Mark Twain","<i>One personals site to rule them all!</i>&nbsp;-- anonymous WheresMyStar.com member","<i>Wow! A free dating site that actually looks professional. Thanks!</i>&nbsp;-- anonymous WheresMyStar.com member","<i>Follow the Light...</i>&nbsp;-- WheresMyStar.com","<i>The Elite of Fine Online Dating</i>&nbsp;-- WheresMyStar.com","<i>Every great fire starts with a spark!</i>&nbsp;-- WheresMyStar.com","<i>Get those Sparks&trade; flying!</i>&nbsp;-- WheresMyStar.com","<i>Paying $20 bucks a month for a dating site is just crazy.</i>&nbsp;-- WheresMyStar.com","<i>29 dimensions of matching for $200 bucks a month?!...No thanks.</i>&nbsp;-- WheresMyStar.com","<i>We don't like stock photography on our pages.</i>&nbsp;-- WheresMyStar.com","<i>The design is simple but sophisticated...</i>&nbsp;-- JAB- JustABout Everything","<i>WheresMyStar is sure to become not only the premier free dating service on the internet...</i>&nbsp;-- My-Resource News","<i>The saddest thing in the world, is loving someone who used to love you.</i>&nbsp;-- unknown","<i>Love is grand; divorce is a hundred grand.</i>&nbsp;-- unknown","<i>God save me from my friends - I can protect myself from my enemies.</i>&nbsp;-- unknown","<i>Love begins with a smile, grows with a kiss, and ends with a teardrop.</i>&nbsp;-- unknown","<i>We always believe our first love is our last, and our last love our first.</i>&nbsp;-- unknown","<i>You don't marry someone you can live with - you marry the person who you cannot live without.</i>&nbsp;-- unknown");var E=document.getElementById("quickQuote");var A=Math.floor(B.length*(Math.random()%1));E.innerHTML=B[A]}function changeToGoodBoxDisplay(A){A.className="normalInput"}function changeToErrorBoxDisplay(A){A.className="errorInput"}function swapSearchDiv(A,C){if(C=="0"){document.getElementById("searchBtn").value="ZIP Code Search"}else{if(C=="1"){document.getElementById("searchBtn").value="Location Search"}else{if(C=="2"){document.getElementById("searchBtn").value="Keyword Search"}else{if(C=="3"){document.getElementById("searchBtn").value="Username Search"}}}}for(var B=0;B<document.getElementsByName(A).length;B++){document.getElementById("searchDiv"+B).style.display="none"}document.getElementById("searchDiv"+C).style.display="block"}function submitLogin(){if(verifyEmailAddy(document.getElementsByName("lem")[0].value)==false){changeToErrorBoxDisplay(document.getElementsByName("lem")[0]);alert("Whoops! Your Email Address is not valid.  Please re-enter it.");return false}else{if(verifyUsernamePasswordChars(document.getElementsByName("lpa")[0].value)==false){changeToErrorBoxDisplay(document.getElementsByName("lpa")[0]);alert("Whoops! Your Password is not valid.  Please re-enter it.");return false}else{document.getElementById("loginBtn").disabled=true;saveLoginData();return true}}}function initLocationLists(){var A,B,C;if(currentCountryID==0){regionList.disabled=true;cityList.disabled=true}else{if(g_hasRegionsArray[currentCountryID]==1){A=document.getElementsByTagName("head")[0];B=document.createElement("script");B.type="text/javascript";B.id="region_script";C="/javascripts/";C+=currentCountryID;C+=".js";B.src=C;A.appendChild(B);if(currentRegionID!=0){A=document.getElementsByTagName("head")[0];B=document.createElement("script");B.type="text/javascript";B.id="city_script";C="/javascripts/";C+=currentCountryID;C+="_";C+=currentRegionID;C+=".js";B.src=C;A.appendChild(B)}else{cityList.disabled=true}}else{regionList[0].text="~~ No Regions ~~";regionList.disabled=true;A=document.getElementsByTagName("head")[0];B=document.createElement("script");B.type="text/javascript";B.id="city_script";C="/javascripts/";C+=currentCountryID;C+="_";C+=currentRegionID;C+=".js";B.src=C;A.appendChild(B)}}}function loadCountryList(){countryList.options.length=g_countryArray.length;for(var A=0;A<g_countryArray.length;A++){countryList[A].value=g_countryArray[A][0];countryList[A].text=g_countryArray[A][1];if(g_countryArray[A][0]==currentCountryID){countryList.options[A].selected=true}}}function loadRegionList(){regionList.options.length=g_regionArray.length;for(var A=0;A<g_regionArray.length;A++){regionList[A].value=g_regionArray[A][0];regionList[A].text=g_regionArray[A][1];if(g_regionArray[A][0]==currentRegionID){regionList.options[A].selected=true}}regionList.disabled=false}function loadCityList(){cityList.options.length=g_cityArray.length;for(var A=0;A<g_cityArray.length;A++){cityList[A].value=g_cityArray[A][0];cityList[A].text=g_cityArray[A][1];if(g_cityArray[A][0]==currentCityID){cityList.options[A].selected=true}}cityList.disabled=false}function changeLocationList(D){var B,A,C,E;if(D=="country"){regionList.value=0;cityList.value=0;currentCountryID=countryList.value;currentRegionID=regionList.value;currentCityID=cityList.value;if(countryList.value==0){regionList.disabled=true;cityList.disabled=true}else{B=document.getElementById("region_script");A=document.getElementsByTagName("head")[0];if(B){A.removeChild(B);g_regionArray=undefined}B=document.getElementById("city_script");if(B){A.removeChild(B);g_cityArray=undefined}C=document.createElement("script");C.type="text/javascript";E="/javascripts/";E+=countryList.value;if(g_hasRegionsArray[countryList.value]==0){C.id="city_script";E+="_0";(regionList)[0].text="~~ No Regions ~~";(cityList)[0].text="Loading....."}else{(regionList)[0].text="Loading.....";C.id="region_script"}E+=".js";C.src=E;regionList.value=0;regionList.disabled=true;cityList.value=0;cityList.disabled=true;A.appendChild(C)}}else{if(D=="region"){cityList.value=0;currentCountryID=countryList.value;currentRegionID=regionList.value;currentCityID=cityList.value;if(regionList.value==0){cityList.disabled=true}else{(cityList)[0].text="Loading.....";cityList.disabled=true;B=document.getElementById("city_script");A=document.getElementsByTagName("head")[0];if(B){A.removeChild(B);g_cityArray=undefined}C=document.createElement("script");C.type="text/javascript";C.id="city_script";E="/javascripts/";E+=countryList.value;E+="_";E+=regionList.value;E+=".js";C.src=E;A.appendChild(C)}}}}function initSignUp(){countryList=document.getElementById("suco");regionList=document.getElementById("sure");cityList=document.getElementById("suci");currentCountryID=0;currentRegionID=0;currentCityID=0;loadCountryList();initLocationLists()}function getSignUpValue(B,C){var A=getCookie("signUpData");return getValue(B,C,A)}function swapSignUpDiv(A){if(A=="0"){document.getElementById("signUpLocationDiv").style.display="none";document.getElementById("signUpZipcodeDiv").style.display="block";document.getElementsByName("sur")[0].checked=true}else{if(A=="1"){document.getElementById("signUpZipcodeDiv").style.display="none";document.getElementById("signUpLocationDiv").style.display="block";document.getElementsByName("sur")[1].checked=true}}}function loadSignUpData(P){var D=document.getElementById("suus");var A=document.getElementById("supa");var G=document.getElementById("suvp");var J=document.getElementById("suem");var B=document.getElementById("suzi");var R=document.getElementById("sume");var E=document.getElementById("suyo");var M=document.getElementById("sula");var K=document.getElementById("suua");var C=document.getElementById("sura");var Q=document.getElementById("sumo");var L=document.getElementById("suda");var I=document.getElementById("suye");if(P!="0"){document.getElementById("signUpError"+P).style.display="block";if(P=="1"){changeToErrorBoxDisplay(D)}else{if(P=="2"||P=="3"||P=="4"){changeToErrorBoxDisplay(J)}else{var F=document.getElementById("susc");changeToErrorBoxDisplay(F);F.value=getSignUpValue("susc",0)}}}else{var O=getCookie("wmsUsername");if(O!=false&&O!=""){document.getElementById("updateSignUp").style.display="block"}else{document.getElementById("signUpNoError").style.display="block"}}D.value=getSignUpValue("suus",0);A.value=getSignUpValue("supa",0);G.value=A.value;J.value=getSignUpValue("suem",0);swapSignUpDiv(getSignUpValue("sur",0));B.value=getSignUpValue("suzi",0);countryList=document.getElementById("suco");regionList=document.getElementById("sure");cityList=document.getElementById("suci");currentCountryID=getSignUpValue("suco",0);currentRegionID=getSignUpValue("sure",0);currentCityID=getSignUpValue("suci",0);loadCountryList();initLocationLists();R.selectedIndex=getSignUpValue("sume",0);E.selectedIndex=getSignUpValue("suyo",0);var H=getSignUpValue("sula",0);var N=getSignUpValue("suua",0);M.options[H-18].selected=true;K.options[N-18].selected=true;C.selectedIndex=getSignUpValue("sura",0);Q.value=getSignUpValue("sumo",0);L.value=getSignUpValue("suda",0);I.value=getSignUpValue("suye",0)}function saveSignUpData(){var A="";A+="suem="+document.getElementById("suem").value;A+="&supa="+document.getElementById("supa").value;A+="&suus="+document.getElementById("suus").value;if(document.getElementsByName("sur")[0].checked==true){A+="&sur=0"}else{A+="&sur=1"}A+="&sume="+document.getElementById("sume").selectedIndex;A+="&suyo="+document.getElementById("suyo").selectedIndex;A+="&suzi="+document.getElementById("suzi").value;A+="&suco="+document.getElementById("suco").value;A+="&sure="+document.getElementById("sure").value;A+="&suci="+document.getElementById("suci").value;A+="&sula="+document.getElementById("sula").value;A+="&suua="+document.getElementById("suua").value;A+="&sura="+document.getElementById("sura").value;A+="&sumo="+document.getElementById("sumo").value;A+="&suda="+document.getElementById("suda").value;A+="&suye="+document.getElementById("suye").value;if(document.getElementById("susc")!=null){A+="&susc="+document.getElementById("susc").value}setCookie("signUpData",A,null,SIGNUP_PATH,null,null)}function submitSignUp(){var F=document.getElementById("suem");var D=document.getElementById("suus");var M=document.getElementById("supa");var A=document.getElementById("suvp");var E=document.getElementById("sumo");var K=document.getElementById("suda");var I=document.getElementById("suye");F.value=trimWhitespace(F.value,true);D.value=trimWhitespace(D.value,true);if(!verifyEmailAddy(F.value)){changeToErrorBoxDisplay(F);alert("Whoops! Your Email Address is not valid.  Please re-enter it.");return false}else{if(F.value.match(/earthlink.net/gi)){changeToErrorBoxDisplay(F);alert("We apologize, but our site does not work with EARTHLINK.NET email addresses.\nWe have contacted Earthlink multiple times, but they refuse to respond to us.\n\nPlease try again with a different email address  :)");return false}else{if(F.value.match(/peoplepc.com/gi)){changeToErrorBoxDisplay(F);alert("We apologize, but our site does not work with PEOPLEPC.COM email addresses.\nWe have contacted PeoplePC multiple times, but they refuse to respond to us.\n\nPlease try again with a different email address  :)");return false}else{if(F.value.match(/mindspring.com/gi)){changeToErrorBoxDisplay(F);alert("We apologize, but our site does not work with PEOPLEPC.COM email addresses.\nWe have contacted PeoplePC multiple times, but they refuse to respond to us.\n\nPlease try again with a different email address  :)");return false}else{changeToGoodBoxDisplay(F)}}}}if(!verifyUsernamePasswordChars(M.value)){changeToErrorBoxDisplay(M);alert("Whoops! Your Password is not valid.  Please re-enter it.");return false}else{changeToGoodBoxDisplay(M)}if(M.value!=A.value){changeToErrorBoxDisplay(M);changeToErrorBoxDisplay(A);alert("Whoops! Your passwords do not match each other.  Please re-enter them.");return false}else{changeToGoodBoxDisplay(M);changeToGoodBoxDisplay(A)}if(!verifyUsernamePasswordChars(D.value)||verifyEmailAddy(D.value)){changeToErrorBoxDisplay(D);alert("Whoops! Your Username is not valid.  Please re-enter it.");return false}else{changeToGoodBoxDisplay(D)}if(document.getElementsByName("sur")[0].checked==true){var B=false;var H=document.getElementById("suzi");if(!(H.value).match(/\d{5}/)){changeToErrorBoxDisplay(H);alert("Whoops! Your ZIP Code is not valid.  Please re-enter it.");return false}else{for(var C=0;C<g_zipRangeArray.length;C+=2){if(H.value>=g_zipRangeArray[C]&&H.value<=g_zipRangeArray[C+1]){B=true;break}}if(B==true){changeToGoodBoxDisplay(H)}else{changeToErrorBoxDisplay(H);alert("Whoops! Your ZIP Code is not valid.  Please re-enter it.");return false}}}else{if(document.getElementsByName("sur")[1].checked==true){if(document.getElementById("suci").value==0){alert("Whoops! Please choose your city, then click 'Submit' again!");return false}}}E.value=(E.value).replace(/^0+|$/,"");if(!(E.value).match(/\d{1,2}/)||E.value>12){changeToErrorBoxDisplay(E);alert("Whoops! Your Birth Month is not valid.  Please re-enter it.");return false}else{changeToGoodBoxDisplay(E)}K.value=(K.value).replace(/^0+|$/,"");if(!(K.value).match(/\d{1,2}/)||K.value>31||((E.value==4||E.value==6||E.value==9||E.value==11)&&K.value==31)){changeToErrorBoxDisplay(K);alert("Whoops! Your Birth Day is not valid.  Please re-enter it.");return false}else{changeToGoodBoxDisplay(K)}if(!(I.value).match(/\d{4}/)){changeToErrorBoxDisplay(I);alert("Whoops! Your Birth Year is not valid.  Please re-enter it.");return false}else{changeToGoodBoxDisplay(I)}if((E.value==2&&(I.value%4==0&&(I.value%100!=0||I.value%400==0))&&K.value>29)||E.value==2&&!(I.value%4==0&&(I.value%100!=0||I.value%400==0))&&K.value>28){changeToErrorBoxDisplay(K);alert("Whoops! Your Birthday is not valid.  Please re-enter it.");return false}var L=0;var G=new Date();L=G.getFullYear()-I.value-1;if(((G.getMonth()+1)>E.value)||(E.value==(G.getMonth()+1)&&K.value<=G.getDate())){L++}if(L<18||L>99){changeToErrorBoxDisplay(E);changeToErrorBoxDisplay(K);changeToErrorBoxDisplay(I);if(L<18){alert("You're too young to be a member of this site. Scram back to MySpace!")}else{alert("Nobody believes you're older than 99 and want to join this site.")}return false}if(document.getElementById("susc")!=null){var J=document.getElementById("susc");if(!verifySecurityCode(J.value)){changeToErrorBoxDisplay(J);alert("Whoops! Your Security Code is not valid.  Please re-enter it.");return false}alert("Please be patient as we validate your data.\nThis may take a minute or 2 and then you'll be all set.\nThanks!");document.getElementById("signUpBtn").value="Please Be Patient..."}document.getElementById("signUpBtn").disabled=true;saveSignUpData();return true}function submitVerifyMemberPassword(){var A=document.getElementsByName("vpa")[0];if(verifyUsernamePasswordChars(A.value)==false){changeToErrorBoxDisplay(A);alert("Whoops! Your Password is not valid.  Please re-enter it.");return false}else{return true}}function swapMiniSearchDiv(A){if(A=="0"){document.getElementById("miniSearchLocationDiv").style.display="none";document.getElementById("miniSearchZipcodeDiv").style.display="block";document.getElementById("miniSearchBtn").value="ZIP Code Search";document.getElementsByName("msr")[0].checked=true}else{if(A=="1"){document.getElementById("miniSearchZipcodeDiv").style.display="none";document.getElementById("miniSearchLocationDiv").style.display="block";document.getElementById("miniSearchBtn").value="Location Search";document.getElementsByName("msr")[1].checked=true}}}function loadMiniSearchData(){var C=getCookie("miniSearchPrefs")||"msr=1&mme=0&myo=1&mla=18&mua=45&mra=0&mco=0&mph=0";var A=getValue("msr",0,C);swapMiniSearchDiv(A);document.getElementsByName("mme")[0].selectedIndex=getValue("mme",0,C);document.getElementsByName("myo")[0].selectedIndex=getValue("myo",0,C);var B=document.getElementsByName("mla")[0];var G=document.getElementsByName("mua")[0];var I=getValue("mla",0,C);var D=getValue("mua",0,C);B.options[I-18].selected=true;G.options[D-18].selected=true;document.getElementsByName("mra")[0].selectedIndex=getValue("mra",0,C);if(getValue("mzi",0,C)){document.getElementsByName("mzi")[0].value=getValue("mzi",0,C)}var K=document.getElementsByName("mco")[0];K.options.length=g_countryArray.length;var E="";var F=18;var J=getValue("mco",0,C);for(var H=0;H<g_countryArray.length;H++){K.options[H].value=g_countryArray[H][0];E=g_countryArray[H][1];if(E.length>F){E=E.substr(0,F);E=E+"..."}if(H==0){K.options[H].text="~~ All Countries ~~"}else{K.options[H].text=E}if(g_countryArray[H][0]==J){K.options[H].selected=true}}if(getValue("mph",0,C)=="1"){document.getElementsByName("mph")[0].checked=true}else{document.getElementsByName("mph")[0].checked=false}if(getValue("mon",0,C)=="1"){document.getElementsByName("mon")[0].checked=true}else{document.getElementsByName("mon")[0].checked=false}}function saveMiniSearchPrefs(){var A="";A+="msr="+(document.getElementsByName("msr")[0].checked==true?"0":"1");A+="&mme="+document.getElementsByName("mme")[0].selectedIndex;A+="&myo="+document.getElementsByName("myo")[0].selectedIndex;A+="&mla="+document.getElementsByName("mla")[0].value;A+="&mua="+document.getElementsByName("mua")[0].value;A+="&mra="+document.getElementsByName("mra")[0].selectedIndex;A+="&mzi="+document.getElementsByName("mzi")[0].value;A+="&mco="+document.getElementsByName("mco")[0].value;A+="&mph="+(document.getElementsByName("mph")[0].checked==true?"1":"0");A+="&mon="+(document.getElementsByName("mon")[0].checked==true?"1":"0");setCookie("miniSearchPrefs",A,COOKIE_TTL_DAYS,HOME_PATH,null,null)}function submitMiniSearch(){if(document.getElementsByName("msr")[0].checked==true){var B=document.getElementsByName("mzi")[0];if(!(B.value).match(/\d{5}/)){changeToErrorBoxDisplay(B);alert("Whoops! This ZIP Code is not valid.  Please re-enter it.");return false}else{for(var A=0;A<g_zipRangeArray.length;A+=2){if(B.value>=g_zipRangeArray[A]&&B.value<=g_zipRangeArray[A+1]){saveMiniSearchPrefs();document.getElementById("miniSearchBtn").disabled=true;return true}}changeToErrorBoxDisplay(B);alert("Whoops! This ZIP Code is not valid.  Please re-enter it.");return false}return false}else{if(document.getElementsByName("msr")[1].checked==true){saveMiniSearchPrefs();document.getElementById("miniSearchBtn").disabled=true;return true}}}var allSearchNames=["sr","me","yo","la","ua","ph","on","ra","zi","co","re","ci","ke","us","et","lh","uh","bt","ec","hc","ht","ex","dd","sm","dr","du","ho","hk","wk","jc","in","cs","fa","ed","po","zs"];var optionNames=["et","lh","uh","bt","ec","hc","ht","ex","dd","sm","dr","du","ho","hk","wk","jc","in","cs","fa","ed","po","zs"];function getSearchValue(B,C){var A=getCookie("searchPrefs")||"me=0&yo=1&la=18&ua=45&ph=0&ra=0&sr=0&co=0&re=0&ci=0&lh=0&uh=0";return getValue(B,C,A)}function loadSearchData(){document.getElementsByName("me")[0].selectedIndex=getSearchValue("me",0);document.getElementsByName("yo")[0].selectedIndex=getSearchValue("yo",0);var C=document.getElementsByName("la")[0];var A=document.getElementsByName("ua")[0];var B=getSearchValue("la",0);var G=getSearchValue("ua",0);C.options[B-18].selected=true;A.options[G-18].selected=true;if(getSearchValue("ph",0)=="1"){document.getElementsByName("ph")[0].checked="checked"}if(getSearchValue("on",0)=="1"){document.getElementsByName("on")[0].checked="checked"}document.getElementsByName("sr")[getSearchValue("sr",0)].checked="checked";swapSearchDiv("sr",getSearchValue("sr",0));document.getElementsByName("ra")[0].selectedIndex=getSearchValue("ra",0);if(getSearchValue("zi",0)!=false){document.getElementsByName("zi")[0].value=getSearchValue("zi",0)}if(getSearchValue("ke",0)!=false){document.getElementsByName("ke")[0].value=getSearchValue("ke",0)}if(getSearchValue("us",0)!=false){document.getElementsByName("us")[0].value=getSearchValue("us",0)}for(var F=0;F<optionNames.length;F++){if(optionNames[F]=="lh"){document.getElementsByName("lh")[0].selectedIndex=getSearchValue("lh",0)}else{if(optionNames[F]=="uh"){document.getElementsByName("uh")[0].selectedIndex=getSearchValue("uh",0)}else{var E=document.getElementsByName(optionNames[F]).length;for(var D=0;D<E-1;D++){var H=getSearchValue(optionNames[F],D);if(H){document.getElementsByName(optionNames[F])[H].checked=true}else{break}}}}}checkNotice();countryList=document.getElementsByName("co")[0];regionList=document.getElementsByName("re")[0];cityList=document.getElementsByName("ci")[0];currentCountryID=getSearchValue("co",0);currentRegionID=getSearchValue("re",0);currentCityID=getSearchValue("ci",0);loadCountryList();initLocationLists()}function submitSearch(){document.getElementById("searchBtn").disabled=true;if(document.getElementsByName("sr")[0].checked==true){var C=document.getElementsByName("zi")[0];if(!(C.value).match(/\d{5}/)){changeToErrorBoxDisplay(C);alert("Whoops! This ZIP Code is not valid.  Please re-enter it.")}else{for(var B=0;B<g_zipRangeArray.length;B+=2){if(C.value>=g_zipRangeArray[B]&&C.value<=g_zipRangeArray[B+1]){saveSearchPrefs();return true}}changeToErrorBoxDisplay(C);alert("Whoops! This ZIP Code is not valid.  Please re-enter it.")}}else{if(document.getElementsByName("sr")[1].checked==true){saveSearchPrefs();return true}else{if(document.getElementsByName("sr")[2].checked==true){var A=document.getElementsByName("ke")[0];A.value=trimWhitespace(A.value,true);if(A.value==""||A.value==" "||A.value.length<4){changeToErrorBoxDisplay(A);alert("Whoops! This keyword value is not valid.  Please re-enter it.\n\nA keyword must have 4 or more letters.")}else{saveSearchPrefs();return true}}else{if(document.getElementsByName("sr")[3].checked==true){var D=document.getElementsByName("us")[0];D.value=trimWhitespace(D.value,true);if(verifyUsernamePasswordChars(D.value)){saveSearchPrefs();return true}else{changeToErrorBoxDisplay(D);alert("Whoops! This username value is not valid.  Please re-enter it.")}}}}}document.getElementById("searchBtn").disabled=false;return false}function saveSearchPrefs(){var C="";var B=0,A=0;C+="me="+document.getElementsByName("me")[0].selectedIndex;C+="&yo="+document.getElementsByName("yo")[0].selectedIndex;C+="&la="+document.getElementsByName("la")[0].value;C+="&ua="+document.getElementsByName("ua")[0].value;if(document.getElementsByName("ph")[0].checked==true){C+="&ph="+document.getElementsByName("ph")[0].value}if(document.getElementsByName("on")[0].checked==true){C+="&on="+document.getElementsByName("on")[0].value}C+="&ra="+document.getElementsByName("ra")[0].selectedIndex;C+="&zi="+document.getElementsByName("zi")[0].value;for(B=0;B<document.getElementsByName("sr").length;B++){if(document.getElementsByName("sr")[B].checked==true){C+="&sr="+B;break}}C+="&co="+document.getElementsByName("co")[0].value;C+="&re="+document.getElementsByName("re")[0].value;C+="&ci="+document.getElementsByName("ci")[0].value;C+="&ke="+document.getElementsByName("ke")[0].value;C+="&us="+document.getElementsByName("us")[0].value;for(B=0;B<optionNames.length;B++){if(optionNames[B]=="lh"){C+="&lh="+document.getElementsByName("lh")[0].selectedIndex}else{if(optionNames[B]=="uh"){C+="&uh="+document.getElementsByName("uh")[0].selectedIndex}else{for(A=0;A<document.getElementsByName(optionNames[B]).length;A++){if(document.getElementsByName(optionNames[B])[A].checked==true){C+="&"+optionNames[B]+"="+A}}}}}setCookie("searchPrefs",C,COOKIE_TTL_DAYS,SEARCH_PATH,null,null)}function checkAge(H,F,B){var C=document.getElementsByName(H)[0];var A=document.getElementsByName(F)[0];var E=C.options[C.selectedIndex].value;var G=A.options[A.selectedIndex].value;var D=0;if(B=="lower"){if(E>G){for(D=0;D<A.options.length;D++){if(A.options[D].value==E){A.options[D].selected=true}}}}else{if(B=="upper"){if(G<E){for(D=0;D<C.options.length;D++){if(C.options[D].value==G){C.options[D].selected=true}}}}}}function checkHeight(E){var C=document.getElementsByName("lh")[0];var B=document.getElementsByName("uh")[0];var D=C.selectedIndex;var A=B.selectedIndex;if(E=="lh"){if(D==0){B.options[0].selected=true}else{if(D>A){B.options[D].selected=true}}}else{if(E=="uh"){if(A==0){C.options[0].selected=true}else{if(D==0){C.options[1].selected=true}else{if(A<D){C.options[A].selected=true}}}}}checkNotice()}function checkIt(C){var B=0;for(var A=0;A<document.getElementsByName(C).length;A++){if(document.getElementsByName(C)[A].checked==true){B++}}if(B==document.getElementsByName(C).length){clearAllBoxes(C)}checkNotice()}function clearAllBoxes(B){for(var A=0;A<document.getElementsByName(B).length;A++){document.getElementsByName(B)[A].checked=false}}function checkNotice(){var A=false;var G=["et","bt","ec","hc","ht"];var E=0,D=0;for(E=0;E<G.length;E++){for(D=0;D<document.getElementsByName(G[E]).length;D++){if(document.getElementsByName(G[E])[D].checked==true){A=true;break}}if(A==true){break}}if(document.getElementsByName("lh")[0].selectedIndex==0&&A==false){document.getElementById("appearanceNotice").style.display="none"}else{document.getElementById("appearanceNotice").style.display="inline"}A=false;var C=["ex","dd","sm","dr","du"];for(E=0;E<C.length;E++){for(D=0;D<document.getElementsByName(C[E]).length;D++){if(document.getElementsByName(C[E])[D].checked==true){A=true;break}}if(A==true){break}}if(A==false){document.getElementById("lifestyleNotice").style.display="none"}else{document.getElementById("lifestyleNotice").style.display="inline"}A=false;var F=["ho","hk","wk"];for(E=0;E<F.length;E++){for(D=0;D<document.getElementsByName(F[E]).length;D++){if(document.getElementsByName(F[E])[D].checked==true){A=true;break}}if(A==true){break}}if(A==false){document.getElementById("livingSituationNotice").style.display="none"}else{document.getElementById("livingSituationNotice").style.display="inline"}A=false;var H=["jc","in"];for(E=0;E<H.length;E++){for(D=0;D<document.getElementsByName(H[E]).length;D++){if(document.getElementsByName(H[E])[D].checked==true){A=true;break}}if(A==true){break}}if(A==false){document.getElementById("workSituationNotice").style.display="none"}else{document.getElementById("workSituationNotice").style.display="inline"}A=false;var B=["cs","fa","ed","po","zs"];for(E=0;E<B.length;E++){for(D=0;D<document.getElementsByName(B[E]).length;D++){if(document.getElementsByName(B[E])[D].checked==true){A=true;break}}if(A==true){break}}if(A==false){document.getElementById("backgroundInfoNotice").style.display="none"}else{document.getElementById("backgroundInfoNotice").style.display="inline"}}function changeElementClass(A,B){document.getElementById(A).className=B}function swapOptionsDiv(B,A){var C=document.getElementById(B);var D=document.getElementById(A);var F="";F+=C.firstChild.nodeValue;var E=F.length;var G;if(F.charAt(0)=="+"){G="-"+F.substr(1,E-1);C.firstChild.nodeValue=G;D.style.display="block"}else{G="+"+F.substr(1,E-1);C.firstChild.nodeValue=G;D.style.display="none"}}function nextPage(){var B=location.href;var D=B.split("pn=");var A=0;if(D[1].indexOf("&")==-1){A=D[1];D[1]=""}else{A=D[1].substring(0,D[1].indexOf("&"));D[1]=D[1].substring(D[1].indexOf("&"))}A++;var C=D[0]+"pn="+A+D[1];location.href=C;return true}function switchPic(B){var A="/p/p-";A+=B.substring(5);document.getElementById("primaryPic").src=A}function countText(F,G){var H=document.getElementById(F);var A=H.value;var E=H.value.length;var C=0;var D=false;var B=0;for(B=0;B<E;B++){if(A.charAt(B)=="'"){if(C+2>G){D=true;break}else{C+=2}}else{if(A.charAt(B)=="<"||A.charAt(B)==">"){if(C+4>G){D=true;break}else{C+=4}}else{if(A.charAt(B)=="&"||A.charAt(B)=="#"||A.charAt(B)=="("||A.charAt(B)==")"){if(C+5>G){D=true;break}else{C+=5}}else{if(C+1>G){D=true;break}else{C++}}}}}if(D==true){H.value=H.value.substring(0,B);alert("Whoops!  You've gone over the character length limit for this field.\nWe have shortened your text to be within the maximum limit.")}document.getElementById(F+"Count").innerHTML=G-C}function adjustTextArea(H){var F=2;var E=35;var B=80;var G=document.getElementById(H);var C=G.value.split("\n");var A=F;for(var D=0;D<C.length;D++){if(C[D].length>B){A+=Math.ceil(C[D].length/B)}}A+=C.length;G.rows=Math.min(A,E)}var personalityTraitNames=["war","rea","emo","dom","liv","rul","soc","sen","vig","abs","pri","app","ope","sel","per","ten"];function loadUpdateProfileData(D,E){var A=D.split(",");var C=0,B=0;for(C=0;C<optionNames.length;C++){if(optionNames[C]=="lh"){document.getElementsByName("lh")[0].selectedIndex=A[B];B++}else{if(optionNames[C]!="uh"){document.getElementsByName(optionNames[C])[A[B]].checked=true;B++}}}A=E.split("");for(C=0;C<personalityTraitNames.length;C++){document.getElementsByName(personalityTraitNames[C])[A[C]].checked=true}countText("cp",78);countText("am",2046);countText("ff",254);countText("fp",254);countText("ft",254);countText("sr",254);countText("ji",254);countText("fi",254);countText("ei",254)}function submitUpdateProfile(){if(confirm("Update your profile with this data?")==false){return false}var A=["cp","am","ff","fp","ft","sr","ji","fi","ei"];for(var B=0;B<A.length;B++){var D=document.getElementById(A[B]);var C=D.value;if(C.length>0){D.value=trimWhitespace(C,false)}}return true}function submitMsg(){if(confirmAction("Send this Message?")==false){return false}var A=["sbj","bdy"];for(var B=0;B<A.length;B++){var D=document.getElementById(A[B]);var C=D.value;if(C.length>0){D.value=trimWhitespace(C,false)}else{D.value="[none]"}}document.getElementById("submitMsgBtn").disabled=true;document.getElementById("submitMsgBtn").value="Sending...";return true}function submitForgotPassword(){var D=document.getElementById("flea");var F=document.getElementById("flmo");var C=document.getElementById("flda");var E=document.getElementById("flye");if(!verifyEmailAddy(D.value)){changeToErrorBoxDisplay(D);alert("Whoops! Your Email Address is not valid.  Please re-enter it.");return false}else{changeToGoodBoxDisplay(D)}F.value=(F.value).replace(/^0+|$/,"");if(!(F.value).match(/\d{1,2}/)||F.value>12){changeToErrorBoxDisplay(F);alert("Whoops! Your Birth Month is not valid.  Please re-enter it.");return false}else{changeToGoodBoxDisplay(F)}C.value=(C.value).replace(/^0+|$/,"");if(!(C.value).match(/\d{1,2}/)||C.value>31||((F.value==4||F.value==6||F.value==9||F.value==11)&&C.value==31)){changeToErrorBoxDisplay(C);alert("Whoops! Your Birthday is not valid.  Please re-enter it.");return false}else{changeToGoodBoxDisplay(C)}if(!(E.value).match(/\d{4}/)){changeToErrorBoxDisplay(E);alert("Whoops! Your Birth Year is not valid.  Please re-enter it.");return false}else{changeToGoodBoxDisplay(E)}if((F.value==2&&(E.value%4==0&&(E.value%100!=0||E.value%400==0))&&C.value>29)||F.value==2&&!(E.value%4==0&&(E.value%100!=0||E.value%400==0))&&C.value>28){changeToErrorBoxDisplay(C);alert("Whoops! Your Birth Day is not valid.  Please re-enter it.");return false}var B=0;var A=new Date();B=A.getFullYear()-E.value-1;if(((A.getMonth()+1)>F.value)||(F.value==(A.getMonth()+1)&&C.value<=A.getDate())){B++}if(B<18||B>99){changeToErrorBoxDisplay(F);changeToErrorBoxDisplay(C);changeToErrorBoxDisplay(E);if(B<18){alert("You're too young to be a member of this site. Scram back to MySpace!")}else{alert("Nobody believes you're older than 99 and want to join this site.")}return false}document.getElementById("forgotPasswordBtn").disabled=true;return true}function showComposeReply(){var B=document.getElementById("originalSubject").innerHTML;var A=document.getElementById("sbj");A.value="Re: "+B;document.getElementById("envelopeMsgBody").style.display="block";location.href+="#composeReplyJump";document.getElementById("bdy").focus();return true}function resetButtons(){if(document.getElementById("loginBtn")!=null){document.getElementById("loginBtn").disabled=false}if(document.getElementById("miniSearchBtn")!=null){document.getElementById("miniSearchBtn").disabled=false}if(document.getElementById("searchBtn")!=null){document.getElementById("searchBtn").disabled=false}if(document.getElementById("forgotPasswordBtn")!=null){document.getElementById("forgotPasswordBtn").disabled=false}if(document.getElementById("signUpBtn")!=null){document.getElementById("signUpBtn").disabled=false}}function loadUpdatePreferencesData(C){var D=["ns","sr","nm","ps","pp","so"];var A=C.split(",");for(var B=0;B<D.length;B++){document.getElementsByName(D[B])[A[B]].checked=true}}function submitSparkResponse(){if(document.getElementsByName("sr")[0].checked==false){var A="Are you sure you want to Close this Spark?\n\n";A+="You and the receiver will not be able\n";A+="to Spark each other again for 60 days.";if(confirm(A)==false){return false}}document.getElementById("submitSparkResponseBtn").disabled=true;document.getElementById("submitSparkResponseBtn").value="Sending...";return true}function changeExternalRefLinks(){if(!document.getElementsByTagName){return }var C=document.getElementsByTagName("a");for(var B=0;B<C.length;B++){var A=C[B];if(A.getAttribute("href")&&A.getAttribute("rel")=="external"){A.target="_blank"}}}function changeSparksOrNotRatingColors(A,B,D){var C=document.getElementById(A);C.style.backgroundColor=B;C.style.color=D}function submitDeleteAccount(){if(document.getElementById("dar").value==0){alert("Please choose a reason why you are leaving us.  Thanks!");return false}if(confirm("Are you sure you want to Delete Your Account?")==false){return false}return true}function isCheckboxChecked(A){var C=document.getElementsByName(A);for(var B=0;B<C.length;B++){if(C[B].checked==true){return confirm("Are you sure you want to Delete the checked item(s)?")}}alert("Nothing is checked for deletion!");return false}function loadTopBarAd(){var A=document.getElementsByTagName("head")[0];var B=document.createElement("script");B.type="text/javascript";B.src="http://cb.us.miva.com/WebFiles/display_adunit_3.3.js";A.appendChild(B)}function loadAdvertisings(){var A=location.href;if(A.match(/wheresmystar.com/gi)){loadTopBarAd()}}
/* ***************************************************************
  All Code herein is Copyright 2006-2008 WheresMyStar.com, Inc.
  Do not copy, reproduce, reuse or sell any code herein
  without the express, written consent of WheresMyStar.com.
  For more information contact webmaster@wheresmystar.com.
  All Rights Reserved.
**************************************************************** */;