var btnPressed="false";function OrgAlert(C,B,A){HideOrgWait();document.getElementById("OrgAlertDialogHeader").innerHTML="Organize";document.getElementById("OrgAlertDialogBody").innerHTML=C;YAHOO.OrgAlert.dialog.Type=B;YAHOO.OrgAlert.dialog.ID=A;YAHOO.OrgAlert.dialog.show();return false}function handleOrgAlertGotoOrg(){YAHOO.OrgAlert.dialog.hide();document.location="/Organize/default.aspx?"+YAHOO.OrgAlert.dialog.Type+"="+YAHOO.OrgAlert.dialog.ID}function handleOrgAlertClose(){YAHOO.OrgAlert.dialog.hide()}function OrgNeedsLogin(){try{HideWorking()}catch(A){}HideOrgWait();YAHOO.NeedsLogin.dialog.show();return false}function handleOrgNeedsLoginGotoLogin(){YAHOO.NeedsLogin.dialog.hide();window.location;document.location="/membership/login.aspx?s="+escape(document.location.pathname)+"?"+escape(document.location.search);return false}function handleOrgNeedsLoginClose(){YAHOO.NeedsLogin.dialog.hide()}function OrgWait(A){document.getElementById("OrgWaitDialogHeader").innerHTML=A;document.getElementById("OrgWaitDialogBody").innerHTML='<img src="/css/default/images/rel_interstitial_loading.gif"/>';YAHOO.OrgWait.dialog.show();return false}function HideOrgWait(){YAHOO.OrgWait.dialog.hide()}function Alert(B,A){document.getElementById("AlertDialogHeader").innerHTML=B;document.getElementById("AlertDialogBody").innerHTML=A;YAHOO.Alert.dialog.show();return false}function handleAlertOk(){YAHOO.Alert.dialog.hide()}YAHOO.namespace("OrgAlert");YAHOO.namespace("Alert");YAHOO.namespace("OrgWait");YAHOO.namespace("NeedsLogin");function initDialogGlobal(){if(!YAHOO.OrgAlert.dialog){var B=document.createElement("DIV");B.id="OrgAlertDialog";B.innerHTML='<div class="hd" id="OrgAlertDialogHeader" ></div><div class="bd" id="OrgAlertDialogBody" ></div>';document.body.appendChild(B);YAHOO.OrgAlert.dialog=new YAHOO.widget.Dialog("OrgAlertDialog",{width:"360px",fixedcenter:true,close:false,draggable:false,zindex:99999999,modal:true,visible:false,constraintoviewport:true,buttons:[{text:"Go To Organize",handler:handleOrgAlertGotoOrg},{text:"Close",handler:handleOrgAlertClose,isDefault:true}]});YAHOO.OrgAlert.dialog.showMaskEvent.unsubscribe();YAHOO.OrgAlert.dialog.hideMaskEvent.unsubscribe();YAHOO.OrgAlert.dialog.render()}if(!YAHOO.Alert.dialog){var A=document.createElement("DIV");A.id="AlertDialog";A.innerHTML='<div class="hd" id="AlertDialogHeader" ></div><div class="bd" id="AlertDialogBody" ></div>';document.body.appendChild(A);YAHOO.Alert.dialog=new YAHOO.widget.Dialog("AlertDialog",{width:"240px",fixedcenter:true,close:false,draggable:false,zindex:99999999,modal:true,visible:false,constraintoviewport:true,buttons:[{text:"Ok",handler:handleAlertOk,isDefault:true}]});YAHOO.Alert.dialog.showMaskEvent.unsubscribe();YAHOO.Alert.dialog.hideMaskEvent.unsubscribe();YAHOO.Alert.dialog.render()}if(!YAHOO.NeedsLogin.dialog){var B=document.createElement("DIV");B.id="OrgNeedLoginDialog";B.innerHTML='<div class="hd" id="OrgNeedLoginHeader" style="font-size:12px">Beckett.com Alert</div><div class="bd" id="OrgNeedLoginBody" style="font-size:12px"><br/><br/>It appears you are not logged in.  Your session may have timed out.<br/><br/>Would you like to relogin now?<br/><br/></div>';document.body.appendChild(B);YAHOO.NeedsLogin.dialog=new YAHOO.widget.Dialog("OrgNeedLoginDialog",{width:"360px",fixedcenter:true,close:false,draggable:false,zindex:99999999,modal:true,visible:false,constraintoviewport:true,buttons:[{text:"Yes, Go To Login",handler:handleOrgNeedsLoginGotoLogin,isDefault:true},{text:"Not Now",handler:handleOrgNeedsLoginClose}]});YAHOO.NeedsLogin.dialog.showMaskEvent.unsubscribe();YAHOO.NeedsLogin.dialog.hideMaskEvent.unsubscribe();YAHOO.NeedsLogin.dialog.render()}if(!YAHOO.OrgWait.dialog){var B=document.createElement("DIV");B.id="OrgWaitDialog";B.innerHTML='<div class="hd" id="OrgWaitDialogHeader"></div><div class="bd" id="OrgWaitDialogBody"></div>';document.body.appendChild(B);YAHOO.OrgWait.dialog=new YAHOO.widget.Dialog("OrgWaitDialog",{width:"360px",fixedcenter:true,close:false,draggable:false,zindex:999999,modal:true,visible:false});YAHOO.OrgWait.dialog.showMaskEvent.unsubscribe();YAHOO.OrgWait.dialog.hideMaskEvent.unsubscribe();YAHOO.OrgWait.dialog.render()}isOrgDialogsInit=true}var isOrgDialogsInit=false,isRequestPending=false;YAHOO.util.Event.onDOMReady(initDialogGlobal);function AddToOrganize(A,B){isRequestPending=true;if(!isOrgDialogsInit){window.setTimeout("AddToOrganize('"+A+"','"+B+"');",100);return false}OrgWait("Adding to Organize: Please Wait...");ajax.get("/Organize/Ajax/AddToOrganize.aspx?"+A+"="+B,ExecIt);return false}function ExecIt(r){isRequestPending=false;try{eval(r)}catch(e){HideOrgWait();Alert("An Error Occured","We're sorry, we had trouble processing your request. Please press F5 to try again. ")}}function formatCurrency(A){A=A.toString().replace(/\$|\,/g,"");if(isNaN(A)){A="0"}sign=(A==(A=Math.abs(A)));A=Math.floor(A*100+0.50000000001);cents=A%100;A=Math.floor(A/100).toString();if(cents<10){cents="0"+cents}for(var B=0;B<Math.floor((A.length-(1+B))/3);B++){A=A.substring(0,A.length-(4*B+3))+","+A.substring(A.length-(4*B+3))}return(((sign)?"":"-")+"$"+A+"."+cents)}function AddToCheckList(A,B){isRequestPending=true;if(!isOrgDialogsInit){window.setTimeout("AddToCheckList('"+A+"','"+B+"');",100);return false}OrgWait("Preparint the Pricing List: Please Wait...");ajax.get("/Organize/Ajax/AddToCheckList.aspx?"+A+"="+B,ExecIt);return false}function StopCachingMyAjaxIE(){var A=new Date();return escape(A.getDate()+A.getHours()+A.getMinutes()+A.getMilliseconds())}function SetCalculatedTotal(A){var B=document.getElementById("hdtotal");B.value=formatCurrency(A)}function CalculateValue1(D,E,B){var A="";if(btnPressed=="false"){btnPressed="true";A+="&TWO=1";A+="&THO=1";var C=document.getElementById(E);C.className="labelBorderNormal";C.innerHTML='<img src="/css/default/images/calculating.gif" />';ajax.get("/Organize/ajax/CalculateStats.aspx?L="+D+"&"+A+"&zz="+StopCachingMyAjaxIE(),ExecIt);setTimeout("SetLabel('"+E+"')",15000)}}function SetLabel(A){document.getElementById(A).innerHTML=document.getElementById("hdtotal").value;document.getElementById(A).className="LabelBorderNormal";btnPressed="false"};