var PAGE="";var PWOBJ=null;function defaultFocus(){if(document.forms.length>0){var a=document.forms[0];for(i=0;i<a.length;i++){if((a.elements[i].type=="text")||(a.elements[i].type=="textarea")||(a.elements[i].type.toString().charAt(0)=="s")){document.forms[0].elements[i].focus();break}}}}function showfavcont(c){var b=document.getElementById("favcont");if(b!=null){if(c.checked){b.style.display="inline"}else{b.style.display="none"}}}function detectNorton(){return true}function loadIFrames(c,b){var a=document.getElementById("countyFrame");if(a!=null){a.src="getcounties.php?quick=1&country="+c+"&county="+b}}function getIframe(){if((parent.countyFrame!=undefined)&&(parent.countyFrame.document.formCounty!=null)){if(parent.countyFrame.document.formCounty.elements[0]!=null){var a=document.quickform;var b=parent.countyFrame;if((a!=null)&&(b!=null)){a.county.value=b.document.formCounty.elements[0].value}}}return true}function pickCountry(c,e,d){var b=0;while(b<c.length){if(c.options[b].value*1==e){c.selectedIndex=b;break}b++}var a=document.getElementById("countyFrame");if(a!=null){a.src="getcounties.php?quick=1&country="+e+"&county="+d}}function doCar(){alert("This image means the user is willing to travel")}function doHome(){alert("This image means the user is willing to accommodate")}function doOn(){alert("This image means the user is online in tvChix right now!")}function doUpd(){alert("This image means the user has recently updated his/her profile.")}function doNew(){alert("This image means the user just recently created a profile on tvChix.\nWhy not be one of the first to send her a welcome message!")}function confirmCheckpoint(){var a=confirm("Setting a checkpoint will tell the website to 'remember' the current date and time for you.\nYou can then come back later and choose to show all new or updated profiles since this \n point in time by ticking the 'New/Updated Since Last Checkpoint' box.\n\n Do a Checkpoint Now?");return a}function confirmUrl(b,c){var a=confirm(b);if(a){document.location.href=c}return a}function dosubmit(b){getIframe();var a=document.getElementById("submitbutton");if(a!=null){a.disabled=true}return true}function flagSuspect(a){if(confirm("You are about to flag this profile as, in your opinion, potentially not genuine or inappropriate.\n\nThe profile will then be reviewed by the tvChix webmaster who will decide if any action is required.\n\nContinue?\n\n")){location.href="report_suspect.php?offendingid="+a}}function deleteFolder(a){if(confirm("You are about to delete a mail folder.\nAny emails in this folder will be deleted also.\n\nAre you sure you want to continue?")){location.href="mailfolders.php?task=delete&folderid="+a}}function emptyFolder(a){if(confirm("You are about to empty a mail folder.\nAny emails in this folder will be deleted.\n\nAre you sure you want to continue?")){location.href="mailfolders.php?task=empty&folderid="+a}}function disableform(a){if(document.all||document.getElementById){for(i=0;i<a.elements.length;i++){var b=a.elements[i];if(b.type.toLowerCase()=="submit"||b.type.toLowerCase()=="reset"){b.disabled=true}}}return true}function openHelp(a){var b=window.open("http://www.tvchix.com/help.php?topic="+a,"helptext","left=50,top=50,screenX=50,screenY=50,scrollbars=no,menubar=no,height=250,width=300,resizable=yes,toolbar=no,location=no,status=no")}function doviewemailsubmit(e,d,c){var a=document.getElementById(d);if(a!=null){a.disabled=true;if(c==1){e.delbuttonstatus.value=1}else{e.delbuttonstatus.value=0}}return true}function disableSubmitBtn(c,b){var a=document.getElementById(b);if(a!=null){a.disabled=true}return true}function doSmiley(h){var a=h;var g=null;var d=document.mailform;if(d!=null){g=d.message}if(g!=null){if(document.selection){g.focus();document.selection.createRange().text=a}else{if(g.selectionStart!=null){var b=g.selectionStart;var c=g.selectionEnd;g.value=g.value.substring(0,b)+a+g.value.substring(c);g.focus();g.selectionStart=g.selectionEnd=(b+a.length)}else{g.value+=a}}}}function doDownload(){document.getElementById("downloader").src="download_emails.php"}var _last_locator=null;function get_overlay(){return document.getElementById("overlay")}function hide_overlay(){get_overlay().style.visibility="hidden";_last_locator=null}function show_overlay(a){get_overlay().style.visibility="visible";_last_locator=a}function is_open_already(a){return _last_locator==a}function get_offset_top(b){var c=0;var a=b;while(a!=document.body){c+=a.offsetTop;a=a.offsetParent}return c}function get_offset_left(b){var c=0;var a=b;while(a!=document.body){c+=a.offsetLeft;a=a.offsetParent}return c}function popup_overlay(c,b){var a=get_overlay();if(is_open_already(c)){return hide_overlay()}a.innerHTML=get_code(b);a.style.top=get_offset_top(c)+"px";a.style.left=get_offset_left(c)+"px";show_overlay(c)}function get_code(a){var c="";for(i=0;i<5;i++){var b="http://"+document.domain+"/ajaxhandler.php?mailstar="+i.toString()+"&id="+a.toString();c=c+"<img onclick=\"javascript:makeRequest('mailstar', '"+b+'\'); hide_overlay()" name="mailstar_'+i.toString()+'" ID="mailstar_'+i.toString()+'" SRC="http://thumbs.tvchix.com/images/sta_'+i.toString()+'.gif" border="0">&nbsp;'}return c}function hide_blanker(){var a=document.getElementById("blanker");if(a!=null){a.style.visibility="hidden"}}function show_blanker(g){var a=document.getElementById("blanker");if(a!=null){var h=getPageDims();a.style.width="100pc";a.style.height=h.y+"px";a.style.left=0;a.style.top=0;a.style.visibility="visible"}var e=getScrollDims();var d=getScrollPos();var c=Math.round((e.x-300)/2)+d.x;var b=Math.round((e.y-300)/2)+d.y;if(g!=null){g.style.top=b+"px";g.style.left=c+"px"}}function hide_popup(a){document.getElementById(a).style.visibility="hidden";hide_blanker()}function show_popup(a){document.getElementById(a).style.visibility="visible"}function center_popup(d){var g=getScrollDims();var c=getScrollPos();var e=Math.round(g.x*0.6);var h=Math.round(g.y*0.6);var b=Math.round((g.x-e)/2)+c.x;var a=Math.round((g.y-h)/2)+c.y;if(d!=null){d.style.width=e.toString()+"px";if(d.clientHeight>h){d.style.height=h.toString()+"px"}if(d.style.height>h){d.style.height=h.toString()+"px"}d.style.left=b+"px";d.style.top=a+"px"}}var _last_notepopup=null;function hide_notepopup(){hide_popup("notepopup");_last_notepopup=null}function get_notepopup_code(c,d){var b='<div name="popupnotes" ID="popupnotes"></div>';var a="http://"+document.domain+"/ajaxhandler.php?getnotes=1&destid="+d;makeRequest("getnotes",a);return b}function popup_notepopup(c,a,b){var d=document.getElementById("notepopup");if(_last_notepopup==c){return hide_notepopup()}d.innerHTML=get_notepopup_code(a,b);show_blanker(d);show_popup("notepopup");_last_notepopup=c}function hide_escortpopup(){hide_popup("escortpopup");_last_notepopup=null}function get_escortpopup_code(c,a){var b='<div name="popupescort" ID="popupescort"></div>';makeRequest("getescortpopup","http://"+document.domain+"/ajaxhandler.php?getescortpopup=1&destid="+c+"&detail="+a);return b}function popup_escortpopup(c,b,a){var d=document.getElementById("escortpopup");if(_last_notepopup==c){return hide_escortpopup()}d.innerHTML=get_escortpopup_code(b,a);show_blanker(d);show_popup("escortpopup");center_popup(d);_last_notepopup=c}function addFavFromPopup(c,b,a){hide_favpopup();makeRequest("favourites",c+"&cat="+a,c+"&cat="+a)}function hide_favpopup(){hide_popup("favpopup");_last_notepopup=null}function get_favpopup_code(h,g){var e=new Array();var a=new Array();a[0]="Friends";a[1]="Aquaintances";a[2]="Lovers";a[3]="Chat Buddies";a[4]="Potential Dates";a[5]="Clients";var c='<div style="padding: 10px; border: 1px solid #666; background-color: white;">';c=c+"You can now categorise your favourites with different colored hearts.<br><br>Click on the category you wish to add <b>"+g+"</b> to<br><br>";c=c+'<div style="margin-left: 40px;">';for(i=0;i<a.length;i++){if(i%2==0){c=c+'<div style="float: left; vertical-align: middle;">'}var d="";if(i>0){d="_"+i.toString()}c=c+'<div style="float: left; width: 150px; margin-right: 30px;">';var b='javascript:addFavFromPopup("'+h+'", "'+g+'", '+i.toString()+")";c=c+"<a class='blue' href='"+b+"'>";c=c+"<img style='margin-bottom: 15px; padding-right: 10px; border: 0px; vertical-align: middle' src='http://thumbs.tvchix.com/images/heart_big"+d+".gif'>"+a[i]+"</a><br>";c=c+'</div><br clear="left">';if(i%2==0){c=c+"</div>"}}c=c+"</div><br>";c=c+'<div class="smalltext">Your category selection is visible only to you, not the person you are adding.<br></div><br>';c=c+"</div>";return c}function strpos(b,c){var a=(b+"").indexOf(c);return a===-1?false:a}function popup_favpopup(c,b,g,e){var a=navigator.userAgent;if((a.indexOf("PPC")!==-1)&&(a.indexOf("Windows CE")!==-1)&&(a.indexOf("Mozilla/4.0")!==-1)){b=false}if(b){var d=document.getElementById("favpopup");if(_last_notepopup==c){return hide_favpopup()}d.innerHTML=get_favpopup_code(g,e);show_blanker(d);show_popup("favpopup");center_popup(d);_last_notepopup=c}else{addFavFromPopup(g,e,0)}}function hide_jotterpopup(){hide_popup("jotterpopup");_last_notepopup=null}function get_jotterpopup_code(){var a='<div name="popupjotter" ID="popupjotter"></div>';a='<textarea cols="20" rows="10"></textarea><script language="javascript" type="text/javascript" src="richedit/tiny_mce_popup.js"><\/script><script language="javascript" type="text/javascript">tinyMCE.init({	mode : "textareas"}); TinyMCE_Popup(); <\/script>';return a}function popup_jotterpopup(a){var b=document.getElementById("jotterpopup");if(_last_notepopup==a){return hide_jotterpopup()}b.innerHTML=get_jotterpopup_code();show_blanker(b);center_popup(b);show_popup("jotterpopup");_last_notepopup=a}function getScrollPos(){var a,b;if(self.pageYOffset){a=self.pageXOffset;b=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollLeft;b=document.documentElement.scrollTop}else{if(document.body){a=document.body.scrollLeft;b=document.body.scrollTop}}}return{x:a,y:b}}function getScrollDims(){var a,b;if(self.innerHeight){a=self.innerWidth;b=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}else{if(document.body){a=document.body.clientWidth;b=document.body.clientHeight}}}return{x:a,y:b}}function getPageDims(){var a,d;var c=document.body.scrollHeight;var b=document.body.offsetHeight;if(c>b){a=document.body.scrollWidth;d=document.body.scrollHeight}else{a=document.body.offsetWidth;d=document.body.offsetHeight}return{x:a,y:d}}function postUserNotes(d){var a=document.getElementById("usernotestextarea");if(a!=null){var c=a.value;var b="http://"+document.domain+"/ajaxhandler.php?savenotes=1&destid="+d+"&notetext=["+encodeURIComponent(c)+"]";makeRequest("savenotes",b)}}function deleteUserNotes(b){var a="http://"+document.domain+"/ajaxhandler.php?savenotes=1&destid="+b+"&notetext=[]";makeRequest("savenotes",a)}function confirmpost(c,b){var a=false;if(c==3){a=true}else{a=confirm(b)}if(a){if(c==1){document.bulkform.bulkdelete.value=1}else{if(c==2){document.bulkform.bulkunread.value=1}else{if(c==3){document.bulkform.bulkmove.value=1}}}return true}else{document.bulkform.bulkdelete.value=0;document.bulkform.bulkunread.value=0;document.bulkform.bulkmove.value=0}return false}function checkCheckboxes(a,b){for(f=0;f<a.length;f++){if(a[f].type=="checkbox"){a[f].checked=b}}}function qsGetIframe(){document.locationform.city.value=parent.cityFrame.document.form2.elements[0].value;document.locationform.county.value=parent.countyFrame.document.formCounty.elements[0].value;return true}function qsLoadIFrames(a){document.getElementById("cityFrame").src="getcities.php?country="+a+"&city={$city}";document.getElementById("countyFrame").src="getcounties.php?country="+a+"&county={$county}"}function qsPickCountry(b,e,d,c){var a=0;while(a<b.length){if(b.options[a].value*1==e){b.selectedIndex=a;break}a++}document.getElementById("countyFrame").src="getcounties.php?country="+e+"&county="+d;document.getElementById("cityFrame").src="getcities.php?country="+e+"&city="+c}function qsOpenAddCity(a){$("#citylist").hide();document.getElementById("addCityFrame").height=129;var b=$("#countylist").val();if(b>0){document.getElementById("addCityFrame").src="addcity.php?country="+document.locationform.country.value+"&county="+b}else{document.getElementById("addCityFrame").src="addcity.php?country="+document.locationform.country.value}}function qsCloseAddCity(){$("#citylist").show();document.getElementById("addCityFrame").height=0}function qsDoSomething(c,b,a){document.getElementById("addCityFrame").height=0;if(a==1){_reload_location_data($("#countrylist").val(),$("#countylist").val(),b)}$("#citylist").show()}function fadeUserNotes(){opacity("profilenotediv","profilenotesdiv",100,0,500)}function opacity(h,g,d,a,b){var c=Math.round(b/100);var e=0;if(d>a){for(i=d;i>=a;i--){setTimeout("changeOpac("+i+",'"+h+"', '"+g+"')",(e*c));e++}}else{if(d<a){for(i=d;i<=a;i++){setTimeout("changeOpac("+i+",'"+h+"', '"+g+"')",(e*c));e++}}}}function changeOpac(c,g,e){var d=document.getElementById(g);if(d!=null){var b=d.style;b.opacity=(c/100);b.MozOpacity=(c/100);b.KhtmlOpacity=(c/100);b.filter="alpha(opacity="+c+")";if((c<=0)&&(e!="")){var a=document.getElementById(e);a.style.display="none";changeOpac(100,g,"")}}}function setClassLegendStyle(b,c){var a=document.getElementById(b);if(a!=null){a.className="classifieds "+c;if(document.classthemeform!=null){document.classthemeform.stylename.value=c}}}function reshowGuestbook(){var a=document.getElementById("guestbookentry");var b=document.getElementById("guestbookerror");if(a!=null){b.style.display="none";a.style.display="inline"}}function toggleMail(c){var a=document.getElementById("replybox_"+c.toString());if(a!=null){if(a.style.display!="none"){a.style.display="none"}else{if(a.innerHTML==""){var b="http://"+document.domain+"/ajaxhandler.php?getmailid="+c.toString();makeRequest("getmail",b)}else{a.style.display="inline"}}}}function confirmDeleteImg(c){var a=confirm("Delete Image?");if(a){var b=document.forms[c];if(b!=null){b.submit()}}}function toggleRatings(e){var b=document.getElementsByTagName("table");for(var d=0;d<b.length;d++){if((b[d].id!=null)&&(b[d].id!="")){var g=b[d];var h=g.id.substr(0,6);if((h=="imgdet")||(h=="imggfx")){if(((g.id.substr(0,7)=="imgdet_")&&(e==0))||((g.id.substr(0,7)=="imggfx_")&&(e==1))||((g.id.substr(0,8)=="imggfxf_")&&(e==2))){g.style.display="block"}else{g.style.display="none"}}}}var c=getElementsByClass("ratingtabsel");for(var d=0;d<c.length;d++){c[d].className="ratingtab"}c=getElementsByClass("ratingtab");for(var d=0;d<c.length;d++){var a=c[d].id.substr(3,1);if(parseInt(a)==(e+1)){c[d].className="ratingtabsel"}}}function getElementsByClass(c){function b(e,d,g){while(d){if(d.nodeType==1){if(d.className){var h=" "+d.className+" ";if(h.indexOf(" "+g+" ")!=-1){e.push(d)}}b(e,d.firstChild,g)}d=d.nextSibling}}var a=new Array();b(a,document.documentElement,c);return a};