var favarray=new Array();var current_tab=false;var favcookie;var emailclick=false;var new_poll=false;function set_bwb_email(){if(emailclick){return true}if(document.getElementById("chk_agree2").value==0){alert("You have to accept the Privacy Policy to proceed");document.getElementById("wbw_email_error").style.display="none";return true}emailclick=true;xmlhttp2=new getXMLHTTP();xmlhttp2.onreadystatechange=function(){if(xmlhttp2.readyState==4){setEmailClick();document.getElementById("wbw_email_error").style.display="none";switch(xmlhttp2.responseText){case"SET":document.getElementById("wbw_email_div").innerHTML="<div style='margin-top:4px;padding:5px;display:block;border:1px solid #fc85c5;width:282px;'><b>Thank you for registering!</b><br />We have already sent your first weekly email.<br /> Please check your spamfilter if you did not receive the email.</div>";break;case"COOKIE":alert("You've already setup your week by week email.");break;case"NOWEEK":document.getElementById("wbw_email_error").style.display="block";document.getElementById("wbw_email_error").innerHTML="Attention! Form was not filled out correctly<div style='overflow:hidden;height:7px;'></div>You've entered an incorrect due date.";break;case"NOEMAIL":document.getElementById("wbw_email_error").style.display="block";document.getElementById("wbw_email_error").innerHTML="Attention! Form was not filled out correctly<div style='overflow:hidden;height:7px;'></div>Your email address is not correct.";break;default:document.getElementById("wbw_email_error").style.display="block";document.getElementById("wbw_email_error").innerHTML="Attention! Form was not filled out correctly<div style='overflow:hidden;height:7px;'></div>Please make sure you filled in everything properly";break}}};xmlhttp2.open("GET","/ajax/set_wbw_email.php?email="+document.wbw_email_form.dd_email.value+"&day="+document.wbw_email_form.dd_day.value+"&month="+document.wbw_email_form.dd_month.value+"&year="+document.wbw_email_form.dd_year.value,true);xmlhttp2.send(null)}function setEmailClick(){emailclick=false}function rndtime(){return Math.floor(Math.random()*100000)}function checkLoggedIn(){return document.cookie.indexOf("bnw_logged_in=1")!=-1}function headerBlockCheckLogin(){try{if(checkLoggedIn()){document.getElementById("login").style.display="none";document.getElementById("logout").style.display="block"}}catch(a){alert(a.message)}}function footerBlockCheckLogin(){try{if(checkLoggedIn()){var a=document.getElementById("footer_links").getElementsByTagName("A");for(var b=0;b<a.length;b++){if(a[b].className=="login"){a[b].style.display="none"}else{if(a[b].className=="logout"){a[b].style.display="inline"}}}}}catch(c){alert(c.message)}}function getForm(a){while(a.nodeName!="FORM"){a=a.parentNode}return a}function frmKeyPress(b,a){if(document.all){var c=window.event;x=c.keyCode}else{x=a.keyCode}if(x==13){b.submit()}}function frmSubmit(a){frmObj=getForm(a);frmObj.submit()}function frmReset(a){frmObj=getForm(a);if(document.getElementById("mselect_box2")){document.getElementById("mselect_box2").innerHTML="";document.getElementById("s_origins").value=""}if(document.getElementById("mselect_cbox2")){document.getElementById("mselect_cbox2").innerHTML="";document.getElementById("s_categories").value=""}frmObj.reset();inp=frmObj.getElementsByTagName("input");for(i=0;i<inp.length;i++){if(inp[i].getAttribute("type")=="select"){inp[i].selectedIndex=0}if(inp[i].value==""||inp[i].value=="Select"){}}}function frmAction(b,a){frmObj=getForm(b);frmObj.action=a}function readCookie(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null}function getXMLHTTP(){var a;try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){a=false}}if(!a&&typeof XMLHttpRequest!="undefined"){try{a=new XMLHttpRequest()}catch(b){a=false}}return a}var fl_prev_id=false;var fl_prev_subforums=false;function forumLinksClick(c,b,a){if(b=="main"&&a.length>0){if(fl_prev_id==c){forumLinksCollapse(c,a)}else{if(fl_prev_id){forumLinksCollapse(fl_prev_id,fl_prev_subforums)}forumLinksExpand(c,a)}}else{document.location.href="/forum/forum"+c+".html"}}clr="#d74995";clr2="#FFFFFF";function cal_hover(a){if(a.style.backgroundColor!=clr){a.setAttribute("oldbg",a.style.backgroundColor);a.style.backgroundColor=clr;a.style.cursor="hand";link=a.childNodes[0];link.style.color=clr2}else{a.setAttribute("selected","true")}}function cal_out(a){if(!a.getAttribute("selected")){a.style.backgroundColor=a.getAttribute("oldbg");link=a.childNodes[0];link.style.color=clr}}function cal_onclick(a){link=a.childNodes[0];self.location.href=link.href}function Set_Cookie(c,e,a,h,d,g){var b=new Date();b.setTime(b.getTime());if(a){a=a*1000*60*60*24}var f=new Date(b.getTime()+(a));document.cookie=c+"="+escape(e)+((a)?";expires="+f.toGMTString():"")+((h)?";path="+h:"")+((d)?";domain="+d:"")+((g)?";secure":"")}function submitCuteKid(){document.getElementById("next_abuse").style.display="none";document.getElementById("frame_box").style.display="";document.getElementById("abuse_popup1").style.display="none";if(document.getElementById("cute_kid_btn1")!=null){document.getElementById("cute_kid_btn1").style.display="none"}if(document.getElementById("cute_kid_btn2")!=null){document.getElementById("cute_kid_btn2").style.display="none"}}function closeCuteKid(){document.getElementById("next_abuse").style.display="";document.getElementById("frame_box").style.display="none";if(document.getElementById("cute_kid_btn1")!=null){document.getElementById("cute_kid_btn1").style.display=""}if(document.getElementById("cute_kid_btn2")!=null){document.getElementById("cute_kid_btn2").style.display=""}}function submissionPollEnd(){document.getElementById("thanks_note").style.display="none"}function showAbusePopup(a){document.getElementById("abuse_popup1").style.display="block";if(new_poll){document.getElementById("abuse_popup1").style.top="463px"}else{document.getElementById("abuse_popup1").style.top="458px"}frames.frame_box.document.getElementById("cute-kid-gender").style.visibility="hidden"}function postAbusePopup(){if(document.getElementById("abuse_popup_reason").options[document.getElementById("abuse_popup_reason").selectedIndex].value=="_"){alert("Please select a reason for this report");return false}xmlhttp_abuse=new getXMLHTTP();xmlhttp_abuse.onreadystatechange=function(){if(xmlhttp_abuse.readyState==4){document.getElementById("abuse_popup1").style.display="none";frames.frame_box.document.getElementById("cute-kid-gender").style.visibility="visible";alert("Thank you for bringing this to our attention.")}};xmlhttp_abuse.open("GET","/ajax/send_abuse_email.php?photo_id="+abuse_photo_id+"&reason="+escape(document.getElementById("abuse_popup_reason").options[document.getElementById("abuse_popup_reason").selectedIndex].value)+"&comment="+escape(document.getElementById("abuse_popup_comment").value),true);xmlhttp_abuse.send(null)};