function emailCheck(n){var i='[^\\s\\(\\)<>@,;:\\\\\\"\\.\\[\\]]+',o="("+i+'|("[^"]*"))',c=new RegExp("^"+o+"(\\."+o+")*$"),l=new RegExp("^"+i+"(\\."+i+")*$"),f=n.match(/^(.+)@(.+)$/),s,r,e,u,h,y;if(f==null||(s=f[1],r=f[2],s.match(c)==null))return!1;if(e=r.match(/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/),e!=null){for(u=1;u<=4;u++)if(e[u]>255)return!1;return!0}if(h=r.match(l),h==null)return!1;var a=new RegExp(i,"g"),t=r.match(a),v=t.length;return t[t.length-1].length<2||t[t.length-1].length>3?!1:v<2?(y="This address is missing a hostname!",!1):!0}function LeavePage(n){var t=confirm("Are you sure you want to continue?\n\nClick OK to confirm. Any unsaved changes you have made will be lost.");t&&(document.location.href=n)}function ResetRegistrationRegion(){document.frmReg.StateAbbr.selectedIndex=0;document.frmReg.StateAbbr.options[0].selected=!0;document.frmReg.MemberRegionID.selectedIndex=0;document.frmReg.MemberRegionID.options[0].selected=!0;document.frmReg.MemberRegionID.disabled=!0}function ValidateURL(n){learnRegExp(n==!1)&&alert("Invalid website address")}function learnRegExp(n){return n.match(/^(ht|f)tps?:\/\/[a-z0-9-\.]+\.[a-z]{2,4}\/?([^\s<>\#%"\,\{\}\\|\\\^\[\]`]+)?$/)}function ResetState(){document.frmReg.CountryID.selectedIndex=0;document.frmReg.CountryID.options[0].selected=!0;document.frmReg.StateID.selectedIndex=0;document.frmReg.StateID.options[0].selected=!0;document.frmReg.StateID.disabled=!0}function OnBlurEmailValidate(){var n=0;document.frmProfile.PrEmail.value==""&&(alert("Please enter your email address."),document.frmProfile.PrEmail.focus(),n=n+1);n==0&&echeck(document.frmProfile.PrEmail.value)==!1&&(alert("Invalid email address"),document.frmProfile.PrEmail.focus(),n=n+1)}function validateContact(){var n=0;document.frmEmail.Email.value==""&&(alert("Please enter your email address."),document.frmEmail.Email.focus(),n=n+1);n==0&&echeck(document.frmEmail.Email.value)==!1&&(alert("Invalid email address"),document.frmEmail.Email.focus(),n=n+1);n==0&&document.frmEmail.FirstName.value==""&&(alert("Please enter your first name."),document.frmEmail.FirstName.focus(),n=n+1);n==0&&document.frmEmail.LastName.value==""&&(alert("Please enter your last name."),document.frmEmail.LastName.focus(),n=n+1);n==0&&document.frmEmail.Subject.value==""&&(alert("Please enter the subject."),document.frmEmail.Subject.focus(),n=n+1);n==0&&document.frmEmail.EmailBody.value==""&&(alert("Please describe the problem you encountered."),document.frmEmail.EmailBody.focus(),n=n+1);n==0&&document.frmEmail.submit()}function validateProblem(){var n=0;document.frmEmailProblems.Email.value==""&&(alert("Please enter your email address."),document.frmEmailProblems.Email.focus(),n=n+1);n==0&&echeck(document.frmEmailProblems.Email.value)==!1&&(alert("Invalid email address"),document.frmEmailProblems.Email.focus(),n=n+1);n==0&&document.frmEmailProblems.FirstName.value==""&&(alert("Please enter your first name."),document.frmEmailProblems.FirstName.focus(),n=n+1);n==0&&document.frmEmailProblems.LastName.value==""&&(alert("Please enter your last name."),document.frmEmailProblems.LastName.focus(),n=n+1);n==0&&document.frmEmailProblems.Subject.value==""&&(alert("Please enter the subject."),document.frmEmailProblems.Subject.focus(),n=n+1);n==0&&document.frmEmailProblems.EmailBody.value==""&&(alert("Please describe the problem you encountered."),document.frmEmailProblems.EmailBody.focus(),n=n+1);n==0&&document.frmEmailProblems.submit()}function NewUserValidate(){var n=0,t=document.frmReg.agreecheck.checked;document.frmReg.Email.value==""&&(alert("Please enter your email address."),document.frmReg.Email.focus(),n=n+1);n==0&&echeck(document.frmReg.Email.value)==!1&&(alert("Invalid email address"),document.frmReg.Email.focus(),n=n+1);n==0&&document.frmReg.Email.value!=document.frmReg.Email2.value&&(alert("Entered emails do not match."),document.frmReg.Email.focus(),n=n+1);n==0&&document.frmReg.CountryID.value==""&&(alert("Please select the country."),document.frmReg.CountryID.focus(),n=n+1);n==0&&document.frmReg.FirstName.value==""&&(alert("Please enter your first name."),document.frmReg.FirstName.focus(),n=n+1);n==0&&document.frmReg.LastName.value==""&&(alert("Please enter your lastname."),document.frmReg.LastName.focus(),n=n+1);n==0&&document.frmReg.City.value==""&&(alert("Please enter the city."),document.frmReg.City.focus(),n=n+1);n==0&&document.frmReg.StateID.value==""&&(alert("Please select the state."),document.frmReg.StateID.focus(),n=n+1);n==0&&document.frmReg.Zip.value==""&&(alert("Please enter the ZIP code."),document.frmReg.Zip.focus(),n=n+1);n==0&&document.frmReg.Zip.value.length!=5&&(alert("The ZIP code should contain 5 digits."),document.frmReg.Zip.focus(),n=n+1);n==0&&IsNumeric(document.frmReg.Zip.value)==!1&&(alert("The ZIP code should only contain numbers."),document.frmReg.Zip.focus(),n=n+1);n==0&&document.frmReg.tbPhone1a.value==""&&(alert("Please enter a telephone number."),document.frmReg.tbPhone1a.focus(),n=n+1);n==0&&(document.frmReg.tbPhone1a.value!=""||document.frmReg.tbPhone1b.value!=""||document.frmReg.tbPhone1c.value!="")&&(n==0&&document.frmReg.tbPhone1a.value==""&&(alert("Please enter the complete telephone number."),document.frmReg.tbPhone1a.focus(),n=n+1),n==0&&document.frmReg.tbPhone1b.value==""&&(alert("Please enter the complete telephone number."),document.frmReg.tbPhone1b.focus(),n=n+1),n==0&&document.frmReg.tbPhone1c.value==""&&(alert("Please enter the complete telephone number."),document.frmReg.tbPhone1c.focus(),n=n+1),n==0&&document.frmReg.ddPhone1Type.value==""&&(alert("Please select the type of phone."),document.frmReg.ddPhone1Type.focus(),n=n+1));n==0&&(document.frmReg.tbPhone2a.value!=""||document.frmReg.tbPhone2b.value!=""||document.frmReg.tbPhone2c.value!="")&&(n==0&&document.frmReg.tbPhone2a.value==""&&(alert("Please enter the complete telephone number."),document.frmReg.tbPhone2a.focus(),n=n+1),n==0&&document.frmReg.tbPhone2b.value==""&&(alert("Please enter the complete telephone number."),document.frmReg.tbPhone2b.focus(),n=n+1),n==0&&document.frmReg.tbPhone2c.value==""&&(alert("Please enter the complete telephone number."),document.frmReg.tbPhone2c.focus(),n=n+1),n==0&&document.frmReg.ddPhone2Type.value==""&&(alert("Please select the type of phone."),document.frmReg.ddPhone2Type.focus(),n=n+1));n==0&&document.frmReg.DOBMonth.value==""&&(alert("Please select a date of birth."),document.frmReg.DOBMonth.focus(),n=n+1);n==0&&document.frmReg.DOBDay.value==""&&(alert("Please select a date of birth."),document.frmReg.DOBDay.focus(),n=n+1);n==0&&document.frmReg.DOBYear.value==""&&(alert("Please select a date of birth."),document.frmReg.DOBYear.focus(),n=n+1);n==0&&document.frmReg.MemberRegionID.value==""&&(alert("Please select a storeboard region."),document.frmReg.MemberRegionID.focus(),n=n+1);n==0&&document.frmReg.tbPassword.value==""&&(alert("Please enter a password."),document.frmReg.tbPassword.focus(),n=n+1);n==0&&document.frmReg.tbPassword.value.length<8&&(alert("Password must be at least 8 characters in length."),document.frmReg.tbPassword.focus(),n=n+1);n==0&&document.frmReg.RetypePassword.value==""&&(alert("Please enter the confirmation password."),document.frmReg.RetypePassword.focus(),n=n+1);n==0&&document.frmReg.tbPassword.value!=document.frmReg.RetypePassword.value&&(alert("Entered passwords do not match."),document.frmReg.tbPassword.focus(),n=n+1);n==0&&document.frmReg.CAPTCHA.value==""&&(alert("Please enter the 8 characters you see in the image."),document.frmReg.CAPTCHA.focus(),n=n+1);n==0&&(t?document.frmReg.submit():(alert("You must accept the Terms and Conditions to register."),document.frmReg.agreecheck.focus(),n=n+1))}function reloadCAPTCHA(){document.getElementById("captcha").src="/inc/aspcaptcha.asp?"+Math.random()}function Showlit(n){n=="star1"&&(document.frmPostRave.Rating.value=="0"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_empty.png",document.images.star3.src="/images/star_empty.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="1"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_empty.png",document.images.star3.src="/images/star_empty.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="2"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_empty.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="3"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="4"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_full.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="5"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_full.png",document.images.star5.src="/images/star_full.png"),document.getElementById("RankingName").innerHTML=Rank1);n=="star2"&&(document.frmPostRave.Rating.value=="0"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_empty.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="1"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_empty.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="2"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_empty.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="3"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="4"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_full.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="5"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_full.png",document.images.star5.src="/images/star_full.png"),document.getElementById("RankingName").innerHTML=Rank2);n=="star3"&&(document.frmPostRave.Rating.value=="0"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="1"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="2"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="3"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="4"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_full.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="5"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_full.png",document.images.star5.src="/images/star_full.png"),document.getElementById("RankingName").innerHTML=Rank3);n=="star4"&&(document.frmPostRave.Rating.value=="0"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_over.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="1"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_over.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="2"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_over.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="3"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_over.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="4"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_over.png",document.images.star5.src="/images/star_empty.png"),document.frmPostRave.Rating.value=="5"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_over.png",document.images.star5.src="/images/star_full.png"),document.getElementById("RankingName").innerHTML=Rank4);n=="star5"&&(document.images.star1.src="/images/star_over.png",document.images.star2.src="/images/star_over.png",document.images.star3.src="/images/star_over.png",document.images.star4.src="/images/star_over.png",document.images.star5.src="/images/star_over.png",document.getElementById("RankingName").innerHTML=Rank5)}function ShowVote(n){n=="star1"&&(document.images.star1.src="/images/star_full.png",document.images.star2.src="/images/star_empty.png",document.images.star3.src="/images/star_empty.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png",document.frmPostRave.Rating.value="1",document.getElementById("RankingName").innerHTML=Rank1);n=="star2"&&(document.images.star1.src="/images/star_full.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_empty.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png",document.frmPostRave.Rating.value="2",document.getElementById("RankingName").innerHTML=Rank2);n=="star3"&&(document.images.star1.src="/images/star_full.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png",document.frmPostRave.Rating.value="3",document.getElementById("RankingName").innerHTML=Rank3);n=="star4"&&(document.images.star1.src="/images/star_full.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_full.png",document.images.star5.src="/images/star_empty.png",document.frmPostRave.Rating.value="4",document.getElementById("RankingName").innerHTML=Rank4);n=="star5"&&(document.images.star1.src="/images/star_full.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_full.png",document.images.star5.src="/images/star_full.png",document.frmPostRave.Rating.value="5",document.getElementById("RankingName").innerHTML=Rank5)}function Hidelit(){document.frmPostRave.Rating.value==0&&(document.images.star1.src="/images/star_empty.png",document.images.star2.src="/images/star_empty.png",document.images.star3.src="/images/star_empty.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png",document.getElementById("RankingName").innerHTML=Rank0);document.frmPostRave.Rating.value=="1"&&(document.images.star1.src="/images/star_full.png",document.images.star2.src="/images/star_empty.png",document.images.star3.src="/images/star_empty.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png",document.getElementById("RankingName").innerHTML=Rank1);document.frmPostRave.Rating.value=="2"&&(document.images.star1.src="/images/star_full.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_empty.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png",document.getElementById("RankingName").innerHTML=Rank2);document.frmPostRave.Rating.value=="3"&&(document.images.star1.src="/images/star_full.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_empty.png",document.images.star5.src="/images/star_empty.png",document.getElementById("RankingName").innerHTML=Rank3);document.frmPostRave.Rating.value=="4"&&(document.images.star1.src="/images/star_full.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_full.png",document.images.star5.src="/images/star_empty.png",document.getElementById("RankingName").innerHTML=Rank4);document.frmPostRave.Rating.value=="5"&&(document.images.star1.src="/images/star_full.png",document.images.star2.src="/images/star_full.png",document.images.star3.src="/images/star_full.png",document.images.star4.src="/images/star_full.png",document.images.star5.src="/images/star_full.png",document.getElementById("RankingName").innerHTML=Rank5)}function ConfirmFriendDelete(n){var t=confirm("Are you sure you wish to remove this friend?\n");t&&(document.location.href="/members/my-friends/?MODE=REMOVECONN&ConnMemberID="+n+"")}function OpenDashContainer(n){var t=17;if(document.getElementById("dashboard"+n).style.display=="")for(i=1;i<=t;i++)document.getElementById("dashboard"+i).style.display="none";else{for(i=1;i<=t;i++)document.getElementById("dashboard"+i).style.display="none";document.getElementById("dashboard"+n).style.display=""}}function OpenAdminContainer(n){var t=7;if(document.getElementById("adminboard"+n).style.display=="")for(i=1;i<=t;i++)document.getElementById("adminboard"+i).style.display="none";else{for(i=1;i<=t;i++)document.getElementById("adminboard"+i).style.display="none";document.getElementById("adminboard"+n).style.display=""}}function OpenDashUploadMedia(){document.getElementById("UploadMediaSection").style.display==""?(document.getElementById("UploadMediaSection").style.display="none",document.getElementById("UploadGraphic").innerHTML='<a href="javascript:void(0);" onclick="OpenDashUploadMedia();"><img src="/images/plus_menu.gif" alt="Upload Media" style="border:none"/><\/a>'):(document.getElementById("UploadMediaSection").style.display="",document.getElementById("UploadGraphic").innerHTML='<a href="javascript:void(0);" onclick="OpenDashUploadMedia();"><img src="/images/minus_menu.gif" alt="Upload Media" style="border:none"/><\/a>')}function AllDashShowHide(){var n=17;if(document.getElementById("dashboard1").style.display=="")for(i=1;i<=n;i++)document.getElementById("dashboard"+i).style.display="none";else for(i=1;i<=n;i++)document.getElementById("dashboard"+i).style.display=""}function AllDashHide(){for(i=1;i<=17;i++)document.getElementById("dashboard"+i)!=null&&(document.getElementById("dashboard"+i).style.display="none")}function FillInUsername(n){document.getElementById("UserName").value=n}function ShowTowns(n){for(i=0;i<=50;i++)document.getElementById("showtown"+i).style.display="none";document.getElementById("showtown"+n).style.display=""}function autojump(n,t,i){var u=document.forms[document.forms.length-1],r=u.elements[n];r.nextField=u.elements[t];r.maxLength==null&&(r.maxLength=i);r.onkeydown=autojump_keyDown;r.onkeyup=autojump_keyUp}function autojump_keyDown(){this.beforeLength=this.value.length;downStrokeField=this}function autojump_keyUp(){this==downStrokeField&&this.value.length>this.beforeLength&&this.value.length>=this.maxLength&&this.nextField.focus();downStrokeField=null}function testPassword(n){var i=[],t,r;i[0]='<table border="0" cellpadding="0" cellspacing="0"><tr><td><table cellpadding="0" cellspacing="2"><tr style="height:11px"><td style="width:30px; background-color:#FF0000"><\/td><td style="width:120px; background-color:#DDDDDD"><\/td><\/tr><\/table><\/td><\/tr><\/table>';i[1]='<table border="0" cellpadding="0" cellspacing="0"><tr><td><table cellpadding="0" cellspacing="2"><tr style="height:11px"><td style="width:60px; background-color:#BB0000"><\/td><td style="width:90px; background-color:#DDDDDD"><\/td><\/tr><\/table><\/td><\/tr><\/table>';i[2]='<table border="0" cellpadding="0" cellspacing="0"><tr><td><table cellpadding="0" cellspacing="2"><tr style="height:11px"><td style="width:90px; background-color:#FF9900"><\/td><td style="width:60px; background-color:#DDDDDD"><\/td><\/tr><\/table><\/td><\/tr><\/table>';i[3]='<table border="0" cellpadding="0" cellspacing="0"><tr><td><table cellpadding="0" cellspacing="2"><tr style="height:11px"><td style="width:120px; background-color:#00BB00"><\/td><td style="width:30px; background-color:#DDDDDD"><\/td><\/tr><\/table><\/td><\/tr><\/table>';i[4]='<table border="0" cellpadding="0" cellspacing="0"><tr><td><table cellpadding="0" cellspacing="2"><tr style="height:11px"><td style="width:150px; background-color:#00EE00"><\/td><\/tr><\/table><\/td><\/tr><\/table>';i[5]='<table border="0" cellpadding="0" cellspacing="0"><tr><td><table cellpadding="0" cellspacing="2"><tr style="height:11px"><td style="width:150px; background-color:#DDDDDD"><\/td><\/tr><\/table><\/td><\/tr><\/table>';t=0;r=0;n.length!=0&&n.length?n.length>0&&n.length<5?t=t+3:n.length>4&&n.length<8?t=t+6:n.length>7&&n.length<12?t=t+12:n.length>11&&(t=t+18):t=-1;n.match(/[a-z]/)&&(t=t+1);n.match(/[A-Z]/)&&(t=t+5);n.match(/\d+/)&&(t=t+5);n.match(/(.*[0-9].*[0-9].*[0-9])/)&&(t=t+5);n.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)&&(t=t+5);n.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)&&(t=t+5);n.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&(t=t+2);n.match(/(\d.*\D)|(\D.*\d)/)&&(t=t+2);n.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)&&(t=t+2);t==-1?(r=i[5],document.getElementById("PasswordRating").innerHTML=" "):t>-1&&t<16?(r=i[0],document.getElementById("PasswordRating").innerHTML="Unsafe"):t>15&&t<25?(r=i[1],document.getElementById("PasswordRating").innerHTML="Weak"):t>24&&t<35?(r=i[2],document.getElementById("PasswordRating").innerHTML="Safe"):t>34&&t<45?(r=i[3],document.getElementById("PasswordRating").innerHTML="Correct"):(r=i[4],document.getElementById("PasswordRating").innerHTML="Optimal");document.getElementById("PasswordIndicator").innerHTML=r}function IsNumeric(n){var r,t=!0;for(i=0;i<n.length&&t==!0;i++)r=n.charAt(i),"0123456789.-".indexOf(r)==-1&&(t=!1);return t}function captalizeFirst(n){var t=n.value,i=t.length,r=t.substring(0,1).toUpperCase(),u=t.substring(1,i),f=r+u;n.value=f}function numbersonly(n,t,i){var r,u;if(window.event)r=window.event.keyCode;else if(t)r=t.which;else return!0;return u=String.fromCharCode(r),r==null||r==0||r==8||r==9||r==13||r==27?!0:"0123456789.".indexOf(u)>-1?!0:i&&u=="."?(n.form.elements[i].focus(),!1):!1}function echeck(n){var i="@",t=".",r=n.indexOf(i),u=n.length,f=n.indexOf(t);return n.indexOf(i)==-1?!1:n.indexOf(i)==-1||n.indexOf(i)==0||n.indexOf(i)==u?!1:n.indexOf(t)==-1||n.indexOf(t)==0||n.indexOf(t)==u?!1:n.indexOf(i,r+1)!=-1?!1:n.substring(r-1,r)==t||n.substring(r+1,r+2)==t?!1:n.indexOf(t,r+2)==-1?!1:n.indexOf(" ")!=-1?!1:!0}function valid(n,t){n.value=n.value.replace(r[t],"")}function MM_preloadImages(){var n=document,t,r,i;if(n.images)for(n.MM_p||(n.MM_p=[]),r=n.MM_p.length,i=MM_preloadImages.arguments,t=0;t<i.length;t++)i[t].indexOf("#")!=0&&(n.MM_p[r]=new Image,n.MM_p[r++].src=i[t])}function FindSpaces(n){return n.indexOf(" ")!=-1?!1:!0}function textCounter(n,t,i){n.value.length>i?n.value=n.value.substring(0,i):document.getElementById(t).innerHTML=i-n.value.length}function ShowPasswords(n){document.getElementById("CurrentPassword").type=n.checked?"text":"password";document.getElementById("NewPassword").type=n.checked?"text":"password";document.getElementById("ConfirmNewPassword").type=n.checked?"text":"password"}function FocusCommentBox(){document.frmMediaComment.taMediaComments.value=="Write A Comment!"&&(document.frmMediaComment.taMediaComments.value="",document.getElementById("submit-button").style.display="")}function ConfirmMediaCommentDelete(n){var i=confirm("Are you sure you want to delete this comment?\n"),t;if(i)return t="",$j.post("/ajax/mediacomment_delete.asp",{MemberID:t,MediaCommentID:n},function(t){result=new String(t);document.getElementById("MediaComment"+n).style.display="none"}),!1}function BlurCommentBox(){document.frmMediaComment.taMediaComments.value==""&&(document.frmMediaComment.taMediaComments.value="Write A Comment!",document.getElementById("submit-button").style.display="none")}function SaveMediaComments(){var t=document.getElementById("taMediaComments").value;t=t.replace(/%/g,"perc3nt");t=t.replace(/&/g,"amp3rsand");t=t.replace(/#/g,"criss6cross");var i=document.getElementById("hidMediaType").value,r=document.getElementById("hidMediaID").value,u=document.getElementById("hidMemberID").value,n=GetXmlHttpObject(),f="/ajax/media_comment.asp?MemberID="+u+"&MediaComment="+t+"&MediaType="+i+"&MediaID="+r;if(!n){alert("Browser does not support HTTP Request");return}n.onreadystatechange=function(){n.readyState==1&&(document.getElementById("BlankForm").style.display="none",document.getElementById("BusyForm").style.display="");(n.readyState==4||n.readyState=="complete")&&(document.getElementById("AllComments").innerHTML=n.responseText,document.getElementById("taMediaComments").value="Write A Comment!",document.getElementById("submit-button").style.display="none",document.getElementById("BlankForm").style.display="",document.getElementById("BusyForm").style.display="none")};n.open("GET",f,!0);n.send(null)}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function ChangeLikeMedia(n,t,i){document.getElementById("fmeProcess").src=t=="l"?"/ajax/like_unlike_media.asp?mediaid="+n+"&mediatype="+i+"&option="+t:"/ajax/like_unlike_media.asp?mediaid="+n+"&mediatype="+i+"&option="+t;setTimeout(LikeMedia(n,t,i),2e3)}function LikeMedia(n,t,i){var r=GetXmlHttpObject(),u="/ajax/like_media.asp?mediaid="+n+"&mediatype="+i;if(!r){alert("Browser does not support HTTP Request");return}r.onreadystatechange=function(){r.readyState==1&&(document.getElementById("LikeCountDisplay").style.display="",document.getElementById("LikeMediaBar").innerHTML='<table cellpadding="0" cellspacing="0" border="0"><tr style="height:26px"><td style="padding-left:5px"><img src="/images/register_loading.gif" alt="Loading"/><\/td><td style="color:#c0c0c0;padding-left:8px">Loading...<\/td><\/tr><\/table>',document.getElementById("LikeMediaBarGap").style.display="");(r.readyState==4||r.readyState=="complete")&&(r.responseText=="NoLikes"?(document.getElementById("LikeCountDisplay").style.display="none",document.getElementById("LikeMediaBar").innerHTML="&nbsp;",document.getElementById("LikeMediaBarGap").style.display="none",document.getElementById("MediaLike").innerHTML='&nbsp;&middot; <a href="javascript:ChangeLikeMedia('+n+",'l','"+i+"')\">Like<\/a>",alert("NoLikes")):(document.getElementById("LikeCountDisplay").style.display="",document.getElementById("LikeMediaBar").innerHTML=r.responseText,document.getElementById("LikeMediaBarGap").style.display="",document.getElementById("MediaLike").innerHTML='&nbsp;&middot; <a href="javascript:ChangeLikeMedia('+n+",'u','"+i+"')\">Unlike<\/a>",alert("YesLikes")))};r.open("GET",u,!0);r.send(null)}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function AlertClose(){document.getElementById("SuccessfulPost").style.display="none"}function PowershareNL(n){var t=confirm("Powershare (which allows a "+n+" Member to share on "+n+", LinkedIn, Facebook, and Twitter all at once) is only available to "+n+" Members. Sign Up?");t&&(document.location,window.open("/sign-up/"))}function PowerShare(){var i=0,n=document.frmPowerShareMedia.ShareOnSocials.value,t,h;console.log(n);var o=document.frmPowerShareMedia.hidMediaID.value,s=document.frmPowerShareMedia.hidMediaType.value,c=document.getElementById("cbFacebook"),l=document.getElementById("cbLinkedIn"),a=document.getElementById("cbTwitter");n=n.replace(/%/g,"perc3nt");n=n.replace(/&/g,"amp3rsand");n=n.replace(/#/g,"criss6cross");console.log(n);var r="N",u="N",f="N",e="N";if(document.frmPowerShareMedia.cbThisSite.checked==!0&&(e="Y"),a!=null&&document.frmPowerShareMedia.cbTwitter.checked==!0&&(u="Y"),l!=null&&document.frmPowerShareMedia.cbLinkedIn.checked==!0&&(f="Y"),c!=null&&document.frmPowerShareMedia.cbFacebook.checked==!0&&(r="Y"),n==""&&(alert("Please type in a comment before clicking share."),document.frmPowerShareMedia.ShareOnSocials.focus(),i=i+1),n.length>1e3&&(alert("Status Updates are limited to 1000 characters. You have entered "+n.length+" characters."),i=i+1),u=="N"&&e=="N"&&f=="N"&&r=="N"&&(alert("You must select at least one social media site to post on."),document.frmPowerShareMedia.ShareOnSocials.focus(),i=i+1),i==0){if(t=GetXmlHttpObject(),console.log("/ajax/powershare.asp?MediaID="+o+"&MediaType="+s+"&StatusUpdate="+n+"&StatusTwitter="+u+"&StatusFacebook="+r+"&StatusLinkedIn="+f+"&StatusSite="+e),h="/ajax/powershare.asp?MediaID="+o+"&MediaType="+s+"&StatusUpdate="+n+"&StatusTwitter="+u+"&StatusFacebook="+r+"&StatusLinkedIn="+f+"&StatusSite="+e,!t){alert("Browser does not support HTTP Request");return}t.onreadystatechange=function(){t.readyState==1&&(document.getElementById("Saving").style.display="",document.getElementById("NotSaving").style.display="none");(t.readyState==4||t.readyState=="complete")&&(document.getElementById("Saving").style.display="none",document.getElementById("NotSaving").style.display="",document.frmPowerShareMedia.ShareOnSocials.value="",document.getElementById("PowerShareWindow").style.display="none",document.getElementById("SuccessfulPost").style.display="",setTimeout("AlertClose();",5200))};t.open("GET",h,!0);t.send(null)}}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function LoadCities(n){var t=GetXmlHttpObject(),i="/ajax/cls_load_cities.asp?StateID="+n;if(!t){alert("Browser does not support HTTP Request");return}t.onreadystatechange=function(){t.readyState==1&&(document.getElementById("LocationCities").innerHTML='<select name="City" class="f1" tabindex="10" disabled="disabled" style="width:130px;"><option value="">Loading...<\/option><\/select>');(t.readyState==4||t.readyState=="complete")&&(document.getElementById("LocationCities").innerHTML=t.responseText)};t.open("GET",i,!0);t.send(null)}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function addEvent(n,t,i){if(t=="DOMContentLoaded"||t=="domload"){addDOMLoadEvent(i);return}if(n.addEventListener)n.addEventListener(t,i,!1);else{i.$$guid||(i.$$guid=addEvent.guid++);n.events||(n.events={});var r=n.events[t];r||(r=n.events[t]={},n["on"+t]&&(r[0]=n["on"+t]));r[i.$$guid]=i;n["on"+t]=handleEvent}}function removeEvent(n,t,i){n.removeEventListener?n.removeEventListener(t,i,!1):n.events&&n.events[t]&&delete n.events[t][i.$$guid]}function handleEvent(n){var i=!0,t,r;n=n||fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);t=this.events[n.type];for(r in t)this.$$handleEvent=t[r],this.$$handleEvent(n)===!1&&(i=!1);return i}function fixEvent(n){return n.preventDefault=fixEvent.preventDefault,n.stopPropagation=fixEvent.stopPropagation,n}function addDOMLoadEvent(n){window.onDOMLoadEvents[window.onDOMLoadEvents.length]=n}function DOMContentLoadedInit(){var n,t;if(!window.DOMContentLoadedInitDone)for(window.DOMContentLoadedInitDone=!0,n=0;n<window.onDOMLoadEvents.length;n++)t=window.onDOMLoadEvents[n],t()}function DOMContentLoadedScheduler(){if(window.DOMContentLoadedInitDone)return!0;if(/KHTML|WebKit/i.test(navigator.userAgent))/loaded|complete/.test(document.readyState)?DOMContentLoadedInit():setTimeout("DOMContentLoadedScheduler()",250);else if(document.getElementById("__ie_onload"))return!0;return typeof DOMContentLoadedCustom=="function"&&typeof document.getElementsByTagName!="undefined"&&(document.getElementsByTagName("body")[0]!=null||document.body!=null)&&(DOMContentLoadedCustom()?DOMContentLoadedInit():setTimeout("DOMContentLoadedScheduler()",250)),!0}function Calendar(){g_Calendar=this;this.daysOfWeek="Sun Mon Tue Wed Thu Fri Sat".split(" ");this.months="January February March April May June July August September October November December".split(" ");this.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];this.containerLayer=null;this.dayMask=[1,1,1,1,1,1,1];this.Holidays=null;this.showHolidays=!0}function calendarTimeout(){cp_timeoutDelay&&(cp_timeoutId=setTimeout("g_Calendar.hide();",cp_timeoutDelay))}function calendarClearTimeout(){cp_timeoutId&&clearTimeout(cp_timeoutId)}function cp_handleDocumentClick(){g_Calendar.containerLayer&&(g_Calendar.isHidden()||g_Calendar.hide())}function parseMonth(n){var t=monthNames.filter(function(t){return new RegExp("^"+n,"i").test(t)});if(t.length==0)throw new Error("Invalid month string");if(t.length>1)throw new Error("Ambiguous month");return monthNames.indexOf(t[0])}function parseWeekday(n){var t=weekdayNames.filter(function(t){return new RegExp("^"+n,"i").test(t)});if(t.length==0)throw new Error("Invalid day string");if(t.length>1)throw new Error("Ambiguous weekday");return weekdayNames.indexOf(t[0])}function parseDateString(n){for(var t=0;t<dateParsePatterns.length;t++){var r=dateParsePatterns[t].re,u=dateParsePatterns[t].handler,i=r.exec(n);if(i)return u(i)}throw new Error("Invalid date string");}function dp_DateString(d){var dateDelim,delim,month,day,year;dp_dateFormat=dp_dateFormat||"m/d/yyyy";dp_dateFormat.indexOf("/")!=-1?(delim=eval("/\\//g"),dateDelim="/"):dp_dateFormat.indexOf("-")!=-1?(delim=eval("/\\-/g"),dateDelim="-"):dp_dateFormat.indexOf(".")!=-1?(delim=eval("/\\./g"),dateDelim="."):(delim=eval("/\\ /g"),dateDelim=" ");month=d.getMonth();day=d.getDate();year=d.getFullYear();switch(dp_dateFormat.replace(delim,"")){case"ddmmmyyyy":return dp_padZero(day)+dateDelim+monthNames[month].substr(0,3)+dateDelim+year;case"dmmmyyyy":return day+dateDelim+monthNames[month].substr(0,3)+dateDelim+year;case"ddmmyyyy":return dp_padZero(day)+dateDelim+dp_padZero(month+1)+dateDelim+year;case"dmmyyyy":return day+dateDelim+dp_padZero(month+1)+dateDelim+year;case"mmddyyyy":return dp_padZero(month+1)+dateDelim+dp_padZero(day)+dateDelim+year;case"mddyyyy":return month+1+dateDelim+dp_padZero(day)+dateDelim+year;case"mdyyyy":return month+1+dateDelim+day+dateDelim+year;case"yyyymmdd":return year+dateDelim+dp_padZero(month+1)+dateDelim+dp_padZero(day);default:return month+1+dateDelim+day+dateDelim+year}}function dp_padZero(n){return n<=9?"0"+n:n}function magicDate(n,t){var f,e,u,r,i;if(!t&&n.value=="")return!0;f=!0;e=n.id+"Msg";try{u=parseDateString(n.value);n.value=dp_DateString(u);n.className="";i=document.getElementById(e);i?(i.firstChild.nodeValue=u.toDateString(),i.className="normal"):u.toDateString()}catch(o){n.className="error";r=o.message;(!r.length||r.indexOf("is null or not an object")>-1)&&(r="Invalid date string");i=document.getElementById(e);i?(i.firstChild.nodeValue=r,i.className="error"):alert(r);f=!1}return f}function LoadRegions(n){var t=GetXmlHttpObject(),i="/ajax/nowyouknowa_load_regions.asp?StateID="+n;if(!t){alert("Browser does not support HTTP Request");return}t.onreadystatechange=function(){t.readyState==1&&(document.getElementById("RegionHolder").innerHTML='<select name="ddRegions" class="f1" tabindex="10" disabled="disabled" style="width:200px;"><option value="">Loading...<\/option><\/select>');(t.readyState==4||t.readyState=="complete")&&(document.getElementById("RegionHolder").innerHTML=t.responseText)};t.open("GET",i,!0);t.send(null)}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function validateHeader(){var n=0;(document.frmMainSearch.tbSearchQuery.value=="What Are You Looking For?"||document.frmMainSearch.tbSearchQuery.value.trim()=="")&&(document.frmMainSearch.tbSearchQuery.focus(),n=n+1);n==0&&(typeof document.frmMainSearch.KeySearchURL!="undefined"&&document.frmMainSearch.KeySearchURL.value!=""&&(document.frmMainSearch.action=document.frmMainSearch.KeySearchURL.value+"?sq="+document.frmMainSearch.tbSearchQuery.value),document.frmMainSearch.submit())}function ConfirmMainStatusRemoval(n){var r=confirm("Are you sure you want to delete this comment?\n"),t,i;if(r){if(t=GetXmlHttpObject(),i="/ajax/status_delete.asp?MainStatusCommentID="+n,!t){alert("Browser does not support HTTP Request");return}t.onreadystatechange=function(){if(t.readyState==1&&(document.getElementById("CURRENTSTATUSDATETIME").innerHTML="",document.getElementById("CURRENTSTATUSID").innerHTML='<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="/images/register_loading.gif" alt="Removing"/><\/td><td style="color:#c0c0c0;padding-left:8px">Removing Status...<\/td><\/tr><\/table>',document.getElementById("CURRENTSTATUS").innerHTML=""),t.readyState==4||t.readyState=="complete"){var r=t.responseText,i=r.split("~~");document.getElementById("CURRENTSTATUSDATETIME").innerHTML=i[1];document.getElementById("CURRENTSTATUSID").innerHTML='<a href="javascript:ConfirmMainStatusRemoval('+i[2]+')">Remove<\/a>';document.getElementById("CURRENTSTATUS").innerHTML=i[0];document.getElementById("MemberStatus"+n).style.display="none";document.getElementById("MemberStatus"+n+"spacer").style.display="none"}};t.open("GET",i,!0);t.send(null)}}function FetchLastStatus(){var n=GetXmlHttpObject();if(!n){alert("Browser does not support HTTP Request");return}n.onreadystatechange=function(){if(n.readyState==1&&(document.getElementById("CURRENTSTATUSDATETIME").innerHTML="",document.getElementById("CURRENTSTATUSID").innerHTML='<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="/images/register_loading.gif" alt="Removing"/><\/td><td style="color:#c0c0c0;padding-left:8px">Removing Status...<\/td><\/tr><\/table>',document.getElementById("CURRENTSTATUS").innerHTML=""),n.readyState==4||n.readyState=="complete"){var i=n.responseText,t=i.split("~~");document.getElementById("CURRENTSTATUSDATETIME").innerHTML=t[1];document.getElementById("CURRENTSTATUSID").innerHTML='<a href="javascript:ConfirmMainStatusRemoval('+t[2]+')">Remove<\/a>';document.getElementById("CURRENTSTATUS").innerHTML=t[0]}};n.open("GET","/ajax/last_status.asp",!0);n.send(null)}function SaveStatusUpdate(){var i=0,n=document.frmDashboardStatusUpdate.StatusUpdate.value,u=document.frmDashboardStatusUpdate.hidBusinessNetwork.value,f=document.frmDashboardStatusUpdate.hidCountyID.value,e=document.frmDashboardStatusUpdate.hidLocalPageID.value,o=document.frmDashboardStatusUpdate.hidStateID.value,s=document.frmDashboardStatusUpdate.hidMediaID.value,h=document.frmDashboardStatusUpdate.hidMediaType.value,c=document.frmDashboardStatusUpdate.hidDefaultStatus.value,l,t,r;if(n=n.replace(/%/g,"perc3nt"),n=n.replace(/&/g,"amp3rsand"),n=n.replace(/#/g,"criss6cross"),l=document.frmDashboardStatusUpdate.StatusUpdate.value,document.frmDashboardStatusUpdate.StatusUpdate.value==c&&(alert("Please type in a status message before clicking share"),document.frmDashboardStatusUpdate.StatusUpdate.focus(),i=i+1),n.length>1e3&&(alert("Status Updates are limited to 1000 characters. You have entered "+n.length+" characters."),i=i+1),i==0){if(t=GetXmlHttpObject(),r="/ajax/status_update.asp?BusinessNetworkID="+u+"&CountyID="+f+"&MediaID="+s+"&MediaType="+h+"&StateID="+o+"&LocalPageID="+e+"&StatusUpdate="+n+"&StatusTwitter=N&StatusFacebook=N&StatusLinkedIn=N",!t){alert("Browser does not support HTTP Request");return}t.onreadystatechange=function(){(t.readyState==4||t.readyState=="complete")&&(document.frmDashboardStatusUpdate.StatusUpdate.value="",document.frmDashboardStatusUpdate.hidMediaID.value="",document.frmDashboardStatusUpdate.hidMediaType.value="",$("#RefreshLink").click())};t.open("GET",r,!0);t.send(null)}}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function ShortenURL(){var t=0,r=document.frmDashboardStatusUpdate.tbShortURL.value,n,i;if(document.frmDashboardStatusUpdate.tbShortURL.value=="Shorten A URL Here"&&(document.frmDashboardStatusUpdate.tbShortURL.focus(),alert("Please enter a URL before clicking 'Shorten'"),t=t+1),t==0){if(n=GetXmlHttpObject(),i="/ajax/shortenurl.asp?OriginalURL="+r,!n){alert("Browser does not support HTTP Request");return}n.onreadystatechange=function(){n.readyState==1&&(document.getElementById("ShortenURLButton").innerHTML='<table cellpadding="0" cellspacing="0" border="0" style="width:60px"><tr><td align="center"><img src="/images/register_loading.gif" alt="Converting"/><\/td><\/tr><\/table>');(n.readyState==4||n.readyState=="complete")&&(document.frmDashboardStatusUpdate.StatusUpdate.value=="Share Something New and Interesting!"?document.frmDashboardStatusUpdate.StatusUpdate.value=n.responseText:document.frmDashboardStatusUpdate.StatusUpdate.value+=" "+n.responseText,document.getElementById("ShortenURLButton").innerHTML='<input type="button" value="Shorten" onclick="ShortenURL();" class="f5"/>',document.frmDashboardStatusUpdate.tbShortURL.value="Shorten A URL Here",document.getElementById("tbShortURL").className="f5 greytext",textCounterTwitter(document.frmDashboardStatusUpdate.StatusUpdate,"charsRemaining",140))};n.open("GET",i,!0);n.send(null)}}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function MediaLikeSU(n,t,i){document.getElementById("fmeProcess").setAttribute("src","/ajax/like_unlike_media.asp?mediaid="+i+"&mediatype="+n+"&thumb="+t)}function LikeSU(n,t,i){var r="";typeof i!="undefined"&&(r=i);var u=document.getElementById("LikeCountDisplay"+n),f=GetXmlHttpObject(),e="/ajax/like_status.asp?statusid="+n;$.ajax({url:"/ajax/like_unlike.asp?statusid="+n+"&mediaid="+r+"&option="+t,type:"GET",dataType:"html",success:function(){u!=null&&(document.getElementById("LikeCountDisplay"+n).style.display="",document.getElementById("LikeStatusBar"+n).innerHTML='<table cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-left:5px"><img src="/images/register_loading.gif" alt="Loading"/><\/td><td style="color:#c0c0c0;padding-left:8px">Loading...<\/td><\/tr><\/table>',document.getElementById("LikeStatusBar"+n+"Gap").style.display="");document.getElementById("StatusLike"+n).innerHTML=t=="l"?'<a href="javascript:void(0)" onclick="LikeSU('+n+",'u',"+r+')"><img src="/css/whiteLayout/images/new/Likeicon2.0.png" alt="Unlike" title="Unlike" class="dashlike" /><\/a>':'<a href="javascript:void(0)" onclick="LikeSU('+n+",'l',"+r+')"><img src="/css/whiteLayout/images/new/Likeicon2.0.png" alt="Like" title="Like" class="dashlike" /><\/a>';$.ajax({url:"/ajax/like_status.asp?statusid="+n,type:"GET",dataType:"html",success:function(t){t=="NoLikes"?u!=null&&(document.getElementById("LikeCountDisplay"+n).style.display="none",document.getElementById("LikeStatusBar"+n).innerHTML="&nbsp;",document.getElementById("LikeStatusBar"+n+"Gap").style.display="none"):u!=null&&(document.getElementById("LikeCountDisplay"+n).style.display="",document.getElementById("LikeStatusBar"+n).innerHTML=t,document.getElementById("LikeStatusBar"+n+"Gap").style.display="")},error:function(){}})},error:function(){}})}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function HideAnnouncement(){var n=GetXmlHttpObject();if(!n){alert("Browser does not support HTTP Request");return}n.onreadystatechange=function(){(n.readyState==4||n.readyState=="complete")&&(document.getElementById("DashAnnounceWidget").style.display="none")};n.open("GET","/ajax/hide_announcement.asp",!0);n.send(null)}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function OpenClosePremiumAds(n){n=="C"?(document.getElementById("plusUnderline").style.borderBottomColor="#F2FCFF",document.getElementById("PlusAds").style.display="none",document.getElementById("OpenCloseAd").innerHTML='<a href="javascript:void(0);" onclick="OpenClosePremiumAds(\'O\');">Open Ads<\/a>'):(document.getElementById("plusUnderline").style.borderBottomColor="#BFF0FF",document.getElementById("PlusAds").style.display="",document.getElementById("OpenCloseAd").innerHTML='<a href="javascript:void(0);" onclick="OpenClosePremiumAds(\'C\');">Close Ads<\/a>')}function FireDropMenu(n){document.getElementById(n).style.display!=""&&CloseAllDropMenus();document.getElementById(n).style.display=""}function ShowMore(n){document.getElementById("More"+n).style.display="inline";document.getElementById("Less"+n).style.display="none"}function ShowLess(n){document.getElementById("More"+n).style.display="none";document.getElementById("Less"+n).style.display="inline"}function BoardReadMore(n){var t=document.getElementById("dots"+n),i=document.getElementById("more"+n),r=document.getElementById("ShowMoreLess"+n);t.style.display==="none"?(t.style.display="inline",i.style.display="none",r.innerHTML="Show More"):(t.style.display="none",i.style.display="inline",r.innerHTML="Show Less")}function CloseAllDropMenus(n){for(var i=["NetworkCats","VideoCats","AudioCats","ImageCats","CouponCats","MemberCats","AdsCats2","ProductCats","DirectoryCats","BlogCats","GroupCats","ForumCats","DealCats","LocationCats"],r=i.length,t=0;t<r;t++)i[t]!=n&&(document.getElementById(i[t]).style.display="none")}function HideNetworkCats(){document.getElementById("NetworkCats").style.display="none"}function HideLocationCats(){document.getElementById("LocationCats").style.display="none"}function HideDealCats(){document.getElementById("DealCats").style.display="none"}function HideForumCats(){document.getElementById("ForumCats").style.display="none"}function HideGroupCats(){document.getElementById("GroupCats").style.display="none"}function HideBlogCats(){document.getElementById("BlogCats").style.display="none"}function HideVideoCats(){document.getElementById("VideoCats").style.display="none"}function HideAudioCats(){document.getElementById("AudioCats").style.display="none"}function HideImageCats(){document.getElementById("ImageCats").style.display="none"}function HideCouponCats(){document.getElementById("CouponCats").style.display="none"}function HideAdsCats2(){document.getElementById("AdsCats2").style.display="none"}function HideProductCats(){document.getElementById("ProductCats").style.display="none"}function HideMemberCats(){document.getElementById("MemberCats").style.display="none"}function HideDirectoryCats(){document.getElementById("DirectoryCats").style.display="none"}function MenusBlur(){document.getElementById("VideoCats")!=null&&(document.getElementById("VideoCats").style.display="none");document.getElementById("AudioCats")!=null&&(document.getElementById("AudioCats").style.display="none");document.getElementById("ImageCats")!=null&&(document.getElementById("ImageCats").style.display="none");document.getElementById("CouponCats")!=null&&(document.getElementById("CouponCats").style.display="none");document.getElementById("AdsCats2")!=null&&(document.getElementById("AdsCats2").style.display="none");document.getElementById("ProductCats")!=null&&(document.getElementById("ProductCats").style.display="none");document.getElementById("MemberCats")!=null&&(document.getElementById("MemberCats").style.display="none");document.getElementById("BlogCats")!=null&&(document.getElementById("BlogCats").style.display="none");document.getElementById("GroupCats")!=null&&(document.getElementById("GroupCats").style.display="none");document.getElementById("ForumCats")!=null&&(document.getElementById("ForumCats").style.display="none");document.getElementById("DealCats")!=null&&(document.getElementById("DealCats").style.display="none");document.getElementById("LocationCats")!=null&&(document.getElementById("LocationCats").style.display="none");document.getElementById("DirectoryCats")!=null&&(document.getElementById("DirectoryCats").style.display="none");document.getElementById("TwitterSetup")!=null&&(document.getElementById("TwitterSetup").style.display="none");document.getElementById("FacebookSetup")!=null&&(document.getElementById("FacebookSetup").style.display="none");document.getElementById("LinkedInSetup")!=null&&(document.getElementById("LinkedInSetup").style.display="none");document.getElementById("OtherStateLogoDM")!=null&&(document.getElementById("OtherStateLogoDM").style.display="none");document.getElementById("OtherCountriesLogoDM")!=null&&(document.getElementById("OtherCountriesLogoDM").style.display="none");document.getElementById("OtherCitiesLogoDM")!=null&&(document.getElementById("OtherCitiesLogoDM").style.display="none");document.getElementById("OtherCountyLogoDM")!=null&&(document.getElementById("OtherCountyLogoDM").style.display="none");document.getElementById("OtherCountyCitiesLogoDM")!=null&&(document.getElementById("OtherCountyCitiesLogoDM").style.display="none")}function SaveStatusLocation(n){document.frmDashboardStatusUpdate.hidLocalPageID.value=n;document.getElementById("StatusLocations").style.display="none";document.getElementById("StatusMedias").style.display="";document.getElementById("ddBusinessNetwork")!=null&&(document.frmDashboardStatusUpdate.ddBusinessNetwork.selectedIndex=0);document.getElementById("ddBusinessNetwork")!=null&&(document.frmDashboardStatusUpdate.ddBusinessNetwork.options[0].selected=!0);document.getElementById("hidBusinessNetwork")!=null&&(document.frmDashboardStatusUpdate.hidBusinessNetwork.value="");document.getElementById("SocialNetworkLinks").style.display=""}function SaveStatusNetwork(n){document.frmDashboardStatusUpdate.hidBusinessNetwork.value=n;document.getElementById("StatusLocations").style.display="none";document.getElementById("StatusMedias").style.display="";document.getElementById("ddSBLocationCity")!=null&&(document.frmDashboardStatusUpdate.ddSBLocationCity.selectedIndex=0);document.getElementById("ddSBLocationCity")!=null&&(document.frmDashboardStatusUpdate.ddSBLocationCity.options[0].selected=!0);document.getElementById("hidLocalPageID")!=null&&(document.frmDashboardStatusUpdate.hidLocalPageID.value="");document.getElementById("SocialNetworkLinks").style.display=""}function CloseLocation(){document.getElementById("StatusLocations").style.display="none";document.getElementById("StatusMedias").style.display="";document.getElementById("SocialNetworkLinks").style.display=""}function ShowStatusLocations(){(document.getElementById("StatusLocations").style.display="")?(document.getElementById("StatusLocations").style.display="none",document.getElementById("SocialNetworkLinks").style.display="",document.getElementById("StatusMedias").style.display=""):(document.getElementById("StatusLocations").style.display="",document.getElementById("SocialNetworkLinks").style.display="none",document.getElementById("StatusMedias").style.display="none")}function OpenCloseLogoCityMenu(){CloseAllDropMenus();document.getElementById("OtherStateLogoDM")!=null&&(document.getElementById("OtherStateLogoDM").style.display="none");document.getElementById("OtherCountriesLogoDM")!=null&&(document.getElementById("OtherCountriesLogoDM").style.display="none");document.getElementById("OtherCountyLogoDM")!=null&&(document.getElementById("OtherCountyLogoDM").style.display="none");document.getElementById("OtherCountyCitiesLogoDM")!=null&&(document.getElementById("OtherCountyCitiesLogoDM").style.display="none");document.getElementById("OtherCitiesLogoDM").style.display=document.getElementById("OtherCitiesLogoDM").style.display==""?"none":""}function OpenCloseLogoCountyCitiesMenu(){CloseAllDropMenus();document.getElementById("OtherStateLogoDM")!=null&&(document.getElementById("OtherStateLogoDM").style.display="none");document.getElementById("OtherCountriesLogoDM")!=null&&(document.getElementById("OtherCountriesLogoDM").style.display="none");document.getElementById("OtherCountyLogoDM")!=null&&(document.getElementById("OtherCountyLogoDM").style.display="none");document.getElementById("OtherCitiesLogoDM")!=null&&(document.getElementById("OtherCitiesLogoDM").style.display="none");document.getElementById("OtherCountyCitiesLogoDM").style.display=document.getElementById("OtherCountyCitiesLogoDM").style.display==""?"none":""}function OpenCloseLogoCountriesMenu(){CloseAllDropMenus();document.getElementById("OtherCitiesLogoDM")!=null&&(document.getElementById("OtherCitiesLogoDM").style.display="none");document.getElementById("OtherStateLogoDM")!=null&&(document.getElementById("OtherStateLogoDM").style.display="none");document.getElementById("OtherCountyLogoDM")!=null&&(document.getElementById("OtherCountyLogoDM").style.display="none");document.getElementById("OtherCountyCitiesLogoDM")!=null&&(document.getElementById("OtherCountyCitiesLogoDM").style.display="none");document.getElementById("OtherCountriesLogoDM").style.display=document.getElementById("OtherCountriesLogoDM").style.display==""?"none":""}function OpenCloseLogoStateMenu(){CloseAllDropMenus();document.getElementById("OtherCitiesLogoDM")!=null&&(document.getElementById("OtherCitiesLogoDM").style.display="none");document.getElementById("OtherCountriesLogoDM")!=null&&(document.getElementById("OtherCountriesLogoDM").style.display="none");document.getElementById("OtherCountyLogoDM")!=null&&(document.getElementById("OtherCountyLogoDM").style.display="none");document.getElementById("OtherCountyCitiesLogoDM")!=null&&(document.getElementById("OtherCountyCitiesLogoDM").style.display="none");document.getElementById("OtherStateLogoDM").style.display=document.getElementById("OtherStateLogoDM").style.display==""?"none":""}function OpenCloseLogoCountyMenu(){CloseAllDropMenus();document.getElementById("OtherCitiesLogoDM")!=null&&(document.getElementById("OtherCitiesLogoDM").style.display="none");document.getElementById("OtherCountriesLogoDM")!=null&&(document.getElementById("OtherCountriesLogoDM").style.display="none");document.getElementById("OtherStateLogoDM")!=null&&(document.getElementById("OtherStateLogoDM").style.display="none");document.getElementById("OtherCountyCitiesLogoDM")!=null&&(document.getElementById("OtherCountyCitiesLogoDM").style.display="none");document.getElementById("OtherCountyLogoDM").style.display=document.getElementById("OtherCountyLogoDM").style.display==""?"none":""}function MainSearchEnter(n,t){var i;if(window.event)i=window.event.keyCode;else if(t)i=t.which;else return!0;return i==13?(validateHeader(),!1):!0}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function OpenCountryTowns(n){document.getElementById(n).style.display=document.getElementById(n).style.display==""?"none":""}function ShowMoreStates(){document.getElementById("MoreCountries").style.display="none";document.getElementById("MoreCities").style.display=document.getElementById("MoreCities").style.display==""?"none":""}function ShowMoreCountries(){document.getElementById("MoreCities").style.display="none";document.getElementById("MoreCountries").style.display=document.getElementById("MoreCountries").style.display==""?"none":""}function getElementsByClassName(n,t){var i,f;t||(t=document.getElementsByTagName("body")[0]);var u=[],e=new RegExp("\\b"+n+"\\b"),r=t.getElementsByTagName("*");for(i=0,f=r.length;i<f;i++)e.test(r[i].className)&&u.push(r[i]);return u}function ShowHideFriends(){document.getElementById("FriendsDisplay1").style.display==""?(document.getElementById("FriendsDisplay1").style.display="none",document.getElementById("FriendsDisplay2").style.display="none"):(document.getElementById("FriendsDisplay1").style.display="",document.getElementById("FriendsDisplay2").style.display="")}function ShowProfileChat(){document.getElementById("FriendsDisplayProfiles").style.display=="none"?(document.getElementById("FriendsDisplayProfiles").style.display="",document.getElementById("FriendsDisplayChat").style.display="none",document.getElementById("ProfileChatButton").innerHTML="Chat"):(document.getElementById("FriendsDisplayProfiles").style.display="none",document.getElementById("FriendsDisplayChat").style.display="",document.getElementById("ProfileChatButton").innerHTML="Profiles")}function onMediastripPhotoAjaxSuccess(){$("a.thumb").fancybox({transitionIn:"elastic",transitionOut:"elastic",speedIn:200,speedOut:200,overlayShow:!0,showCloseButton:!1,titlePosition:"inside",titleFormat:formatTitle});$("#images #inner").quickpaginate({perpage:5,pager:$("#photopager")});var n=document.getElementById("ProfileMediaStrip")}function ShowTwitterSetup(){document.getElementById("TwitterSetup").style.display="";document.getElementById("FacebookSetup").style.display="none";document.getElementById("LinkedInSetup").style.display="none"}function ShowFacebookSetup(){document.getElementById("FacebookSetup").style.display="";document.getElementById("TwitterSetup").style.display="none";document.getElementById("LinkedInSetup").style.display="none"}function ShowLinkedInSetup(){document.getElementById("LinkedInSetup").style.display="";document.getElementById("FacebookSetup").style.display="none";document.getElementById("TwitterSetup").style.display="none"}function showMoreWire(){var t=document.getElementById("fmeFriendStatus"),n=new Number(new String(t.style.height).replace("px",""));return n=(n>100?n:150)+100,n<=1500&&(t.style.height=n+"px"),!1}function showLessWire(){var t=document.getElementById("fmeFriendStatus"),n=new Number(new String(t.style.height).replace("px",""));return n=n-100,n>=200&&(t.style.height=n+"px"),!1}function ConfirmStatusCommentDelete(n){var i=confirm("Are you sure you want to delete this comment?\n"),t;if(i)return t="",$j.post("/ajax/statuscomment_delete.asp",{MemberID:t,MainStatusCommentID:n},function(t){result=new String(t);document.getElementById("StatusComment"+n).style.display="none"}),!1}function ShowNetworkBoardPref(n){var t=$("#NetworkBoardPrefs");t.attr("data-shown")=="true"?(t.attr("data-shown","false"),t.css("display","none")):(HideBoardPref(n),HideWorldBoardPref(n),t.attr("data-shown","true"),t.css("display","block"))}function HideNetworkBoardPref(n){if(n.stopPropagation(),document.getElementById("NetworkBoardPrefs")!=null){var t=$("#NetworkBoardPrefs");t.attr("data-shown","false");t.css("display","none")}}function ShowBoardPref(n){var t=$("#BoardPrefs");t.attr("data-shown")=="true"?(t.attr("data-shown","false"),t.css("display","none")):(HideNetworkBoardPref(n),HideWorldBoardPref(n),t.attr("data-shown","true"),t.css("display","block"))}function HideBoardPref(n){if(n.stopPropagation(),document.getElementById("BoardPrefs")!=null){var t=$("#BoardPrefs");t.attr("data-shown","false");t.css("display","none")}}function ShowWorldBoardPref(n){var t=$("#WorldBoardPrefs");t.attr("data-shown")=="true"?(t.attr("data-shown","false"),t.css("display","none")):(HideNetworkBoardPref(n),HideBoardPref(n),t.attr("data-shown","true"),t.css("display","block"))}function HideWorldBoardPref(n){if(n.stopPropagation(),document.getElementById("WorldBoardPrefs")!=null){var t=$("#WorldBoardPrefs");t.attr("data-shown","false");t.css("display","none")}}function HideSearchDropMenu(){document.getElementById("SearchPrefs")!=null&&(document.getElementById("SearchPrefs").style.display="none")}function ReduceIFrame(n){document.getElementById("fmeMedia").style.height=n;document.getElementById("ProfileMediaStrip").style.height=n}function ConfirmStatusRemoval(n){var i=confirm("Are you sure you want to delete this post?\n"),t;if(i)return t="",$j.post("/ajax/status_removal.asp",{MemberID:t,MainStatusID:n},function(t){result=new String(t);document.getElementById("MemberStatus"+n).style.display="none";document.getElementById("MemberStatus"+n+"spacer").style.display="none"}),!1}function ShowCommentBox(n){document.getElementById("yescomment"+n).style.display=="none"?(document.getElementById("yescomment"+n).style.display="",document.getElementById("taStatusComments"+n).focus()):document.getElementById("taStatusComments"+n).value==""&&(document.getElementById("yescomment"+n).style.display="none")}function CommentEdit(n){document.getElementById("StatusComment"+n).style.display="none";document.getElementById("editcomment"+n).style.display="";document.getElementById("taComment"+n).focus()}function ShowMoreProfiles(){document.getElementById("NewestMembers").style.height=="352px"?(document.getElementById("NewestMembers").style.height="450px",document.getElementById("MoreLessLink").innerHTML="Less"):(document.getElementById("NewestMembers").style.height="352px",document.getElementById("MoreLessLink").innerHTML="More")}function ShowNewsEvents(n){n=="E"?(document.getElementById("EventsWidget").style.display="",document.getElementById("NewsWidget").style.display="none",document.getElementById("EventButton").style.background="#E1E1E1",document.getElementById("NewsButton").style.background="#F4F4F4"):n=="N"&&(document.getElementById("EventsWidget").style.display="none",document.getElementById("NewsWidget").style.display="",document.getElementById("EventButton").style.background="#F4F4F4",document.getElementById("NewsButton").style.background="#E1E1E1")}function dbShowClassCats(n){for(i=0;i<=10;i++)document.getElementById("classcat"+i).style.display="none",document.getElementById("dbacat"+i).src="/images/dbca_btn"+i+"_Off.gif";return document.getElementById("classcat"+n).style.display="block",document.getElementById("dbacat"+n).src="/images/dbca_btn"+n+"_On.gif",document.getElementById("classcatselected").innerHTML=n,!1}function fireEvent(n,t){var r=n,i;document.createEvent?(i=document.createEvent("MouseEvents"),i.initEvent(t,!0,!1),r.dispatchEvent(i)):document.createEventObject&&r.fireEvent("on"+t)}function ShowHideMediaBar(){if(document.getElementById("MediaBarDisplay").style.display=="none")document.getElementById("MediaBarDisplay").style.display="",document.getElementById("MediaBarButton").setAttribute("title","Hide Your Media");else{for(i=1;i<=6;i++)document.getElementById("manage_"+i).style.display="none";document.getElementById("ProfileMediaStrip").style.display="none";document.getElementById("MediaTabStrip").style.display="none";document.getElementById("TabWindowState2").innerHTML="";document.getElementById("MediaBarDisplay").style.display="none";document.getElementById("MediaBarButton").setAttribute("title","View & Share Your Media")}}function showProfileMediaImg(n,t){var i=document.getElementById("ProfileMediaImgLink"),r=document.getElementById("ProfileMediaImg");return r.setAttribute("src",n),i.setAttribute("href",n),i.setAttribute("title",t),fireEvent(i,"click"),!1}function textCounterTwitter(){}function sb_textarea_onfocus(n,t){n&&n.value==t&&(n.value="",n.className="f5")}function sb_textarea_onblur(n,t){n&&n.value==""&&(n.value=t,n.className="f5 greytext")}function callImproveProfile(n){var t=document.getElementById("hiddenclicker");t.href=n;$("#hiddenclicker").trigger("click")}function VideoLoad(n,t){var i=GetXmlHttpObject(),r="/dashboard/ajax/videos_state_ajax.asp?md="+n+"&st="+t;if(!i){alert("Browser does not support HTTP Request");return}i.onreadystatechange=function(){if(i.readyState==1&&(document.getElementById("videos_inner").innerHTML=LoadingAlert),i.readyState==4||i.readyState=="complete"){var n=i.responseText;document.getElementById("videos_inner").innerHTML=n}};i.open("GET",r,!0);i.send(null)}function ClassLoad(n,t){var i=GetXmlHttpObject(),r="/dashboard/ajax/class_state_ajax.asp?md="+n+"&st="+t;if(!i){alert("Browser does not support HTTP Request");return}i.onreadystatechange=function(){if(i.readyState==1&&(document.getElementById("class_inner").innerHTML=LoadingAlert),i.readyState==4||i.readyState=="complete"){var n=i.responseText;document.getElementById("class_inner").innerHTML=n}};i.open("GET",r,!0);i.send(null)}function BlogsLoad(n,t){var i=GetXmlHttpObject(),r="/dashboard/ajax/blogs_ajax.asp?md="+n+"&st="+t;if(!i){alert("Browser does not support HTTP Request");return}i.onreadystatechange=function(){if(i.readyState==1&&(document.getElementById("blogs_inner").innerHTML=LoadingAlert),i.readyState==4||i.readyState=="complete"){var n=i.responseText;document.getElementById("blogs_inner").innerHTML=n}};i.open("GET",r,!0);i.send(null)}function CouponLoad(n,t){var i=GetXmlHttpObject(),r="/dashboard/ajax/coupon_ajax.asp?md="+n+"&st="+t;if(!i){alert("Browser does not support HTTP Request");return}i.onreadystatechange=function(){if(i.readyState==1&&(document.getElementById("coupon_inner").innerHTML=LoadingAlert),i.readyState==4||i.readyState=="complete"){var n=i.responseText;document.getElementById("coupon_inner").innerHTML=n}};i.open("GET",r,!0);i.send(null)}function ProductsLoad(n){var t=GetXmlHttpObject(),i="/dashboard/ajax/prod_ajax.asp?md="+n;if(!t){alert("Browser does not support HTTP Request");return}t.onreadystatechange=function(){if(t.readyState==1&&(document.getElementById("prod_inner").innerHTML=LoadingAlert),t.readyState==4||t.readyState=="complete"){var n=t.responseText;document.getElementById("prod_inner").innerHTML=n}};t.open("GET",i,!0);t.send(null)}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function ShowLocationCats(){document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("BlogCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display=""}function HideLocationCats(){document.getElementById("LocationCats").style.display="none"}function ShowDealCats(){document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("BlogCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("DealCats").style.display=""}function HideDealCats(){document.getElementById("DealCats").style.display="none"}function ShowForumCats(){document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("BlogCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("ForumCats").style.display=""}function HideForumCats(){document.getElementById("ForumCats").style.display="none"}function ShowGroupCats(){document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("BlogCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("GroupCats").style.display=""}function HideGroupCats(){document.getElementById("GroupCats").style.display="none"}function ShowBlogCats(){document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("BlogCats").style.display=""}function HideBlogCats(){document.getElementById("BlogCats").style.display="none"}function ShowVideoCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("VideoCats").style.display=""}function HideVideoCats(){document.getElementById("VideoCats").style.display="none"}function ShowAudioCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("AudioCats").style.display=""}function HideAudioCats(){document.getElementById("AudioCats").style.display="none"}function ShowImageCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("ImageCats").style.display=""}function HideImageCats(){document.getElementById("ImageCats").style.display="none"}function ShowCouponCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("CouponCats").style.display=""}function HideCouponCats(){document.getElementById("CouponCats").style.display="none"}function ShowAdsCats2(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("AdsCats2").style.display=""}function HideAdsCats2(){document.getElementById("AdsCats2").style.display="none"}function ShowProductCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("ProductCats").style.display=""}function HideProductCats(){document.getElementById("ProductCats").style.display="none"}function ShowMemberCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("MemberCats").style.display=""}function HideMemberCats(){document.getElementById("MemberCats").style.display="none"}function ShowDirectoryCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("GroupCats").style.display="none";document.getElementById("ForumCats").style.display="none";document.getElementById("DealCats").style.display="none";document.getElementById("LocationCats").style.display="none";document.getElementById("DirectoryCats").style.display=""}function HideDirectoryCats(){document.getElementById("DirectoryCats").style.display="none"}function getElementsByClassName(n,t){var i,f;t||(t=document.getElementsByTagName("body")[0]);var u=[],e=new RegExp("\\b"+n+"\\b"),r=t.getElementsByTagName("*");for(i=0,f=r.length;i<f;i++)e.test(r[i].className)&&u.push(r[i]);return u}function HideAllTowns(n){var t=getElementsByClassName(n);for(i in t)t[i].style.display="none"}function RemoveLinkProfile(n,t,i,r){var u=GetXmlHttpObject(),f="/ajax/removelink_profile.asp?id="+r;if(!u){alert("Browser does not support HTTP Request");return}u.onreadystatechange=function(){(u.readyState==4||u.readyState=="complete")&&u.responseText=="Done"&&(document.getElementById(n).style.display="none",document.getElementById(t).style.display="none",document.getElementById(i).style.display="none")};u.open("GET",f,!0);u.send(null)}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function HideGroupFromProfile(n,t){var i=GetXmlHttpObject(),r="/groups/ajax/removegroup_profile.asp?mid="+t+"&gid="+n;if(!i){alert("Browser does not support HTTP Request");return}i.onreadystatechange=function(){(i.readyState==4||i.readyState=="complete")&&i.responseText=="Done"&&(document.getElementById("GroupRow"+n).style.display="none")};i.open("GET",r,!0);i.send(null)}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function LoadProfileCityList(n){var t=GetXmlHttpObject(),i="/ajax/prf_load_cities.asp?StateID="+n;if(!t){alert("Browser does not support HTTP Request");return}t.onreadystatechange=function(){t.readyState==1&&(document.getElementById("PRCITYSELECT").innerHTML='<select name="PrCity" class="f1" tabindex="10" disabled="disabled" style="width:300px;"><option value="">Loading...<\/option><\/select>');(t.readyState==4||t.readyState=="complete")&&(document.getElementById("PRCITYSELECT").innerHTML=t.responseText)};t.open("GET",i,!0);t.send(null)}function LoadProfileZipList(n,t){var i=GetXmlHttpObject(),r="/ajax/prf_load_zips.asp?StateID="+n+"&City="+t;if(!i){alert("Browser does not support HTTP Request");return}i.onreadystatechange=function(){i.readyState==1&&(document.getElementById("ZIPSELECT").innerHTML='<select name="PrZip" class="f1" tabindex="10" disabled="disabled" style="width:300px;"><option value="">Loading...<\/option><\/select>');(i.readyState==4||i.readyState=="complete")&&(document.getElementById("ZIPSELECT").innerHTML=i.responseText)};i.open("GET",r,!0);i.send(null)}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function ShowBlogCats(){document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("BlogCats").style.display=""}function HideBlogCats(){document.getElementById("BlogCats").style.display="none"}function ShowVideoCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("VideoCats").style.display=""}function HideVideoCats(){document.getElementById("VideoCats").style.display="none"}function ShowAudioCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("AudioCats").style.display=""}function HideAudioCats(){document.getElementById("AudioCats").style.display="none"}function ShowImageCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("ImageCats").style.display=""}function HideImageCats(){document.getElementById("ImageCats").style.display="none"}function ShowCouponCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("CouponCats").style.display=""}function HideCouponCats(){document.getElementById("CouponCats").style.display="none"}function ShowAdsCats2(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("AdsCats2").style.display=""}function HideAdsCats2(){document.getElementById("AdsCats2").style.display="none"}function ShowProductCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("ProductCats").style.display=""}function HideProductCats(){document.getElementById("ProductCats").style.display="none"}function ShowMemberCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("DirectoryCats").style.display="none";document.getElementById("MemberCats").style.display=""}function HideMemberCats(){document.getElementById("MemberCats").style.display="none"}function ShowDirectoryCats(){document.getElementById("BlogCats").style.display="none";document.getElementById("VideoCats").style.display="none";document.getElementById("AudioCats").style.display="none";document.getElementById("ImageCats").style.display="none";document.getElementById("CouponCats").style.display="none";document.getElementById("AdsCats2").style.display="none";document.getElementById("ProductCats").style.display="none";document.getElementById("MemberCats").style.display="none";document.getElementById("DirectoryCats").style.display=""}function HideDirectoryCats(){document.getElementById("DirectoryCats").style.display="none"}function storeitem_submenu(n,t,i,r){var u=GetXmlHttpObject(),f;if(n==""&&(n=i),f="/ajax/create_storeitem_menu.asp?id="+n+"&selectedID="+i+"&IsMobileRequest="+r,!u){alert("Browser does not support HTTP Request");return}u.onreadystatechange=function(){if(u.readyState==1)try{document.getElementById("cat2a").style.display="";document.getElementById("cat2b").style.display="";document.getElementById("cat2c").style.display="";document.getElementById(t).innerHTML='<select id="ddSubCategory" name="ddSubCategory" class="f1" style="width: 350px" disabled><option>Loading...<\/option><\/select>'}catch(i){}(u.readyState==4||u.readyState=="complete")&&(n==""?(document.getElementById("cat2a").style.display="none",document.getElementById("cat2b").style.display="none",document.getElementById("cat2c").style.display="none"):u.responseText==""?(document.getElementById("cat2a").style.display="none",document.getElementById("cat2b").style.display="none",document.getElementById("cat2c").style.display="none",document.getElementById("ddCategory").value=n,document.getElementById("SelectedStoreItemCatID").value=n,CheckDefaultMainCat(n,"#btnMainCategory")):(document.getElementById("cat2a").style.display="",document.getElementById("cat2b").style.display="",document.getElementById("cat2c").style.display="",document.getElementById(t).innerHTML=u.responseText))};u.open("GET",f,!0);u.send(null)}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function ConfirmMainStatusRemoval(n){var r=confirm("Are you sure you want to delete this comment?\n"),t,i;if(r){if(t=GetXmlHttpObject(),i="/ajax/status_delete.asp?MainStatusCommentID="+n,!t){alert("Browser does not support HTTP Request");return}t.onreadystatechange=function(){if(t.readyState==1&&(document.getElementById("CURRENTSTATUSDATETIME").innerHTML="",document.getElementById("CURRENTSTATUSID").innerHTML='<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="/images/register_loading.gif" alt="Removing"/><\/td><td style="color:#c0c0c0;padding-left:8px">Removing Status...<\/td><\/tr><\/table>',document.getElementById("CURRENTSTATUS").innerHTML=""),t.readyState==4||t.readyState=="complete"){var i=t.responseText,n=i.split("~~");document.getElementById("CURRENTSTATUSDATETIME").innerHTML=n[1];document.getElementById("CURRENTSTATUSID").innerHTML='<a href="javascript:ConfirmMainStatusRemoval('+n[2]+')">Remove<\/a>';document.getElementById("CURRENTSTATUS").innerHTML=n[0]}};t.open("GET",i,!0);t.send(null)}}function GetXmlHttpObject(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}function getCookie(n){var t=document.cookie.match("(^|;) ?"+n+"=([^;]*)(;|$)");return t?t[2]:null}function setCookie(n,t,i){var r=new Date;r.setTime(r.getTime()+864e5*i);document.cookie=n+"="+t+";path=/;expires="+r.toGMTString()}var swfobject=function(){function v(){var i,r,n;if(!c){try{i=t.getElementsByTagName("body")[0].appendChild(h("span"));i.parentNode.removeChild(i)}catch(u){return}for(c=!0,r=w.length,n=0;n<r;n++)w[n]()}}function yt(n){c?n():w[w.length]=n}function pt(n){if(typeof r.addEventListener!=i)r.addEventListener("load",n,!1);else if(typeof t.addEventListener!=i)t.addEventListener("load",n,!1);else if(typeof r.attachEvent!=i)ui(r,"onload",n);else if(typeof r.onload=="function"){var u=r.onload;r.onload=function(){u();n()}}else r.onload=n}function gt(){lt?ni():it()}function ni(){var o=t.getElementsByTagName("body")[0],u=h(f),r,e;u.setAttribute("type",p);r=o.appendChild(u);r?(e=0,function(){if(typeof r.GetVariable!=i){var t=r.GetVariable("$version");t&&(t=t.split(" ")[1].split(","),n.pv=[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)])}else if(e<10){e++;setTimeout(arguments.callee,10);return}o.removeChild(u);r=null;it()}()):it()}function it(){var y=s.length,r,t,h,c,v;if(y>0)for(r=0;r<y;r++){var f=s[r].id,e=s[r].callbackFn,o={success:!1,id:f};if(n.pv[0]>0){if(t=u(f),t)if(!g(s[r].swfVersion)||n.wk&&n.wk<312)if(s[r].expressInstall&&ut()){h={};h.data=s[r].expressInstall;h.width=t.getAttribute("width")||"0";h.height=t.getAttribute("height")||"0";t.getAttribute("class")&&(h.styleclass=t.getAttribute("class"));t.getAttribute("align")&&(h.align=t.getAttribute("align"));var p={},a=t.getElementsByTagName("param"),w=a.length;for(c=0;c<w;c++)a[c].getAttribute("name").toLowerCase()!="movie"&&(p[a[c].getAttribute("name")]=a[c].getAttribute("value"));ft(h,p,f,e)}else ti(t),e&&e(o);else l(f,!0),e&&(o.success=!0,o.ref=rt(f),e(o))}else l(f,!0),e&&(v=rt(f),v&&typeof v.SetVariable!=i&&(o.success=!0,o.ref=v),e(o))}}function rt(n){var r=null,t=u(n),e;return t&&t.nodeName=="OBJECT"&&(typeof t.SetVariable!=i?r=t:(e=t.getElementsByTagName(f)[0],e&&(r=e))),r}function ut(){return!d&&g("6.0.65")&&(n.win||n.mac)&&!(n.wk&&n.wk<312)}function ft(f,e,o,s){var c,v,l,a;d=!0;nt=s||null;at={success:!1,id:o};c=u(o);c&&(c.nodeName=="OBJECT"?(y=et(c),k=null):(y=c,k=o),f.id=ht,(typeof f.width==i||!/%$/.test(f.width)&&parseInt(f.width,10)<310)&&(f.width="310"),(typeof f.height==i||!/%$/.test(f.height)&&parseInt(f.height,10)<137)&&(f.height="137"),t.title=t.title.slice(0,47)+" - Flash Player Installation",v=n.ie&&n.win?"ActiveX":"PlugIn",l="MMredirectURL="+r.location.toString().replace(/&/g,"%26")+"&MMplayerType="+v+"&MMdoctitle="+t.title,typeof e.flashvars!=i?e.flashvars+="&"+l:e.flashvars=l,n.ie&&n.win&&c.readyState!=4&&(a=h("div"),o+="SWFObjectNew",a.setAttribute("id",o),c.parentNode.insertBefore(a,c),c.style.display="none",function(){c.readyState==4?c.parentNode.removeChild(c):setTimeout(arguments.callee,10)}()),ot(f,e,o))}function ti(t){if(n.ie&&n.win&&t.readyState!=4){var i=h("div");t.parentNode.insertBefore(i,t);i.parentNode.replaceChild(et(t),i);t.style.display="none",function(){t.readyState==4?t.parentNode.removeChild(t):setTimeout(arguments.callee,10)}()}else t.parentNode.replaceChild(et(t),t)}function et(t){var u=h("div"),e,i,o,r;if(n.win&&n.ie)u.innerHTML=t.innerHTML;else if(e=t.getElementsByTagName(f)[0],e&&(i=e.childNodes,i))for(o=i.length,r=0;r<o;r++)i[r].nodeType==1&&i[r].nodeName=="PARAM"||i[r].nodeType==8||u.appendChild(i[r].cloneNode(!0));return u}function ot(t,r,e){var v,y=u(e),w,o,k,a,c,s,l;if(n.wk&&n.wk<312)return v;if(y)if(typeof t.id==i&&(t.id=e),n.ie&&n.win){w="";for(o in t)t[o]!=Object.prototype[o]&&(o.toLowerCase()=="data"?r.movie=t[o]:o.toLowerCase()=="styleclass"?w+=' class="'+t[o]+'"':o.toLowerCase()!="classid"&&(w+=" "+o+'="'+t[o]+'"'));k="";for(a in r)r[a]!=Object.prototype[a]&&(k+='<param name="'+a+'" value="'+r[a]+'" />');y.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+w+">"+k+"<\/object>";b[b.length]=t.id;v=u(t.id)}else{c=h(f);c.setAttribute("type",p);for(s in t)t[s]!=Object.prototype[s]&&(s.toLowerCase()=="styleclass"?c.setAttribute("class",t[s]):s.toLowerCase()!="classid"&&c.setAttribute(s,t[s]));for(l in r)r[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"&&ii(c,l,r[l]);y.parentNode.replaceChild(c,y);v=c}return v}function ii(n,t,i){var r=h("param");r.setAttribute("name",t);r.setAttribute("value",i);n.appendChild(r)}function wt(t){var i=u(t);i&&i.nodeName=="OBJECT"&&(n.ie&&n.win?(i.style.display="none",function(){i.readyState==4?ri(t):setTimeout(arguments.callee,10)}()):i.parentNode.removeChild(i))}function ri(n){var t=u(n),i;if(t){for(i in t)typeof t[i]=="function"&&(t[i]=null);t.parentNode.removeChild(t)}}function u(n){var i=null;try{i=t.getElementById(n)}catch(r){}return i}function h(n){return t.createElement(n)}function ui(n,t,i){n.attachEvent(t,i);a[a.length]=[n,t,i]}function g(t){var r=n.pv,i=t.split(".");return i[0]=parseInt(i[0],10),i[1]=parseInt(i[1],10)||0,i[2]=parseInt(i[2],10)||0,r[0]>i[0]||r[0]==i[0]&&r[1]>i[1]||r[0]==i[0]&&r[1]==i[1]&&r[2]>=i[2]?!0:!1}function bt(r,u,o,s){var a,c,l;n.ie&&n.mac||(a=t.getElementsByTagName("head")[0],a)&&(c=o&&typeof o=="string"?o:"screen",s&&(e=null,tt=null),e&&tt==c||(l=h("style"),l.setAttribute("type","text/css"),l.setAttribute("media",c),e=a.appendChild(l),n.ie&&n.win&&typeof t.styleSheets!=i&&t.styleSheets.length>0&&(e=t.styleSheets[t.styleSheets.length-1]),tt=c),n.ie&&n.win?e&&typeof e.addRule==f&&e.addRule(r,u):e&&typeof t.createTextNode!=i&&e.appendChild(t.createTextNode(r+" {"+u+"}")))}function l(n,t){if(vt){var i=t?"visible":"hidden";c&&u(n)?u(n).style.visibility=i:bt("#"+n,"visibility:"+i)}}function kt(n){var t=/[\\\"<>\.;]/.exec(n)!=null;return t&&typeof encodeURIComponent!=i?encodeURIComponent(n):n}var i="undefined",f="object",st="Shockwave Flash",dt="ShockwaveFlash.ShockwaveFlash",p="application/x-shockwave-flash",ht="SWFObjectExprInst",ct="onreadystatechange",r=window,t=document,o=navigator,lt=!1,w=[gt],s=[],b=[],a=[],y,k,nt,at,c=!1,d=!1,e,tt,vt=!0,n=function(){var l=typeof t.getElementById!=i&&typeof t.getElementsByTagName!=i&&typeof t.createElement!=i,e=o.userAgent.toLowerCase(),s=o.platform.toLowerCase(),a=s?/win/.test(s):/win/.test(e),v=s?/mac/.test(s):/mac/.test(e),y=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,h=!+"\v1",u=[0,0,0],n=null,c;if(typeof o.plugins!=i&&typeof o.plugins[st]==f)n=o.plugins[st].description,!n||typeof o.mimeTypes!=i&&o.mimeTypes[p]&&!o.mimeTypes[p].enabledPlugin||(lt=!0,h=!1,n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),u[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10),u[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10),u[2]=/[a-zA-Z]/.test(n)?parseInt(n.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof r.ActiveXObject!=i)try{c=new ActiveXObject(dt);c&&(n=c.GetVariable("$version"),n&&(h=!0,n=n.split(" ")[1].split(","),u=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]))}catch(w){}return{w3:l,pv:u,wk:y,ie:h,win:a,mac:v}}(),fi=function(){n.w3&&((typeof t.readyState!=i&&t.readyState=="complete"||typeof t.readyState==i&&(t.getElementsByTagName("body")[0]||t.body))&&v(),c||(typeof t.addEventListener!=i&&t.addEventListener("DOMContentLoaded",v,!1),n.ie&&n.win&&(t.attachEvent(ct,function(){t.readyState=="complete"&&(t.detachEvent(ct,arguments.callee),v())}),r==top&&function(){if(!c){try{t.documentElement.doScroll("left")}catch(n){setTimeout(arguments.callee,0);return}v()}}()),n.wk&&function(){if(!c){if(!/loaded|complete/.test(t.readyState)){setTimeout(arguments.callee,0);return}v()}}(),pt(v)))}(),ei=function(){n.ie&&n.win&&window.attachEvent("onunload",function(){for(var e=a.length,r,i,u,f,t=0;t<e;t++)a[t][0].detachEvent(a[t][1],a[t][2]);for(r=b.length,i=0;i<r;i++)wt(b[i]);for(u in n)n[u]=null;n=null;for(f in swfobject)swfobject[f]=null;swfobject=null})}();return{registerObject:function(t,i,r,u){if(n.w3&&t&&i){var f={};f.id=t;f.swfVersion=i;f.expressInstall=r;f.callbackFn=u;s[s.length]=f;l(t,!1)}else u&&u({success:!1,id:t})},getObjectById:function(t){if(n.w3)return rt(t)},embedSWF:function(t,r,u,e,o,s,h,c,a,v){var y={success:!1,id:r};n.w3&&!(n.wk&&n.wk<312)&&t&&r&&u&&e&&o?(l(r,!1),yt(function(){var n,b,p,k,w,d;if(u+="",e+="",n={},a&&typeof a===f)for(b in a)n[b]=a[b];if(n.data=t,n.width=u,n.height=e,p={},c&&typeof c===f)for(k in c)p[k]=c[k];if(h&&typeof h===f)for(w in h)typeof p.flashvars!=i?p.flashvars+="&"+w+"="+h[w]:p.flashvars=w+"="+h[w];if(g(o))d=ot(n,p,r),n.id==r&&l(r,!0),y.success=!0,y.ref=d;else{if(s&&ut()){n.data=s;ft(n,p,r,v);return}l(r,!0)}v&&v(y)})):v&&v(y)},switchOffAutoHideShow:function(){vt=!1},ua:n,getFlashPlayerVersion:function(){return{major:n.pv[0],minor:n.pv[1],release:n.pv[2]}},hasFlashPlayerVersion:g,createSWF:function(t,i,r){return n.w3?ot(t,i,r):undefined},showExpressInstall:function(t,i,r,u){n.w3&&ut()&&ft(t,i,r,u)},removeSWF:function(t){n.w3&&wt(t)},createCSS:function(t,i,r,u){n.w3&&bt(t,i,r,u)},addDomLoadEvent:yt,addLoadEvent:pt,getQueryParamValue:function(n){var r=t.location.search||t.location.hash,u,i;if(r){if(/\?/.test(r)&&(r=r.split("?")[1]),n==null)return kt(r);for(u=r.split("&"),i=0;i<u.length;i++)if(u[i].substring(0,u[i].indexOf("="))==n)return kt(u[i].substring(u[i].indexOf("=")+1))}return""},expressInstallCallback:function(){if(d){var t=u(ht);t&&y&&(t.parentNode.replaceChild(y,t),k&&(l(k,!0),n.ie&&n.win&&(y.style.display="block")),nt&&nt(at));d=!1}}}}(),votesubmit=0,Rank0="&nbsp;",Rank1="Would Not Recommend",Rank2="OK",Rank3="Above Average",Rank4="Very Good",Rank5="Great!",downStrokeField,r={special:/[\W]/g,quotes:/['\''&'\"']/g,notnumbers:/[^\d]/g},monthNames,weekdayNames,dateParsePatterns,dp_dateFormat,sEventType,LoadingAlert,DdlPageControl;addEvent.guid=1;fixEvent.preventDefault=function(){this.returnValue=!1};fixEvent.stopPropagation=function(){this.cancelBubble=!0};window.addEventListener||(document.onreadystatechange=function(){window.onload&&window.onload!=handleEvent&&(addEvent(window,"load",window.onload),window.onload=handleEvent)});window.onDOMLoadEvents=[];window.DOMContentLoadedInitDone=!1;setTimeout("DOMContentLoadedScheduler()",250);addEvent(window,"load",DOMContentLoadedInit);document.addEventListener&&document.addEventListener("DOMContentLoaded",DOMContentLoadedInit,!1);var cp_timeoutDelay=2e3,cp_timeoutId=!1,cp_location=1,g_startDay=0,g_Calendar;Calendar.prototype.show=function(e,target,dateFormat,dateFrom,dateTo,menuYearFrom,menuYearTo){var elSrc,x,y,obj,yScroll,tmp,atmp,delim,i,theDate,tmpCurYear;if(!document.getElementById){alert("This browser is not suppored for a calendar popup.");return}if(!document.getElementById(target)){alert('Error: input field "'+target+'" does not exist.');return}if(this.containerLayer=document.getElementById("calcontainer"),this.containerLayer||(this.containerLayer=document.createElement("div"),this.containerLayer.id="calcontainer",this.containerLayer.onmouseout=calendarTimeout,this.containerLayer.onmouseover=calendarClearTimeout,this.containerLayer.onclick=this.handleClick,document.body.insertBefore(this.containerLayer,document.body.childNodes[0])),this.isVisible()){this.hide();return}if(calendarClearTimeout(),e||(e=window.event),e.target?elSrc=e.target:e.srcElement&&(elSrc=e.srcElement),e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),x=y=0,obj=cp_location==1?document.getElementById(target):elSrc,obj.offsetParent)while(obj)x+=obj.offsetLeft,y+=obj.offsetTop,obj=obj.offsetParent;else x=obj.x,y=obj.y;if(cp_location==1?(self.pageYOffset?yScroll=self.pageYOffset:document.documentElement&&document.documentElement.scrollTop?yScroll=document.documentElement.scrollTop:document.body&&(yScroll=document.body.scrollTop),this.containerLayer.style.left=x+"px",this.containerLayer.style.top=y+document.getElementById(target).offsetHeight+1+this.containerLayer.offsetHeight>this.getWindowHeight()+yScroll?y-this.containerLayer.offsetHeight-1+"px":y+document.getElementById(target).offsetHeight+1+"px"):(this.containerLayer.style.left=x+elSrc.offsetWidth+1+"px",this.containerLayer.style.top=y+"px"),this.dateFrom=dateFrom||new Date(1900,0,1),this.dateFromDay=this.padZero(this.dateFrom.getDate()),this.dateFromMonth=this.padZero(this.dateFrom.getMonth()),this.dateFromYear=this.dateFrom.getFullYear(),this.dateTo=dateTo||new Date(3e3,0,1),this.dateToDay=this.padZero(this.dateTo.getDate()),this.dateToMonth=this.padZero(this.dateTo.getMonth()),this.dateToYear=this.dateTo.getFullYear(),this.dateToday=new Date,this.tYear=this.dateToday.getFullYear(),this.tMonth=this.dateToday.getMonth(),this.tDay=this.dateToday.getDate(),dateFormat?this.dateFormat=dateFormat:dp_dateFormat?this.dateFormat=dp_dateFormat:this.dateFormat||(this.dateFormat="m/d/yyyy"),dp_dateFormat=this.dateFormat,this.dateDelim=this.dateFormat.indexOf("-")!=-1?"-":this.dateFormat.indexOf("/")!=-1?"/":this.dateFormat.indexOf(".")!=-1?".":this.dateFormat.indexOf(" ")!=-1?" ":"/",this.target=target,tmp=document.getElementById(this.target),tmp.className=tmp.className.replace("error","").replace("  "," "),tmp&&tmp.value&&tmp.value.split(this.dateDelim).length==3){atmp=tmp.value.split(this.dateDelim);delim=eval("/\\"+this.dateDelim+"/g");switch(this.dateFormat.replace(delim,"")){case"ddmmmyyyy":case"dmmmyyyy":for(this.day=1,this.year=this.oYear=parseInt(atmp[2],10),i=0;i<this.months.length;i++)if(atmp[1].toLowerCase()==this.months[i].substr(0,3).toLowerCase()){this.month=this.oMonth=i;break}this.day=parseInt(atmp[0],10);break;case"ddmmyyyy":case"dmmyyyy":case"dmyyyy":this.day=1;this.year=this.oYear=parseInt(atmp[2],10);this.month=this.oMonth=parseInt(atmp[1]-1,10);this.day=parseInt(atmp[0],10);break;case"mmddyyyy":case"mddyyyy":case"mdyyyy":this.day=1;this.year=this.oYear=parseInt(atmp[2],10);this.month=this.oMonth=parseInt(atmp[0]-1,10);this.day=parseInt(atmp[1],10);break;case"yyyymmdd":this.day=1;this.year=this.oYear=parseInt(atmp[0],10);this.month=this.oMonth=parseInt(atmp[1]-1,10);this.day=parseInt(atmp[2],10)}}else theDate=new Date,this.year=this.oYear=theDate.getFullYear(),this.month=this.oMonth=theDate.getMonth(),this.day=this.oDay=theDate.getDate();this.menuYearFrom=menuYearFrom||this.year-3;this.menuYearTo=menuYearTo||this.year+3;tmpCurYear=(new Date).getFullYear();this.menuYearTo<tmpCurYear&&(this.menuYearTo=tmpCurYear);this.menuYearTo++;this.writeString(this.buildString());this.containerLayer.style.visibility="visible"};Calendar.prototype.buildString=function(){var n="",e=[],u,h,o,i,f,a,v,l,c,s,r;if(this.Holidays)for(u=0;u<this.Holidays.length;u++)this.Holidays[u].date.getFullYear()==this.year&&this.Holidays[u].date.getMonth()==this.month&&(e[e.length]=this.Holidays[u]);for(document.all&&document.getElementById&&!window.Opera&&navigator.appVersion.substr(22,3)!="5.0"&&(n='<iframe src="about:blank" scrolling="no" frameborder="0" style="width: '+this.containerLayer.offsetWidth+"px; height: "+this.containerLayer.offsetHeight+'px; z-index: -1; position: absolute; filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);"><\/iframe>'),n+='<table cellspacing="0">',n+='<thead><tr><td colspan="7"><ul>\n<li id="cp_prevMonth"><a href="javascript:g_Calendar.changeMonth(-1)" title="Goto last month"><span>&lt;<\/span><\/a><\/li>\n<li id="cp_monthMenu"><a href="javascript:g_Calendar.openMenuMonths()" title="Open month menu">'+this.months[this.month]+'<\/a>\n<ul id="cp_months"><li><a href="javascript:g_Calendar.clickMonth(0)">January<\/a><\/li><li><a href="javascript:g_Calendar.clickMonth(1)">February<\/a><\/li><li><a href="javascript:g_Calendar.clickMonth(2)">March<\/a><\/li><li><a href="javascript:g_Calendar.clickMonth(3)">April<\/a><\/li><li><a href="javascript:g_Calendar.clickMonth(4)">May<\/a><\/li><li><a href="javascript:g_Calendar.clickMonth(5)">June<\/a><\/li><li><a href="javascript:g_Calendar.clickMonth(6)">July<\/a><\/li><li><a href="javascript:g_Calendar.clickMonth(7)">August<\/a><\/li><li><a href="javascript:g_Calendar.clickMonth(8)">September<\/a><\/li><li><a href="javascript:g_Calendar.clickMonth(9)">October<\/a><\/li><li><a href="javascript:g_Calendar.clickMonth(10)">November<\/a><\/li><li><a href="javascript:g_Calendar.clickMonth(11)">December<\/a><\/li><\/ul><\/li>\n<li id="cp_nextMonth"><a href="javascript:g_Calendar.changeMonth(1)" title="Goto next month"><span>&gt;<\/span><\/a><\/li>\n<li id="cp_prevYear"><a href="javascript:g_Calendar.changeYear(-1)" title="Goto last year"><span>&lt;<\/span><\/a><\/li>\n<li id="cp_yearMenu"><a href="javascript:g_Calendar.openMenuYears();" title="Open year menu">'+this.year+"<\/a>\n",n+=this.menuYearTo-this.menuYearFrom>7?'<ul id="cp_years" style="overflow: auto; overflow-x: hidden; overflow-y: auto;">':'<ul id="cp_years">',h=this.menuYearTo,h<=this.year&&(h=this.year+1),o=this.menuYearFrom;o<h;o++)n+='<li><a href="javascript:g_Calendar.clickYear('+o+')">'+o+"<\/a><\/li>";n+='<\/ul><\/li>\n<li id="cp_nextYear"><a href="javascript:g_Calendar.changeYear(1)" title="Goto next year"><span>&gt;<\/span><\/a><\/li>\n<\/ul><\/td><\/tr>';var t=1,y=(7+this.getFirstDOM()-g_startDay)%7,p=this.getDaysInMonth();for(n+="<tr>",i=0;i<7;i++)n+="<th>"+this.daysOfWeek[(g_startDay+i)%7]+"<\/th>";for(f=new Date,n+='<\/tr><\/thead><tfoot><tr><td colspan="7">Today is: <a href="javascript:g_Calendar.clickToday()" title="Goto current month">'+(/^d/.test(this.dateFormat)?f.getDate()+" "+this.months[f.getMonth()]+" ":this.months[f.getMonth()]+" "+f.getDate()+", ")+f.getFullYear()+"<\/a><\/td><\/tr><\/tfoot><tbody>",a=parseInt(""+this.dateFromYear+this.dateFromMonth+this.dateFromDay,10),v=parseInt(""+this.dateToYear+this.dateToMonth+this.dateToDay,10),c=1;c<=6;c++){for(n+="<tr>",i=1;i<=7;i++){for(s=!0,r="",u=0;u<e.length;u++)e[u].date.getDate()==t&&(this.showHolidays||(s=!1),r=e[u].desc);n+="<td ";7*(c-1)+i>=y+1&&t<=p?(t==this.day&&this.year==this.oYear&&this.month==this.oMonth?n+='class="calHighlightColor"':(i==7-g_startDay||i==(7-g_startDay)%7+1)&&(n+='class="calWeekend"'),n+=">",this.dayMask[i-1]==0?s=!1:(l=parseInt(""+this.year+this.padZero(this.month)+this.padZero(t),10),l>=a&&l<=v||(s=!1)),n+=s?t==this.tDay&&this.year==this.tYear&&this.month==this.tMonth?'<a class="today"'+(r==""?"":' title="'+r+'"')+' href="javascript: g_Calendar.clickDay('+t+');"><strong>'+t+"<\/strong><\/a>":"<a"+(r==""?"":' title="'+r+'"')+' href="javascript: g_Calendar.clickDay('+t+');">'+t+"<\/a>":t==this.tDay&&this.year==this.tYear&&this.month==this.tMonth?"<span"+(r==""?"":' title="'+r+'"')+' class="disabled today"><strong>'+t+"<\/strong><\/span>":"<span"+(r==""?"":' title="'+r+'"')+' class="disabled">'+t+"<\/span>",t++):((i==7-g_startDay||i==(7-g_startDay)%7+1)&&(n+='class="calWeekend"'),n+=(r==""?"":' title="'+r+'"')+">&nbsp;");n+="<\/td>"}n+="<\/tr>"}return n+="<\/tbody>",n+"<\/table>"};Calendar.prototype.setDateFormat=function(n){this.dateFormat=n||"m/d/yyyy";dp_dateFormat=this.dateFormat};Calendar.prototype.setDayMask=function(n){for(var i=this.dayMask.length>n.length?n.length:this.dayMask.length,t=0;t<i;t++)this.dayMask[t]=n[t];return this.dayMask};Calendar.prototype.setHolidays=function(n,t){return this.Holidays=n,this.showHolidays=t,n};Calendar.prototype.getFirstDOM=function(){var n=new Date;return n.setDate(1),n.setMonth(this.month),n.setFullYear(this.year),n.getDay()};Calendar.prototype.getDaysInMonth=function(){return this.month!=1?this.daysInMonth[this.month]:this.isLeapYear(this.year)?29:28};Calendar.prototype.isLeapYear=function(n){return n%4==0&&(n%100!=0||n%400==0)?!0:!1};Calendar.prototype.selectChange=function(n){this.month=n.selectedIndex;this.writeString(this.buildString())};Calendar.prototype.inputChange=function(n){var t=n;t.value>=1900&&t.value<=2100?(this.year=t.value,this.writeString(this.buildString())):t.value=this.year};Calendar.prototype.changeYear=function(n){n==1?this.year++:this.year--;this.writeString(this.buildString())};Calendar.prototype.changeMonth=function(n){this.month==11&&n==1?(this.month=0,this.year++):this.month==0&&n==-1?(this.month=11,this.year--):n==1?this.month++:this.month--;this.writeString(this.buildString())};Calendar.prototype.clickDay=function(n){var t=document.getElementById(this.target);t&&(t.value=this.formatDateAsString(n,this.month,this.year),magicDate&&magicDate(t),t.focus());this.hide()};Calendar.prototype.clickMonth=function(n){this.month=n;this.writeString(this.buildString())};Calendar.prototype.clickYear=function(n){this.year=n;this.writeString(this.buildString())};Calendar.prototype.clickToday=function(){var n=new Date;this.year=n.getFullYear();this.month=n.getMonth();this.writeString(this.buildString())};Calendar.prototype.formatDateAsString=function(day,month,year){var delim=eval("/\\"+this.dateDelim+"/g");switch(this.dateFormat.replace(delim,"")){case"ddmmmyyyy":return this.padZero(day)+this.dateDelim+this.months[month].substr(0,3)+this.dateDelim+year;case"dmmmyyyy":return day+this.dateDelim+this.months[month].substr(0,3)+this.dateDelim+year;case"ddmmyyyy":return this.padZero(day)+this.dateDelim+this.padZero(month+1)+this.dateDelim+year;case"dmmyyyy":return day+this.dateDelim+this.padZero(month+1)+this.dateDelim+year;case"mmddyyyy":return this.padZero(month+1)+this.dateDelim+this.padZero(day)+this.dateDelim+year;case"mddyyyy":return month+1+this.dateDelim+this.padZero(day)+this.dateDelim+year;case"mdyyyy":return month+1+this.dateDelim+day+this.dateDelim+year;case"yyyymmdd":return year+this.dateDelim+this.padZero(month+1)+this.dateDelim+this.padZero(day);default:return month+1+this.dateDelim+this.padZero(day)+this.dateDelim+year}};Calendar.prototype.writeString=function(n){this.containerLayer.innerHTML=n};Calendar.prototype.hide=function(){calendarClearTimeout();this.containerLayer.style.visibility="hidden"};Calendar.prototype.isVisible=function(){return this.containerLayer.style.visibility=="visible"?!0:!1};Calendar.prototype.isHidden=function(){return this.containerLayer.style.visibility=="hidden"?!0:!1};Calendar.prototype.padZero=function(n){return n<=9?"0"+n:n};Calendar.prototype.getWindowHeight=function(){var n=0;return typeof window.innerHeight=="number"?n=window.innerHeight:document.documentElement&&document.documentElement.clientHeight?n=document.documentElement.clientHeight:document.body&&document.body.clientHeight&&(n=document.body.clientHeight),n};Calendar.prototype.openMenu=function(n){var t=document.getElementById(n);t&&(t.className=t.className=="open"?"":"open")};Calendar.prototype.closeMenu=function(n){var t=document.getElementById(n);t&&(t.className="")};Calendar.prototype.openMenuMonths=function(){this.closeMenu("cp_years");this.openMenu("cp_months")};Calendar.prototype.openMenuYears=function(){this.closeMenu("cp_months");this.openMenu("cp_years")};Calendar.prototype.closeMenus=function(){this.closeMenu("cp_years");this.closeMenu("cp_months")};Calendar.prototype.handleClick=function(n){n||(n=window.event);n.target?elSrc=n.target:n.srcElement&&(elSrc=n.srcElement);n.pageX||n.pageY?(x=n.pageX,y=n.pageY):(n.clientX||n.clientY)&&(x=n.clientX+document.body.scrollLeft,y=n.clientY+document.body.scrollTop);y>parseInt(g_Calendar.containerLayer.style.top,10)+20&&g_Calendar.closeMenus();n.cancelBubble=!0;n.stopPropagation&&n.stopPropagation()};Date.prototype.addDays=function(n){return new Date(n*864e5+this.valueOf())};new Calendar(new Date);window.document.onclick=cp_handleDocumentClick;Array.prototype.indexOf=function(n){for(var t=0;t<this.length;t++)if(this[t]==n)return t;return-1};Array.prototype.filter=function(n){for(var i=[],t=0;t<this.length;t++)n(this[t])&&(i[i.length]=this[t]);return i};monthNames="January February March April May June July August September October November December".split(" ");weekdayNames="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");dateParsePatterns=[{re:/^tod/i,handler:function(){return new Date}},{re:/^tom/i,handler:function(){var n=new Date;return n.setDate(n.getDate()+1),n}},{re:/^yes/i,handler:function(){var n=new Date;return n.setDate(n.getDate()-1),n}},{re:/^(\d{1,2})(st|nd|rd|th)?$/i,handler:function(n){var t=new Date;return t.setDate(parseInt(n[1],10)),t}},{re:/^(\d{1,2})(?:st|nd|rd|th)? (\w+)$/i,handler:function(n){var t=new Date;return t.setDate(1),t.setMonth(parseMonth(n[2])),t.setDate(parseInt(n[1],10)),t}},{re:/^(\d{1,2})(?:st|nd|rd|th)? (\w+),? (\d{4})$/i,handler:function(n){var t=new Date;return t.setDate(1),t.setYear(n[3]),t.setMonth(parseMonth(n[2])),t.setDate(parseInt(n[1],10)),t}},{re:/^(\w+) (\d{1,2})(?:st|nd|rd|th)?$/i,handler:function(n){var t=new Date;return t.setDate(1),t.setMonth(parseMonth(n[1])),t.setDate(parseInt(n[2],10)),t}},{re:/^(\w+) (\d{1,2})(?:st|nd|rd|th)?,? (\d{4})$/i,handler:function(n){var t=new Date;return t.setDate(1),t.setYear(n[3]),t.setMonth(parseMonth(n[1])),t.setDate(parseInt(n[2],10)),t}},{re:/^ne(?:xt)* (\w+)$/i,handler:function(n){var i=new Date,r=i.getDay(),u=parseWeekday(n[1]),t=u-r;return(u<=r||t+r<7)&&(t+=7),1==t&&(t+=7),i.setDate(i.getDate()+t),i}},{re:/^la(?:st)* (\w+)$/i,handler:function(n){var i=new Date,r=i.getDay(),u=parseWeekday(n[1]),t=-1*(r+7-u)%7;return 0==t?t=-7:-1==t&&(t-=7),i.setDate(i.getDate()+t),i}},{re:/^th(?:is)* (\w+)$/i,handler:function(n){var t=new Date,i=t.getDay(),r=parseWeekday(n[1]),u=r-i;return r<=i&&(u+=7),t.setDate(t.getDate()+u),t}},{re:/^fir(?:st)* (\w+)$/i,handler:function(n){var t=new Date,i,r,u;return(t.setDate(1),i=t.getDay(),r=parseWeekday(n[1]),i==r)?t:(u=r-i,r<i&&(u+=7),t.setDate(t.getDate()+u),t)}},{re:/^sec(?:ond)* (\w+)$/i,handler:function(n){var t=new Date;t.setDate(1);var r=t.getDay(),u=parseWeekday(n[1]),i=u-r;return u<r&&(i+=7),i+=7,t.setDate(t.getDate()+i),t}},{re:/^thi(?:rd)* (\w+)$/i,handler:function(n){var t=new Date;t.setDate(1);var r=t.getDay(),u=parseWeekday(n[1]),i=u-r;return u<r&&(i+=7),i+=14,t.setDate(t.getDate()+i),t}},{re:/^fo(?:urth)* (\w+)$/i,handler:function(n){var t=new Date;t.setDate(1);var r=t.getDay(),u=parseWeekday(n[1]),i=u-r;return u<r&&(i+=7),i+=21,t.setDate(t.getDate()+i),t}},{re:/^fi(?:fth)* (\w+)$/i,handler:function(n){var t=new Date;t.setDate(1);var r=t.getDay(),u=parseWeekday(n[1]),i=u-r;return u<r&&(i+=7),i+=28,t.setDate(t.getDate()+i),t}},{re:/(\d{1,2})\/(\d{1,2})\/(\d{4})/,handler:function(n){var t=new Date;return t.setDate(1),dp_dateFormat&&dp_dateFormat.substr(0,1)!="m"?(t.setYear(n[3]),t.setMonth(parseInt(n[2],10)-1),t.setDate(parseInt(n[1],10))):(t.setYear(n[3]),t.setMonth(parseInt(n[1],10)-1),t.setDate(parseInt(n[2],10))),t}},{re:/(\d{1,2})-(\d{1,2})-(\d{4})/,handler:function(n){var t=new Date;return t.setDate(1),dp_dateFormat&&dp_dateFormat.substr(0,1)!="m"?(t.setYear(n[3]),t.setMonth(parseInt(n[2],10)-1),t.setDate(parseInt(n[1],10))):(t.setYear(n[3]),t.setMonth(parseInt(n[1],10)-1),t.setDate(parseInt(n[2],10))),t}},{re:/(\d{1,2})\.(\d{1,2})\.(\d{4})/,handler:function(n){var t=new Date;return t.setDate(1),dp_dateFormat&&dp_dateFormat.substr(0,1)!="m"?(t.setYear(n[3]),t.setMonth(parseInt(n[2],10)-1),t.setDate(parseInt(n[1],10))):(t.setYear(n[3]),t.setMonth(parseInt(n[1],10)-1),t.setDate(parseInt(n[2],10))),t}},{re:/(\d{4})-(\d{1,2})-(\d{1,2})/,handler:function(n){var t=new Date;return t.setDate(1),t.setYear(parseInt(n[1],10)),t.setMonth(parseInt(n[2],10)-1),t.setDate(parseInt(n[3],10)),t}}];try{if(addEvent){try{addDOMLoadEvent&&(sEventType="DOMContentLoaded")}catch(e){sEventType="load"}addEvent(window,sEventType,function(){for(var t=document.getElementsByTagName("input"),n=0;n<t.length;n++)/\bdateparse\b/.test(t[n].className)&&(addEvent(t[n],"blur",function(){magicDate(this)}),addEvent(t[n],"focus",function(){this.className!="error"&&this.select()}))})}}catch(e){}LoadingAlert='<table cellpadding="0" cellspacing="0" border="0"><tr><td style="height:10px"><\/td><\/tr><table><table cellpadding="3" cellspacing="1" border="0" style="background-color:#EEEEEE"><tr><td style="background-color:#F7F7F7"><table cellpadding="0" cellspacing="0" border="0"><tr style="height:22px"><td><img src="<%=G_CDNROOT%>/images/register_loading.gif"><\/td><td class="f5" style="color:#999999;padding-left:10px">&nbsp;Loading...<\/td><\/tr><\/table><\/td><\/tr><\/table>',function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof module!="undefined"&&module.exports?module.exports=n:n(jQuery,window,document)}(function(n){(function(t){var i=typeof define=="function"&&define.amd,r=typeof module!="undefined"&&module.exports,u="https:"==document.location.protocol?"https:":"http:";i||(r?require("jquery-mousewheel")(n):n.event.special.mousewheel||n("head").append(decodeURI("%3Cscript src="+u+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E")));t()})(function(){var h="mCustomScrollbar",t="mCS",it=".mCustomScrollbar",ot={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},pt=0,b={},p=window.attachEvent&&!window.addEventListener?1:0,e=!1,c,i=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],s={init:function(r){var r=n.extend(!0,{},ot,r),e=v.call(this),u,f;if(r.live){if(u=r.liveSelector||this.selector||it,f=n(u),r.live==="off"){k(u);return}b[u]=setTimeout(function(){f.mCustomScrollbar(r);r.live==="once"&&f.length&&k(u)},500)}else k(u);return r.setWidth=r.set_width?r.set_width:r.setWidth,r.setHeight=r.set_height?r.set_height:r.setHeight,r.axis=r.horizontalScroll?"x":wt(r.axis),r.scrollInertia=r.scrollInertia>0&&r.scrollInertia<17?17:r.scrollInertia,typeof r.mouseWheel!="object"&&r.mouseWheel==!0&&(r.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),r.mouseWheel.scrollAmount=r.mouseWheelPixels?r.mouseWheelPixels:r.mouseWheel.scrollAmount,r.mouseWheel.normalizeDelta=r.advanced.normalizeMouseWheelDelta?r.advanced.normalizeMouseWheelDelta:r.mouseWheel.normalizeDelta,r.scrollButtons.scrollType=bt(r.scrollButtons.scrollType),st(r),n(e).each(function(){var u=n(this);if(!u.data(t)){u.data(t,{idx:++pt,opt:r,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:u.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=u.data(t),f=e.opt,o=u.data("mcs-axis"),h=u.data("mcs-scrollbar-position"),c=u.data("mcs-theme");o&&(f.axis=o);h&&(f.scrollbarPosition=h);c&&(f.theme=c,st(f));kt.call(this);e&&f.callbacks.onCreate&&typeof f.callbacks.onCreate=="function"&&f.callbacks.onCreate.call(this);n("#mCSB_"+e.idx+"_container img:not(."+i[2]+")").addClass(i[2]);s.update.call(null,u)}})},update:function(r,f){var e=r||v.call(this);return n(e).each(function(){var s=n(this),c;if(s.data(t)){var e=s.data(t),r=e.opt,h=n("#mCSB_"+e.idx+"_container"),a=n("#mCSB_"+e.idx),l=[n("#mCSB_"+e.idx+"_dragger_vertical"),n("#mCSB_"+e.idx+"_dragger_horizontal")];if(!h.length)return;e.tweenRunning&&o(s);f&&e&&r.callbacks.onBeforeUpdate&&typeof r.callbacks.onBeforeUpdate=="function"&&r.callbacks.onBeforeUpdate.call(this);s.hasClass(i[3])&&s.removeClass(i[3]);s.hasClass(i[4])&&s.removeClass(i[4]);a.css("max-height","none");a.height()!==s.height()&&a.css("max-height",s.height());dt.call(this);r.axis==="y"||r.advanced.autoExpandHorizontalScroll||h.css("width",ht(h));e.overflowed=ii.call(this);ct.call(this);r.autoDraggerLength&&ni.call(this);ti.call(this);ri.call(this);c=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)];r.axis!=="x"&&(e.overflowed[0]?l[0].height()>l[0].parent().height()?y.call(this):(u(s,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(y.call(this),r.axis==="y"?g.call(this):r.axis==="yx"&&e.overflowed[1]&&u(s,c[1].toString(),{dir:"x",dur:0,overwrite:"none"})));r.axis!=="y"&&(e.overflowed[1]?l[1].width()>l[1].parent().width()?y.call(this):(u(s,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(y.call(this),r.axis==="x"?g.call(this):r.axis==="yx"&&e.overflowed[0]&&u(s,c[0].toString(),{dir:"y",dur:0,overwrite:"none"})));f&&e&&(f===2&&r.callbacks.onImageLoad&&typeof r.callbacks.onImageLoad=="function"?r.callbacks.onImageLoad.call(this):f===3&&r.callbacks.onSelectorChange&&typeof r.callbacks.onSelectorChange=="function"?r.callbacks.onSelectorChange.call(this):r.callbacks.onUpdate&&typeof r.callbacks.onUpdate=="function"&&r.callbacks.onUpdate.call(this));et.call(this)}})},scrollTo:function(i,r){if(typeof i!="undefined"&&i!=null){var f=v.call(this);return n(f).each(function(){var s=n(this);if(s.data(t)){var o=s.data(t),h=o.opt,c={trigger:"external",scrollInertia:h.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},f=n.extend(!0,{},c,r),e=ft.call(this,i),l=f.scrollInertia>0&&f.scrollInertia<17?17:f.scrollInertia;e[0]=at.call(this,e[0],"y");e[1]=at.call(this,e[1],"x");f.moveDragger&&(e[0]*=o.scrollRatio.y,e[1]*=o.scrollRatio.x);f.dur=wi()?0:l;setTimeout(function(){e[0]!==null&&typeof e[0]!="undefined"&&h.axis!=="x"&&o.overflowed[0]&&(f.dir="y",f.overwrite="all",u(s,e[0].toString(),f));e[1]!==null&&typeof e[1]!="undefined"&&h.axis!=="y"&&o.overflowed[1]&&(f.dir="x",f.overwrite="none",u(s,e[1].toString(),f))},f.timeout)}})}},stop:function(){var i=v.call(this);return n(i).each(function(){var i=n(this);i.data(t)&&o(i)})},disable:function(r){var u=v.call(this);return n(u).each(function(){var u=n(this),f;u.data(t)&&(f=u.data(t),et.call(this,"remove"),g.call(this),r&&y.call(this),ct.call(this,!0),u.addClass(i[3]))})},destroy:function(){var r=v.call(this);return n(r).each(function(){var f=n(this);if(f.data(t)){var u=f.data(t),e=u.opt,s=n("#mCSB_"+u.idx),o=n("#mCSB_"+u.idx+"_container"),c=n(".mCSB_"+u.idx+"_scrollbar");e.live&&k(e.liveSelector||n(r).selector);et.call(this,"remove");g.call(this);y.call(this);f.removeData(t);a(this,"mcs");c.remove();o.find("img."+i[2]).removeClass(i[2]);s.replaceWith(o.contents());f.removeClass(h+" _"+t+"_"+u.idx+" "+i[6]+" "+i[7]+" "+i[5]+" "+i[3]).addClass(i[4])}})}},v=function(){return typeof n(this)!="object"||n(this).length<1?it:this},st=function(t){t.autoDraggerLength=n.inArray(t.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"])>-1?!1:t.autoDraggerLength;t.autoExpandScrollbar=n.inArray(t.theme,["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"])>-1?!1:t.autoExpandScrollbar;t.scrollButtons.enable=n.inArray(t.theme,["minimal","minimal-dark"])>-1?!1:t.scrollButtons.enable;t.autoHideScrollbar=n.inArray(t.theme,["minimal","minimal-dark"])>-1?!0:t.autoHideScrollbar;t.scrollbarPosition=n.inArray(t.theme,["minimal","minimal-dark"])>-1?"outside":t.scrollbarPosition},k=function(n){b[n]&&(clearTimeout(b[n]),a(b,n))},wt=function(n){return n==="yx"||n==="xy"||n==="auto"?"yx":n==="x"||n==="horizontal"?"x":"y"},bt=function(n){return n==="stepped"||n==="pixels"||n==="step"||n==="click"?"stepped":"stepless"},kt=function(){var f=n(this),u=f.data(t),r=u.opt,l=r.autoExpandScrollbar?" "+i[1]+"_expand":"",o=["<div id='mCSB_"+u.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+u.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_vertical"+l+"'><div class='"+i[12]+"'><div id='mCSB_"+u.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /><\/div><div class='mCSB_draggerRail' /><\/div><\/div>","<div id='mCSB_"+u.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+u.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_horizontal"+l+"'><div class='"+i[12]+"'><div id='mCSB_"+u.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /><\/div><div class='mCSB_draggerRail' /><\/div><\/div>"],v=r.axis==="yx"?"mCSB_vertical_horizontal":r.axis==="x"?"mCSB_horizontal":"mCSB_vertical",a=r.axis==="yx"?o[0]+o[1]:r.axis==="x"?o[1]:o[0],y=r.axis==="yx"?"<div id='mCSB_"+u.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",p=r.autoHideScrollbar?" "+i[6]:"",w=r.axis!=="x"&&u.langDir==="rtl"?" "+i[7]:"",c,s,e;r.setWidth&&f.css("width",r.setWidth);r.setHeight&&f.css("height",r.setHeight);r.setLeft=r.axis!=="y"&&u.langDir==="rtl"?"989999px":r.setLeft;f.addClass(h+" _"+t+"_"+u.idx+p+w).wrapInner("<div id='mCSB_"+u.idx+"' class='mCustomScrollBox mCS-"+r.theme+" "+v+"'><div id='mCSB_"+u.idx+"_container' class='mCSB_container' style='position:relative; top:"+r.setTop+"; left:"+r.setLeft+";' dir='"+u.langDir+"' /><\/div>");c=n("#mCSB_"+u.idx);s=n("#mCSB_"+u.idx+"_container");r.axis==="y"||r.advanced.autoExpandHorizontalScroll||s.css("width",ht(s));r.scrollbarPosition==="outside"?(f.css("position")==="static"&&f.css("position","relative"),f.css("overflow","visible"),c.addClass("mCSB_outside").after(a)):(c.addClass("mCSB_inside").append(a),s.wrap(y));gt.call(this);e=[n("#mCSB_"+u.idx+"_dragger_vertical"),n("#mCSB_"+u.idx+"_dragger_horizontal")];e[0].css("min-height",e[0].height());e[1].css("min-width",e[1].width())},ht=function(t){var i=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return n(this).outerWidth(!0)}).get())],r=t.parent().width();return i[0]>r?i[0]:i[1]>r?i[1]:"100%"},dt=function(){var e=n(this),f=e.data(t),r=f.opt,i=n("#mCSB_"+f.idx+"_container"),u;r.advanced.autoExpandHorizontalScroll&&r.axis!=="y"&&(i.css({width:"auto","min-width":0,"overflow-x":"scroll"}),u=Math.ceil(i[0].scrollWidth),r.advanced.autoExpandHorizontalScroll===3||r.advanced.autoExpandHorizontalScroll!==2&&u>i.parent().width()?i.css({width:u,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap())},gt=function(){var s=n(this),o=s.data(t),u=o.opt,h=n(".mCSB_"+o.idx+"_scrollbar:first"),f=tt(u.scrollButtons.tabindex)?"tabindex='"+u.scrollButtons.tabindex+"'":"",r=["<a href='#' class='"+i[13]+"' "+f+" />","<a href='#' class='"+i[14]+"' "+f+" />","<a href='#' class='"+i[15]+"' "+f+" />","<a href='#' class='"+i[16]+"' "+f+" />"],e=[u.axis==="x"?r[2]:r[0],u.axis==="x"?r[3]:r[1],r[2],r[3]];u.scrollButtons.enable&&h.prepend(e[0]).append(e[1]).next(".mCSB_scrollTools").prepend(e[2]).append(e[3])},ni=function(){var s=n(this),u=s.data(t),f=n("#mCSB_"+u.idx),e=n("#mCSB_"+u.idx+"_container"),r=[n("#mCSB_"+u.idx+"_dragger_vertical"),n("#mCSB_"+u.idx+"_dragger_horizontal")],o=[f.height()/e.outerHeight(!1),f.width()/e.outerWidth(!1)],i=[parseInt(r[0].css("min-height")),Math.round(o[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(o[1]*r[1].parent().width())],h=p&&i[1]<i[0]?i[0]:i[1],c=p&&i[3]<i[2]?i[2]:i[3];r[0].css({height:h,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":i[0]+"px"});r[1].css({width:c,"max-width":r[1].parent().width()-10})},ti=function(){var s=n(this),i=s.data(t),u=n("#mCSB_"+i.idx),f=n("#mCSB_"+i.idx+"_container"),r=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")],e=[f.outerHeight(!1)-u.height(),f.outerWidth(!1)-u.width()],o=[e[0]/(r[0].parent().height()-r[0].height()),e[1]/(r[1].parent().width()-r[1].width())];i.scrollRatio={y:o[0],x:o[1]}},d=function(n,t,r){var f=r?i[0]+"_expanded":"",u=n.closest(".mCSB_scrollTools");t==="active"?(n.toggleClass(i[0]+" "+f),u.toggleClass(i[1]),n[0]._draggable=n[0]._draggable?0:1):n[0]._draggable||(t==="hide"?(n.removeClass(i[0]),u.removeClass(i[1])):(n.addClass(i[0]),u.addClass(i[1])))},ii=function(){var h=n(this),r=h.data(t),e=n("#mCSB_"+r.idx),i=n("#mCSB_"+r.idx+"_container"),u=r.overflowed==null?i.height():i.outerHeight(!1),f=r.overflowed==null?i.width():i.outerWidth(!1),o=i[0].scrollHeight,s=i[0].scrollWidth;return o>u&&(u=o),s>f&&(f=s),[u>e.height(),f>e.width()]},y=function(){var r=n(this),i=r.data(t),f=i.opt,c=n("#mCSB_"+i.idx),s=n("#mCSB_"+i.idx+"_container"),h=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")],e;o(r);(f.axis!=="x"&&!i.overflowed[0]||f.axis==="y"&&i.overflowed[0])&&(h[0].add(s).css("top",0),u(r,"_resetY"));(f.axis!=="y"&&!i.overflowed[1]||f.axis==="x"&&i.overflowed[1])&&(e=dx=0,i.langDir==="rtl"&&(e=c.width()-s.outerWidth(!1),dx=Math.abs(e/i.scrollRatio.x)),s.css("left",e),h[1].css("left",dx),u(r,"_resetX"))},ri=function(){var u=n(this),r=u.data(t),i=r.opt,e;if(!r.bindEvents){if(ui.call(this),i.contentTouchScroll&&fi.call(this),ei.call(this),i.mouseWheel.enable){function f(){e=setTimeout(function(){n.event.special.mousewheel?(clearTimeout(e),oi.call(u[0])):f()},100)}f()}hi.call(this);li.call(this);i.advanced.autoScrollOnFocus&&ci.call(this);i.scrollButtons.enable&&ai.call(this);i.keyboard.enable&&vi.call(this);r.bindEvents=!0}},g=function(){var f=n(this),r=f.data(t),u=r.opt,o=t+"_"+r.idx,s=".mCSB_"+r.idx+"_scrollbar",e=n("#mCSB_"+r.idx+",#mCSB_"+r.idx+"_container,#mCSB_"+r.idx+"_container_wrapper,"+s+" ."+i[12]+",#mCSB_"+r.idx+"_dragger_vertical,#mCSB_"+r.idx+"_dragger_horizontal,"+s+">a"),h=n("#mCSB_"+r.idx+"_container");u.advanced.releaseDraggableSelectors&&e.add(n(u.advanced.releaseDraggableSelectors));u.advanced.extraDraggableSelectors&&e.add(n(u.advanced.extraDraggableSelectors));r.bindEvents&&(n(document).add(n(!l()||top.document)).unbind("."+o),e.each(function(){n(this).unbind("."+o)}),clearTimeout(f[0]._focusTimeout),a(f[0],"_focusTimeout"),clearTimeout(r.sequential.step),a(r.sequential,"step"),clearTimeout(h[0].onCompleteTimeout),a(h[0],"onCompleteTimeout"),r.bindEvents=!1)},ct=function(r){var h=n(this),u=h.data(t),o=u.opt,c=n("#mCSB_"+u.idx+"_container_wrapper"),f=c.length?c:n("#mCSB_"+u.idx+"_container"),e=[n("#mCSB_"+u.idx+"_scrollbar_vertical"),n("#mCSB_"+u.idx+"_scrollbar_horizontal")],s=[e[0].find(".mCSB_dragger"),e[1].find(".mCSB_dragger")];o.axis!=="x"&&(u.overflowed[0]&&!r?(e[0].add(s[0]).add(e[0].children("a")).css("display","block"),f.removeClass(i[8]+" "+i[10])):(o.alwaysShowScrollbar?(o.alwaysShowScrollbar!==2&&s[0].css("display","none"),f.removeClass(i[10])):(e[0].css("display","none"),f.addClass(i[10])),f.addClass(i[8])));o.axis!=="y"&&(u.overflowed[1]&&!r?(e[1].add(s[1]).add(e[1].children("a")).css("display","block"),f.removeClass(i[9]+" "+i[11])):(o.alwaysShowScrollbar?(o.alwaysShowScrollbar!==2&&s[1].css("display","none"),f.removeClass(i[11])):(e[1].css("display","none"),f.addClass(i[11])),f.addClass(i[9])));u.overflowed[0]||u.overflowed[1]?h.removeClass(i[5]):h.addClass(i[5])},r=function(t){var e=t.type,i=t.target.ownerDocument!==document&&frameElement!==null?[n(frameElement).offset().top,n(frameElement).offset().left]:null,u=l()&&t.target.ownerDocument!==top.document&&frameElement!==null?[n(t.view.frameElement).offset().top,n(t.view.frameElement).offset().left]:[0,0],r,f;switch(e){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return i?[t.originalEvent.pageY-i[0]+u[0],t.originalEvent.pageX-i[1]+u[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":return r=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],f=t.originalEvent.touches.length||t.originalEvent.changedTouches.length,t.target.ownerDocument!==document?[r.screenY,r.screenX,f>1]:[r.pageY,r.pageX,f>1];default:return i?[t.pageY-i[0]+u[0],t.pageX-i[1]+u[1],!1]:[t.pageY,t.pageX,!1]}},ui=function(){function k(n,t,r,f){var e,o;w[0].idleTimer=h.scrollInertia<233?250:0;i.attr("id")===y[1]?(e="x",o=(i[0].offsetLeft-t+f)*s.scrollRatio.x):(e="y",o=(i[0].offsetTop-n+r)*s.scrollRatio.y);u(v,o.toString(),{dir:e,drag:!0})}var v=n(this),s=v.data(t),h=s.opt,f=t+"_"+s.idx,y=["mCSB_"+s.idx+"_dragger_vertical","mCSB_"+s.idx+"_dragger_horizontal"],w=n("#mCSB_"+s.idx+"_container"),b=n("#"+y[0]+",#"+y[1]),i,c,a,g=h.advanced.releaseDraggableSelectors?b.add(n(h.advanced.releaseDraggableSelectors)):b,nt=h.advanced.extraDraggableSelectors?n(!l()||top.document).add(n(h.advanced.extraDraggableSelectors)):n(!l()||top.document);b.bind("contextmenu."+f,function(n){n.preventDefault()}).bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),yt(t)){e=!0;p&&(document.onselectstart=function(){return!1});lt.call(w,!1);o(v);i=n(this);var u=i.offset(),f=r(t)[0]-u.top,s=r(t)[1]-u.left,l=i.height()+u.top,y=i.width()+u.left;f<l&&f>0&&s<y&&s>0&&(c=f,a=s);d(i,"active",h.autoExpandScrollbar)}}).bind("touchmove."+f,function(n){n.stopImmediatePropagation();n.preventDefault();var t=i.offset(),u=r(n)[0]-t.top,f=r(n)[1]-t.left;k(c,a,u,f)});n(document).add(nt).bind("mousemove."+f+" pointermove."+f+" MSPointerMove."+f,function(n){if(i){var t=i.offset(),u=r(n)[0]-t.top,f=r(n)[1]-t.left;if(c===u&&a===f)return;k(c,a,u,f)}}).add(g).bind("mouseup."+f+" touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(){i&&(d(i,"active",h.autoExpandScrollbar),i=null);e=!1;p&&(document.onselectstart=null);lt.call(w,!0)})},fi=function(){function dt(n){if(!nt(n)||e||r(n)[2]){c=0;return}c=1;ft=0;et=0;st=1;k.removeClass("mCS_touch_action");var t=b.offset();d=r(n)[0]-t.top;g=r(n)[1]-t.left;v=[r(n)[0],r(n)[1]]}function gt(n){var c,l,a,y;if(nt(n)&&!e&&!r(n)[2]&&(f.documentTouchScroll||n.preventDefault(),n.stopImmediatePropagation(),!et||ft)&&st){pt=w();var o=tt.offset(),t=r(n)[0]-o.top,u=r(n)[1]-o.left,h="mcsLinearOut";rt.push(t);ut.push(u);v[2]=Math.abs(r(n)[0]-v[0]);v[3]=Math.abs(r(n)[1]-v[1]);i.overflowed[0]&&(c=it[0].parent().height()-it[0].height(),l=d-t>0&&t-d>-(c*i.scrollRatio.y)&&(v[3]*2<v[2]||f.axis==="yx"));i.overflowed[1]&&(a=it[1].parent().width()-it[1].width(),y=g-u>0&&u-g>-(a*i.scrollRatio.x)&&(v[2]*2<v[3]||f.axis==="yx"));l||y?(kt||n.preventDefault(),ft=1):(et=1,k.addClass("mCS_touch_action"));kt&&n.preventDefault();s=f.axis==="yx"?[d-t,g-u]:f.axis==="x"?[null,g-u]:[d-t,null];b[0].idleTimer=250;i.overflowed[0]&&ot(s[0],wt,h,"y","all",!0);i.overflowed[1]&&ot(s[1],wt,h,"x",lt,!0)}}function ni(n){if(!nt(n)||e||r(n)[2]){c=0;return}c=1;n.stopImmediatePropagation();o(k);yt=w();var t=tt.offset();at=r(n)[0]-t.top;vt=r(n)[1]-t.left;rt=[];ut=[]}function ti(n){var t,u,h;if(nt(n)&&!e&&!r(n)[2]){st=0;n.stopImmediatePropagation();ft=0;et=0;ht=w();var c=tt.offset(),l=r(n)[0]-c.top,v=r(n)[1]-c.left;if(!(ht-pt>30)){a=1e3/(ht-yt);var p="mcsEaseOut",o=a<2.5,k=o?[rt[rt.length-2],ut[ut.length-2]]:[0,0];y=o?[l-k[0],v-k[1]]:[l-at,v-vt];t=[Math.abs(y[0]),Math.abs(y[1])];a=o?[Math.abs(y[0]/4),Math.abs(y[1]/4)]:[a,a];u=[Math.abs(b[0].offsetTop)-y[0]*ii(t[0]/a[0],a[0]),Math.abs(b[0].offsetLeft)-y[1]*ii(t[1]/a[1],a[1])];s=f.axis==="yx"?[u[0],u[1]]:f.axis==="x"?[null,u[1]]:[u[0],null];ct=[t[0]*4+f.scrollInertia,t[1]*4+f.scrollInertia];h=parseInt(f.contentTouchScroll)||0;s[0]=t[0]>h?s[0]:0;s[1]=t[1]>h?s[1]:0;i.overflowed[0]&&ot(s[0],ct[0],p,"y",lt,!1);i.overflowed[1]&&ot(s[1],ct[1],p,"x",lt,!1)}}}function ii(n,t){var i=[t*1.5,t*2,t/1.5,t/2];return n>90?t>4?i[0]:i[3]:n>60?t>3?i[3]:i[2]:n>30?t>8?i[1]:t>6?i[0]:t>4?t:i[2]:t>8?t:i[3]}function ot(n,t,i,r,f,e){n&&u(k,n.toString(),{dur:t,scrollEasing:i,dir:r,overwrite:f,drag:e})}var k=n(this),i=k.data(t),f=i.opt,h=t+"_"+i.idx,tt=n("#mCSB_"+i.idx),b=n("#mCSB_"+i.idx+"_container"),it=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")],st,d,g,at,vt,rt=[],ut=[],yt,pt,ht,y,a,s,wt=0,ct,lt=f.axis==="yx"?"none":"all",v=[],ft,et,bt=b.find("iframe"),p=["touchstart."+h+" pointerdown."+h+" MSPointerDown."+h,"touchmove."+h+" pointermove."+h+" MSPointerMove."+h,"touchend."+h+" pointerup."+h+" MSPointerUp."+h],kt=document.body.style.touchAction!==undefined&&document.body.style.touchAction!=="";b.bind(p[0],function(n){dt(n)}).bind(p[1],function(n){gt(n)});tt.bind(p[0],function(n){ni(n)}).bind(p[2],function(n){ti(n)});bt.length&&bt.each(function(){n(this).bind("load",function(){l(this)&&n(this.contentDocument||this.contentWindow.document).bind(p[0],function(n){dt(n);ni(n)}).bind(p[1],function(n){gt(n)}).bind(p[2],function(n){ti(n)})})})},ei=function(){function y(){return window.getSelection?window.getSelection().toString():document.selection&&document.selection.type!="Control"?document.selection.createRange().text:0}function f(n,t,i){l.type=i&&u?"stepped":"stepless";l.scrollAmount=10;ut(a,n,t,"mcsLinearOut",i?60:null)}var a=n(this),i=a.data(t),v=i.opt,l=i.sequential,s=t+"_"+i.idx,o=n("#mCSB_"+i.idx+"_container"),h=o.parent(),u;o.bind("mousedown."+s,function(){c||u||(u=1,e=!0)}).add(document).bind("mousemove."+s,function(n){if(!c&&u&&y()){var s=o.offset(),t=r(n)[0]-s.top+o[0].offsetTop,e=r(n)[1]-s.left+o[0].offsetLeft;t>0&&t<h.height()&&e>0&&e<h.width()?l.step&&f("off",null,"stepped"):(v.axis!=="x"&&i.overflowed[0]&&(t<0?f("on",38):t>h.height()&&f("on",40)),v.axis!=="y"&&i.overflowed[1]&&(e<0?f("on",37):e>h.width()&&f("on",39)))}}).bind("mouseup."+s+" dragend."+s,function(){c||(u&&(u=0,f("off",null)),e=!1)})},oi=function(){function a(t,h){var v,y;if(o(s),!si(s,t.target)){if(v=i.mouseWheel.deltaFactor!=="auto"?parseInt(i.mouseWheel.deltaFactor):p&&t.deltaFactor<100?100:t.deltaFactor||100,y=i.scrollInertia,i.axis==="x"||i.mouseWheel.axis==="x")var a="x",l=[Math.round(v*r.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],w=i.mouseWheel.scrollAmount!=="auto"?l[1]:l[0]>=e.width()?e.width()*.9:l[0],k=Math.abs(n("#mCSB_"+r.idx+"_container")[0].offsetLeft),b=f[1][0].offsetLeft,d=f[1].parent().width()-f[1].width(),c=i.mouseWheel.axis==="y"?t.deltaY||h:t.deltaX;else var a="y",l=[Math.round(v*r.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],w=i.mouseWheel.scrollAmount!=="auto"?l[1]:l[0]>=e.height()?e.height()*.9:l[0],k=Math.abs(n("#mCSB_"+r.idx+"_container")[0].offsetTop),b=f[0][0].offsetTop,d=f[0].parent().height()-f[0].height(),c=t.deltaY||h;(a!=="y"||r.overflowed[0])&&(a!=="x"||r.overflowed[1])&&((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(c=-c),i.mouseWheel.normalizeDelta&&(c=c<0?-1:1),(c>0&&b!==0||c<0&&b!==d||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(w=t.deltaFactor,y=17),u(s,(k-c*w).toString(),{dir:a,dur:y}))}}if(n(this).data(t)){var s=n(this),r=s.data(t),i=r.opt,h=t+"_"+r.idx,e=n("#mCSB_"+r.idx),f=[n("#mCSB_"+r.idx+"_dragger_vertical"),n("#mCSB_"+r.idx+"_dragger_horizontal")],c=n("#mCSB_"+r.idx+"_container").find("iframe");c.length&&c.each(function(){n(this).bind("load",function(){l(this)&&n(this.contentDocument||this.contentWindow.document).bind("mousewheel."+h,function(n,t){a(n,t)})})});e.bind("mousewheel."+h,function(n,t){a(n,t)})}},rt={},l=function(t){var u=!1,i=!1,f=null,r;if(t===undefined?i="#empty":n(t).attr("id")!==undefined&&(i=n(t).attr("id")),i!==!1&&rt[i]!==undefined)return rt[i];if(t){try{r=t.contentDocument||t.contentWindow.document;f=r.body.innerHTML}catch(e){}u=f!==null}else{try{r=top.document;f=r.body.innerHTML}catch(e){}u=f!==null}return i!==!1&&(rt[i]=u),u},lt=function(n){var t=this.find("iframe"),i;t.length&&(i=n?"auto":"none",t.css("pointer-events",i))},si=function(i,r){var u=r.nodeName.toLowerCase(),f=i.data(t).opt.mouseWheel.disableOver;return n.inArray(u,f)>-1&&!(n.inArray(u,["select","textarea"])>-1&&!n(r).is(":focus"))},hi=function(){var s=n(this),f=s.data(t),r=t+"_"+f.idx,h=n("#mCSB_"+f.idx+"_container"),l=h.parent(),a=n(".mCSB_"+f.idx+"_scrollbar ."+i[12]),c;a.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r,function(t){e=!0;n(t.target).hasClass("mCSB_dragger")||(c=1)}).bind("touchend."+r+" pointerup."+r+" MSPointerUp."+r,function(){e=!1}).bind("click."+r,function(t){var r,e;if(c&&(c=0,n(t.target).hasClass(i[12])||n(t.target).hasClass("mCSB_draggerRail"))){if(o(s),r=n(this),e=r.find(".mCSB_dragger"),r.parent(".mCSB_scrollTools_horizontal").length>0){if(!f.overflowed[1])return;var v="x",a=t.pageX>e.offset().left?-1:1,y=Math.abs(h[0].offsetLeft)-a*l.width()*.9}else{if(!f.overflowed[0])return;var v="y",a=t.pageY>e.offset().top?-1:1,y=Math.abs(h[0].offsetTop)-a*l.height()*.9}u(s,y.toString(),{dir:v,scrollEasing:"mcsEaseInOut"})}})},ci=function(){var i=n(this),s=i.data(t),e=s.opt,c=t+"_"+s.idx,r=n("#mCSB_"+s.idx+"_container"),h=r.parent();r.bind("focusin."+c,function(){var t=n(document.activeElement),c=r.find(".mCustomScrollBox").length,s=0;t.is(e.advanced.autoScrollOnFocus)&&(o(i),clearTimeout(i[0]._focusTimeout),i[0]._focusTimer=c?(s+17)*c:0,i[0]._focusTimeout=setTimeout(function(){var n=[f(t)[0],f(t)[1]],o=[r[0].offsetTop,r[0].offsetLeft],c=[o[0]+n[0]>=0&&o[0]+n[0]<h.height()-t.outerHeight(!1),o[1]+n[1]>=0&&o[0]+n[1]<h.width()-t.outerWidth(!1)],l=e.axis==="yx"&&!c[0]&&!c[1]?"none":"all";e.axis==="x"||c[0]||u(i,n[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:l,dur:s});e.axis==="y"||c[1]||u(i,n[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:l,dur:s})},i[0]._focusTimer))})},li=function(){var u=n(this),i=u.data(t),f=t+"_"+i.idx,r=n("#mCSB_"+i.idx+"_container").parent();r.bind("scroll."+f,function(){(r.scrollTop()!==0||r.scrollLeft()!==0)&&n(".mCSB_"+i.idx+"_scrollbar").css("visibility","hidden")})},ai=function(){var f=n(this),r=f.data(t),o=r.opt,u=r.sequential,i=t+"_"+r.idx,s=".mCSB_"+r.idx+"_scrollbar",h=n(s+">a");h.bind("contextmenu."+i,function(n){n.preventDefault()}).bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i+" mouseup."+i+" touchend."+i+" pointerup."+i+" MSPointerUp."+i+" mouseout."+i+" pointerout."+i+" MSPointerOut."+i+" click."+i,function(t){function s(n,t){u.scrollAmount=o.scrollButtons.scrollAmount;ut(f,n,t)}if(t.preventDefault(),yt(t)){var i=n(this).attr("class");u.type=o.scrollButtons.scrollType;switch(t.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if(u.type==="stepped")return;e=!0;r.tweenRunning=!1;s("on",i);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if(u.type==="stepped")return;e=!1;u.dir&&s("off",i);break;case"click":if(u.type!=="stepped"||r.tweenRunning)return;s("on",i)}}})},vi=function(){function p(t){function w(n,t){(s.type=r.keyboard.scrollType,s.scrollAmount=r.keyboard.scrollAmount,s.type==="stepped"&&i.tweenRunning)||ut(e,n,t)}var c,y,p,l,v;switch(t.type){case"blur":i.tweenRunning&&s.dir&&w("off",null);break;case"keydown":case"keyup":if(c=t.keyCode?t.keyCode:t.which,y="on",r.axis!=="x"&&(c===38||c===40)||r.axis!=="y"&&(c===37||c===39)){if((c===38||c===40)&&!i.overflowed[0]||(c===37||c===39)&&!i.overflowed[1])return;t.type==="keyup"&&(y="off");n(document.activeElement).is(a)||(t.preventDefault(),t.stopImmediatePropagation(),w(y,c))}else c===33||c===34?((i.overflowed[0]||i.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),t.type==="keyup"&&(o(e),p=c===34?-1:1,r.axis==="x"||r.axis==="yx"&&i.overflowed[1]&&!i.overflowed[0]?(l="x",v=Math.abs(f[0].offsetLeft)-p*h.width()*.9):(l="y",v=Math.abs(f[0].offsetTop)-p*h.height()*.9),u(e,v.toString(),{dir:l,scrollEasing:"mcsEaseInOut"}))):(c===35||c===36)&&(n(document.activeElement).is(a)||((i.overflowed[0]||i.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),t.type==="keyup"&&(r.axis==="x"||r.axis==="yx"&&i.overflowed[1]&&!i.overflowed[0]?(l="x",v=c===35?Math.abs(h.width()-f.outerWidth(!1)):0):(l="y",v=c===35?Math.abs(h.height()-f.outerHeight(!1)):0),u(e,v.toString(),{dir:l,scrollEasing:"mcsEaseInOut"}))))}}var e=n(this),i=e.data(t),r=i.opt,s=i.sequential,c=t+"_"+i.idx,w=n("#mCSB_"+i.idx),f=n("#mCSB_"+i.idx+"_container"),h=f.parent(),a="input,textarea,select,datalist,keygen,[contenteditable='true']",v=f.find("iframe"),y=["blur."+c+" keydown."+c+" keyup."+c];v.length&&v.each(function(){n(this).bind("load",function(){l(this)&&n(this.contentDocument||this.contentWindow.document).bind(y[0],function(n){p(n)})})});w.attr("tabindex","0").bind(y[0],function(n){p(n)})},ut=function(r,f,e,s,h){function y(n){l.snapAmount&&(c.scrollAmount=(l.snapAmount instanceof Array)?c.dir[0]==="x"?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var i=c.type!=="stepped",f=h?h:n?i?b/1.5:k:1e3/60,e=n?i?7.5:40:2.5,t=[Math.abs(p[0].offsetTop),Math.abs(p[0].offsetLeft)],o=[v.scrollRatio.y>10?10:v.scrollRatio.y,v.scrollRatio.x>10?10:v.scrollRatio.x],w=c.dir[0]==="x"?t[1]+c.dir[1]*o[1]*e:t[0]+c.dir[1]*o[0]*e,d=c.dir[0]==="x"?t[1]+c.dir[1]*parseInt(c.scrollAmount):t[0]+c.dir[1]*parseInt(c.scrollAmount),a=c.scrollAmount!=="auto"?d:w,g=s?s:n?i?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",nt=n?!0:!1;if(n&&f<17&&(a=c.dir[0]==="x"?t[1]:t[0]),u(r,a.toString(),{dir:c.dir[0],scrollEasing:g,dur:f,onComplete:nt}),n){c.dir=!1;return}clearTimeout(c.step);c.step=setTimeout(function(){y()},f)}function d(){clearTimeout(c.step);a(c,"step");o(r)}var v=r.data(t),l=v.opt,c=v.sequential,p=n("#mCSB_"+v.idx+"_container"),w=c.type==="stepped"?!0:!1,b=l.scrollInertia<26?26:l.scrollInertia,k=l.scrollInertia<1?17:l.scrollInertia;switch(f){case"on":if(c.dir=[e===i[16]||e===i[15]||e===39||e===37?"x":"y",e===i[13]||e===i[15]||e===38||e===37?-1:1],o(r),tt(e)&&c.type==="stepped")return;y(w);break;case"off":d();(w||v.tweenRunning&&c.dir)&&y(!0)}},ft=function(i){var u=n(this).data(t).opt,r=[];return typeof i=="function"&&(i=i()),i instanceof Array?r=i.length>1?[i[0],i[1]]:u.axis==="x"?[null,i[0]]:[i[0],null]:(r[0]=i.y?i.y:i.x||u.axis==="x"?null:i,r[1]=i.x?i.x:i.y||u.axis==="y"?null:i),typeof r[0]=="function"&&(r[0]=r[0]()),typeof r[1]=="function"&&(r[1]=r[1]()),r},at=function(i,r){var h,e;if(i!=null&&typeof i!="undefined"){var c=n(this),l=c.data(t),v=l.opt,u=n("#mCSB_"+l.idx+"_container"),o=u.parent(),y=typeof i;r||(r=v.axis==="x"?"x":"y");var p=r==="x"?u.outerWidth(!1)-o.width():u.outerHeight(!1)-o.height(),a=r==="x"?u[0].offsetLeft:u[0].offsetTop,w=r==="x"?"left":"top";switch(y){case"function":return i();case"object":return(e=i.jquery?i:n(i),!e.length)?void 0:r==="x"?f(e)[1]:f(e)[0];case"string":case"number":if(tt(i))return Math.abs(i);if(i.indexOf("%")!==-1)return Math.abs(p*parseInt(i)/100);if(i.indexOf("-=")!==-1)return Math.abs(a-parseInt(i.split("-=")[1]));if(i.indexOf("+=")!==-1)return h=a+parseInt(i.split("+=")[1]),h>=0?0:Math.abs(h);if(i.indexOf("px")!==-1&&tt(i.split("px")[0]))return Math.abs(i.split("px")[0]);if(i==="top"||i==="left")return 0;if(i==="bottom")return Math.abs(o.height()-u.outerHeight(!1));if(i==="right")return Math.abs(o.width()-u.outerWidth(!1));if(i==="first"||i==="last")return e=u.find(":"+i),r==="x"?f(e)[1]:f(e)[0];if(n(i).length)return r==="x"?f(n(i))[1]:f(n(i))[0];u.css(w,i);s.update.call(null,c[0]);return}}},et=function(r){function c(){if(clearTimeout(e[0].autoUpdate),o.parents("html").length===0){o=null;return}e[0].autoUpdate=setTimeout(function(){if(f.advanced.updateOnSelectorChange&&(u.poll.change.n=v(),u.poll.change.n!==u.poll.change.o)){u.poll.change.o=u.poll.change.n;h(3);return}if(f.advanced.updateOnContentResize&&(u.poll.size.n=o[0].scrollHeight+o[0].scrollWidth+e[0].offsetHeight+o[0].offsetHeight+o[0].offsetWidth,u.poll.size.n!==u.poll.size.o)){u.poll.size.o=u.poll.size.n;h(1);return}if(f.advanced.updateOnImageLoad&&!(f.advanced.updateOnImageLoad==="auto"&&f.axis==="y")&&(u.poll.img.n=e.find("img").length,u.poll.img.n!==u.poll.img.o)){u.poll.img.o=u.poll.img.n;e.find("img").each(function(){l(this)});return}(f.advanced.updateOnSelectorChange||f.advanced.updateOnContentResize||f.advanced.updateOnImageLoad)&&c()},f.advanced.autoUpdateTimeout)}function l(t){function u(n,t){return function(){return t.apply(n,arguments)}}function f(){this.onload=null;n(t).addClass(i[2]);h(2)}if(n(t).hasClass(i[2])){h();return}var r=new Image;r.onload=u(r,f);r.src=t.src}function v(){f.advanced.updateOnSelectorChange===!0&&(f.advanced.updateOnSelectorChange="*");var n=0,t=e.find(f.advanced.updateOnSelectorChange);return f.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){n+=this.offsetHeight+this.offsetWidth}),n}function h(n){clearTimeout(e[0].autoUpdate);s.update.call(null,o[0],n)}var o=n(this),u=o.data(t),f=u.opt,e=n("#mCSB_"+u.idx+"_container");if(r){clearTimeout(e[0].autoUpdate);a(e[0],"autoUpdate");return}c()},yi=function(n,t,i){return Math.round(n/t)*t-i},o=function(i){var r=i.data(t),u=n("#mCSB_"+r.idx+"_container,#mCSB_"+r.idx+"_container_wrapper,#mCSB_"+r.idx+"_dragger_vertical,#mCSB_"+r.idx+"_dragger_horizontal");u.each(function(){pi.call(this)})},u=function(i,r,u){function c(n){return f&&e.callbacks[n]&&typeof e.callbacks[n]=="function"}function ot(){return[e.callbacks.alwaysTriggerOffsets||p>=l[0]+a,e.callbacks.alwaysTriggerOffsets||p<=-v]}function y(){var n=[o[0].offsetTop,o[0].offsetLeft],t=[h[0].offsetTop,h[0].offsetLeft],r=[o.outerHeight(!1),o.outerWidth(!1)],f=[w.height(),w.width()];i[0].mcs={content:o,top:n[0],left:n[1],draggerTop:t[0],draggerLeft:t[1],topPct:Math.round(100*Math.abs(n[0])/(Math.abs(r[0])-f[0])),leftPct:Math.round(100*Math.abs(n[1])/(Math.abs(r[1])-f[1])),direction:u.dir}}var f=i.data(t),e=f.opt,et={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:e.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},u=n.extend(et,u),g=[u.dur,u.drag?0:u.dur],w=n("#mCSB_"+f.idx),o=n("#mCSB_"+f.idx+"_container"),b=o.parent(),nt=e.callbacks.onTotalScrollOffset?ft.call(i,e.callbacks.onTotalScrollOffset):[0,0],tt=e.callbacks.onTotalScrollBackOffset?ft.call(i,e.callbacks.onTotalScrollBackOffset):[0,0],it;if(f.trigger=u.trigger,(b.scrollTop()!==0||b.scrollLeft()!==0)&&(n(".mCSB_"+f.idx+"_scrollbar").css("visibility","visible"),b.scrollTop(0).scrollLeft(0)),r!=="_resetY"||f.contentReset.y||(c("onOverflowYNone")&&e.callbacks.onOverflowYNone.call(i[0]),f.contentReset.y=1),r!=="_resetX"||f.contentReset.x||(c("onOverflowXNone")&&e.callbacks.onOverflowXNone.call(i[0]),f.contentReset.x=1),r!=="_resetY"&&r!=="_resetX"){(f.contentReset.y||!i[0].mcs)&&f.overflowed[0]&&(c("onOverflowY")&&e.callbacks.onOverflowY.call(i[0]),f.contentReset.x=null);(f.contentReset.x||!i[0].mcs)&&f.overflowed[1]&&(c("onOverflowX")&&e.callbacks.onOverflowX.call(i[0]),f.contentReset.x=null);e.snapAmount&&(it=(e.snapAmount instanceof Array)?u.dir==="x"?e.snapAmount[1]:e.snapAmount[0]:e.snapAmount,r=yi(r,it,e.snapOffset));switch(u.dir){case"x":var h=n("#mCSB_"+f.idx+"_dragger_horizontal"),k="left",p=o[0].offsetLeft,l=[w.width()-o.outerWidth(!1),h.parent().width()-h.width()],s=[r,r===0?0:r/f.scrollRatio.x],a=nt[1],v=tt[1],rt=a>0?a/f.scrollRatio.x:0,ut=v>0?v/f.scrollRatio.x:0;break;case"y":var h=n("#mCSB_"+f.idx+"_dragger_vertical"),k="top",p=o[0].offsetTop,l=[w.height()-o.outerHeight(!1),h.parent().height()-h.height()],s=[r,r===0?0:r/f.scrollRatio.y],a=nt[0],v=tt[0],rt=a>0?a/f.scrollRatio.y:0,ut=v>0?v/f.scrollRatio.y:0}(s[1]<0||s[0]===0&&s[1]===0?s=[0,0]:s[1]>=l[1]?s=[l[0],l[1]]:s[0]=-s[0],i[0].mcs||(y(),c("onInit")&&e.callbacks.onInit.call(i[0])),clearTimeout(o[0].onCompleteTimeout),vt(h[0],k,Math.round(s[1]),g[1],u.scrollEasing),!f.tweenRunning&&(p===0&&s[0]>=0||p===l[0]&&s[0]<=l[0]))||vt(o[0],k,Math.round(s[0]),g[0],u.scrollEasing,u.overwrite,{onStart:function(){u.callbacks&&u.onStart&&!f.tweenRunning&&(c("onScrollStart")&&(y(),e.callbacks.onScrollStart.call(i[0])),f.tweenRunning=!0,d(h),f.cbOffsets=ot())},onUpdate:function(){u.callbacks&&u.onUpdate&&c("whileScrolling")&&(y(),e.callbacks.whileScrolling.call(i[0]))},onComplete:function(){if(u.callbacks&&u.onComplete){e.axis==="yx"&&clearTimeout(o[0].onCompleteTimeout);var n=o[0].idleTimer||0;o[0].onCompleteTimeout=setTimeout(function(){c("onScroll")&&(y(),e.callbacks.onScroll.call(i[0]));c("onTotalScroll")&&s[1]>=l[1]-rt&&f.cbOffsets[0]&&(y(),e.callbacks.onTotalScroll.call(i[0]));c("onTotalScrollBack")&&s[1]<=ut&&f.cbOffsets[1]&&(y(),e.callbacks.onTotalScrollBack.call(i[0]));f.tweenRunning=!1;o[0].idleTimer=0;d(h,"hide")},n)}}})}},vt=function(n,t,i,r,u,f,e){function y(){o.stop||(s||b.call(),s=w()-g,p(),s>=o.time&&(o.time=s>o.time?s+h-(s-o.time):s+h-1,o.time<s+1&&(o.time=s+1)),o.time<r?o.id=l(y):d.call())}function p(){r>0?(o.currVal=it(o.time,c,v,r,u),a[t]=Math.round(o.currVal)+"px"):a[t]=i+"px";k.call()}function nt(){h=1e3/60;o.time=s+h;l=window.requestAnimationFrame?window.requestAnimationFrame:function(n){return p(),setTimeout(n,.01)};o.id=l(y)}function tt(){o.id!=null&&(window.requestAnimationFrame?window.cancelAnimationFrame(o.id):clearTimeout(o.id),o.id=null)}function it(n,t,i,r,u){switch(u){case"linear":case"mcsLinear":return i*n/r+t;case"mcsLinearOut":return n/=r,n--,i*Math.sqrt(1-n*n)+t;case"easeInOutSmooth":return(n/=r/2,n<1)?i/2*n*n+t:(n--,-i/2*(n*(n-2)-1)+t);case"easeInOutStrong":return(n/=r/2,n<1)?i/2*Math.pow(2,10*(n-1))+t:(n--,i/2*(-Math.pow(2,-10*n)+2)+t);case"easeInOut":case"mcsEaseInOut":return(n/=r/2,n<1)?i/2*n*n*n+t:(n-=2,i/2*(n*n*n+2)+t);case"easeOutSmooth":return n/=r,n--,-i*(n*n*n*n-1)+t;case"easeOutStrong":return i*(-Math.pow(2,-10*n/r)+1)+t;case"easeOut":case"mcsEaseOut":default:var f=(n/=r)*n,e=f*n;return t+i*(.499999999999997*e*f+-2.5*f*f+5.5*e+-6.5*f+4*n)}}var v;n._mTween||(n._mTween={top:{},left:{}});var e=e||{},b=e.onStart||function(){},k=e.onUpdate||function(){},d=e.onComplete||function(){},g=w(),h,s=0,c=n.offsetTop,a=n.style,l,o=n._mTween[t];t==="left"&&(c=n.offsetLeft);v=i-c;o.stop=0;f!=="none"&&tt();nt()},w=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},pi=function(){var n=this,r,i,t;for(n._mTween||(n._mTween={top:{},left:{}}),r=["top","left"],i=0;i<r.length;i++)t=r[i],n._mTween[t].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(n._mTween[t].id):clearTimeout(n._mTween[t].id),n._mTween[t].id=null,n._mTween[t].stop=1)},a=function(n,t){try{delete n[t]}catch(i){n[t]=null}},yt=function(n){return!(n.which&&n.which!==1)},nt=function(n){var t=n.originalEvent.pointerType;return!(t&&t!=="touch"&&t!==2)},tt=function(n){return!isNaN(parseFloat(n))&&isFinite(n)},f=function(n){var t=n.parents(".mCSB_container");return[n.offset().top-t.offset().top,n.offset().left-t.offset().left]},wi=function(){function t(){var t=["webkit","moz","ms","o"],n;if("hidden"in document)return"hidden";for(n=0;n<t.length;n++)if(t[n]+"Hidden"in document)return t[n]+"Hidden";return null}var n=t();return n?document[n]:!1};n.fn[h]=function(t){if(s[t])return s[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t!="object"&&t)n.error("Method "+t+" does not exist");else return s.init.apply(this,arguments)};n[h]=function(t){if(s[t])return s[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t!="object"&&t)n.error("Method "+t+" does not exist");else return s.init.apply(this,arguments)};n[h].defaults=ot;window[h]=!0;n(window).bind("load",function(){n(it)[h]();n.extend(n.expr[":"],{mcsInView:n.expr[":"].mcsInView||function(t){var i=n(t),u=i.parents(".mCSB_container"),e,r;if(u.length)return e=u.parent(),r=[u[0].offsetTop,u[0].offsetLeft],r[0]+f(i)[0]>=0&&r[0]+f(i)[0]<e.height()-i.outerHeight(!1)&&r[1]+f(i)[1]>=0&&r[1]+f(i)[1]<e.width()-i.outerWidth(!1)},mcsInSight:n.expr[":"].mcsInSight||function(t,i,r){var e=n(t),o,s=e.parents(".mCSB_container"),u,h,c,l=r[3]==="exact"?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(s.length)return o=[e.outerHeight(!1),e.outerWidth(!1)],h=[s[0].offsetTop+f(e)[0],s[0].offsetLeft+f(e)[1]],u=[s.parent()[0].offsetHeight,s.parent()[0].offsetWidth],c=[o[0]<u[0]?l[0]:l[1],o[1]<u[1]?l[0]:l[1]],h[0]-u[0]*c[0][0]<0&&h[0]+o[0]-u[0]*c[0][1]>=0&&h[1]-u[1]*c[1][0]<0&&h[1]+o[1]-u[1]*c[1][1]>=0},mcsOverflow:n.expr[":"].mcsOverflow||function(i){var r=n(i).data(t);if(r)return r.overflowed[0]||r.overflowed[1]}})})})});var customDDL={openCss:"js-ddl-opened",initedByClick:"js-ddl-inited",init:function(n,t,i){var r=n.children("span"),u=r.next("ul");r.length!=0&&this.openCloseEvent(r,u,t,i)},initByClick:function(n){var t,i,r;n.length==0||n.hasClass(customDDL.initedByClick)||(n.addClass(customDDL.initedByClick),t=n.children("span"),i=t.next("ul"),t.length!=0&&(this.openCloseEvent(t,i),r=n.attr("id"),$("body").click(function(n){n.target.id==r||$(n.target).parents("#"+r).size()||(i.fadeOut(0),i.removeClass(customDDL.openCss))}),i.mCustomScrollbar(),t.click()))},openCloseEvent:function(n,t,i,r){n.on("click",function(){t.hasClass(customDDL.openCss)?(t.removeClass(customDDL.openCss),t.slideUp(100),typeof r=="function"&&r()):(hdrSearchPanel.closeEvent(hdrSearchPanel.$searchTypeList),t.addClass(customDDL.openCss),t.slideDown(100),typeof i=="function"&&i())})},closeEvent:function(n){n.hasClass(customDDL.openCss)&&(n.removeClass(customDDL.openCss),n.slideUp(0))}},xmlObject={GetXmlHttpObject:function(){var n=null;return window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n}},FollowUnfollowControl={jsInitCss:"js-init-bound",initMouseoverEvent:function(n){if(!$(n).hasClass(FollowUnfollowControl.jsInitCss)){$(n).addClass(FollowUnfollowControl.jsInitCss);$(n).on("mouseover",function(){$(this).addClass("light-orange-btn").addClass("light-orange-btn-inline");$(this).text("Unfollow")});$(n).on("mouseout",function(){$(this).removeClass("light-orange-btn").removeClass("light-orange-btn-inline");$(this).text("Following")});$(n).trigger("mouseover")}}};$(document).ready(function(){($("#SelectLocationPanel").length!=0||$("#HeaderSearchPanel").length!=0)&&selectLocationPanel.init();$("#HdrSearchDDL").length!=0&&hdrSearchPanel.init();$("#MediaThirdbar").length!=0&&ThirdbarMediaPanel.init();$("#GearMenuBtn").length!=0&&(profilePopup.init(),gearPopup.init(),friendPopup.init(),NotificationPopup.init());navPopupPanel.init()});var profilePopup={$btn:"",openCss:"js-opened",init:function(){if(this.$btn=$("#ProfileMenuBtn"),this.$btn.length!=0){$("body").click(function(n){n.target.id=="ProfileMenuBtnWrp"||$(n.target).parents("#ProfileMenuBtnWrp").size()||profilePopup.close()});this.$btn.on("click",function(){$(this).hasClass(profilePopup.openCss)?profilePopup.close():(hdrSearchPanel.closeEvent(hdrSearchPanel.$searchTypeList),navPopupPanel.closeEvent(),topNavPanel.closeEvent(),selectLocationPanel.closeAllDdl(),gearPopup.close(),typeof searchPagePanel!="undefined"&&searchPagePanel.closeEvent(),searchByTagManager.hideSearchInputAndPopup_Header(),$(this).addClass(profilePopup.openCss),$(this).next("ul").fadeIn(200))})}},close:function(){profilePopup.$btn!=""&&profilePopup.$btn.length!=0&&(profilePopup.$btn.removeClass(profilePopup.openCss),profilePopup.$btn.next("ul").fadeOut(200))}},gearPopup={$btn:"",openCss:"js-opened",init:function(){if(this.$btn=$("#GearMenuBtn"),this.$btn.length!=0){$("body").click(function(n){n.target.id=="GearMenuBtnWrp"||$(n.target).parents("#GearMenuBtnWrp").size()||($("#GearMenuBtnWrp").find("ul").first().fadeOut(0),$("#GearMenuBtnWrp").find("#GearMenuBtn").first().removeClass(gearPopup.openCss))});this.$btn.on("click",function(){$(this).hasClass(gearPopup.openCss)?gearPopup.close():(hdrSearchPanel.closeEvent(hdrSearchPanel.$searchTypeList),navPopupPanel.closeEvent(),topNavPanel.closeEvent(),selectLocationPanel.closeAllDdl(),profilePopup.close(),typeof searchPagePanel!="undefined"&&searchPagePanel.closeEvent(),searchByTagManager.hideSearchInputAndPopup_Header(),$(this).addClass(gearPopup.openCss),$(this).next("ul").fadeIn(200))})}},close:function(){gearPopup.$btn!=""&&gearPopup.$btn.length!=0&&(gearPopup.$btn.removeClass("js-opened"),gearPopup.$btn.next("ul").fadeOut(200))}},friendPopup={$btn:"",openCss:"js-opened",init:function(){if(this.$btn=$("#friendsMenuBtn"),this.$btn.length!=0){$("body").click(function(n){n.target.id=="friendsMenuBtnWrp"||$(n.target).parents("#friendsMenuBtnWrp").size()||($("#friendsMenuBtnWrp").find("ul").first().fadeOut(0),$("#friendsMenuBtnWrp").find("#friends-btn_bg").first().removeClass(friendPopup.openCss))});this.$btn.on("click",function(){$(this).hasClass(friendPopup.openCss)?friendPopup.close():(hdrSearchPanel.closeEvent(hdrSearchPanel.$searchTypeList),navPopupPanel.closeEvent(),topNavPanel.closeEvent(),selectLocationPanel.closeAllDdl(),profilePopup.close(),typeof searchPagePanel!="undefined"&&searchPagePanel.closeEvent(),searchByTagManager.hideSearchInputAndPopup_Header(),$(this).addClass(friendPopup.openCss),$(this).next("ul").fadeIn(200))})}},close:function(){friendPopup.$btn!=""&&friendPopup.$btn.length!=0&&(friendPopup.$btn.removeClass("js-opened"),friendPopup.$btn.next("ul").fadeOut(200))}},NotificationPopup={$btn:"",openCss:"js-opened",init:function(){if(this.$btn=$("#notificationMenuBtn"),this.$btn.length!=0){$("body").click(function(n){n.target.id=="notificationMenuBtnWrp"||$(n.target).parents("#notificationMenuBtnWrp").size()||($("#notificationMenuBtnWrp").find("ul").first().fadeOut(0),$("#notificationMenuBtnWrp").find("#notification-btn_bg").first().removeClass(NotificationPopup.openCss))});this.$btn.on("click",function(){$(this).hasClass(NotificationPopup.openCss)?NotificationPopup.close():(hdrSearchPanel.closeEvent(hdrSearchPanel.$searchTypeList),navPopupPanel.closeEvent(),topNavPanel.closeEvent(),selectLocationPanel.closeAllDdl(),profilePopup.close(),typeof searchPagePanel!="undefined"&&searchPagePanel.closeEvent(),searchByTagManager.hideSearchInputAndPopup_Header(),$(this).addClass(NotificationPopup.openCss),$(this).next("ul").fadeIn(200))})}},close:function(){NotificationPopup.$btn!=""&&NotificationPopup.$btn.length!=0&&(NotificationPopup.$btn.removeClass("js-opened"),NotificationPopup.$btn.next("ul").fadeOut(200))}},navPopupPanel={$openBtn:"",$menuPopup:"",openCss:"js-nav-popup-opened",init:function(){this.$openBtn=$("#OpenNavBtn");this.$menuPopup=$("#NavPopup");this.openCloseMenu(this.$openBtn,this.$menuPopup);this.closeMenu(this.$menuPopup.find("#NavPopupCloseBtn"),this.$menuPopup)},openCloseMenu:function(n,t){n.bind("click",function(){t.hasClass(navPopupPanel.openCss)?(t.removeClass(navPopupPanel.openCss),t.fadeOut(200)):(t.addClass(navPopupPanel.openCss),t.fadeIn(200),selectLocationPanel.closeEvent(),logInPopupPanel.closeEvent(),profilePopup.close(),gearPopup.close(),TopLinksFrame.closeEvent())})},closeMenu:function(n,t){n.bind("click",function(){t.removeClass(navPopupPanel.openCss);t.fadeOut(200)})},closeEvent:function(){navPopupPanel.$menuPopup!=""&&navPopupPanel.$menuPopup.hasClass(navPopupPanel.openCss)&&(navPopupPanel.$menuPopup.removeClass(navPopupPanel.openCss),navPopupPanel.$menuPopup.fadeOut(200))}},selectLocationPanel={$locationsPanel:"",openPanelCss:"js-loc-panel-opened",openItemCss:"js-opened-location-item",init:function(){var t=$("#HdrLocationLabel"),i=$("#WhereToBtn"),r=$("#WhatElseBtn"),n;this.$locationsPanel=$("#SelectLocationPanel");this.$locationsPanel.length==0&&(this.$locationsPanel=$("#HeaderSearchPanel"));this.openCloseHandler(t,this.$locationsPanel,this.openPanelCss);this.openCloseHandler(i,this.$locationsPanel,this.openPanelCss);this.openCloseHandler(r,this.$locationsPanel,this.openPanelCss);n="js-current-location";this.$locationsPanel.find(".location-item").each(function(){var i=$(this),r=i.children("span"),t=i.find("ul");i.find("ul").first().mCustomScrollbar();r.next("ul").length==0&&(t=i.find(".js-ul-ddl"));r.on("click",function(){t.hasClass(selectLocationPanel.openItemCss)?(t.removeClass(selectLocationPanel.openItemCss),t.slideUp(100),t.hasClass("js-ul-ddl")&&(t.find("#SerachCountryTb").val(""),t.find("#SerachStateTb").val(""),t.find("#SerachCountyTb").val(""),t.find("#SerachCityTb").val(""))):(hdrSearchPanel.closeEvent(hdrSearchPanel.$searchTypeList),selectLocationPanel.closeAllOtherDdl(r,selectLocationPanel.$locationsPanel,n),t.addClass(selectLocationPanel.openItemCss),profilePopup.close(),gearPopup.close(),t.slideDown(100),t.hasClass("js-ul-ddl")&&(t.find("ul").slideDown(100),angular.element("#NgStateApp").scope().rebindAllCountries(),angular.element("#NgStateApp").scope().rebindAllStates(),angular.element("#NgStateApp").scope().rebindAllCounties(),angular.element("#NgStateApp").scope().rebindAllCities()),searchByTagManager.hideInfoPopup_inTheHeader())});t.find("span").each(function(){$(this).on("click",function(){r.html($(this).text());t.removeClass(selectLocationPanel.openItemCss);t.slideUp(0);t.hasClass("js-ul-ddl")&&(t.find("ul").slideUp(0),t.find("#SerachCountryTb").val(""))})})})},openEvent:function(){hdrSearchPanel.closeEvent(hdrSearchPanel.$searchTypeList);typeof $thisLabel!="undefined"&&selectLocationPanel.closeAllOtherDdl($thisLabel,selectLocationPanel.$locationsPanel,currentItemMarkerCss);typeof $thisLocationList!="undefined"&&$thisLocationList.addClass(selectLocationPanel.openItemCss);profilePopup.close();gearPopup.close();typeof $thisLocationList!="undefined"&&($thisLocationList.slideDown(100),$thisLocationList.hasClass("js-ul-ddl")&&($thisLocationList.find("ul").slideDown(100),angular.element("#NgStateApp").scope().rebindAllCountries()));searchByTagManager.hideInfoPopup_inTheHeader()},closeEvent:function(){selectLocationPanel.$locationsPanel!=""&&selectLocationPanel.$locationsPanel.length!=0&&selectLocationPanel.$locationsPanel.hasClass(selectLocationPanel.openPanelCss)&&(selectLocationPanel.$locationsPanel.removeClass(selectLocationPanel.openPanelCss),selectLocationPanel.$locationsPanel.fadeOut())},closeAllDdl:function(){$("#SelectLocationPanel").find(".location-item ul,.location-item .js-ul-ddl").each(function(){$(this).slideUp(0);$(this).removeClass(selectLocationPanel.openItemCss)})},closeAllOtherDdl:function(n,t,i){n.next("ul").first().addClass(i);t.find(".location-item ul,.location-item .js-ul-ddl").each(function(){$(this).hasClass(i)||($(this).removeClass(selectLocationPanel.openItemCss),$(this).slideUp(100))});n.next("ul").length==0?n.next("ul").first().removeClass(i):n.next(".js-ul-ddl").first().removeClass(i)},openCloseHandler:function(n,t,i){if(n.length!=0)n.on("click",function(){t.hasClass(i)?(t.removeClass(i),t.fadeOut(0),selectLocationPanel.closeAllDdl(),$("#HdrLocationIcon").attr("src","/css/whiteLayout/images/White-Triangle.png"),setCookie("LocationBarOpen","1",1)):(setCookie("LocationBarOpen","1",1),$("#HdrLocationIcon").attr("src","/css/whiteLayout/images/White-TriangleUp.png"),hdrSearchPanel.closeEvent(hdrSearchPanel.$searchTypeList),navPopupPanel.closeEvent(),topNavPanel.closeEvent(),logInPopupPanel.closeEvent(),profilePopup.close(),gearPopup.close(),TopLinksFrame.closeEvent(),t.addClass(i),t.fadeIn(200,function(){$(this).css("overflow","initial")}),searchByTagManager.hideInfoPopup_inTheHeader())})}},LinkPanelObj={cssMarker:"js-showed-pnl",$moreChannelPanel:"",$moreNetworkPanel:"",showChannelsPanel:function(){LinkPanelObj.$moreChannelPanel==""&&(LinkPanelObj.$moreChannelPanel=$("#ChannelsSelectLinkPanel"),$("#ChannelsDDL").html("<span>Loading...<\/span>"),$.ajax({url:"/profile/inc/ajax_top_channels_links_default.asp",success:function(n){$("#ChannelsDDL").html(n)}}));LinkPanelObj.$moreChannelPanel.hasClass(LinkPanelObj.cssMarker)?LinkPanelObj.hideChannelsPanel():(LinkPanelObj.$moreChannelPanel.addClass(LinkPanelObj.cssMarker),LinkPanelObj.$moreChannelPanel.fadeIn())},hideChannelsPanel:function(){LinkPanelObj.$moreChannelPanel.removeClass(LinkPanelObj.cssMarker);LinkPanelObj.$moreChannelPanel.fadeOut()},showNetworksPanel:function(){LinkPanelObj.$moreNetworkPanel==""&&(LinkPanelObj.$moreNetworkPanel=$("#NetworksSelectLinkPanel"));LinkPanelObj.$moreNetworkPanel.hasClass(LinkPanelObj.cssMarker)?LinkPanelObj.hideNetworksPanel():(LinkPanelObj.$moreNetworkPanel.addClass(LinkPanelObj.cssMarker),LinkPanelObj.$moreNetworkPanel.fadeIn())},hideNetworksPanel:function(){LinkPanelObj.$moreNetworkPanel.removeClass(LinkPanelObj.cssMarker);LinkPanelObj.$moreNetworkPanel.fadeOut()}},hdrSearchPanel={$hdrSearchDllLabel:"",$searchTypeList:"",openDDLCss:"js-opened-search-ddl",init:function(){hdrSearchPanel.$hdrSearchDllLabel=$("#HdrSearchDDL");hdrSearchPanel.$searchTypeList=hdrSearchPanel.$hdrSearchDllLabel.next("ul");hdrSearchPanel.$hdrSearchDllLabel.on("click",function(){hdrSearchPanel.$searchTypeList.hasClass(hdrSearchPanel.openDDLCss)?hdrSearchPanel.closeEvent(hdrSearchPanel.$searchTypeList):(hdrSearchPanel.$searchTypeList.addClass(hdrSearchPanel.openDDLCss),hdrSearchPanel.$searchTypeList.slideDown(100),typeof searchPagePanel!="undefined"&&searchPagePanel.closeEvent())});var n=hdrSearchPanel.$hdrSearchDllLabel.parents("form"),t=n.find("#hfNoSearchURL"),i=n.find("#hfKeySearchURL");hdrSearchPanel.$hdrSearchDllLabel.next("ul").find("span").each(function(){$(this).on("click",function(){hdrSearchPanel.$hdrSearchDllLabel.html($(this).text());hdrSearchPanel.$searchTypeList.removeClass(hdrSearchPanel.openDDLCss);hdrSearchPanel.$searchTypeList.slideUp(0);n.attr("action",$(this).attr("data-FormUrl"));t.val($(this).attr("data-NoSearchURL"));i.val($(this).attr("data-KeySearchURL"))})})},closeEvent:function(n){n.removeClass(hdrSearchPanel.openDDLCss);n.slideUp(100)}},ThirdbarMediaPanel={$ThirdbarDllLabel:"",$searchTypeList:"",openDDLCss:"js-opened-search-ddl",init:function(){ThirdbarMediaPanel.$ThirdbarDllLabel=$("#MediaThirdbar");ThirdbarMediaPanel.$searchTypeList=ThirdbarMediaPanel.$ThirdbarDllLabel.next("ul");ThirdbarMediaPanel.$ThirdbarDllLabel.on("click",function(){ThirdbarMediaPanel.$searchTypeList.hasClass(ThirdbarMediaPanel.openDDLCss)?ThirdbarMediaPanel.closeEvent(ThirdbarMediaPanel.$searchTypeList):(ThirdbarMediaPanel.$searchTypeList.addClass(ThirdbarMediaPanel.openDDLCss),ThirdbarMediaPanel.$searchTypeList.slideDown(100),typeof searchPagePanel!="undefined"&&searchPagePanel.closeEvent())});ThirdbarMediaPanel.$ThirdbarDllLabel.next("ul").find("span").each(function(){$(this).on("click",function(){ThirdbarMediaPanel.$ThirdbarDllLabel.html($(this).text());ThirdbarMediaPanel.$searchTypeList.removeClass(ThirdbarMediaPanel.openDDLCss);ThirdbarMediaPanel.$searchTypeList.slideUp(0)})})},closeEvent:function(n){n.removeClass(ThirdbarMediaPanel.openDDLCss);n.slideUp(100)}};$(document).ready(function(){topNavPanel.init();popularVideoPanel.init();$("#fmeFriendStatusWrp").length!=0&&($("#VideoWDGContentWrp").mCustomScrollbar(),$("#ClassifiedWDGContentWrp").mCustomScrollbar(),$("#NetworksWDGContentWrp").mCustomScrollbar(),$("#MembersWDGContentWrp").mCustomScrollbar(),$("#ImageWDGContentWrp").mCustomScrollbar(),$("#ProductsWDGContentWrp").mCustomScrollbar(),$("#BlogsWDGContentWrp").mCustomScrollbar());topWidgetsManager.init();leftColumnBg.setHeightOfColumn();leftColumnBg.setHeightOfMembersWidget();ControlPanel.init();searchByTagManager.openLearnMoreHeaderPage();linkAndEventManager.init();lazyLoadStatusIcon.init();SignInPopup.init();ShopCenterCategory.init();TopSearchCategory.init();BizCategory.init();AdminPanelObj.init()});var AdminPanelObj={isShown:!1,isLoaded:!1,OpenModeStyle:"width:185px;padding-bottom:0px; position: absolute",wrpClass:".js-admin-panel-wrp",$wrpClass:"",thirdColumnWrp:"#ThirdColumnContent",$thirdColumnWrp:"",showBtn:".js-adpanel-show-btn",$showBtn:"",showLabel:"Show Admin Side Widget",hideLabel:"Hide Admin Side Widget",widgetUrl:"/dashboard/admin_widget_ajax.asp",siteRoot:"https://www.storeboard.com/",defaultHtml:'<div class="js-admin-panel-wrp"><div style="position:relative"><div style="padding-right:10px;margin-left:9px;margin-right:12px;"id="AdminWidget"><div style="display:inline-block;background:#0FACEB;overflow:hidden;width:100%;"><table border="0" cellpadding="0" cellspacing="0" width="145" style="width:100%;"><tbody><tr style="height:30px"><td class="widget-hdr fb" style="font-size:14px;color:#FFFFFF" align="center">Admin Tools <span class="close-admin-widget-btn" onclick="AdminPanelObj.showHideEvent()"><\/span><\/td><\/tr><tr><td style="width:100%;text-align:center;padding:30px 0px 720px;background:#fff;"><div class="load-gif_img" style="width: 100%;"><img src="/images/schemes/lblu/trans_ajax_loader.gif" alt="Loading..."><\/div><div class="load-gif_txt f5">&nbsp;Loading...<\/div><\/td><\/tr><\/tbody><\/table><\/div><\/div><\/div><\/div>',init:function(){AdminPanelObj.$wrpClass=$(AdminPanelObj.wrpClass);AdminPanelObj.$wrpClass.length!=0&&(AdminPanelObj.$showBtn=$(AdminPanelObj.showBtn),AdminPanelObj.$showBtn.fadeIn(0))},createUrl:function(){AdminPanelObj.widgetUrl+="?cp_LocalPageID="+AdminPanelObj.$wrpClass.attr("data-cp_LocalPageID");AdminPanelObj.widgetUrl+="&nLocalPageAdmin="+AdminPanelObj.$wrpClass.attr("data-nLocalPageAdmin");AdminPanelObj.widgetUrl+="&PageURL="+AdminPanelObj.$wrpClass.attr("data-PageURL");AdminPanelObj.widgetUrl+="&altTitle="+AdminPanelObj.$wrpClass.attr("data-altTitle");AdminPanelObj.widgetUrl+="&cp_PrCity="+AdminPanelObj.$wrpClass.attr("data-cp_PrCity");AdminPanelObj.widgetUrl+="&cp_PrStateID="+AdminPanelObj.$wrpClass.attr("data-cp_PrStateID");AdminPanelObj.widgetUrl+="&cp_PrCountryID="+AdminPanelObj.$wrpClass.attr("data-cp_PrCountryID");AdminPanelObj.widgetUrl+="&CountryCity="+AdminPanelObj.$wrpClass.attr("data-CountryCity");AdminPanelObj.widgetUrl+="&StatePage="+AdminPanelObj.$wrpClass.attr("data-StatePage");AdminPanelObj.widgetUrl+="&cp_Neighborhood="+AdminPanelObj.$wrpClass.attr("data-cp_Neighborhood")},showHideEvent:function(){AdminPanelObj.isShown?(AdminPanelObj.isShown=!1,AdminPanelObj.$thirdColumnWrp.attr("style",""),AdminPanelObj.$wrpClass.fadeOut(0),AdminPanelObj.$showBtn.find("span").first().html(AdminPanelObj.showLabel)):(AdminPanelObj.$thirdColumnWrp=$(AdminPanelObj.thirdColumnWrp),AdminPanelObj.isShown=!0,AdminPanelObj.isLoaded?(AdminPanelObj.$thirdColumnWrp.attr("style","width:568px"),AdminPanelObj.$wrpClass.fadeIn(0),AdminPanelObj.$showBtn.find("span").first().html(AdminPanelObj.hideLabel)):(profilePopup.close(),AdminPanelObj.$thirdColumnWrp.attr("style","width:568px"),AdminPanelObj.isLoaded=!0,AdminPanelObj.$wrpClass.html(AdminPanelObj.defaultHtml),AdminPanelObj.createUrl(),$.get(AdminPanelObj.widgetUrl,function(n){AdminPanelObj.$wrpClass.html(n);AdminPanelObj.$thirdColumnWrp.attr("style","width:568px");AdminPanelObj.isLoaded=!0;AdminPanelObj.$wrpClass.fadeIn(0);AdminPanelObj.$showBtn.find("span").first().html(AdminPanelObj.hideLabel)})))}},TopLinksFrame={cssMark:"js-showed",$ddlLabel:"",openCloseDdl:function(n){TopLinksFrame.$ddlLabel==""&&(TopLinksFrame.$ddlLabel=n);TopLinksFrame.$ddlLabel.hasClass(TopLinksFrame.cssMark)?(TopLinksFrame.$ddlLabel.removeClass(TopLinksFrame.cssMark),TopLinksFrame.$ddlLabel.next().slideUp()):(TopLinksFrame.$ddlLabel.addClass(TopLinksFrame.cssMark),TopLinksFrame.$ddlLabel.next().slideDown(),navPopupPanel.closeEvent())},closeEvent:function(){TopLinksFrame.$ddlLabel==""&&(TopLinksFrame.$ddlLabel=$("#TopLinkDdlLabel"));TopLinksFrame.$ddlLabel.removeClass(TopLinksFrame.cssMark);TopLinksFrame.$ddlLabel.next().slideUp(0)}},ShopCenterCategory={mallLabel:"",productLabel:"",TopsearchproductLabel:"",init:function(){ShopCenterCategory.mallLabel=$(".js-sh-center_ddl  div.js-mallCategories > span");TopSearchCategory.TopsearchproductLabel=$(".js-sh1-center_ddl div.js-TopSearchCategories > span");ShopCenterCategory.productLabel=$(".js-sh-center_ddl div.js-productCategories > span");$(".js-sh-center_ddl").length!=0&&$(".js-sh-center_ddl > div").each(function(){customDDL.init($(this));$(this).find("ul").length!=0&&$(this).find("ul").mCustomScrollbar();$(this).find("ul li> span").each(function(){$(this).on("click",function(){var n=$(this).parents(".js-mallCategories").length!=0;n?(ShopCenterCategory.mallLabel.text($(this).attr("data-name")),ShopCenterCategory.productLabel.text("Product Categories")):(ShopCenterCategory.productLabel.text($(this).attr("data-MediaType")),ShopCenterCategory.mallLabel.text("Mall Categories"));customDDL.closeEvent($(this).parent().parent().parent().parent("ul"))})})})}},TopSearchCategory={mallLabel:"",TopsearchproductLabel:"",productLabel:"",init:function(){TopSearchCategory.TopsearchproductLabel=$(".js-sh1-center_ddl div.js-TopSearchCategories > span");$(".js-sh1-center_ddl").length!=0&&$(".js-sh1-center_ddl > div").each(function(){customDDL.init($(this));$(this).find("ul").length!=0&&$(this).find("ul").mCustomScrollbar();$(this).find("ul li> span").each(function(){$(this).on("click",function(){TopSearchCategory.TopsearchproductLabel.text($(this).attr("data-MediaType"));document.frmMainSearch.KeySearchURL.value=$(this).attr("data-keysearchurl");document.frmMainSearch.NoSearchURL.value=$(this).attr("data-nosearchurl");document.frmMainSearch.action=document.frmMainSearch.KeySearchURL.value;customDDL.closeEvent($(this).parent().parent().parent().parent("ul"))})})})}},BizCategory={Label:"",init:function(){BizCategory.Label=$(".js-biz-ddl div.js-bizCategories > span");$(".js-biz-ddl").length!=0&&$(".js-biz-ddl > div").each(function(){customDDL.init($(this));$(this).find("ul").length!=0&&$(this).find("ul").mCustomScrollbar();$(this).find("ul li> span").each(function(){$(this).on("click",function(){BizCategory.Label.text($(this).attr("data-name"));customDDL.closeEvent($(this).parent().parent().parent().parent("ul"))})})})}},VideoDeleteManager={isInited:!1,$dltBtn:"",url:"/profile/Video_delete_popup.asp?iframe=1&Action=DeleteAllSelected",init:function(){},changeUrl:function(n){var t="";n.each(function(){$(this).is(":checked")&&(t+=$(this).val()+",")});VideoDeleteManager.$dltBtn.attr("href",VideoDeleteManager.url+"&ids="+t+"&containerId="+pageSettings.contentId)},deleteSelected:function(){var n="",i=$("#"+pageSettings.contentId).find(".js-delete-video-chb"),t;i.each(function(){$(this).is(":checked")&&(n+=$(this).val()+",")});t="/ajax/Video_delete.asp?Action=DeleteAllSelected&ids="+n;$.get(t,function(){refreshList()})},deleteSingle:function(n){var t="/ajax/Video_delete.asp?Action=Submitted&MemberVideoID="+n;$.get(t,function(){refreshList()})},checkSingle:function(){},checkAll:function(){var n=$("#"+pageSettings.contentId).find(".js-delete-video-chb");n.each(function(){$(this).prop("checked",!0)})},uncheckAll:function(){var n=$("#"+pageSettings.contentId).find(".js-delete-video-chb");n.each(function(){$(this).prop("checked",!1)})}},MemberDeleteManager={isInited:!1,$dltBtn:"",url:"/profile/profile_delete_popup.asp?iframe=1&Action=DeleteAllSelected",init:function(){MemberDeleteManager.isInited||(MemberDeleteManager.$dltBtn=$("#DeleteCheckedBtn"),MemberDeleteManager.isInited=!0)},changeUrl:function(n){var t="";n.each(function(){$(this).is(":checked")&&(t+=$(this).val()+",")});MemberDeleteManager.$dltBtn.attr("href",MemberDeleteManager.url+"&ids="+t+"&containerId="+pageSettings.contentId)},checkSingle:function(){MemberDeleteManager.init();var n=$("#"+pageSettings.contentId).find(".js-delete-member-chb");MemberDeleteManager.changeUrl(n)},checkAll:function(){MemberDeleteManager.init();var n=$("#"+pageSettings.contentId).find(".js-delete-member-chb");n.each(function(){$(this).prop("checked",!0)});MemberDeleteManager.changeUrl(n)},uncheckAll:function(){MemberDeleteManager.init();var n=$("#"+pageSettings.contentId).find(".js-delete-member-chb");n.each(function(){$(this).prop("checked",!1)})}},SignInPopup={isLoaded:!1,closeClick:!0,$infoLabel:"",init:function(){$("#SigninPopupOpanBtn, #LogOut_CP").length>0&&(SignInPopup.isLoaded||(SignInPopup.isLoaded=!0,$.ajax({url:"/ajax/SignInPopup.asp",success:function(n){$("body").append(n);logInPopupPanel.OnEnterSubmitHandler($(".js-login-opened > .js-signin-popup").first())}})))},updateLoginReasonMessage:function(n){(SignInPopup.$infoLabel==""||SignInPopup.$infoLabel.length==0)&&(SignInPopup.$infoLabel=$("#LogInPopup_Info"));SignInPopup.$infoLabel.html("<p>You must sign in to "+n.html()+"<\/p>")},updateLoginPackage:function(){(SignInPopup.$infoLabel==""||SignInPopup.$infoLabel.length==0)&&(SignInPopup.$infoLabel=$("#LogInPopup_Info"));SignInPopup.$infoLabel.html("<p>You must sign in to select package<\/p>")}},linkAndEventManager={init:function(){$("#AddEditLinksBtn").length!=0&&($("#AddEditLinksBtn").fancybox({frameWidth:450,frameHeight:179,padding:0,showCloseButton:!1,hideOnContentClick:!1,callbackOnClose:linkAndEventManager.loadProfileLinksView}),$("#AddEditEventsBtn").fancybox({frameWidth:450,frameHeight:200,showCloseButton:!1,padding:0,hideOnContentClick:!0}))},loadProfileLinksView:function(){location.href="/profile/profile_addedit.asp?view=links"}},lazyLoadStatusIcon={init:function(){$("body").append('<img style="display:none" src="/css/whiteLayout/images/fb-active-pink.png"/>');$("body").append('<img style="display:none" src="/css/whiteLayout/images/fb-not-active-gray.png"/>');$("body").append('<img style="display:none" src="/css/whiteLayout/images/in-active-pink.png"/>');$("body").append('<img style="display:none" src="/css/whiteLayout/images/li-not-active-gray.png"/>');$("body").append('<img style="display:none" src="/css/whiteLayout/images/tw-active-pink.png"/>');$("body").append('<img style="display:none" src="/css/whiteLayout/images/tw-not-active-gray.png"/>')}},BoardPreferencePopup={init:function(){$("#DashboardPrefPopUp").fancybox({frameWidth:460,frameHeight:430,showCloseButton:!1,padding:0,hideOnContentClick:!0,fitToView:!0})}},ControlPanel={init:function(){$("#ControlPanel").length!=0?(ControlPanel.bindPopupToMenu(),$("#ControlPanel").find(".js-menu-item").each(function(){$(this).bind("mouseover",function(){$(this).children("div.js-sub-menu").fadeIn(0)});$(this).bind("mouseout",function(){$(this).children("div.js-sub-menu").fadeOut(0)})})):$("#GearMenuBtn").length!=0&&ControlPanel.bindPopupToAccountMenu();$("#ControlPanel1").length!=0&&$("#ControlPanel1").find(".js-menu-item").each(function(){$(this).bind("mouseover",function(){$(this).children("div.js-sub-menu").fadeIn(0)});$(this).bind("mouseout",function(){$(this).children("div.js-sub-menu").fadeOut(0)})});$("#ProductControlPanel").length!=0&&$("#ProductControlPanel").find(".js-menu-item").each(function(){$(this).bind("mouseover",function(){$(this).children("div.js-sub-menu").fadeIn(0)});$(this).bind("mouseout",function(){$(this).children("div.js-sub-menu").fadeOut(0)})})},bindPopupToMenu:function(){$("#PanelPremium_ManageHeadline").fancybox({frameWidth:450,frameHeight:219,showCloseButton:!1,padding:0,hideOnContentClick:!0});$("#PanelPremium_ManageDisplayName").fancybox({frameWidth:450,frameHeight:242,showCloseButton:!1,padding:0,hideOnContentClick:!0});ControlPanel.bindPopupToAccountMenu();$("#PanelProducts_AddProduct,#Products_AddProduct").fancybox({frameWidth:550,frameHeight:430,showCloseButton:!1,title:!1,padding:0,hideOnContentClick:!1});$("#PanelShare_ShareYourMedia").fancybox({frameWidth:450,frameHeight:242,showCloseButton:!1,padding:0,hideOnContentClick:!0});$("#PanelShare_MobileSite").fancybox({frameWidth:450,frameHeight:242,showCloseButton:!1,padding:0,hideOnContentClick:!0});$("#PanelShare_ShareEvent").fancybox({frameWidth:450,frameHeight:200,showCloseButton:!1,padding:0,hideOnContentClick:!0});$("#PanelShare_ManagePowerShare").fancybox({frameWidth:450,frameHeight:219,showCloseButton:!1,padding:0,hideOnContentClick:!0});$("#PanelDeals_ManageYourDeals").fancybox({frameWidth:711,frameHeight:400,padding:0,showCloseButton:!1,hideOnContentClick:!1});$("#PanelDeals_AddDeal").fancybox({frameWidth:711,frameHeight:400,padding:0,showCloseButton:!1,hideOnContentClick:!1});$("#PanelNetworks_ManageNetwork").fancybox({frameWidth:450,frameHeight:242,showCloseButton:!1,padding:0,hideOnContentClick:!0});$("#PanelAudios_ManageAudios,#PanelAudios_AddAudios").fancybox({frameWidth:650,showCloseButton:!1,padding:0,frameHeight:330});$("#PanelImages_ManageImages,#PanelImages_AddImages").fancybox({frameWidth:712,frameHeight:385,showCloseButton:!1,padding:0,hideOnContentClick:!1});$("#PanelAddAll").fancybox({frameWidth:712,frameHeight:405,showCloseButton:!1,padding:0,hideOnContentClick:!1});$("#PanelBlogs_ManageBlogs,#PanelBlogs_AddNewsStory").fancybox({frameWidth:800,frameHeight:500,showCloseButton:!1,padding:0,hideOnContentClick:!1});$("#PanelBlogs_AddBlogs").fancybox({frameWidth:840,frameHeight:531,showCloseButton:!1,padding:0,hideOnContentClick:!1});$("#PanelVideos_ManageVideos,#PanelVideos_AddAnVideos").fancybox({frameWidth:800,frameHeight:500,showCloseButton:!1,padding:0,hideOnContentClick:!1});$("#PanelVideos_AddAnVideos").fancybox({frameWidth:800,frameHeight:480,showCloseButton:!1,padding:0,hideOnContentClick:!1})},bindPopupToAccountMenu:function(){$("#PanelAccount_ManageCity,#PanelAccount_ManageCity_InHeader").fancybox({frameWidth:450,frameHeight:242,padding:0,showCloseButton:!1,hideOnContentClick:!1})},openSumMenu:function(n){n.children("div.js-sub-menu").fadeIn()},closeSubMenu:function(n){n.children("div.js-sub-menu").fadeOut()}},leftColumnBg={setHeightOfColumn:function(){var n=$("#LeftColumnWhiteBg");n.length!=0&&n.css("height",n.parent().height());$("#MiddleContentColumn").children().each(function(){})},minHeightMemberWidget:375,setHeightOfMembersWidget:function(){if($("#mainLaftNavPanel").length!=0){var t=$("#LeftCoumn"),n=t.height();n-=t.find("#mainLaftNavPanel").first().height();n-=t.find("#Top10ImagesSlotHeader").first().height();n-=t.find("#Top10ImagesSlotLinks").first().height();n-=t.find("#MemberWidgetHeader").first().height();n-=t.find("#MemberWidgetLinks").first().height();n-=140;n-=1605;n-=200;n<leftColumnBg.minHeightMemberWidget&&(n=leftColumnBg.minHeightMemberWidget);t.find("#MembersWDGContentWrp").first().css("height",n+"px")}}},columnEqualizer={countOfRequest:0,requestBeforeEqualiz:3,init:function(){var i,r,u,t;if(columnEqualizer.countOfRequest++,columnEqualizer.countOfRequest==columnEqualizer.requestBeforeEqualiz){var f=0,e=0,n=0;$("#LeftCoumn").children().each(function(){$(this).is(":visible")&&(e+=$(this).outerHeight(!0))});f=$("#LeftCoumn").outerHeight(!0);i=0;r=0;n=0;$("#MiddleContentColumn").children(".js-MiddleContentColumn-item").each(function(){$(this).is(":visible")&&(r+=$(this).outerHeight(!0))});i=$("#MiddleContentColumn").outerHeight(!0);parseInt(i)>parseInt(r)&&(n=parseInt(i)-parseInt(r),$("#ClassifiedWDGContentWrp").length!=0?(n+=$("#ClassifiedWDGContentWrp").outerHeight(!1),$("#ClassifiedWDGContentWrp").css("height",n+"px")):$("#VideoWDGContentWrp").length!=0&&(n+=$("#VideoWDGContentWrp").outerHeight(!1),$("#VideoWDGContentWrp").css("height",n+"px")));u=0;t=0;n=0;$("#ThirdColumnContent").children().each(function(){$(this).is(":visible")&&(t+=$(this).outerHeight(!0))});t+=$("#AdvertsAppFrame").outerHeight(!0);u=$("#ThirdColumnContent").parent("td").outerHeight(!0);u>t&&(n=u-t,n+=$("#ImageWDGContentWrp").outerHeight(!1),$("#ImageWDGContentWrp").css("height",n+"px"))}}},topWidgetsManager={$topBlogs:"",$topVideos:"",init:function(){this.$topBlogs=$("#Top10VideosSlot");this.$topVideos=$("#Top10VideosSlot");this.$topBlogs.find(".top-list-blog_text").each(function(){$(this).dotdotdot({ellipsis:"... ",wrap:"word",fallbackToLetter:!0,after:null,watch:!1,height:null,tolerance:0,callback:function(){},lastCharacter:{remove:[" ",",",";",".","!","?"],noEllipsis:[]}})});this.$topVideos.find(".top-list-blog_text").each(function(){$(this).dotdotdot({ellipsis:"... ",wrap:"word",fallbackToLetter:!0,after:null,watch:!1,height:null,tolerance:0,callback:function(){},lastCharacter:{remove:[" ",",",";",".","!","?"],noEllipsis:[]}})})}},ClassifiedsWidgetPanel={$panel:"",init:function(){this.$panel==""&&(this.$panel=$("#ClassifiedWDGContentWrp"));this.$panel.find(".clsf-details span").each(function(){$(this).dotdotdot({ellipsis:"... ",wrap:"word",fallbackToLetter:!0,after:null,watch:!1,height:null,tolerance:0,callback:function(){},lastCharacter:{remove:[" ",",",";",".","!","?"],noEllipsis:[]}})})}},BlogsWidgetPanel={$panel:"",init:function(){this.$panel==""&&(this.$panel=$("#BlogsWDGContentWrp"));this.$panel.find(".widget_item-description").each(function(){$(this).dotdotdot({ellipsis:"... ",wrap:"word",fallbackToLetter:!0,after:null,watch:!1,height:null,tolerance:0,callback:function(){},lastCharacter:{remove:[" ",",",";",".","!","?"],noEllipsis:[]}})})}},logInPopupPanel={isInitialized:!1,$logInPopup:"",$JSpasswordField:"",$closeBtn:"",openCss:"js-login-opened",logInInProgress:!1,ErrorFound:0,isRefererForHeader:!1,isRefererForMiddle:!1,init:function(){this.$logInPopup=$("#LogInPopup");this.$JSpasswordField=document.getElementById("LogInPopupPassword");this.$closeBtn=this.$logInPopup.find("#LogInPopup_CloseBtn").first();this.$closeBtn.on("click",function(){logInPopupPanel.closeEvent()});this.OnEnterSubmitHandler(this.$logInPopup);logInPopupPanel.isInitialized=!0},_setRefererValue:function(n){var t=n.find("form"),i=t.attr("action");i+="?referer="+window.location.href;t.attr("action",i)},setReferer:function(n){n==0?this.isRefererForHeader||(this.isRefererForHeader=!0,logInPopupPanel._setRefererValue(this.$logInPopup)):this.isRefererForMiddle||(this.isRefererForMiddle=!0,logInPopupPanel._setRefererValue($("#SigninPopupPanel")))},showHideEvent:function(){logInPopupPanel.isInitialized?logInPopupPanel.showHideEventHandler():(logInPopupPanel.init(),logInPopupPanel.showHideEventHandler())},showHideEventHandler:function(){logInPopupPanel.$logInPopup.hasClass(logInPopupPanel.openCss)?(logInPopupPanel.$logInPopup.removeClass(logInPopupPanel.openCss),logInPopupPanel.$logInPopup.fadeOut(200)):(logInPopupPanel.$logInPopup.addClass(logInPopupPanel.openCss),logInPopupPanel.$logInPopup.fadeIn(200),$(".sign-up-btn").length!=0&&(navPopupPanel.closeEvent(),topNavPanel.closeEvent(),typeof searchPagePanel!="undefined"&&searchPagePanel.closeEvent(),searchByTagManager.hideInfoPopup_inTheHeader()))},closeEvent:function(){logInPopupPanel.$logInPopup!=""&&logInPopupPanel.$logInPopup.hasClass(logInPopupPanel.openCss)&&(logInPopupPanel.$logInPopup.removeClass(logInPopupPanel.openCss),logInPopupPanel.$logInPopup.fadeOut(200))},CheckPassword:function(n){var t,r,f,u;if(this.setReferer(n),!logInPopupPanel.logInInProgress){if(logInPopupPanel.logInInProgress=!0,logInPopupPanel.ErrorFound=0,n==0){for(i=0;i<document.frmSignIn.length;i++)if(document.frmSignIn[i].className.indexOf("js-signin-popup")==-1){t=document.frmSignIn[i].nodeName=="FORM"?document.frmSignIn[i]:document.frmSignIn;break}}else for(i=0;i<document.frmSignIn.length;i++)if(document.frmSignIn[i].className.indexOf("js-signin-popup")>-1){t=document.frmSignIn[i].nodeName=="FORM"?document.frmSignIn[i]:document.frmSignIn;break}if(t.LoginUID.value==""&&(alert("Please enter your e-mail address."),t.LoginUID.focus(),logInPopupPanel.ErrorFound=logInPopupPanel.ErrorFound+1),logInPopupPanel.ErrorFound==0&&t.LoginPWD.value==""&&(alert("Please enter your password."),t.LoginPWD.focus(),logInPopupPanel.ErrorFound=logInPopupPanel.ErrorFound+1),logInPopupPanel.ErrorFound==0)if(r=t.hidAttempts.value,f=1,logInPopupPanel.ErrorFound==0){var e=t.LoginUID.value,o=t.LoginPWD.value,s=xmlObject.GetXmlHttpObject();url="/ajax/check_pwd2.asp";u={eml:e,pwd:o};$.ajax({type:"post",url:url,data:u,async:!1,success:function(n){n=="CORRECT"?t.submit():(alert("The password you entered is incorrect."),t.LoginUID.focus(),t.hidAttempts.value=r,logInPopupPanel.ErrorFound=logInPopupPanel.ErrorFound+1,logInPopupPanel.logInInProgress=!1)},error:function(){}})}else logInPopupPanel.logInInProgress=!1}},CheckPasswordStage2:function(n){var u=n.hidAttempts.value,t=n.LoginUID.value,i=n.LoginPWD.value,f=xmlObject.GetXmlHttpObject(),r;url="/ajax/check_pwd2.asp?eml="+t+"&pwd="+i;url="/ajax/check_pwd2.asp";r={eml:t,pwd:i};$.ajax({type:"post",url:url,data:r,async:!1,success:function(t){t=="CORRECT"?n.submit():(alert("The password you entered is incorrect."),n.LoginUID.focus(),n.hidAttempts.value=u,logInPopupPanel.ErrorFound=logInPopupPanel.ErrorFound+1,logInPopupPanel.logInInProgress=!1)},error:function(){}})},showHidePassword:function(n,t){var r,u;if(t==0){for(i=0;i<document.frmSignIn.length;i++)if(document.frmSignIn[i].className.indexOf("js-signin-popup")==-1){r=document.frmSignIn[i].nodeName=="FORM"?document.frmSignIn[i]:document.frmSignIn;break}}else for(i=0;i<document.frmSignIn.length;i++)if(document.frmSignIn[i].className.indexOf("js-signin-popup")>-1){r=document.frmSignIn[i].nodeName=="FORM"?document.frmSignIn[i]:document.frmSignIn;break}u=r.LogInPopupPassword;u.type=n.is(":checked")?"text":"password"},OnEnterSubmitHandler:function(n){n.find("#LogInUserID,#LogInPopupPassword").each(function(){$(this).on("keypress",function(n){if(n.keyCode==13)return logInPopupPanel.CheckPassword(logInPopupPanel.isLoginFromHeader($(this))),!1})})},isLoginFromHeader:function(n){var t=0;return n.parents("form").hasClass("js-signin-popup")&&(t=1),t}},popularVideoPanel={init:function(){var n=$("#PopularVideoList");$("#PopularVideoList").find(".js-popular-video-title a").each(function(){$(this).dotdotdot({ellipsis:"... ",wrap:"word",fallbackToLetter:!0,after:null,watch:!1,height:null,tolerance:0,callback:function(){},lastCharacter:{remove:[" ",",",";",".","!","?"],noEllipsis:[]}})})}},topNavPanel={$ddlTopCitiesWrp:"",init:function(){this.$ddlTopCitiesWrp=$("#TopCitiesWhiteDropDown");$("body").click(function(n){n.target.id=="TopCitiesWhiteDropDown"||$(n.target).parents("#TopCitiesWhiteDropDown").size()||customDDL.closeEvent($("#TopCitiesWhiteDropDown").find("ul"))});$("body").click(function(n){n.target.id=="LocationTopCityDDL"||$(n.target).parents("#LocationTopCityDDL").size()||$("#LocationTopCityDDL").find("ul").each(function(){$(this).slideUp(0);$(this).removeClass(selectLocationPanel.openItemCss)})});this.$ddlTopCitiesWrp!=0&&(customDDL.init(this.$ddlTopCitiesWrp),this.$ddlTopCitiesWrp.find("ul").length!=0&&this.$ddlTopCitiesWrp.find("ul").mCustomScrollbar())},closeEvent:function(){topNavPanel.$ddlTopCitiesWrp!=""&&customDDL.closeEvent(topNavPanel.$ddlTopCitiesWrp.find("ul"))}},searchByTagManager={$tbTag:"",$tbTagInsideMenu:"",$tbTagInsideSits:"",$popupWrp:"",cssOpen:"js-opened",$searchTagPopupPanel:"",$searchTagPopupPanel_InHeader:"",$tooltip_InHeader:"",isSecondShowOfInfoPopup:!1,showHideSearchInput:function(n){searchByTagManager.$searchTagPopupPanel==""&&(searchByTagManager.$searchTagPopupPanel=n.next("#SearchTagPopupPanel"));n.hasClass(searchByTagManager.cssOpen)?(n.removeClass(searchByTagManager.cssOpen),searchByTagManager.$searchTagPopupPanel.fadeOut(200)):(n.addClass(searchByTagManager.cssOpen),searchByTagManager.$searchTagPopupPanel.fadeIn(200))},showHideSearchInput_Header:function(n){searchByTagManager.$searchTagPopupPanel_InHeader==""&&(searchByTagManager.$searchTagPopupPanel_InHeader=n.next("#SearchTagForm_InTheHeader"));n.hasClass(searchByTagManager.cssOpen)?searchByTagManager.hideInfoPopup_inTheHeader():(n.addClass(searchByTagManager.cssOpen),searchByTagManager.$searchTagPopupPanel_InHeader.fadeIn(0),$("#HdrSearchDDL").html("SB Tag"),searchByTagManager.markSitsSelectedDll());hdrSearchPanel.closeEvent(hdrSearchPanel.$searchTypeList)},hideSearchInput_Header:function(n){searchByTagManager.$searchTagPopupPanel_InHeader==""&&(searchByTagManager.$searchTagPopupPanel_InHeader=n.next("#SearchTagForm_InTheHeader"));n.hasClass(searchByTagManager.cssOpen)&&(n.removeClass(searchByTagManager.cssOpen),searchByTagManager.$searchTagPopupPanel_InHeader.fadeOut(200));searchByTagManager.unmarkSitsSelectedDll()},hideSearchInputAndPopup_Header:function(){searchByTagManager.hideInfoPopup_inTheHeader();searchByTagManager.hideSearchInput_Header($("#SitsIconInTheHeader"))},markSitsSelectedDll:function(){$("#HdrSearchDDL").addClass("search-ddl_label_sits-active")},unmarkSitsSelectedDll:function(){$("#HdrSearchDDL").removeClass("search-ddl_label_sits-active")},getUrlByTag_fromDashboard:function(){this.$tbTag==""&&(this.$tbTag=$("#SearchTagForm").find("#tbTagName"));this.getUrlByTag(searchByTagManager.$tbTag)},getUrlByTag_fromMenu:function(){this.$tbTagInsideMenu==""&&(this.$tbTagInsideMenu=$("#SearchTagForm_InsideMenu").find("#tbTagName"));this.getUrlByTag(searchByTagManager.$tbTagInsideMenu)},getUrlByTag_fromSitsPage:function(){this.$tbTagInsideSits==""&&(this.$tbTagInsideSits=$("#SearchTagForm_InsideSITS").find("#tbTagName"));this.getUrlByTag(searchByTagManager.$tbTagInsideSits)},getUrlByTag:function(n){n.val()==""?(alert("Please Enter The SB Tag "),document.frmTags.tbTagName.focus()):$.getJSON("/ajax/get_url_by_tag.asp?tagname="+n.val(),function(t){$.each(t,function(t,i){if(i=="NotFound")return alert('There Is No SB Tag For "'+n.val()+'" .'),!1;window.location=i})})},showInfoPopup:function(){this.$popupWrp==""&&(this.$popupWrp=$("#SearchTagFormInfoPopup"),this.openLearnMorePage(searchByTagManager.$popupWrp.find("#OpenLearnMorePage")));this.$popupWrp.hasClass(searchByTagManager.cssOpen)?this.hideInfoPopup():(this.$popupWrp.addClass(searchByTagManager.cssOpen),this.$popupWrp.fadeIn(200))},hideInfoPopup:function(){this.$popupWrp.removeClass(searchByTagManager.cssOpen);this.$popupWrp.fadeOut(200)},initInfoPopup_inTheHeader:function(){searchByTagManager.$tooltip_InHeader==""&&(searchByTagManager.$tooltip_InHeader=$("#SearchTagForm_InHeaderTooltip"),searchByTagManager.openLearnMorePage(searchByTagManager.$tooltip_InHeader.find("#OpenLearnMorePage")))},showInfoPopup_inTheHeader:function(){searchByTagManager.initInfoPopup_inTheHeader();searchByTagManager.$tooltip_InHeader.fadeIn(0);selectLocationPanel.closeEvent();typeof searchPagePanel!="undefined"&&searchPagePanel.closeEvent();logInPopupPanel.closeEvent()},hideInfoPopup_inTheHeader:function(){searchByTagManager.initInfoPopup_inTheHeader()},openLearnMorePage:function(n){n.on("click",function(){var n=$(this).parent("form");typeof currCountryId=="undefined"||typeof currStateId=="undefined"||typeof currCountyId=="undefined"||typeof currCityId=="undefined"||typeof currCategory=="undefined"||typeof currPgType=="undefined"||(n.find("#searchCountry").val(currCountryId),n.find("#searchState").val(currStateId),n.find("#searchCounty").val(currCountyId),n.find("#searchCity").val(currCityId),n.find("#searchCategory").val(currCategory),n.find("#searchType").val(currPgType));n.submit()})},openLearnMoreHeaderPage:function(){if($("#OpenLearnMorePageLink").length!=0)$("#OpenLearnMorePageLink").on("click",function(){var n=$("#StepInsideForm");n.find("#searchCountry").val(currCountryId);n.find("#searchState").val(currStateId);n.find("#searchCounty").val(currCountyId);n.find("#searchCity").val(currCityId);n.find("#searchCategory").val(currCategory);n.find("#searchType").val(currPgType);n.submit()})}};widgetRightMenu={$menu:"",openCss:"js-opened",openClose:function(n){(widgetRightMenu.$menu==""||widgetRightMenu.$menu.length==0)&&(widgetRightMenu.$menu=n.next("ul"),$("body").click(function(n){n.target.id=="WidgetRightMenu"||$(n.target).parents("#WidgetRightMenu").size()||$("#WidgetRightMenu").find("ul").each(function(){$(this).fadeOut(0);$(this).removeClass(widgetRightMenu.openCss)})}));widgetRightMenu.$menu.hasClass(widgetRightMenu.openCss)?(widgetRightMenu.$menu.removeClass(widgetRightMenu.openCss),widgetRightMenu.$menu.fadeOut(0)):(widgetRightMenu.$menu.addClass(widgetRightMenu.openCss),widgetRightMenu.$menu.fadeIn(0))}};DdlPageControl={init:function(n){$(n).mCustomScrollbar()}}