function nobackinreg1(D,C,A){var B=confirm("If you choose to go back, your registration will not complete successfully.  Please hit cancel now to continue.");if(B==true){window.open="/loader.jsp?page=regfinish.jsp&id="+D+"&pword="+C+"&invite="+A+"&tab=1"}}function nobackinreg2remove(){window.onbeforeunload=null}function hashpassword(){var B=ge("password").value;var A=ge("cpassword").value;if(B!=A){alert("Your passwords did not match!");return false}if(B.length<6){alert("Your password must be at least 6 characters long!");return false}ge("hashedpass").value=hex_md5(B);ge("password").value="";ge("cpassword").value="";return true}function hashpasswordEdit(){var B=ge("password").value;var A=ge("curpassword").value;ge("hashedpass").value=hex_md5(B);ge("curpasswordhash").value=hex_md5(A);ge("curpassword").value=""}function findPos(A){var B=curtop=0;if(A.offsetParent){B=A.offsetLeft;curtop=A.offsetTop;while(A=A.offsetParent){B+=A.offsetLeft;curtop+=A.offsetTop}}return[B,curtop]}function popupChangeAvatar(A){ajax=loadAjax("/changeAvatar.jsp?mid="+A+"&type=1");ajax.onreadystatechange=function(){if(ajax.readyState==4){var B=createDivIfNExists("newpopup");B.innerHTML=ajax.responseText;B.style.display="";showpopup(B);if(ge("loading")!=null){ge("loading").style.visibility="hidden"}}};ajax.send(null)}function playVideo(){try{var E=ge("mt");if(!E){return }var B=E.value;var A=(location.host.indexOf("rogers.com")==-1)?"#$140ab987aaf6f85d8a1":"#$7a8c927a2ce2d34eb14";var D=(location.host.indexOf("rogers.com")==-1)?"/videoPlayer/flowplayer.commercial-3.0.7.swf":"/videoPlayer/flowplayer.commercial-3.1.3.swf";if(B=="2"){$f("playerContainer",D,{key:A,logo:{opacity:0,displayTime:1},clip:{autoPlay:true,autoBuffering:true}})}else{if(B=="4"){$f("playerContainer",D,{key:A,logo:{opacity:0,displayTime:1},clip:{autoPlay:true,autoBuffering:true}})}}}catch(C){alert("There was an error trying to play the file")}}function loadrelationships(B,A,C){loadQuickFade("/fetchrelationships.jsp?streamType="+B+"&uid="+A,C)}function setActive(B,A,C){var E=ge(B);var D;resetActiveTabs(E.parentNode.id,A);if(B.className=A){E.className=C}if(B!="profileFeedsTab"){if(ge("feedHelper")!=null){ge("feedHelper").style.display="none"}}}function resetActiveTabs(A,B){var D=ge(A);var C=D.firstChild;while(C!=null&&C.className!="clearMe"){if(C.nodeType==1){ge(C.id).className=B}C=C.nextSibling}}function spt(A){var D;var E;if(ge("vid")==null||ge("uid")==null){}else{}if(A==5){E=window.location.toString();if(E.indexOf("/loader.jsp")>0){var C=E.indexOf("&pt=");if(C==-1){E=E+"&pt=5"}else{E=E.substring(0,E.indexOf("&pt="))+"&pt=5"}}else{var B=ge("uid").value;E="/loader.jsp?page=profile.jsp&id="+B+"&pt=5"}}D.onreadystatechange=function(){if(D.readyState==4){if(A==5){window.location=E;ge("feedHelper").style.display="none"}return }};ajaxsend(D)}function verifyinputs(B){var A=B.interests.value;if(A==" "){B.interests.value=""}A=B.affiliations.value;if(A==" "){B.affiliations.value=""}A=B.credentials.value;if(A==" "){B.credentials.value=""}A=B.biases.value;if(A==" "){B.biases.value=""}A=B.vices.value;if(A==" "){B.vices.value=""}}function setEditProfile(C){var F="updateProfileContainer";var D="updateDetailsContainer";var B="preferencesContainer";var E="updateProfileHelp";var A="updateDetailsHelp";switch(C){case (1):ge(D).style.display="block";ge(A).style.display="block";ge(F).style.display="none";ge(E).style.display="none";ge(B).style.display="none";break;case (2):ge(B).style.display="block";ge(D).style.display="none";ge(A).style.display="none";ge(F).style.display="none";ge(E).style.display="none";break;case (0):default:ge(F).style.display="block";ge(E).style.display="block";ge(D).style.display="none";ge(A).style.display="none";ge(B).style.display="none";break}}function alertToggle(){var A=document.edit.elements.length;if(ge("alert_yes").checked){if(ge("etMsg")){ge("etMsg").innerHTML="Please select how you want your alert be sent through email"}if(ge("eType")){ge("eType").style.display=""}}else{if(ge("alert_no").checked){if(ge("etMsg")){ge("etMsg").innerHTML="&nbsp;"}if(ge("eType")){ge("eType").style.display="none"}if(ge("aFilters")){ge("aFilters").style.display="none"}for(i=0;i<A;i++){name=document.edit.elements[i].name;if(name.indexOf("alert_")>-1&&name!="alert_yesno"){document.edit.elements[i].checked=false}}}}}function alertCBToggle(C){if(ge("etMsg")){ge("etMsg").innerHTML="&nbsp;"}if(ge("aFilters")){ge("aFilters").style.display=""}var B=document.edit.elements.length;for(i=0;i<B;i++){var A=document.edit.elements[i].name;if(A.indexOf("alert_")>-1&&A!="alert_yesno"&&A!="alert_emailType"){if((document.edit.elements[i].name=="alert_bobbreply"||document.edit.elements[i].name=="alert_news")&&C.id=="alert_digest"){document.edit.elements[i].checked=false;document.edit.elements[i].disabled="disabled"}else{document.edit.elements[i].disabled="";document.edit.elements[i].checked=true}}}}function popupYouTubeHelp(){var A;A=window.open("/images/ytHelp.jpg","name","height=459,width=700");if(window.focus){A.focus()}}function editProfileFields(A){ge(A).style.display="inline"}function uneditProfileFields(A){ge(A).style.display="none"}function hideProfileProgress(){url="/createCookie.jsp?n=sbpc";url=url+ge("uid").value;var A=loadAjax(url);A.onreadystatechange=function(){if(A.readyState==4){window.location.reload()}};ajaxsend(A)}function showProfileRelationships(D,C,B){var A="/fetchrelationships.jsp?streamType="+B+"&uid="+C;ajaxSimple(A,D)};