function select_fix_ie(el){var isOpen=$(el).data("isOpen");if(isOpen!=null){return;}$(el).mousedown(function(){var isOpen=$(this).data("isOpen");if(isOpen){return;}$(this).data("isOpen",true);var clone_selection=$(this).data("clone");if(clone_selection==null){clone_selection=$("<div></div>").get(0);$(clone_selection).insertAfter(this);$(clone_selection).css("display","block");$(clone_selection).css("width",$(this).css("width"));$(clone_selection).css("height","20px");$(clone_selection).css("position",$(this).css("position"));$(clone_selection).css("z-index",$(this).css("z-index"));$(this).data("clone",clone_selection);}$(clone_selection).show();$(clone_selection).css("visibility","hidden");var position=$(this).position();var oldWidth=$(this).width();$(this).css("width","auto");var newWidth=$(this).width();if(oldWidth>=newWidth){$(this).css("width",$(clone_selection).css("width"));}$(this).css("top",position.top+"px");$(this).css("left",position.left+"px");$(this).css("position","absolute");$(this).css("z-index","1000");}).blur(function(){select_fix_ie_close(this);}).change(function(){select_fix_ie_close(this);});$(el).data("isOpen",false);}function select_fix_ie_close(el){var isOpen=$(el).data("isOpen");if(isOpen){var clone_selection=$(el).data("clone");$(clone_selection).css("display","none");$(el).css("position","");$(el).css("width",$(clone_selection).css("width"));$(el).css("top","");$(el).css("left","");$(el).css("z-index",$(clone_selection).css("z-index"));$(el).data("isOpen",false);}}var sliderHeight="";if(BrowserDetect.browser=="Explorer"){sliderHeight="240";}else{sliderHeight="200";}function setProductSlider(){return 0;}function openProductSlider(){var open_height=$(".inner-product-desc").attr("box_h")+"px";$(".inner-product-desc").animate({height:open_height},{duration:"slow"});$(".productDetailContentMore").html('<a href="javascript:undefined;">Close</a>');$(".productDetailContentMore a").click(function(){closeProductSlider();});}var timer;function closeProductSlider(){if(navigator.userAgent.indexOf("Safari")>-1){$(".inner-product-desc").css("overflow","hidden");timer=setInterval("changeHeight()",10);}else{$(".inner-product-desc").animate({height:sliderHeight},{duration:"slow"});}$(".productDetailContentMore").html('<a href="javascript:undefined;">Read More</a>');$(".productDetailContentMore a").click(function(){openProductSlider();});}function changeHeight(){var addHeight=$(".inner-product-desc").height()-5;if(addHeight<200){clearInterval(timer);}$(".inner-product-desc").css("height",addHeight+"px");}var sliderHeight4Search="130";if(jQuery.browser.msie){sliderHeight4Search="135";}var facetContentClass=".search_facet_content";var readMoreClass=".search_facet_read_more_class";var facetContentBase="#facet_";var readMoreLinkBase="#link_";var readMoreBase="#more_";function setProductSlider4Search(){if($(facetContentClass)){var theHeight=0;$(facetContentClass).each(function(){var current=$(this);current.attr("box_h",current.height());theHeight=current.height();currentId=current.attr("id");id=currentId.split("_")[1];if((theHeight-10)>sliderHeight4Search){current.css("height",sliderHeight4Search+"px");current.css("overflow","hidden");$(readMoreBase+id).html('<a href="javascript:undefined;" id=link_'+id+' onclick="javascript:openSearchFacetSlider('+id+')">More...</a>');}else{current.css("height","auto");}});}}function openSearchFacetSlider(id){var open_height=$(facetContentBase+id).attr("box_h")+"px";$(facetContentBase+id).animate({height:open_height},{duration:"slow"});$(readMoreBase+id).html('<a href="javascript:undefined;" id=link_'+id+' onclick="javascript:closeSearchFacetSlider('+id+')">Less...</a>');}var timer;function closeSearchFacetSlider(id){if(navigator.userAgent.indexOf("Safari")>-1){$(facetContentBase+id).css("overflow","hidden");timer=setInterval("changeHeight4Search("+id+")",10);}else{$(facetContentBase+id).animate({height:sliderHeight4Search},{duration:"slow"});}$(readMoreBase+id).html('<a href="javascript:undefined;" id=link_'+id+' onclick="javascript:openSearchFacetSlider('+id+')">More...</a>');}function changeHeight4Search(id){var addHeight=$(facetContentBase+id).height()-5;if(addHeight<130){clearInterval(timer);}$(facetContentBase+id).css("height",addHeight+"px");}jQuery.fn.extend({storeRealData:function(){var real=this.val();this.data("real",real);},getRealData:function(){return this.data("real");},clearData:function(){this.data("real","");},displayMock:function(){this.val("XXXX");},displayReal:function(){this.val(this.getRealData());},initialize:function(className){if(!this.val()==""){this.storeRealData();this.displayMock();this.bindClickToDispalyReal(className);}},bindClickToDispalyReal:function(className){if(!this.val()==""){this.bind("click",function(e){$("."+className).each(function(){$(this).displayReal();$(this).unbind("click");});});}else{this.bind("click",function(e){$(this).displayReal();$(this).unbind("click");});}},saveCreditCardValue:function(){$("#realCreditCardNumber").val($("#inputMock1").getRealData()+$("#inputMock2").getRealData()+$("#inputMock3").getRealData()+$("#inputMock4").val());},initAll:function(className){$("."+className).each(function(){$(this).initialize(className);});$(this).change(function(){$(this).storeRealData();$(this).saveCreditCardValue();});$("#inputMock4").change(function(){$("#inputMock4").saveCreditCardValue();});}});function populateState(stateId,data){var state=$("#"+stateId)[0];state.options.length=0;var options=data.split("|");var result="";for(var i=0;i<options.length;i++){var temp=($.trim(options[i])).split("=");state.options[i]=(new Option(temp[1],temp[0]));}}function inputState(inputObj,stateId){var statObj=document.getElementById(stateId);changeSelectValue(statObj,inputObj);}function changeSelectValue(statObj,inputObj){statObj.options.length=0;statObj.options[0]=new Option(inputObj.value,inputObj.value);}function getStatesAndClass(countryCode,stateId,inputClass){$.ajax({type:"Get",async:false,url:contextPath+"/global/util/stateRestriction.jsp",data:"countryCode="+countryCode,dataType:"text",success:function(data){var stateInputId=stateId+"_state_Input";var style="width:120px;";try{style=$("#"+stateId).attr("style");}catch(e){}if($.trim(data)=="NoState"){var sel=document.getElementById(stateId);var parent=sel.parentNode;var stateInput=document.getElementById(stateInputId);if(stateInput!=null){sel.style.display="none";stateInput.style.display="";inputState(stateInput,stateId);}else{var newInput=document.createElement("input");newInput.setAttribute("type","text");newInput.setAttribute("id",stateInputId);newInput.setAttribute("style",style);newInput.style.width=sel.style.width;newInput.maxLength=40;newInput.className=inputClass;var onclikFunction="inputState(this,'"+stateId+"')";newInput.onkeyup=function(){inputState(newInput,stateId);};parent.appendChild(newInput);sel.style.display="none";}return;}else{var stateInput=document.getElementById(stateInputId);if(stateInput!=null){stateInput.style.display="none";}var sel=document.getElementById(stateId);if(sel!=null){sel.style.display="";}}try{populateState(stateId,data);}catch(e){}},error:function(){}});}function getStates(countryCode,stateId){$.ajax({type:"Get",async:false,url:contextPath+"/global/util/stateRestriction.jsp",data:"countryCode="+countryCode,dataType:"text",success:function(data){var stateInputId=stateId+"_state_Input";var style="width:120px;";try{style=$("#"+stateId).attr("style");}catch(e){}if($.trim(data)=="NoState"){var sel=document.getElementById(stateId);var parent=sel.parentNode;var stateInput=document.getElementById(stateInputId);if(stateInput!=null){sel.style.display="none";stateInput.style.display="";inputState(stateInput,stateId);}else{var newInput=document.createElement("input");newInput.setAttribute("type","text");newInput.setAttribute("id",stateInputId);newInput.setAttribute("style",style);newInput.style.width=sel.style.width;newInput.maxLength=40;var onclikFunction="inputState(this,'"+stateId+"')";newInput.onkeyup=function(){inputState(newInput,stateId);};parent.appendChild(newInput);sel.style.display="none";}return;}else{var stateInput=document.getElementById(stateInputId);if(stateInput!=null){stateInput.style.display="none";}var sel=document.getElementById(stateId);if(sel!=null){sel.style.display="";}}try{populateState(stateId,data);}catch(e){}},error:function(){}});}function onCountryChange(inAccountPage){var country=$("#country").val();if($("#areaCode").data("unSetup")==null){$("#areaCode").blur(function(){if($("#country").val()=="US"){var areaCode=$("#areaCode").val();if(areaCode.length>3){$("#areaCode").val(areaCode.substr(0,3));}}});$("#areaCode").data("unSetup",false);}if($("#phoneNumber").data("unSetup")==null){$("#phoneNumber").blur(function(){if($("#country").val()=="US"){var phoneNumber=$("#phoneNumber").val();if(phoneNumber.length>7){$("#phoneNumber").val(phoneNumber.substr(0,7));}}}).change(function(){if($("#country").val()=="US"){var phoneNumber=$("#phoneNumber").val();if(phoneNumber.length>7){$("#phoneNumber").val(phoneNumber.substr(0,7));}}});$("#phoneNumber").data("unSetup",false);}if(country=="US"){$("#countryCode").hide();$("#state").show();$("#province").hide();$("#provinceLabel").hide();$("#stateLabel").show();$("#countryCode").val("");$("#areaCode").attr("maxLength","3");$("#phoneNumber").attr("maxLength","7");var areaCode=$("#areaCode").val();var phoneNumber=$("#phoneNumber").val();if(areaCode.length>3){$("#areaCode").val(areaCode.substr(0,3));}if(phoneNumber.length>7){$("#phoneNumber").val(phoneNumber.substr(0,7));}$("#popboxDiv").show();$("#phoneNumberLabel").html("Phone Number:");}else{$("#countryCode").show();$("#province").show();$("#state").hide();$("#provinceLabel").show();$("#stateLabel").hide();$("#areaCode").attr("maxLength","5");$("#phoneNumber").attr("maxLength","10");$("#popboxDiv").hide();if(inAccountPage==true){$("#phoneNumberLabel").html('Phone Number:<span class="orange">*</span>');}else{$("#phoneNumberLabel").html("Phone Number:*");}}}var currentForm="";function hidSelection(){if(BrowserDetect.browser=="Explorer"){$("select").each(function(){$(this).hide();});$("select",document.getElementById(currentForm)).each(function(){$(this).show();});onCountryChange();}}function popUpRemoteVarifyMessage(buttonId){$("#"+buttonId).removeAttr("disabled");if($("#onlyRemoteVarifyFail").val()=="true"){popupModalWindowAC(contextPath+"/popup/confirmInvalidateAddress.jsp","popup_ac_window",{buttonId:buttonId,type:"normal"});}}function popUpRemoteVarifyMessageBill(buttonId){$("#"+buttonId).removeAttr("disabled");if($("#onlyRemoteVarifyFailBill").val()=="true"){popupModalWindowAC(contextPath+"/popup/confirmInvalidateAddress.jsp","popup_ac_window",{buttonId:buttonId,type:"bill"});}}function popUpRemoteVarifyMessageShip(buttonId){$("#"+buttonId).removeAttr("disabled");if($("#onlyRemoteVarifyFailShip").val()=="true"){popupModalWindowAC(contextPath+"/popup/confirmInvalidateAddress.jsp","popup_ac_window",{buttonId:buttonId,type:"ship"});}}function popUpRemoteVarifyMessage_confirm(buttonId,type){if(type=="normal"){closeModalWindowAC("popup_ac_window");$("#needRemoteVerify").val("false");$("#"+buttonId).click();}else{if(type=="bill"){closeModalWindowAC("popup_ac_window");$("#needRemoteVerifyBill").val("false");$("#"+buttonId).click();}else{if(type=="ship"){closeModalWindowAC("popup_ac_window");$("#needRemoteVerifyShip").val("false");postCheckoutForm("shippingForm",null,"shippingFormButton");}}}}function popupModalWindowAC(url,popId,param){var wscrollLeft=$(window).scrollLeft();var wscrollTop=$(window).scrollTop();var popwin_left=$(window).width()/2-200;popwin_top=$(window).height()/2-100;popwin_left=popwin_left+wscrollLeft;popwin_top=popwin_top+wscrollTop;popupModalWindowACOpen(url,popId,popwin_top+"px",popwin_left+"px",param);}function popupModalWindowACOpen(url,popId,popwin_top,popwin_left,param){if(BrowserDetect.browser=="Explorer"){$("select").each(function(){$(this).hide();});}var modalElement=document.getElementById("popup_ac_modal");if(modalElement==null){var body=document.getElementsByTagName("body")[0];modalElement=document.createElement("div");modalElement.id="popup_ac_modal";body.appendChild(modalElement);}modalElement.style.display="block";modalElement.style.height=$(document).height()+"px";var otherModalElement=$("#popup_modal");if(otherModalElement.css("display")=="block"){otherModalElement.css("-moz-opacity","0.2");otherModalElement.css("opacity","0.2");$(modalElement).css("-moz-opacity","0.2");$(modalElement).css("opacity","0.2");}var popElement=document.getElementById(popId);popElement.style.display="block";popElement.style.top=popwin_top;popElement.style.left=popwin_left;$("div#"+popId).load(url,param);}function closeModalWindowAC(popId){var modalElement=document.getElementById("popup_ac_modal");modalElement.style.display="none";var popElement=document.getElementById(popId);popElement.style.display="none";popElement.innerHTML="";if(BrowserDetect.browser=="Explorer"){$("select").each(function(){$(this).show();});}var otherModalElement=$("#popup_modal");if(otherModalElement!=null){otherModalElement.css("-moz-opacity","0.4");otherModalElement.css("opacity","0.4");hidSelection();}$(modalElement).css("-moz-opacity","0.4");$(modalElement).css("opacity","0.4");onCountryChange();}var popID="page_blackout";var topY=0;function showQL(divID,e,objhref){$("#div"+divID).show();}function hideQL(divID,e,objhref){$("#div"+divID).hide();}function toggleopac(bOn,objHREF){if(bOn){$(objHREF).attr("style","filter:alpha(opacity=92);-moz-opacity:.92;opacity:.92;");}else{$(objHREF).attr("style","filter:alpha(opacity=84);-moz-opacity:.84;opacity:.84;");}}function togglePopup(richCartObject,responseData){var data=richCartObject.requestFormDate;var productId=data["/franklincovey/order/purchase/FCCartModifierFormHandler.ProductId"];var skuId=data["/franklincovey/order/purchase/FCCartModifierFormHandler.catalogRefIds"];var qty=data["/franklincovey/order/purchase/FCCartModifierFormHandler.quantity"];if(productId==null||skuId==null){richCartObject.handleResponse(responseData);}if(productId.length==0||skuId.length==0){richCartObject.handleResponse(responseData);}var container=$("#page_blackout");var url=contextPath+"/checkout/popupCheckOut.jsp";container.load(url,{id:productId,skuId:skuId,qty:qty},function(){toggleDiv(richCartObject);richCartObject.handleResponse(responseData);});container.ajaxError(function(event,request,settings){alert(settings.url);richCartObject.handleResponse(responseData);});}function toggleBYOBPopup(richCartObject,responseData){var returnValues=$.trim(responseData).split("||");var success=true;var errorsMsg="";if(returnValues!=null&&returnValues.length>1){var errorsFound=$.trim(returnValues[0]);errorsMsg=$.trim(returnValues[1]);if(errorsFound=="true"){success=false;}}var container=$("#page_blackout");if(success){var data=richCartObject.requestFormDate;var productId=data["/franklincovey/order/purchase/FCCartModifierFormHandler.ProductId"];var skuId=data["/franklincovey/order/purchase/FCCartModifierFormHandler.catalogRefIds"];var qty=data["/franklincovey/order/purchase/FCCartModifierFormHandler.quantity"];var bundleType=data["/franklincovey/order/purchase/FCCartModifierFormHandler.bundleType"];if(productId==null||skuId==null){richCartObject.handleResponse(responseData);}if(productId.length==0||skuId.length==0){richCartObject.handleResponse(responseData);}var url=contextPath+"/checkout/popupBYOB.jsp";container.load(url,{id:productId,skuId:skuId,qty:qty,bundleType:bundleType},function(){toggleDiv(richCartObject);richCartObject.handleResponse(responseData);});container.ajaxError(function(event,request,settings){alert(settings.url);richCartObject.handleResponse(responseData);});}else{$("#bundleError").html("<b>Uh oh</b>"+errorsMsg+'<p style="float:right"><a href="javascript:toggleOffDivWithBlackout(\'bundleError\');">Close</a>');$("#bundleError").show();toggleDivWithBlackout("bundleError",true);}}function toggleDiv(richCart){var toppos=richCart.mouseY-350;var currentTop=0;if(jQuery.browser.msie){currentTop=document.documentElement.scrollTop;}else{currentTop=window.pageYOffset;}currentTop+=($(window).height()/10);if(currentTop<153){currentTop=153;if($.browser.msie&&($.browser.version=="7.0")){currentTop=152;}if($.browser.msie&&($.browser.version=="6.0")){currentTop=156;}}if(toppos<currentTop){toppos=currentTop;}if(topY==0){topY=toppos;}if(topY>0){toppos=topY;}var tempDIV=$("#"+popID);var windowSize=getWindowSize();var scrollOffset=getScrollOffset();var x=(windowSize[0]/2+scrollOffset[0])-(520/2);if($.browser.msie){x+=9;}var tempDIV=document.getElementById(popID);tempDIV.setAttribute("style","position:absolute;left:"+x+"px;top:"+toppos+"px;z-index:2000;background-color:transparent;filter: alpha(opacity = 0);opacity:0;");tempDIV.style.cssText="position:absolute;left:"+x+"px;top:"+toppos+"px;z-index:2000;background-color:transparent;filter: alpha(opacity = 0);opacity:0;";resetOpacity();if(BrowserDetect.browser=="Explorer"){$("select").each(function(){if($(this).attr("id")!="relatedProductDetailSizeSelect"&&$(this).attr("id")!="relatedDateSelect"){$(this).css("visibility","hidden");}});}$("#checkOutBlockScreen").animate({opacity:0.6},"slow");$("#"+popID).animate({opacity:1},"slow",function(){setTimeout(function(){var h=$("#is_html_addToCartFirstWarpper").attr("offsetHeight");$("#relatedProductDiv").css("top",h+"px");},1000);setTimeout("$('#relatedProductDiv').slideDown('slow');",1000);});}function getWindowSize(){var myWidth=0,myHeight=0;if(typeof(window.innerWidth)=="number"){myWidth=window.innerWidth;myHeight=window.innerHeight;}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight;}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth=document.body.clientWidth;myHeight=document.body.clientHeight;}}}return[myWidth,myHeight];}function getScrollOffset(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=="number"){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}}}return[scrOfX,scrOfY];}function quickHidePopup(){topY=0;}function hidePopup(){topY=0;$("#"+popID).fadeOut(500,function(){$("#"+popID).hide();});$("#"+popID+"> div").remove();$("#checkOutBlockScreen").fadeOut(1000,function(){$("#checkOutBlockScreen").hide();});if(BrowserDetect.browser=="Explorer"){$("select").each(function(){$(this).css("visibility","visible");});}}function resetOpacity(){var bodyHeight=getPageHeight();var bodyWidth=getPageWidth();tempDIV=document.getElementById("checkOutBlockScreen");tempDIV.setAttribute("style","position: absolute;left: 0px;top: 0px;overflow:hidden;width:"+bodyWidth+"px;height: "+bodyHeight+"px;z-index:1990;display: block;background-color: #333;filter: alpha(opacity =0);opacity:0;");tempDIV.style.cssText="position: absolute;left: 0px;top: 0px;overflow:hidden;width:"+bodyWidth+"px;height: "+bodyHeight+"px;z-index:1990;display: block;background-color: #333;filter: alpha(opacity =0);opacity:0";}function prepareCheckOutData(productId,skuId,qty){alert(productId+","+skuId+","+qty);if(productId==null||skuId==null){return;}if(productId.length==0||skuId.length==0){return;}var container=$("#page_blackout");var url=contextPath+"/checkout/popupCheckOut.jsp";container.load(url,{id:productId,skuId:skuId,qty:qty});container.ajaxError(function(event,request,settings){alert(settings.url);});}function prepareBYOBData(productId,skuId,qty,bundleType){if(productId==null||skuId==null){return;}if(productId.length==0||skuId.length==0){return;}var container=$("#page_blackout");var url=contextPath+"/checkout/popupBYOB.jsp";container.load(url,{id:productId,skuId:skuId,qty:qty,bundleType:bundleType});container.ajaxError(function(event,request,settings){alert(settings.url);});}function handleBYOResponse(richCartObject,responseData){$("#"+popID).animate({opacity:1},"slow",function(){richCartObject.handleResponse(responseData);var h=$("#is_html_addToCartFirstWarpper").attr("offsetHeight");$("#relatedProductDiv").css("top",h+"px");$("#relatedProductDiv").slideDown("slow");});}function getPageHeight(){if(window.innerHeight&&window.scrollMaxY){pageHeight=window.innerHeight+window.scrollMaxY;}else{if(document.body&&(document.body.scrollHeight>document.body.offsetHeight)){pageHeight=document.body.scrollHeight;}else{pageHeight=document.body.offsetHeight+document.body.offsetTop;}}return pageHeight;}function getPageWidth(){if(window.innerWidth&&window.scrollMaxX){pageWidth=window.innerWidth+window.scrollMaxX;}else{if(document.body&&(document.body.scrollWidth>document.body.offsetWidth)){pageWidth=document.body.scrollWidth;}else{pageWidth=document.body.offsetWidth+document.body.offsetLeft;}}return pageWidth;}function handleWishlistEdit(pUrl,pWindow,pParent,pParams){var left=Math.round(((getPageWidth()/2)-236));var whichWrapperObj=document.getElementById(pParent);var msgCoords=getObjCoords(whichWrapperObj);var newTopCoord=msgCoords.y;popupModalWindow(pUrl,pWindow,newTopCoord+"px",left+"px",pParams);}function handleWishlistResponse(richCartObject,responseData,pFormId){var data=richCartObject.getDatabyForm(pFormId);var mouseX=richCartObject.mouseX;var mouseY=richCartObject.mouseY;var productId=data.productId;var skuId=data.catalogRefIds;var qty=data.quantity;prepareCheckOutData(productId,skuId,qty);var toppos=mouseY-250;if(toppos<window.pageYOffset){toppos=window.pageYOffset+30;}var leftpos=getPageWidth();if(leftpos>0){leftpos=leftpos/2-250;}else{leftpos=405;}var tempDIV=$("#"+popID);var tempDIV=document.getElementById(popID);tempDIV.setAttribute("style","position:absolute;left:"+leftpos+"px;top:"+toppos+"px;z-index:2000;background-color:transparent;filter: alpha(opacity = 0);opacity:0;");tempDIV.style.cssText="position:absolute;left:"+leftpos+"px;top:"+toppos+"px;z-index:2000;background-color:transparent;filter: alpha(opacity = 0);opacity:0;";resetOpacity();if($.browser.msie&&($.browser.version=="6.0")){$("#productDetailSizeSelect").css("display","none");}$("#checkOutBlockScreen").animate({opacity:0.8},"slow");$("#"+popID).animate({opacity:1},"slow",function(){richCartObject.handleResponse(responseData);var h=$("#is_html_addToCartFirstWarpper").attr("offsetHeight");$("#relatedProductDiv").css("top",h+"px");$("#relatedProductDiv").slideDown("slow");});}function handleBYOBResponse(richCartObject,responseData,pFormId){var data=richCartObject.getDatabyForm(pFormId);var mouseX=richCartObject.mouseX;var mouseY=richCartObject.mouseY;var productId=data.productId;var skuId=data.catalogRefIds;var qty=data.quantity;var bundleType=data.bundleType;prepareBYOBData(productId,skuId,qty,bundleType);var toppos=mouseY-250;if(toppos<window.pageYOffset){toppos=window.pageYOffset+30;}var leftpos=getPageWidth();if(leftpos>0){leftpos=leftpos/2-250;}else{leftpos=405;}var tempDIV=$("#"+popID);var tempDIV=document.getElementById(popID);tempDIV.setAttribute("style","position:absolute;left:"+leftpos+"px;top:"+toppos+"px;z-index:2000;background-color:transparent;filter: alpha(opacity = 0);opacity:0;");tempDIV.style.cssText="position:absolute;left:"+leftpos+"px;top:"+toppos+"px;z-index:2000;background-color:transparent;filter: alpha(opacity = 0);opacity:0;";resetOpacity();if($.browser.msie&&($.browser.version=="6.0")){$("#productDetailSizeSelect").css("display","none");}$("#checkOutBlockScreen").animate({opacity:0.8},"slow");$("#"+popID).animate({opacity:1},"slow",function(){richCartObject.handleResponse(responseData);var h=$("#is_html_addToCartFirstWarpper").attr("offsetHeight");$("#relatedProductDiv").css("top",h+"px");$("#relatedProductDiv").slideDown("slow");});}jQuery.fn.center=function(){this.css("position","absolute");var top=($(window).height()-this.outerHeight())/2+$(window).scrollTop();var left=($(window).width()-this.outerWidth())/2+$(window).scrollLeft();if(top<0){top=0;}if(left<0){left=0;}this.css("top",top+"px");this.css("left",left+"px");return this;};function toggleDivWithBlackout(pPopID,pDynamicPos){var tempDIV=document.getElementById(pPopID);tempDIV.setAttribute("style","filter: alpha(opacity = 0);opacity:0;display:block");tempDIV.style.cssText="filter: alpha(opacity = 0);opacity:0;display:block";if(pDynamicPos){$(tempDIV).center();}resetOpacity();$("#checkOutBlockScreen").animate({opacity:0.6},"slow");$("#"+pPopID).animate({opacity:1},"slow",function(){});}function toggleOffDivWithBlackout(pPopID){var tempDIV=document.getElementById(pPopID);$("#checkOutBlockScreen").animate({opacity:0},"slow",function(){$("#checkOutBlockScreen").hide();});$("#"+pPopID).animate({opacity:0},"slow",function(){$("#"+pPopID).hide();});}richCart={id:null,url:null,isAddOpenCart:false,isPageFresh:true,isOpened:false,maskDivId:null,itemCountClass:null,formId:null,mouseX:null,mouseY:null,requestFormDate:null,postForm:function(formId,e){if(!formId){return;}this.mouseX=this.checkOutMouseX(e);this.mouseY=this.checkOutMouseY(e);this.formId=formId,this.isPageFresh=false;this.isAddOpenCart=false;this.ajaxPostForm(formId);},postWishlistForm:function(formId,e){if(!formId){return;}if(!this.mouseX){this.mouseX=this.checkOutMouseX(e);}if(!this.mouseY){this.mouseY=this.checkOutMouseY(e);}this.formId=formId,this.isPageFresh=false;this.isAddOpenCart=false;this.wishlistAjaxPostForm(formId);},postBYOBForm:function(formId,e){if(!formId){return;}if(!this.mouseX){this.mouseX=this.checkOutMouseX(e);}if(!this.mouseY){this.mouseY=this.checkOutMouseY(e);}this.formId=formId,this.isPageFresh=false;this.isAddOpenCart=false;this.byobAjaxPostForm(formId);},postFormSync:function(formId){if(!formId){return;}this.isPageFresh=false;this.isAddOpenCart=true;this.ajaxPostFormSync(formId);},checkOutMouseX:function(evt){if(evt.pageX){return evt.pageX;}else{if(evt.clientX){return evt.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);}else{return null;}}},checkOutMouseY:function(evt){if(evt.pageY){return evt.pageY;}else{if(evt.clientY){return evt.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);}else{return null;}}},ajaxPostForm:function(formId){this.requestFormDate=this.getDatabyForm(formId);var bindParam={type:"POST",url:this.url,data:this.requestFormDate,success:function(data){togglePopup(richCart,data);},error:function(XMLHttpRequest,textStatus,errorThrown){alert("error:"+textStatus);}};if(!formId){bindParam.data=null;bindParam.success=function(data){richCart.handleResponse(data,true);};}var quantity=$("#prodcutDetailSkuQuantity").val();if(this.isNumber(quantity)){$.ajax(bindParam);}else{alert("You entered an invalid value for the field 'quantity' which expects a number.");}},isNumber:function(obj){if(/^\d+$/.test(obj)){return true;}else{return false;}},ajaxPostFormSync:function(formId){var bindParam={async:false,type:"POST",url:this.url,data:this.getDatabyForm(formId),success:function(data){richCart.handleResponseSync(data);},error:function(XMLHttpRequest,textStatus,errorThrown){alert("error:"+textStatus);}};if(!formId){bindParam.data=null;bindParam.success=function(data){richCart.handleResponse(data,true);};}$.ajax(bindParam);},getDatabyForm:function(formId){var data={};try{$("#"+formId).find("input,select,textarea").each(function(){if(this.name){data[this.name]=$(this).val();}});}catch(e){alert("err"+e);}return data;},getDatabyForm2:function(formId){var data={};try{$("#"+formId).find("input,select,textarea").each(function(){var tempName=this.id;if(null==tempName||tempName==""){tempName=this.name;}tempName=tempName.replace(/\//g,"_");tempName=tempName.replace(/\./g,"_");if(tempName){data[tempName]=$(this).val();}});}catch(e){alert("err"+e);}return data;},getProductDatabyForm:function(formId){var data={};try{$("#"+formId).find("input,select,textarea").each(function(){if(this.name=="/franklincovey/order/purchase/FCCartModifierFormHandler.catalogRefIds"||this.name=="/franklincovey/order/purchase/FCCartModifierFormHandler.ProductId"||this.name=="/franklincovey/order/purchase/FCCartModifierFormHandler.quantity"){data[this.name]=$(this).val();}});}catch(e){alert("err"+e);}return data;},handleResponse:function(data){$("#"+this.id).html(data);$("#checkOut").show();},handleResponseSync:function(data,firstHover){$("#"+this.id).html(data);if(!firstHover){if(this.itemCountClass){if($("#itemCount")){if($("#itemCount").val()==undefined){$("."+this.itemCountClass).html("<span>0 Item = 0.00</span>");}else{$("."+this.itemCountClass).html("<span>"+$("#itemCount").val()+" Item = "+$("#subTotal").val()+"</span>");}}}}},showCart:function(){if(this.id){if(this.isOpened!=true){if(this.isPageFresh==false){this.fixIeCover.setMaskDiv($("#"+this.id).width(),$("#"+this.id).height());this.fixIeCover.showMaskDiv();$("#"+this.id).show(300,function(){richCart.isOpened=true;});}else{if(this.isPageFresh==true){this.ajaxPostForm();this.isPageFresh=false;}}}}},closeCart:function(){if(this.id){if(this.isOpened==true){if(this.isAddOpenCart==false){$("#"+this.id).hide(500,function(){richCart.isOpened=false;});this.fixIeCover.hideMaskDiv();}}}},forceCloseCart:function(){if(this.id){$("#"+this.id).hide(500,function(){richCart.isOpened=false;});this.isOpened=false;this.isAddOpenCart=false;this.fixIeCover.hideMaskDiv();}},fixIeCover:{isIe:function(){if(jQuery.browser.msie){return true;}return false;},setMaskDiv:function(width,height){if(!this.isIe()&&!richCart.maskDivId){return;}$("#"+richCart.maskDivId).width(width);$("#"+richCart.maskDivId).height(height);},showMaskDiv:function(){if(!this.isIe()&&!richCart.maskDivId){return;}$("#"+richCart.maskDivId).show(300);},hideMaskDiv:function(){if(!this.isIe()&&!richCart.maskDivId){return;}$("#"+richCart.maskDivId).hide(500);}},byoAjaxPostForm:function(formId){var bindParam={async:false,type:"POST",url:this.url,data:this.getDatabyForm(formId),success:function(data){handleBYOResponse(richCart,data);},error:function(XMLHttpRequest,textStatus,errorThrown){alert("error:"+textStatus);}};if(!formId){bindParam.data=null;bindParam.success=function(data){richCart.handleResponse(data,true);};}$.ajax(bindParam);},wishlistAjaxPostForm:function(formId){var bindParam={async:false,type:"POST",url:contextPath+"/cart/includes/franklinCartContents.jsp",data:this.getDatabyForm(formId),success:function(data){handleWishlistResponse(richCart,data,formId);},error:function(XMLHttpRequest,textStatus,errorThrown){alert("error:"+textStatus);}};if(!formId){bindParam.data=null;bindParam.success=function(data){richCart.handleResponse(data,true);};}$.ajax(bindParam);},byobAjaxPostForm:function(formId){this.requestFormDate=this.getDatabyForm(formId);var bindParam={type:"POST",url:"/store/cart/includes/bundleError.jsp",data:this.requestFormDate,success:function(data){toggleBYOBPopup(richCart,data);},error:function(XMLHttpRequest,textStatus,errorThrown){alert("error:"+textStatus);}};if(!formId){bindParam.data=null;bindParam.success=function(data){richCart.handleResponse(data,true);};}var quantity=$("#prodcutDetailSkuQuantity").val();if(this.isNumber(quantity)){$.ajax(bindParam);}else{alert("You entered an invalid value for the field 'quantity' which expects a number.");}},isNumber:function(obj){if(/^\d+$/.test(obj)){return true;}else{return false;}}};var hasSubCategories=new Array();var currentSubMenu="";var lastMenu="";var currentMenu="";var menuHover=false;var hideMenu=false;var currentRootCategory="";var leftMenu="";var rightMenu="";var isLeftMenu=false;var isRightMenu=false;var rd=false;var menuLoaded=new Object();var goLinks={links:[{link:"frnc/blog",name:"Get Organized Blog"},{link:"frnc/board",name:"GO User Forum"},{link:"partners",name:"Meet Our Partners"}]};var pauseDrop=250;var prepend="";if(contextPath=="/au"||contextPath=="/nz"){prepend="AUNZ_";}function dump(arr,level){var dumped_text="";if(!level){level=0;}var level_padding="";for(var j=0;j<level+1;j++){level_padding+="    ";}if(typeof(arr)=="object"){for(var item in arr){var value=arr[item];if(typeof(value)=="object"){dumped_text+=level_padding+"'"+item+"' ...\n";dumped_text+=dump(value,level+1);}else{dumped_text+=level_padding+"'"+item+"' => \""+value+'"\n';}}}else{dumped_text="===>"+arr+"<===("+typeof(arr)+")";}return dumped_text;}function searchFormValidate(boxid){var searchValue=(document.searchform.q.value=="Search");if(searchValue==false){document.searchform.action="http://search.franklinplanner.com/";document.searchform.submit();}}function showSearchBubble(boxid){var pos=$("#search_box").position();var posX=pos.left-120;var posY=pos.top-75;document.searchform.action="http://search.franklinplanner.com/";if(document.searchform.q.value.length<1){document.getElementById(boxid).style.left=posX+"px";document.getElementById(boxid).style.top=posY+"px";$("#searchErrorBubble").fadeIn(200);document.searchform.q.focus();return false;}else{document.searchform.submit();return true;}}function hideSearchBubble(boxid){document.getElementById(boxid).style.display="none";}function subMenu(catId,store,on){if(document.getElementById("sub_"+catId)){var el=document.getElementById("sub_"+catId);el.style.width="300px";if(on==true){$("#sub_"+catId).load("/shopping/common/ajx_submenucategories.jsp?currentRootCategory="+catId);el.style.display="block";el.style.height="300px";}else{el.style.display="none";}}}function whatsThis(which,state,parent){closeWhatsThis();var whatsThisDiv=document.getElementById("sub_menu_2_whats_this_"+which);if(whatsThisDiv){if(state=="block"){var whatsThisParent=document.getElementById("sub_menu_2_"+which);var menuParent=document.getElementById("subcat_"+parent);var parentCoords=getObjCoords(whatsThisParent);var menuCoords=getObjCoords(menuParent);var newLeft=parentCoords.x-menuCoords.x+110;var newTop=parentCoords.y-menuCoords.y+5;whatsThisDiv.style.top=newTop+"px";whatsThisDiv.style.left=newLeft+"px";}whatsThisDiv.style.display=state;}}function closeWhatsThis(){var these=getElementsByClass("sub_menu_2_whats_this",null,"div");if(these!=null){for(i=0;i<these.length;i++){these[i].style.display="none";}}}var thisCat="";var lastCat="";var hoverCat=false;var hoverGo=false;var hoverGoComm=false;var catLength=0;var catDropped=false;var goDropped=false;var goLinksDropped=false;var theGoDropped=false;function showSubCats(cat,hasSubs){$("#goDayDrop").hide();$("#goSpaceDrop").hide();$("#goLifeDrop").hide();lastCat=thisCat;$(".subCat").hide();$("#catDrop").hide();if(!isNaN(lastCat)){$("#subCat_"+lastCat).hide();}if(lastCat==(catLength-1)){$("#catDiv_"+lastCat).removeClass().addClass("catDivLast");}else{$("#catDiv_"+lastCat).removeClass().addClass("catDiv");}$(".catSepDiv").show();$("#sep_"+cat).hide();if(cat>0){var i=cat-1;$("#sep_"+i).hide();}if(lastCat>0){var j=lastCat-1;$("#catDiv_"+j).removeClass().addClass("catDiv");}if(hasSubCategories[cat]!=""&&hasSubCategories[cat]>0){$("#subCat_"+cat).show();var vers=null;vers=$.browser.version;if(catDropped){$("#catDrop").show();$("#catDiv_"+cat).removeClass().addClass("catDivOn");}else{$("#catDiv_"+cat).removeClass().addClass("catDivOn");setTimeout(function(){if(hoverCat){if(vers==null||($.browser.msie&&$.browser.version<=7)){$("#catDrop").show();}else{$("#catDrop").slideDown(200);}catDropped=true;}},pauseDrop);}}else{$("#catDiv_"+cat).removeClass().addClass("catDivOn");}thisCat=cat;}function showSubCatsOP(cat,hasSubs,row){lastCat=thisCat;$(".subCat").hide();$("#catDrop").hide();var newY=$("#navRow"+row).position().top;newY+=35;$("#catDrop").css("top",newY+"px");if(!isNaN(lastCat)){$("#subCat_"+lastCat).hide();}$("#catDiv_"+lastCat).removeClass().addClass("navOff");if(lastCat>0){var j=lastCat-1;$("#catDiv_"+j).removeClass().addClass("navOff");}if(hasSubCategories[cat]!=""&&hasSubCategories[cat]>0){$("#subCat_"+cat).show();var vers=null;vers=$.browser.version;if(catDropped){$("#catDrop").show();$("#catDiv_"+cat).removeClass().addClass("navOn");}else{$("#catDiv_"+cat).removeClass().addClass("navOn");setTimeout(function(){if(hoverCat){if(vers==null||($.browser.msie&&$.browser.version<=7)){$("#catDrop").show();}else{$("#catDrop").slideDown(200);}catDropped=true;}},pauseDrop);}}else{$("#catDiv_"+cat).removeClass().addClass("navOn");}thisCat=cat;}function showGoCats(which){theGoDropped=which;if(hoverCat){hoverCat=false;hideSubCats(false);}$("#goDayDrop").hide();$("#goSpaceDrop").hide();$("#goLifeDrop").hide();$("#goDayDiv").removeClass().addClass(prepend+"goDay");$("#goSpaceDiv").removeClass().addClass(prepend+"goSpace");$("#goLifeDiv").removeClass().addClass(prepend+"goLife");$("#goCommDiv").removeClass().addClass(prepend+"goComm");var vers=null;vers=$.browser.version;if($("#"+which+"Drop").html()!="EMPTY"){if(goDropped){$("#"+which+"Drop").show();$("#"+which+"Div").removeClass().addClass(prepend+which+"On");}else{$("#"+which+"Div").removeClass().addClass(prepend+which+"On");setTimeout(function(){if(hoverGo){if(vers==null||($.browser.msie&&$.browser.version<=7)){$("#"+which+"Drop").show();}else{$("#"+which+"Drop").slideDown(200);}goDropped=true;}},pauseDrop);}}}function hideSubCats(hasSubs){var wait=0;if(catDropped){wait=500;}setTimeout(function(){if(!hoverCat){catHeaderOff();$("#catDrop").hide();catDropped=false;$(".catSepDiv").show();}},wait);}function hideSubCatsOP(hasSubs){var wait=0;if(catDropped){wait=500;}setTimeout(function(){if(!hoverCat){catHeaderOffOP();$("#catDrop").hide();catDropped=false;$(".catSepDiv").show();}},wait);}function catHeaderOff(){if(!isNaN(thisCat)){if(thisCat>0&&thisCat==(catLength-1)){$("#catDiv_"+thisCat).css("border-bottom","1px solid #dedede");$("#catDiv_"+thisCat).removeClass().addClass("catDivLast");}else{$("#catDiv_"+thisCat).removeClass().addClass("catDiv");}if(thisCat>0){var i=thisCat-1;$("#catDiv_"+i).removeClass().addClass("catDiv");}}thisCat="";lastCat="";}function catHeaderOffOP(){if(!isNaN(thisCat)){$("#catDiv_"+thisCat).removeClass().addClass("navOff");if(thisCat>0){var i=thisCat-1;$("#catDiv_"+i).removeClass().addClass("navOff");}}thisCat="";lastCat="";}function hideGoCats(){wait=500;setTimeout(function(){if(hoverGo==false){$("#"+theGoDropped+"Drop").hide();$("#goCommDrop").hide();$("#goDayDiv").removeClass().addClass(prepend+"goDay");$("#goSpaceDiv").removeClass().addClass(prepend+"goSpace");$("#goLifeDiv").removeClass().addClass(prepend+"goLife");$("#goCommDiv").removeClass().addClass(prepend+"goComm");goDropped=false;}},wait);}function showGoLinks(){$("#goCommDiv").removeClass().addClass(prepend+"goCommOn");if(contextPath=="/store"){var goUrl="http://getorganized.franklinplanner.com/";if(hoverCat){hoverCat=false;hideSubCats(false);}if(hoverGo){hoverGo=false;hideGoCats();}if($("#goCommLinks").is(":empty")){$.each(goLinks.links,function(i,item){var goDiv=document.createElement("div");var goLink=document.createElement("a");$(goDiv).addClass("thirdCatDiv");goLink.setAttribute("href",goUrl+item.link);$(goLink).html(item.name);$(goLink).appendTo($(goDiv));$(goDiv).appendTo($("#goCommLinks"));});}var vers=null;vers=$.browser.version;if(vers==null||($.browser.msie&&$.browser.version<=7)){$("#goCommDrop").show();goLinksDropped=true;}else{setTimeout(function(){if(hoverGoComm){$("#goCommDrop").slideDown(200);goLinksDropped=true;}},pauseDrop);}}}function hideGoLinks(){if(contextPath=="/store"){wait=3000;if(!goLinksDropped){wait=0;}setTimeout(function(){if(hoverGoComm==false){$("#goCommDiv").removeClass().addClass(prepend+"goComm");$("#goCommDrop").hide();goLinksDropped=false;}},wait);}else{$("#goCommDiv").removeClass().addClass(prepend+"goComm");}}function buildTopMenu(url){var goCats=new Array();if(contextPath=="/store"){goCats.cat370002="goDay";goCats.cat370004="goSpace";goCats.cat370006="goLife";}else{if(contextPath=="/ca"){goCats.cat470029="goDay";goCats.cat470078="goSpace";goCats.cat470044="goLife";}else{if(contextPath=="/au"){goCats.cat470102="goDay";goCats.cat470106="goSpace";goCats.cat470104="goLife";}else{if(contextPath=="/nz"){goCats.cat470102="goDay";goCats.cat470106="goSpace";goCats.cat470104="goLife";}else{goCats.cat370002="goDay";goCats.cat370004="goSpace";goCats.cat370006="goLife";}}}}var ignoreCats=new Array();ignoreCats.cat330023=1;var specialOffersSelected=false;if(-1!=document.location.href.indexOf("promotions.jsp")){specialOffersSelected=true;}menu=document.getElementById("catMenu");var tbl=document.createElement("table");tbl.style.width="900px";tbl.setAttribute("id","topNavTbl");var tbdy=document.createElement("tbody");var trw=document.createElement("tr");$.ajax({type:"GET",cache:true,contentType:"application/json",global:true,dataType:"jsonp",jsonp:"jsoncallback",processData:false,url:url,success:function(jsonp){var len=jsonp.categories.length;var isLast=false;var isFirst=false;if(jsonp.status&&jsonp.status=="success"&&jsonp.categories&&jsonp.categories.length>0){var catTable=document.createElement("table");$(catTable).attr("cellpadding","0");$(catTable).attr("cellspacing","0");catTable.className="catTable";var catTBody=document.createElement("tbody");var catTr=document.createElement("tr");var lastCat=jsonp.categories.length-1;catLength=jsonp.categories.length;if(lastCat>0){var leftTd=document.createElement("td");leftTd.className="catLeft";catTr.appendChild(leftTd);$.each(jsonp.categories,function(i,item){if(goCats[item.id]){buildSubMenu($("#"+goCats[item.id]+"Drop"),item,false);$("#"+goCats[item.id]+"Div").click(function(){window.location=item.templateUrl;});$("#"+goCats[item.id]).css("cursor","pointer");}else{if(!ignoreCats[item.id]&&item.name){var hasSubs=false;if(item.subcategories&&item.subcategories.length>0){hasSubs=true;}var catTd=document.createElement("td");catTd.className="catTd";$(catTd).attr("id","catTd_"+i);var catDiv=document.createElement("div");$(catDiv).attr("id","catDiv_"+i);if(i==(catLength-1)){catDiv.className="catDivLast";}else{catDiv.className="catDiv";}$(catDiv).html(item.name);$(catDiv).click(function(){window.location=item.templateUrl;});$(catDiv).hover(function(){hoverCat=true;showSubCats(i,hasSubs);},function(){hoverCat=false;hideSubCats(hasSubs);});catTd.appendChild(catDiv);catTr.appendChild(catTd);if(i<catLength-1){var sepTd=document.createElement("td");var sepDiv=document.createElement("div");sepTd.className="catSepTd";sepDiv.className="catSepDiv";$(sepDiv).attr("id","sep_"+i);sepTd.appendChild(sepDiv);catTr.appendChild(sepTd);}var subCatDiv=document.createElement("div");subCatDiv.style.display="none";subCatDiv.className="subCat";$(subCatDiv).attr("id","subCat_"+i);if(hasSubs){buildSubMenu(subCatDiv,item,true);}}}});var rightTd=document.createElement("td");rightTd.className="catRight";catTr.appendChild(rightTd);}catTBody.appendChild(catTr);catTable.appendChild(catTBody);menu.innerHTML="";menu.appendChild(catTable);tbdy.appendChild(trw);tbl.appendChild(tbdy);if(document.getElementById("defaultTopNav")){document.getElementById("defaultTopNav").style.display="none";}}else{}var subdomain="store";var dir="store";var currency="$";if(jsonp.store_id=="uk"){subdomain="uk";dir="uk";currency="&pound;";}else{if(jsonp.store_id=="au"){subdomain="australia";dir="au";currency="AU$";}else{if(jsonp.store_id=="nz"){subdomain="newzealand";dir="nz";currency="AU$";}else{if(jsonp.store_id=="ca"){subdomain="canada";dir="ca";currency="$";}}}}if(jsonp.cart_count&&jsonp.cart_total){var content=jsonp.cart_count+"&nbsp;Item";if(jsonp.cart_count==1){}else{content+="s";}content+="&nbsp;|&nbsp;"+jsonp.cart_total;$("#cartTotals").html(content);}else{$("#cartTotal").html("0&nbsp;Items&nbsp;|&nbsp;"+currency+"0.00");}if(jsonp.first_name!=""){var loggedInContent='<div id="myAccount" style="float: left">';loggedInContent+='<table cellpadding="0" cellspacing="0" style="float:right;"><tbody><tr>';loggedInContent+='<td style="width:3px;"><img src="http://'+subdomain+'.franklinplanner.com/static/site/common/fcp/account-box-left.jpg"/></td>';loggedInContent+='<td id="myAccount"><a href="http://'+subdomain+".franklinplanner.com/"+dir+'/user/profile.jsp?sc=09-myaccounthdr&c=09-myaccounthdr">';loggedInContent+=jsonp.first_name;loggedInContent+='\'s Account</a></td><td style="width:3px;"><img src="http://'+subdomain+'.franklinplanner.com/static/site/common/fcp/account-box-right.jpg"/></td>';loggedInContent+="</tr></tbody></table>";loggedInContent+="</div>";loggedInContent+='<div style="float:left"><a href="http://'+subdomain+".franklinplanner.com/"+dir+'/user/uLogout.jsp"><img src="http://'+subdomain+'.franklinplanner.com/static/site/common/fcp/utl-nav-sign-out.gif"></a></div>';$("#signInMsg").html(loggedInContent);}},error:function(){var tdl=document.createElement("td");tdl.style.height="32px";tdl.style.width="6px";tdl.innerHTML="<img name='menuLeft' src='http://www.franklinplanner.com/images/shop_template/lft_nav_corn_off.gif' border='0'/>";var tda=document.createElement("td");tda.innerHTML="&nbsp;";tda.className="menu_bg_off";var tdr=document.createElement("td");tdr.style.height="32px";tdr.style.width="6px";tdr.innerHTML="<img name='menuRight' src='http://www.franklinplanner.com/images/shop_template/rt_nav_corn_off.gif' border='0'/>";trw.appendChild(tdl);trw.appendChild(tda);trw.appendChild(tdr);tbdy.appendChild(trw);tbl.appendChild(tbdy);if(document.getElementById("defaultTopNav")){document.getElementById("defaultTopNav").style.display="none";}menu.appendChild(tbl);}});$(".goDropDiv").hover(function(){hoverGo=true;},function(){hoverGo=false;hideGoCats();});$("#goLifeDiv").hover(function(){hoverGo=true;showGoCats("goLife");},function(){hoverGo=false;hideGoCats("goLife");});$("#goSpaceDiv").hover(function(){hoverGo=true;showGoCats("goSpace");},function(){hoverGo=false;hideGoCats("goSpace");});$("#goDayDiv").hover(function(){hoverGo=true;showGoCats("goDay");},function(){hoverGo=false;hideGoCats("goDay");});$("#catDrop").hover(function(){hoverCat=true;},function(){hoverCat=false;hideSubCats(true);});$("#goCommDrop").hover(function(){hoverGoComm=true;},function(){hoverGoComm=false;hideGoLinks();});$("#goCommDiv").hover(function(){hoverGoComm=true;showGoLinks();},function(){hoverGoComm=false;hideGoLinks();});}function buildTopMenuOP(url){var goCats=new Array();var ignoreCats=new Array();var specialOffersSelected=false;if(-1!=document.location.href.indexOf("promotions.jsp")){specialOffersSelected=true;}menu=document.getElementById("catMenu");var tbl=document.createElement("table");tbl.style.width="900px";tbl.setAttribute("id","topNavTbl");var tbdy=document.createElement("tbody");var trw=document.createElement("tr");var navLimit=9;$.ajax({type:"GET",cache:true,contentType:"application/json",global:true,dataType:"jsonp",jsonp:"jsoncallback",processData:false,url:url,success:function(jsonp){var len=jsonp.categories.length;var isLast=false;var isFirst=false;if(jsonp.status&&jsonp.status=="success"&&jsonp.categories&&jsonp.categories.length>0){var catTable=document.createElement("table");$(catTable).attr("cellpadding","0");$(catTable).attr("cellspacing","0");catTable.className="navTbl";var catTBody=document.createElement("tbody");var catTable2=document.createElement("table");$(catTable2).attr("cellpadding","0");$(catTable2).attr("cellspacing","0");catTable2.className="navTbl";var catTBody2=document.createElement("tbody");var catTr=document.createElement("tr");var catTr2=document.createElement("tr");var lastCat=jsonp.categories.length-1;catLength=jsonp.categories.length;if(lastCat>0){var leftTd=document.createElement("td");leftTd.className="catLeft";catTr.appendChild(leftTd);$.each(jsonp.categories,function(i,item){if(goCats[item.id]){buildSubMenu($("#"+goCats[item.id]+"Drop"),item,false);$("#"+goCats[item.id]+"Div").click(function(){window.location=item.templateUrl;});$("#"+goCats[item.id]).css("cursor","pointer");}else{if(!ignoreCats[item.id]&&item.name&&item.name!="Home"&&item.name!="Be Organized!"){var hasSubs=false;if(item.subcategories&&item.subcategories.length>0){hasSubs=true;hasSubCategories[i]=item.subcategories.length;}var catTd=document.createElement("td");catTd.className="catTdOP";$(catTd).attr("id","catTd_"+i);$(catTd).attr("nowrap","nowrap");var catDiv=document.createElement("div");$(catDiv).attr("id","catDiv_"+i);catDiv.className="navOff";$(catDiv).click(function(){window.location=item.templateUrl;});$(catDiv).hover(function(){hoverCat=true;showSubCatsOP(i,hasSubs);tabOn(i);},function(){hoverCat=false;hideSubCatsOP(hasSubs);tabOff(i);});var navLeftOP=document.createElement("div");navLeftOP.className="navLeftOP";var navMiddle=document.createElement("div");navMiddle.className="navMiddle";$(navMiddle).html(item.name);var navRightOP=document.createElement("div");navRightOP.className="navRightOP";catDiv.appendChild(navLeftOP);catDiv.appendChild(navMiddle);catDiv.appendChild(navRightOP);catTd.appendChild(catDiv);if(i<navLimit){catTr.appendChild(catTd);}else{catTr2.appendChild(catTd);}if(i<catLength-1){var sepTd=document.createElement("td");var sepDiv=document.createElement("div");sepTd.className="catSepTd";sepDiv.className="catSepDiv";$(sepDiv).attr("id","sep_"+i);sepTd.appendChild(sepDiv);catTr.appendChild(sepTd);}var subCatDiv=document.createElement("div");subCatDiv.style.display="none";subCatDiv.className="subCat";$(subCatDiv).attr("id","subCat_"+i);if(hasSubs){buildSubMenu(subCatDiv,item,true,"subCatTitleOP");}}}});var rightTd=document.createElement("td");rightTd.className="catRight";catTr.appendChild(rightTd);var catTdAbout=document.createElement("td");var catDivAbout=document.createElement("div");$(catDivAbout).attr("id","ns_nav_about");catDivAbout.className="nsnavOff";$(catDivAbout).click(function(){window.location="http://beorganized.theorganizedparent.com/company_information";});$(catDivAbout).hover(function(){tabOn("ns_about");},function(){tabOff("ns_about");});var navLeftOPAbout=document.createElement("div");navLeftOPAbout.className="navLeftOP";var navMiddleAbout=document.createElement("div");navMiddleAbout.className="navMiddle";$(navMiddleAbout).html("About Us");var navRightOPAbout=document.createElement("div");navRightOPAbout.className="navRightOP";catDivAbout.appendChild(navLeftOPAbout);catDivAbout.appendChild(navMiddleAbout);catDivAbout.appendChild(navRightOPAbout);catTdAbout.appendChild(catDivAbout);catTr2.appendChild(catTdAbout);var catTdPrint=document.createElement("td");var catDivPrint=document.createElement("div");$(catDivPrint).attr("id","ns_nav_print");catDivPrint.className="nsnavOff";$(catDivPrint).click(function(){window.location="http://beorganized.theorganizedparent.com/AllFreebies";});$(catDivPrint).hover(function(){tabOn("ns_print");},function(){tabOff("ns_print");});var navLeftOPPrint=document.createElement("div");navLeftOPPrint.className="navLeftOP";var navMiddlePrint=document.createElement("div");navMiddlePrint.className="navMiddle";$(navMiddlePrint).html("Printables");var navRightOPPrint=document.createElement("div");navRightOPPrint.className="navRightOP";catDivPrint.appendChild(navLeftOPPrint);catDivPrint.appendChild(navMiddlePrint);catDivPrint.appendChild(navRightOPPrint);catTdPrint.appendChild(catDivPrint);catTr2.appendChild(catTdPrint);var catTdProject=document.createElement("td");var catDivProject=document.createElement("div");$(catDivProject).attr("id","ns_nav_project");catDivProject.className="nsnavOff";$(catDivProject).click(function(){window.location="http://beorganized.theorganizedparent.com/AllProjects";});$(catDivProject).hover(function(){tabOn("ns_project");},function(){tabOff("ns_project");});var navLeftOPProject=document.createElement("div");navLeftOPProject.className="navLeftOP";var navMiddleProject=document.createElement("div");navMiddleProject.className="navMiddle";$(navMiddleProject).html("Projects");var navRightOPProject=document.createElement("div");navRightOPProject.className="navRightOP";catDivProject.appendChild(navLeftOPProject);catDivProject.appendChild(navMiddleProject);catDivProject.appendChild(navRightOPProject);catTdProject.appendChild(catDivProject);catTr2.appendChild(catTdProject);var catTdBlog=document.createElement("td");var catDivBlog=document.createElement("div");$(catDivBlog).attr("id","ns_nav_blog");catDivBlog.className="nsnavOff";$(catDivBlog).click(function(){window.location="http://beorganized.theorganizedparent.com/";});$(catDivBlog).hover(function(){tabOn("ns_blog");},function(){tabOff("ns_blog");});var navLeftOPBlog=document.createElement("div");navLeftOPBlog.className="navLeftOP";var navMiddleBlog=document.createElement("div");navMiddleBlog.className="navMiddle";$(navMiddleBlog).html("Blog");var navRightOPBlog=document.createElement("div");navRightOPBlog.className="navRightOP";catDivBlog.appendChild(navLeftOPBlog);catDivBlog.appendChild(navMiddleBlog);catDivBlog.appendChild(navRightOPBlog);catTdBlog.appendChild(catDivBlog);catTr2.appendChild(catTdBlog);var catTdNews=document.createElement("td");var catDivNews=document.createElement("div");$(catDivNews).attr("id","ns_nav_news");catDivNews.className="nsnavOff";$(catDivNews).click(function(){window.location="http://beorganized.theorganizedparent.com/AllNews";});$(catDivNews).hover(function(){tabOn("ns_news");},function(){tabOff("ns_news");});var navLeftOPNews=document.createElement("div");navLeftOPNews.className="navLeftOP";var navMiddleNews=document.createElement("div");navMiddleNews.className="navMiddle";$(navMiddleNews).html("Newsworthy");var navRightOPNews=document.createElement("div");navRightOPNews.className="navRightOP";catDivNews.appendChild(navLeftOPNews);catDivNews.appendChild(navMiddleNews);catDivNews.appendChild(navRightOPNews);catTdNews.appendChild(catDivNews);catTr2.appendChild(catTdNews);}catTBody.appendChild(catTr);catTable.appendChild(catTBody);catTBody2.appendChild(catTr2);catTable2.appendChild(catTBody2);menu.innerHTML="";menu.appendChild(catTable);menu.appendChild(catTable2);tbdy.appendChild(trw);tbl.appendChild(tbdy);if(document.getElementById("defaultTopNav")){document.getElementById("defaultTopNav").style.display="none";}}else{}if(jsonp.cart_count&&jsonp.cart_total){var content=jsonp.cart_count+"&nbsp;Item";if(jsonp.cart_count==1){}else{content+="s";}content+="&nbsp;|&nbsp;"+jsonp.cart_total;$("#cartTotals").html(content);}else{$("#cartTotal").html("0&nbsp;Items&nbsp;|&nbsp;$0.00");}if(jsonp.first_name!=""){var loggedInContent='<div id="myAccount" style="float: left">';loggedInContent+='<table cellpadding="0" cellspacing="0" style="float:right;"><tbody><tr>';loggedInContent+='<td style="width:3px;"><img src="http://store.theorganizedparent.com/static/site/common/fcp/account-box-left.jpg"/></td>';loggedInContent+='<td id="myAccount"><a href="http://store.theorganizedparent.com/organized/user/profile.jsp?sc=09-myaccounthdr&c=09-myaccounthdr">';loggedInContent+=jsonp.first_name;loggedInContent+='\'s Account</a></td><td style="width:3px;"><img src="http://store.theorganizedparent.com/static/site/common/fcp/account-box-right.jpg"/></td>';loggedInContent+="</tr></tbody></table>";loggedInContent+="</div>";loggedInContent+='<div style="float:left"><a href="http://store.theorganizedparent.com/organized/user/uLogout.jsp"><img src="http://store.theorganizedparent.com/static/site/common/fcp/utl-nav-sign-out.gif"></a></div>';$("#signInMsg").html(loggedInContent);}},error:function(){}});$("#catDrop").hover(function(){hoverCat=true;},function(){hoverCat=false;hideSubCatsOP(true);});}function buildSubMenu(container,item,isCatDrop,className){var subTable=document.createElement("table");var subTBody=document.createElement("tbody");var subTr=document.createElement("tr");var lastLine=false;var subCount=0;var allCount=0;$(container).html("");$.each(item.subcategories,function(j,subItem){var allSubCount=0;$.each(subItem,function(k,sub){lastLine=false;if(subCount==0){subTr=document.createElement("tr");}subCount++;allCount++;var subTd=document.createElement("td");if(subCount==5){subTd.className="subCatTdFive";}else{subTd.className="subCatTd";}var titleDiv=document.createElement("div");if(!className){className="subCatTitle";}titleDiv.className=className;$(titleDiv).html(sub.name.toUpperCase());$(titleDiv).appendTo($(subTd));if(sub.thirdcategories){$.each(sub.thirdcategories,function(k,sub3){var linkDiv=document.createElement("div");linkDiv.className="thirdCatDiv";var catLink=document.createElement("a");catLink.className="thirdCatLink";$(catLink).attr("href",sub3.templateUrl);$(catLink).html(sub3.name);$(catLink).appendTo($(linkDiv));$(linkDiv).appendTo($(subTd));});}$(subTd).appendTo(subTr);if(subCount==5){lastLine=true;$(subTr).appendTo(subTBody);var spaceTr=document.createElement("tr");var spaceTd=document.createElement("td");spaceTd.colSpan="5";spaceTd.style.height="23px";$(spaceTd).html("&nbsp;");$(spaceTd).appendTo(spaceTr);$(spaceTr).appendTo(subTBody);subCount=0;}});});if(subCount<5&&subCount>0){var subTd=document.createElement("td");subTd.colSpan=(5-subCount);$(subTd).html("&nbsp;");$(subTd).appendTo(subTr);$(subTr).appendTo(subTBody);}var spaceTr=document.createElement("tr");var spaceTd=document.createElement("td");spaceTd.colSpan="5";spaceTd.style.height="23px";$(spaceTd).html("&nbsp;");$(spaceTd).appendTo(spaceTr);$(spaceTr).appendTo(subTBody);$(subTBody).appendTo(subTable);$(subTable).appendTo(container);if(isCatDrop){$(container).appendTo("#catDrop");}}function setPos(itemId){var isLoaded=eval("menuLoaded."+itemId);if(!isLoaded){var cell=document.getElementById("td_"+itemId);var submenu=document.getElementById("subcat_"+itemId);var topNavTbl=document.getElementById("topNavTbl");var menuDiv=document.getElementById("menuDiv");var cellLeft=getObjCoords(submenu);var menuLeft=getObjCoords(menuDiv);var pos=cellLeft.x-menuLeft.x;var navTableWidth=getDivWidth(topNavTbl);var topNavWidth=getDivWidth(cell);var subMenuWidth=getDivWidth(submenu);var relPos=pos+subMenuWidth;var relPos2=relPos+topNavWidth;var leftAlign=cellLeft.x+topNavWidth-subMenuWidth;if(pos>navTableWidth/2){if(leftAlign>menuLeft.x){submenu.style.left=leftAlign+"px";}else{submenu.style.left=menuLeft.x+6+"px";}}else{if(pos+subMenuWidth>navTableWidth){if(subMenuWidth<pos+subMenuWidth){if(leftAlign>menuLeft.x){submenu.style.left=(menuLeft.x+navTableWidth-subMenuWidth-6)+"px";}else{submenu.style.left=menuLeft.x+6+"px";}}else{submenu.style.left=(cellLeft.x)+"px";}}}eval("menuLoaded."+itemId+"=true");}}function Point(x,y){this.x=x;this.y=y;}function getObjCoords(o){var oX=0;var oY=0;if(o.offsetParent){while(1){oX+=o.offsetLeft;oY+=o.offsetTop;if(!o.offsetParent){break;}o=o.offsetParent;}}else{if(o.x){oX+=o.x;oY+=o.y;}}return new Point(oX,oY);}function hideAllSubs(){var menuNode=document.getElementById("topNavTbl");var subMenus=getElementsByClass("sub_menu_on",menuNode,"div");if(null!=subMenus&&""!=subMenus){for(i=0;i<subMenus.length;i++){if(menuHover==true&&currentSubMenu!=""&&currentSubMenu==subMenus[i].id){}else{$(subMenus[i]).hide();}}}}function isGC(){var gcSelected=false;if(-1!=window.location.search.indexOf("prod290002")){gcSelected=true;}return gcSelected;}function showSubMenu(catId,lr){var catTd=document.getElementById("td_"+catId);var currTd=document.getElementById("td_"+currentMenu);var specialOffersSelected=false;if(-1!=document.location.href.indexOf("promotions.jsp")){specialOffersSelected=true;}if(currentSubMenu!=""){$(currentSubMenu).hide();}if(currentMenu!=""){if((currentMenu==currentRootCategory&&!isGC())||(specialOffersSelected&&currentMenu=="special_offers")||(isGC()&&currentMenu=="gift_cards")){currTd.className="menu_bg_off";}else{currTd.className="menu_bg_off";}}if(lr!=""){if(lr=="l"){document.menuLeft.src="http://www.franklinplanner.com/images/shop_template/lft_nav_corn_on.gif";}if(lr=="r"){document.menuRight.src="http://www.franklinplanner.com/images/shop_template/rt_nav_corn_on.gif";}}else{if(currentMenu!=""&&currentMenu!=currentRootCategory&&!specialOffersSelected){document.menuRight.src="http://www.franklinplanner.com/images/shop_template/rt_nav_corn_off.gif";document.menuLeft.src="http://www.franklinplanner.com/images/shop_template/lft_nav_corn_off.gif";}}if(currentRootCategory!=""&&leftMenu==currentRootCategory){document.menuLeft.src="http://www.franklinplanner.com/images/shop_template/lft_nav_corn_on.gif";}if(currentRootCategory!=""&&rightMenu==currentRootCategory){document.menuLeft.src="http://www.franklinplanner.com/images/shop_template/rt_nav_corn_on.gif";}catTd.className="menu_bg_on";if(document.getElementById("subcat_"+catId)){var sub=document.getElementById("subcat_"+catId);changeOpac(0,"subcat_"+catId);sub.style.textAlign="left";sub.style.zIndex="9999";sub.style.display="block";setPos(catId);sub.style.display="none";changeOpac(100,"subcat_"+catId);$(sub).slideDown(200);currentSubMenu="subcat_"+catId;hideAllSubs();lastMenu=currentMenu;currentMenu=catId;}currentMenu=catId;}function hideSubMenu(){var currTd=document.getElementById("td_"+currentMenu);var specialOffersSelected=false;if(-1!=document.location.href.indexOf("promotions.jsp")){specialOffersSelected=true;}hideAllSubs();if(document.getElementById(currentSubMenu)){$(currentSubMenu).hide();closeWhatsThis();}if(document.getElementById("td_"+currentMenu)){if((currentMenu==currentRootCategory&&!isGC())||(specialOffersSelected&&currentMenu=="special_offers")||(isGC()&&currentMenu=="gift_cards")){currTd.className="menu_bg_off";}else{currTd.className="menu_bg_off";}}if(document.menuLeft){if(currentRootCategory!=""&&leftMenu==currentRootCategory){document.menuLeft.src="http://www.franklinplanner.com/images/shop_template/lft_nav_corn_on.gif";}else{if(isLeftMenu){document.menuLeft.src="http://www.franklinplanner.com/images/shop_template/lft_nav_corn_off.gif";isLeftMenu=false;}}}if(document.menuRight){if((currentRootCategory!=""&&rightMenu==currentRootCategory)||specialOffersSelected){document.menuRight.src="http://www.franklinplanner.com/images/shop_template/rt_nav_corn_on.gif";}else{if(isRightMenu){document.menuRight.src="http://www.franklinplanner.com/images/shop_template/rt_nav_corn_off.gif";rightMenu=false;}}}}function goNav(){if(document.getElementById("go_nav")){var url="http://www.franklinplanner.com/fc/common/json_leftnav.jsp";$.ajaxSetup({global:true,dataType:"jsonp",jsonp:"jsoncallback",cache:true});$.ajax({type:"GET",processData:false,url:url,success:function(jsonp){if(jsonp.items&&jsonp.items.length>0){var goDiv=document.getElementById("go_nav");var goTable=document.createElement("table");goTable.setAttribute("style","width:170px;");var goTbody=document.createElement("tbody");var titleTr=document.createElement("tr");var titleTd=document.createElement("td");titleTd.style.paddingLeft="5px";titleTd.innerHTML="<b>"+jsonp.title+"</b>";titleTr.appendChild(titleTd);goTbody.appendChild(titleTr);$.each(jsonp.items,function(i,item){var aTr=document.createElement("tr");var aTd=document.createElement("td");aTd.style.paddingLeft="7px";aTd.style.paddingRight="5px";aTd.style.paddingTop="2px";aTd.innerHTML="<a href='"+item.url+"' class='gonav_link'>"+item.name+"</a>";aTr.appendChild(aTd);goTbody.appendChild(aTr);});goTable.appendChild(goTbody);goDiv.appendChild(goTable);}}});}}function findPositionX(obj){var curleft=0;if(obj.offsetParent){while(1){curleft+=obj.offsetLeft;if(!obj.offsetParent){break;}obj=obj.offsetParent;}}else{if(obj.x){curleft+=obj.x;}}return curleft;}function findPositionY(obj){var curtop=0;if(obj.offsetParent){while(1){curtop+=obj.offsetTop;if(!obj.offsetParent){break;}obj=obj.offsetParent;}}else{if(obj.y){curtop+=obj.y;}}return curtop;}function getElementsByClass(searchClass,node,tag){var classElements=new Array();if(node==null){node=document;}if(tag==null){tag="*";}var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)");for(i=0,j=0;i<elsLen;i++){if(els[i].className&&els[i].className.match(pattern)){classElements[j]=els[i];j++;}}return classElements;}function getNodeElementsByName(searchClass,node,tag){var classElements=new Array();if(node==null){node=document;}if(tag==null){tag="*";}var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)");for(i=0,j=0;i<elsLen;i++){if(els[i].name&&els[i].name.match(pattern)){classElements[j]=els[i];j++;}}return classElements;}function changeOpac(opacity,id){var object=document.getElementById(id).style;object.opacity=(opacity/100);object.MozOpacity=(opacity/100);object.KhtmlOpacity=(opacity/100);object.filter="alpha(opacity="+opacity+")";}function getDivHeight(pNode){return pNode.innerHeight?pNode.innerHeight:pNode.offsetHeight+document.body.offsetTop;}function getDivWidth(pNode){return pNode.innerWidth?pNode.innerWidth:pNode.offsetWidth;}function getDatabyForm(formId){var data={};try{$("#"+formId).find("input,select,textarea").each(function(){if(this.name){if($(this).attr("type")=="radio"){if($(this).attr("checked")){data[this.name]=$(this).val();}}else{if($(this).attr("type")=="checkbox"){if($(this).attr("checked")){data[this.name]=$(this).val();}}else{data[this.name]=$(this).val();}}}});}catch(e){alert("err"+e);}return data;}function S4(){return(((1+Math.random())*65536)|0).toString(16).substring(1);}function guid(){return(S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());}function isInteger(value){reg=/(^0$)|(^([1-9]+)([0-9]*)$)/;if(reg.test(value)){return true;}else{return false;}}function mouseX(evt){if(evt.pageX){return evt.pageX;}else{if(evt.clientX){return evt.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);}else{return null;}}}function mouseY(evt){if(evt.pageY){return evt.pageY;}else{if(evt.clientY){return evt.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);}else{return null;}}}function showDiv(e,divId){var layoutDiv=$("#"+divId);var x=mouseX(e);var y=mouseY(e);layoutDiv.css({position:"absolute",left:x+"px",top:y+"px","z-index":1999});layoutDiv.fadeIn("slow");}function hideDiv(divId){var layoutDiv=$("#"+divId);layoutDiv.fadeOut("slow");}function Popup(){}Popup.prototype=new Object();Popup.prototype.divId=null;Popup.prototype.title=null;Popup.prototype.popupOptions={};Popup.prototype.ajaxOptions={};Popup.prototype.openedDialog=null;Popup.prototype.isTempDiv=false;Popup.opened=false;Popup.divId=null;Popup.prototype.openPopupIml=function(){Popup.opened=true;$("#"+this.divId).dialog(this.popupOptions);};Popup.prototype.close=function(){if(this.isTempDiv){if(BrowserDetect.browser=="Explorer"){document.getElementById(this.divId).removeNode(true);}else{$("#"+this.divId).remove();}$("#"+this.divId).dialog("destroy");}$("#"+this.divId).dialog("close");};Popup.prototype.openPopup=function(){if(this.divId==null&&!Popup.opened){this.popupOptions.dialogClass="alert";var openDivId=guid();$("<div title='"+this.title+"' height='auto' id='"+openDivId+"'></div>").appendTo("body");this.divId=openDivId;Popup.divId=openDivId;this.isTempDiv=true;}else{this.divId=Popup.divId;this.isTempDiv=true;}if(this.ajaxOptions!=null){var thisPopup=this;this.ajaxOptions.success=function(data){var thisPopupElem=document.getElementById(thisPopup.divId);if(thisPopupElem){thisPopupElem.innerHTML=data;thisPopup.openPopupIml();}else{}realignQuickView();};$.ajax(this.ajaxOptions);}else{this.openPopupIml();}};Popup.openPopupAjax=function(url,data,afterOpen){var popupOptions={modal:false,width:600,height:"auto",resizable:false,autoOpen:true,open:afterOpen};var ajaxOptions={url:url,data:data};Popup.openOnePopup(ajaxOptions,popupOptions,null,null);};Popup.openPopupDiv=function(divId){var popupOptions={modal:true,width:"auto"};Popup.openOnePopup(null,popupOptions,null,divId);};Popup.openOnePopup=function(ajaxOptions,popupOptions,title,divId){var pop=new Popup();pop.ajaxOptions=ajaxOptions;pop.popupOptions=popupOptions;pop.divId=divId;pop.title=title;pop.openPopup();Popup.popStack.push(pop);};Popup.closePoup=function(){var pop=Popup.popStack.pop();if(pop!=null){Popup.opened=false;pop.close();}};Popup.popStack=new Array();
