var queueEvents=false;function secureSubmit(email,password,remember){$("#aspnetForm").attr("action",document.location.href.replace("http://","https://"));$("#aspnetForm").submit();return false;};function showNotice(notice,fieldObj){$(".notice").html(notice).slideDown('fast');if(fieldObj!="undefined"&&fieldObj!=null){$(fieldObj).next().get(0).className="validate-x";}
return false;};function hideNotice(fieldObj){if(fieldObj!="undefined"&&fieldObj!=null){$(fieldObj).next().get(0).className="validate-check";}
if(queueEvents==true)return true;$(".notice").slideUp('fast');return true;};function clearNotice(fieldObj){if(fieldObj!="undefined"&&fieldObj!=null){$(fieldObj).next().get(0).className="validate-placeholder";}
$(".notice").hide();};var skipValidation=false;function stepClick(stepId,stepComplete){if(!stepComplete)skipValidation=true;$("input[id$=hidNextStep]").val(stepId);$("input[id$=btnContinue]").click();return false;}
function embeddedSignup(){this.field={email1:null,email2:null,pass1:null,pass2:null,promoCode:null,continueBtn:null};this.validateEmail=function(fieldInstance){var emailPattern=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;var thisEmail,otherEmail,thisRef;if(fieldInstance==1){thisRef=this.field.email1;thisEmail=$(this.field.email1).get(0).value;otherEmail=$(this.field.email2).get(0).value;}
else{thisRef=this.field.email2;thisEmail=$(this.field.email2).get(0).value;otherEmail=$(this.field.email1).get(0).value;}
if(!queueEvents&&thisEmail==""){clearNotice(thisRef);return false;}
if(!emailPattern.test(thisEmail)){return showNotice(resErrors.EmailValid,thisRef);}
else if(otherEmail.length>0&&thisEmail!=otherEmail){return showNotice(resErrors.EmailMatch,thisRef);}
return hideNotice(thisRef);};this.validatePass=function(fieldInstance){var passwordPattern=/^[a-zA-Z0-9]{6,10}$/;var thisPass,otherPass,thisRef;if(fieldInstance==1){thisRef=this.field.pass1;thisPass=this.field.pass1.value;otherPass=this.field.pass2.value;}
else{thisRef=this.field.pass2;thisPass=this.field.pass2.value;otherPass=this.field.pass1.value;}
if(!queueEvents&&thisPass==""){clearNotice(thisRef);return false;}
if(thisPass.length<6||thisPass.length>10){return showNotice(resErrors.PasswordLength,thisRef);}
if(!passwordPattern.test(thisPass)){return showNotice(resErrors.PasswordValid,thisRef);}
else if(otherPass.length>0&&thisPass!=otherPass){return showNotice(resErrors.PasswordMatch,thisRef);}
return hideNotice(thisRef);};this.validatePromoCode=function(){if(!queueEvents)return true;return hideNotice(this.field.promoCode);};this.keyPress=function(e){var key=e.keyCode||e.which;if(13==key){this.field.continueBtn.click();return false;}
return true;};this.validateAll=function(){queueEvents=true;if(!this.validateEmail(1)||!this.validateEmail(2)||!this.validatePass(1)||!this.validatePass(2)||!this.validatePromoCode()){queueEvents=false;return false;}
queueEvents=false;$("#aspnetForm").attr("action",document.location.href.replace("http://","https://"));return true;};this.showPopup=function(hoveritem){$("#hoverpopup").css("top",(hoveritem.offsetTop-100)+"px").css("left",(hoveritem.offsetLeft-395)+"px").css("visibility","visible");};}
function signupTrack(step){var brandName;if(zipGlobal.BrandID==2)
brandName="RogersVideoDirect.ca";else
brandName="Zip.ca";if(step==1){DCS.dcsuri="/Custom_Reporting/FreeTrial_GetStartedNow.htm";WT.si_n=brandName+"_FreeTrial_"+DCSext.lang;WT.si_x="1";WT.pi="FreeTrialGetStarted_"+DCSext.lang;}
else if(step==2){DCS.dcsuri="/Custom_Reporting/FreeTrial_ChoosePlan.htm";WT.si_n=brandName+"_FreeTrial_"+DCSext.lang;WT.si_x="2";WT.pi="FreeTrialChoosePlan_"+DCSext.lang;}
else if(step==3){DCS.dcsuri="/Custom_Reporting/FreeTrial_ShippingInfo.htm";WT.si_n=brandName+"_FreeTrial_"+DCSext.lang;WT.si_x="3";WT.pi="FreeTrialShippingInfo_"+DCSext.lang;}
else if(step==4){DCS.dcsuri="/Custom_Reporting/FreeTrial_BillingInfo.htm";WT.si_n=brandName+"_FreeTrial_"+DCSext.lang;WT.si_x="4";WT.pi="FreeTrialBillingInfo_"+DCSext.lang;}
else if(step==5){DCS.dcsuri="/Custom_Reporting/FreeTrial_PaymentInfo.htm";WT.si_n=brandName+"_FreeTrial_"+DCSext.lang;WT.si_x="5";WT.pi="FreeTrialPaymentInfo_"+DCSext.lang;}
else
return;dcsTag();}
var menuCategoryTimeout=25;var menuCategoryCloseTimer=0;var menuCategoryItem=0;function menuCategoryOpen(){menuCategoryCancelTimer();menuCategoryClose();menuCategoryItem=$(this).find('ul').css('visibility','visible');}
function menuCategoryClose(){if(menuCategoryItem){menuCategoryItem.css('visibility','hidden');}}
function menuCategoryTimer(){menuCategoryCloseTimer=window.setTimeout(menuCategoryClose,menuCategoryTimeout);}
function menuCategoryCancelTimer(){if(menuCategoryCloseTimer){window.clearTimeout(menuCategoryCloseTimer);menuCategoryCloseTimer=null;}}
$(document).ready(function(){$('#menu-category > li').bind('mouseover',menuCategoryOpen);$('#menu-category > li').bind('mouseout',menuCategoryTimer);});$(document).click(menuCategoryClose);function searchEncode(original){return encodeURIComponent(original).replace(/%/g,'$');}
function searchPerform(txtSearchId){var searchTerm=$('#'+txtSearchId).val();if(null!=searchTerm&&searchTerm.length>0){document.location=zipGlobal.ServerPath+'DVD/Browse.aspx/'+zipGlobal.CultureID+'/s/'+searchEncode(searchTerm);}
return false;}
function searchEnterIntercept(e,txtSearchId){var key=e.keyCode||e.which;if(13==key){searchPerform(txtSearchId);return false;}
return true;}
if(typeof(bsn)=="undefined")
_b=bsn={};if(typeof(_b.Autosuggest)=="undefined")
_b.Autosuggest={};_b.AutoSuggest=function(id,param){if(!document.getElementById)
return 0;this.txtSearchId=id;this.fld=_b.DOM.gE(id);if(!this.fld)
return 0;this.sInp="";this.nInpC=0;this.aSug=[];this.iHigh=0;this.oP=param?param:{};var k,def={minchars:1,meth:"get",varname:"input",className:"autosuggest",timeout:2500,delay:500,offsety:-5,shownoresults:true,noresults:"No results!",maxheight:250,cache:true,maxentries:25,maxresults:250};for(k in def){if(typeof(this.oP[k])!=typeof(def[k]))
this.oP[k]=def[k];}
var p=this;this.fld.onkeypress=function(ev){return p.onKeyPress(ev);};this.fld.onkeyup=function(ev){return p.onKeyUp(ev);};this.fld.setAttribute("autocomplete","off");};_b.AutoSuggest.prototype.onKeyPress=function(ev){var key=(window.event)?window.event.keyCode:ev.keyCode||ev.which;var RETURN=13;var TAB=9;var ESC=27;var bubble=1;switch(key){case RETURN:this.setHighlightedValue();bubble=0;break;case ESC:this.clearSuggestions();break;}
return bubble;};_b.AutoSuggest.prototype.onKeyUp=function(ev){var key=(window.event)?window.event.keyCode:ev.keyCode;var ARRUP=38;var ARRDN=40;var bubble=1;switch(key){case ARRUP:this.changeHighlight(key);bubble=0;break;case ARRDN:this.changeHighlight(key);bubble=0;break;default:this.getSuggestions(this.fld.value);}
return bubble;};_b.AutoSuggest.prototype.getSuggestions=function(val){if(val==this.sInp)
return 0;_b.DOM.remE(this.idAs);this.sInp=val;if(val.length<this.oP.minchars){this.aSug=[];this.nInpC=val.length;return 0;}
var ol=this.nInpC;this.nInpC=val.length?val.length:0;var l=this.aSug.length;if(this.nInpC>ol&&l&&l<this.oP.maxresults&&this.oP.cache){var arr=[];for(var i=0;i<l;i++){if(this.aSug[i].value.substr(0,val.length).toLowerCase()==val.toLowerCase()||this.aSug[i].value.substr(0,val.length+4).toLowerCase()=='the '+val.toLowerCase()||this.aSug[i].value.substr(0,val.length+1).toLowerCase().replace(':','')==val.toLowerCase()||this.aSug[i].value.substr(0,val.length+5).toLowerCase().replace(':','')=='the '+val.toLowerCase())
arr.push(this.aSug[i]);}
this.aSug=arr;this.createList(this.aSug);return false;}
else
{var pointer=this;var input=this.sInp;clearTimeout(this.ajID);this.ajID=setTimeout(function(){pointer.doAjaxRequest(input)},this.oP.delay);}
return false;};_b.AutoSuggest.prototype.doAjaxRequest=function(input){if(input!=this.fld.value)
return false;var pointer=this;if(typeof(this.oP.script)=="function")
var url=this.oP.script(encodeURIComponent(this.sInp));else
var url=this.oP.script+this.oP.varname+"="+encodeURIComponent(this.sInp);if(!url)
return false;var meth=this.oP.meth;var input=this.sInp;var onSuccessFunc=function(req){pointer.setSuggestions(req,input)};var onErrorFunc=function(status){};var myAjax=new _b.Ajax();myAjax.makeRequest(url,meth,onSuccessFunc,onErrorFunc);};_b.AutoSuggest.prototype.setSuggestions=function(req,input){if(input!=this.fld.value)
return false;this.aSug=[];if(this.oP.json){var jsondata=eval('('+req.responseText+')');for(var i=0;i<jsondata.results.length;i++){this.aSug.push({'id':jsondata.results[i].id,'value':jsondata.results[i].value,'info':jsondata.results[i].info});}}
else{var xml=req.responseXML;if(xml.getElementsByTagName('results')!=null){var results=xml.getElementsByTagName('results')[0].childNodes;for(var i=0;i<results.length;i++){if(results[i].hasChildNodes())
this.aSug.push({'id':results[i].getAttribute('id'),'value':results[i].childNodes[0].nodeValue,'info':results[i].getAttribute('info')});}}}
this.idAs="as_"+this.fld.id;this.createList(this.aSug);};_b.AutoSuggest.prototype.createList=function(arr){var pointer=this;var listings=arr.length;listings=arr.length>this.oP.maxentries?this.oP.maxentries:arr.length;_b.DOM.remE(this.idAs);this.killTimeout();if(listings==0&&!this.oP.shownoresults)
return false;var div=_b.DOM.cE("div",{id:this.idAs,className:this.oP.className});var hcorner=_b.DOM.cE("div",{className:"as_corner"});var hbar=_b.DOM.cE("div",{className:"as_bar"});var header=_b.DOM.cE("div",{className:"as_header"});header.appendChild(hcorner);header.appendChild(hbar);div.appendChild(header);var ul=_b.DOM.cE("ul",{id:"as_ul"});var emLength;var st;for(var i=0;i<listings;i++){var val=this.aSug[i].value;var iLen=this.sInp.length;if(val.substr(0,iLen+1).toLowerCase().replace(':','')==this.sInp.toLowerCase()){emLength=iLen+1;st=val.toLowerCase().replace(':','').indexOf(this.sInp.toLowerCase());}
else if(val.substr(0,iLen+4).toLowerCase()=='the '+this.sInp.toLowerCase()){emLength=iLen+4;st=val.toLowerCase().indexOf('the '+this.sInp.toLowerCase());}
else if(val.substr(0,iLen+5).toLowerCase().replace(':','')=='the '+this.sInp.toLowerCase()){emLength=iLen+5;st=val.toLowerCase().replace(':','').indexOf('the '+this.sInp.toLowerCase());}
else{emLength=iLen;st=val.toLowerCase().indexOf(this.sInp.toLowerCase());}
var output=val.substring(0,st)+"<em>"+val.substring(st,st+emLength)+"</em>"+val.substring(st+emLength);var span=_b.DOM.cE("span",{},output,true);if(arr[i].info!=""){var br=_b.DOM.cE("br",{});span.appendChild(br);var small=_b.DOM.cE("small",{},arr[i].info);span.appendChild(small);}
var a=_b.DOM.cE("a",{href:"#"});var tl=_b.DOM.cE("span",{className:"tl"}," ");var tr=_b.DOM.cE("span",{className:"tr"}," ");a.appendChild(tl);a.appendChild(tr);a.appendChild(span);a.name=i+1;a.onclick=function(){pointer.setHighlightedValue();return false;};a.onmouseover=function(){pointer.setHighlight(this.name,false);};var li=_b.DOM.cE("li",{},a);ul.appendChild(li);}
if(arr.length==0&&this.oP.shownoresults){var li=_b.DOM.cE("li",{className:"as_warning"},this.oP.noresults);ul.appendChild(li);}
div.appendChild(ul);var fcorner=_b.DOM.cE("div",{className:"as_corner"});var fbar=_b.DOM.cE("div",{className:"as_bar"});var footer=_b.DOM.cE("div",{className:"as_footer"});footer.appendChild(fcorner);footer.appendChild(fbar);div.appendChild(footer);var pos=_b.DOM.getPos(this.fld);div.style.left=(pos.x)+"px";div.style.top=(pos.y+this.fld.offsetHeight+this.oP.offsety+5)+"px";div.style.width=(this.fld.offsetWidth+72)+"px";div.onmouseover=function(){pointer.killTimeout()};div.onmouseout=function(){pointer.resetTimeout()};document.getElementsByTagName("body")[0].appendChild(div);this.iHigh=0;var pointer=this;this.toID=setTimeout(function(){pointer.clearSuggestions()},this.oP.timeout);};_b.AutoSuggest.prototype.changeHighlight=function(key){var list=_b.DOM.gE("as_ul");if(!list)
return false;var n;if(key==40)
n=this.iHigh+1;else if(key==38)
n=this.iHigh-1;if(n>list.childNodes.length)
n=list.childNodes.length;if(n<1)
n=1;this.setHighlight(n,true);};_b.AutoSuggest.prototype.setHighlight=function(n,changefld){var list=_b.DOM.gE("as_ul");if(!list)
return false;if(this.iHigh>0)
this.clearHighlight();this.iHigh=Number(n);list.childNodes[this.iHigh-1].className="as_highlight";if(changefld==true)
this.fld.value=this.aSug[this.iHigh-1].value;this.killTimeout();};_b.AutoSuggest.prototype.clearHighlight=function(){var list=_b.DOM.gE("as_ul");if(!list)
return false;if(this.iHigh>0){list.childNodes[this.iHigh-1].className="";this.iHigh=0;}};_b.AutoSuggest.prototype.setHighlightedValue=function(){if(this.iHigh){this.sInp=this.fld.value=this.aSug[this.iHigh-1].value;this.fld.focus();searchPerform(this.txtSearchId);if(this.fld.selectionStart)
this.fld.setSelectionRange(this.sInp.length,this.sInp.length);this.clearSuggestions();if(typeof(this.oP.callback)=="function")
this.oP.callback(this.aSug[this.iHigh-1]);}};_b.AutoSuggest.prototype.killTimeout=function(){clearTimeout(this.toID);};_b.AutoSuggest.prototype.resetTimeout=function(){clearTimeout(this.toID);var pointer=this;this.toID=setTimeout(function(){pointer.clearSuggestions()},1000);};_b.AutoSuggest.prototype.clearSuggestions=function(){this.killTimeout();var ele=_b.DOM.gE(this.idAs);var pointer=this;if(ele){var fade=new _b.Fader(ele,1,0,250,function(){_b.DOM.remE(pointer.idAs)});}};if(typeof(_b.Ajax)=="undefined")
_b.Ajax={};_b.Ajax=function(){this.req={};this.isIE=false;};_b.Ajax.prototype.makeRequest=function(url,meth,onComp,onErr){if(meth!="POST")
meth="GET";this.onComplete=onComp;this.onError=onErr;var pointer=this;if(window.XMLHttpRequest){this.req=new XMLHttpRequest();this.req.onreadystatechange=function(){pointer.processReqChange()};this.req.open("GET",url,true);this.req.send(null);}
else if(eval('window.'+'A'+'c'+'t'+'i'+'v'+'e'+'X'+'O'+'b'+'j'+'e'+'c'+'t')){this.req=eval('new '+'A'+'c'+'t'+'i'+'v'+'e'+'X'+'O'+'b'+'j'+'e'+'c'+'t("Microsoft.XMLHTTP")');if(this.req){this.req.onreadystatechange=function(){pointer.processReqChange()};this.req.open(meth,url,true);this.req.send();}}};_b.Ajax.prototype.processReqChange=function(){if(this.req.readyState==4){if(this.req.status==200){this.onComplete(this.req);}else{this.onError(this.req.status);}}};if(typeof(_b.DOM)=="undefined")
_b.DOM={};_b.DOM.cE=function(type,attr,cont,html){var ne=document.createElement(type);if(!ne)
return 0;for(var a in attr)
ne[a]=attr[a];var t=typeof(cont);if(t=="string"&&!html)
ne.appendChild(document.createTextNode(cont));else if(t=="string"&&html)
ne.innerHTML=cont;else if(t=="object")
ne.appendChild(cont);return ne;};_b.DOM.gE=function(e){var t=typeof(e);if(t=="undefined")
return 0;else if(t=="string"){var re=document.getElementById(e);if(!re)
return 0;else if(typeof(re.appendChild)!="undefined")
return re;else
return 0;}
else if(typeof(e.appendChild)!="undefined")
return e;else
return 0;};_b.DOM.remE=function(ele){var e=this.gE(ele);if(!e)
return 0;else if(e.parentNode.removeChild(e))
return true;else
return 0;};_b.DOM.getPos=function(e){var e=this.gE(e);var obj=e;var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}
else if(obj.x)
curleft+=obj.x;var obj=e;var curtop=0;if(obj.offsetParent){while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent;}}
else if(obj.y)
curtop+=obj.y;return{x:curleft,y:curtop};};if(typeof(_b.Fader)=="undefined")
_b.Fader={};_b.Fader=function(ele,from,to,fadetime,callback){if(!ele)
return 0;this.e=ele;this.from=from;this.to=to;this.cb=callback;this.nDur=fadetime;this.nInt=50;this.nTime=0;var p=this;this.nID=setInterval(function(){p._fade()},this.nInt);};_b.Fader.prototype._fade=function(){this.nTime+=this.nInt;var ieop=Math.round(this._tween(this.nTime,this.from,this.to,this.nDur)*100);var op=ieop/100;if(this.e.filters)
{try{this.e.filters.item("DXImageTransform.Microsoft.Alpha").opacity=ieop;}catch(e){this.e.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+ieop+')';}}
else
{this.e.style.opacity=op;}
if(this.nTime==this.nDur){clearInterval(this.nID);if(this.cb!=undefined)
this.cb();}};_b.Fader.prototype._tween=function(t,b,c,d){return b+((c-b)*(t/d));};var GB_DONE=false;var GB_HEIGHT=400;var GB_WIDTH=400;var GB_ANIMATION=false;var GB_SHOWING=false;function GBMaxHeight(){var retHeight;var minHeight=300;var maxHeight=659;var heightOffset=-50;if(typeof window!="undefined"&&window&&typeof window.innerHeight!="undefined"&&window.innerHeight&&window.innerHeight>minHeight){retHeight=window.innerHeight+heightOffset;}
else if(typeof document!="undefined"&&document&&typeof document.documentElement!="undefined"&&document.documentElement&&typeof document.documentElement.clientHeight!="undefined"&&document.documentElement.clientHeight&&document.documentElement.clientHeight>minHeight){retHeight=document.documentElement.clientHeight+heightOffset;}
else if(typeof screen!="undefined"&&screen&&typeof screen.height!="undefined"&&screen.height&&screen.height>minHeight){retHeight=screen.height-200+heightOffset;}
else{return maxHeight;}
return(retHeight>maxHeight?maxHeight:retHeight);}
function GBMaxWidth(){var minWidth=300;var widthOffset=0;if(typeof window!="undefined"&&window&&typeof window.innerWidth!="undefined"&&window.innerWidth&&window.innerWidth>minWidth){return window.innerWidth+widthOffset;}
else if(typeof document!="undefined"&&document&&typeof document.documentElement!="undefined"&&document.documentElement&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth&&document.documentElement.clientWidth>minWidth){return document.documentElement.clientWidth+widthOffset;}
else if(typeof screen!="undefined"&&screen&&typeof screen.width!="undefined"&&screen.width&&screen.width>minWidth){return screen.width-100+widthOffset;}
return 600;}
var GB_hierarchy=[];function GB_show(caption,contentHtml,height,width){var root=FindRoot();root.GB_show_actual(root,caption,contentHtml,height,width);}
function GB_show_actual(root,caption,contentHtml,height,width){var divTitleHover=$('#divTitleHover');if(divTitleHover&&divTitleHover.length&&divTitleHover.length>0){divTitleHover.remove();};if(height<=0)height=200;if(GB_SHOWING){root.GB_hide_without_reopening_parent();}
GB_HEIGHT=height||400;GB_WIDTH=width||400;GB_HEIGHT=GB_HEIGHT+10
if(GB_HEIGHT>root.GBMaxHeight())GB_HEIGHT=root.GBMaxHeight();if(GB_WIDTH>root.GBMaxWidth())GB_WIDTH=root.GBMaxWidth();if(!GB_DONE){$(document.body).append("<div id='GB_overlay'></div><div id='GB_window'><div class='GB_close' id='GB_close'></div><div style='clear: both;'></div></div>");$("#GB_close").click(root.GB_hide);$("#GB_overlay").click(root.GB_hide);$(window).resize(root.GB_position);GB_DONE=true;}
$("#GB_frame").remove();$("#GB_window").append("<div id='GB_frame'>"+contentHtml+"</div>");$("#GB_caption").html(caption);$("#GB_close").css({"background-image":"url('"+zipGlobal.ImagePath+"/v4/closeX.jpg"+"')"});iePngFix('div','GB_close');$("#GB_overlay").show();root.GB_position();if(GB_ANIMATION)
$("#GB_window").slideDown("slow");else
$("#GB_window").show();GB_SHOWING=true;$("html").css("overflow","hidden");$("#GB_frame iframe").each(function(){this.src=this.src;$("#GB_frame").css("overflow","hidden");});if(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 6.0")!=-1){$(".menu-category-dropdown").hide();$(".row select").hide();}
root.GB_hierarchy.push(arguments);}
function GB_show_arguments(root,argumentsArray){root.GB_show_actual(root,argumentsArray[1],argumentsArray[2],argumentsArray[3],argumentsArray[4]);}
function GB_hide_without_reopening_parent(){$("#GB_window,#GB_overlay").hide();$("#GB_window,#GB_overlay").remove();GB_DONE=false;GB_SHOWING=false;$("html").css("overflow","");if(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 6.0")!=-1){$(".menu-category-dropdown").show();$(".row select").show();}}
function GB_hide(){var root=FindRoot();root.GB_hide_without_reopening_parent();if(root.GB_hierarchy.length>=1){root.GB_hierarchy.pop();if(root.GB_hierarchy.length>=1){var argumentsArray=root.GB_hierarchy[root.GB_hierarchy.length-1];root.GB_hierarchy.pop();root.GB_show_arguments(root,argumentsArray);};};};function GB_position(){var topOffset=-14;var de=document.documentElement;var w=self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;var top=document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;var left=document.documentElement.scrollLeft>document.body.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;$("#GB_window").css({width:GB_WIDTH+"px",height:GB_HEIGHT+"px",left:(((w-GB_WIDTH)/2)+left)+"px",top:(((h-GB_HEIGHT)/2)+top+topOffset)+"px"});$("#GB_overlay").css({top:top+"px",left:"0px",width:w+"px",height:(20+h)+"px"});$("#GB_frame").css("height",GB_HEIGHT+"px");$("#GB_frame iframe").each(function(){this.height=$("#GB_window").css('height');this.width=this.width;});}
function GreyboxSetHeight(newHeight){var maxHeight=parent.GBMaxHeight();if(newHeight<maxHeight){parent.GB_HEIGHT=newHeight+4;parent.GB_position();}
else{parent.GB_HEIGHT=maxHeight;parent.GB_position();}}
function GreyboxAutoHeight(elementId,retryCount){var maxRetries=10;var newHeight=ElementTopById(elementId);if(typeof retryCount=="undefined"||retryCount==null)retryCount=0;else retryCount++;if(newHeight>1){GreyboxSetHeight(newHeight);}
if(retryCount<maxRetries){setTimeout(function(){GreyboxAutoHeight(elementId,retryCount)},retryCount*retryCount*10);}}
var titleHoverObject=null;var titleHoverTimeout=null;var titleUnHoverTimeout=null;var titlePopupVisible=false;function titleHoverAjaxRequest(titleId,hasTitleImage){$.ajax({type:'GET',url:zipGlobal.ServerPath+'WebServices/Title/wsTitleDetail.asmx/GetTitleHoverContentExtended',data:({titleId:titleId,hasTitleImage:hasTitleImage,funnelUrls:true}),dataType:'xml',success:function(result){if(result!=null){var contentRoot=result.getElementsByTagName("content");if(null==contentRoot[0]){return;}
var nodeTitle=result.getElementsByTagName("title");if(nodeTitle[0]){title=nodeTitle[0].firstChild.nodeValue;}
content=contentRoot[0].firstChild.nodeValue;titleHoverShow(title,content);};},failure:function(){}});};function titleHoverWait(eventObject,titleId,hasTitleImage,delay){titleHoverObject=eventObject;if((typeof delay=="undefined")||(delay==null)||delay<=0){titleHoverAjaxRequest(titleId,hasTitleImage);}
else{titleHoverTimeout=setTimeout("titleHoverAjaxRequest('"+titleId+"',"+hasTitleImage+")",delay);};};function titleHoverShow(title,content,straightArrowLeft){var divName="divTitleHover";var target,newTarget;var boxWidth="373px";var boxX,boxY;var divWidth,divHeight;var boxStyle="red";var boxLeft=false;var boxTop=false;var boxOffsetX=-10,boxOffsetYtop=30,boxOffsetYbot=-30;var winH,winW;var eventObjY;var CurrentwindowTop=0;var leftNudge=22,rightNudge=-18;var straightArrowY=34;straightArrowLeft=(straightArrowLeft==true);if(straightArrowLeft){boxOffsetYtop=-6;boxOffsetYbot=6;}
if(titleHoverObject==null){if(document.getElementById(divName))
document.getElementById(divName).style.visibility="hidden";return;}
if(window.innerWidth){winW=window.innerWidth;winH=window.innerHeight;}
else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){winW=document.documentElement.clientWidth;winH=document.documentElement.clientHeight;}
else{winW=document.body.offsetWidth;winH=document.body.offsetHeight;}
CurrentwindowTop=document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;CurrentwindowTop=CurrentwindowTop<170?170:CurrentwindowTop;if(!titleHoverObject){boxX=winW/2+170;boxY=300;}
else{boxX=DL_GetElementLeft(titleHoverObject);boxY=DL_GetElementTop(titleHoverObject);eventObjY=boxY;}
if(straightArrowLeft){boxLeft=true;}
else if(!titleHoverObject){boxLeft=false;}
else if(boxX<winW/2){boxLeft=true;}
else{boxLeft=false;}
if(straightArrowLeft){boxTop=true;}
else if(boxY-CurrentwindowTop<winH/2){boxTop=true;}
else{boxTop=false;}
boxOffsetY=boxTop?boxOffsetYtop:boxOffsetYbot;if(!document.getElementById(divName)){newTarget=document.createElement("div");newTarget.id=divName;document.body.appendChild(newTarget);newTarget.onmouseover=titleHoverOnMouseOver;newTarget.onmouseout=titleHoverOnMouseOut;}
else if(navigator.appName=="Microsoft Internet Explorer"){target=document.getElementById(divName);target.removeAttribute("style");}
target=document.getElementById(divName);target.style.zIndex="1001";target.style.position="absolute";target.style.width=boxWidth;target.innerHTML="\
     <div class='fo-"+(straightArrowLeft?"left-straight":(boxLeft?"left":"right"))+"'>\
      <div class='fo-box'>\
       <div class='fo-top-wrap'>\
        <div class='fo-top'>"+title+"</div>\
       </div>\
       <div class='fo-mid-wrap'>\
        <div class='fo-mid' "+((navigator.appName=="Microsoft Internet Explorer"&&document.documentElement.clientHeight==0)?"style='width:100%'>":">")+content+"</div>\
       </div>\
       <div class='fo-bot-wrap'></div>\
      </div>\
      <div id='titleArrow' class='fo-arr-"+(boxTop?"up":"down")+"'></div>\
      <div style='clear:both'></div>\
     </div>";divWidth=target.offsetWidth||target.width||373;divHeight=target.offsetHeight||target.height||400;alignRightX=titleHoverObject.offsetWidth||titleHoverObject.width||150;if(titleHoverObject&&titleHoverObject.offsetHeight<=11){alignMiddleY=-titleHoverObject.childNodes[0].offsetHeight/2;}
else
alignMiddleY=(titleHoverObject.offsetHeight||titleHoverObject.height||110)/2;eventObjY=boxY+alignMiddleY;alignMiddleY-=divHeight/2;boxY+=alignMiddleY;if(boxLeft){boxX+=alignRightX+rightNudge;}
else{boxX+=leftNudge;}
if(boxY<CurrentwindowTop){boxY=CurrentwindowTop;}
else if(boxY+divHeight>CurrentwindowTop+winH){boxY=CurrentwindowTop+winH-divHeight;}
target.style.visibility="visible";if(boxLeft){target.style.top=(boxY+boxOffsetY)+"px";target.style.left=(boxX+boxOffsetX)+"px";}
else{target.style.top=(boxY+boxOffsetY)+"px";target.style.left=(boxX-boxOffsetX-divWidth)+"px";}
var arrow=document.getElementById("titleArrow");if(arrow!=null){if(straightArrowY){arrow.style.marginTop=eventObjY-boxY-boxOffsetY+straightArrowY+"px";}
if(eventObjY-boxY-boxOffsetY-(boxTop?10:80)+100>divHeight){arrow.style.marginTop=(divHeight-100)+"px"}
else if(eventObjY<CurrentwindowTop){arrow.style.marginTop=20+"px"}
else{arrow.style.marginTop=eventObjY-boxY-boxOffsetY-(boxTop?10:80)+"px"}}
iePngFix("div","fo-");};function titleHoverWaitUnhover(){if(titleHoverTimeout&&titleHoverObject){clearTimeout(this.titleHoverTimeout);}
var hoverBox=document.getElementById("divTitleHover")
if(hoverBox!=null&&hoverBox.style.visibility=="visible"){titleUnHoverTimeout=setTimeout('titleHoverUnhover()',1);}
else{titleHoverUnhover();}};function titleHoverOnMouseOver(){titlePopupVisible=true;if(titleUnHoverTimeout){clearTimeout(titleUnHoverTimeout);};};function titleHoverOnMouseOut(ev){if(ev){var isNestedDiv=false;var eParElement;if(ev.relatedTarget)
eParElement=ev.relatedTarget.offsetParent;while(eParElement!=null){if(eParElement==document.getElementById('divTitleHover')){isNestedDiv=true;eParElement=null;}
else
eParElement=eParElement.offsetParent;}
if(isNestedDiv==false){titlePopupVisible=false;titleHoverUnhover();}}
else{if(!event.fromElement.contains(event.toElement)&&!document.getElementById('divTitleHover').contains(event.toElement)){titlePopupVisible=false;titleHoverUnhover();}}};function titleHoverUnhover(){if(document.getElementById("divTitleHover")&&titlePopupVisible==false){document.getElementById("divTitleHover").style.visibility="hidden";};if('function'==typeof window.ddlSuffixShow){ddlSuffixShow();}};function iePngFix(tagName,classPrefix){var ie55=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 5.5")!=-1);var ie6=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 6.0")!=-1);if(!ie55&&!ie6)return;$(tagName+"[class^="+classPrefix+"]").each(function(){var bgImg=this.currentStyle['backgroundImage'];if(bgImg.indexOf(".png")>=0){var ieBg=bgImg.split('url("')[1].split('")')[0];this.style.backgroundImage="none";this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ieBg+"',sizingMethod='crop')";}});};function DL_GetElementLeft(eElement){if(!eElement&&this)
{eElement=this;}
var nLeftPos=eElement.offsetLeft;var eParElement=eElement.offsetParent;while(eParElement!=null){nLeftPos+=eParElement.offsetLeft;eParElement=eParElement.offsetParent;}
return nLeftPos;};function DL_GetElementTop(eElement){if(!eElement&&this){eElement=this;}
var nTopPos=eElement.offsetTop;var eParElement=eElement.offsetParent;while(eParElement!=null){nTopPos+=eParElement.offsetTop;eParElement=eParElement.offsetParent;}
return nTopPos;};function ElementTopById(eId){var targetDiv=document.getElementById(eId);if(typeof targetDiv=="undefined"||targetDiv==null)return-1;return DL_GetElementTop(targetDiv);};function htmlEscape(input){return $('<div/>').text(input).html();};$(document).ready(function(){$('.box').scale9Grid({top:10,bottom:10,left:10,right:10});});var bannerTimeout;function openKeyholeBanner(delay){if(delay){clearTimeout(bannerTimeout);bannerTimeout=setTimeout(function(){openKeyholeBanner(false)},750);return;}
$("#rent-banner").animate({height:'124px'},50);};function closeKeyholeBanner(delay){if(delay){clearTimeout(bannerTimeout);bannerTimeout=setTimeout(function(){closeKeyholeBanner(false)},100);return;}
$("#rent-banner").animate({height:'70px'},50);};function videoPlayerTag(publishId){var ie=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;var playerPath="http://www.videodetective.net/flash/players/player4.6.298.movieapi.swf";var tag=null;if(ie){tag=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ','id="vdplayer" ','codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=',this.version,'" width="450" ','height="320">','<param name="movie" value="',playerPath,'"/>','<param name="quality" value="high"/>','<param name="wmode" value="transparent"/>','<param name="allowFullScreen" value="true"/>','<param name="bgcolor" value="#000000"/>','<param name="flashvars" value="publishedid=',publishId,'&width=450&height=320"/>','</object>'].join("");}
else{tag=['<embed src="',playerPath,'" ','quality="high" ','bgcolor="#000000" ','width="450" ','height="320" ','allowFullScreen="true" ','wmode="transparent" ','type="application/x-shockwave-flash" ','flashvars="publishedid=',publishId,'&width=450&height=320" ','name="vdplayer" ','pluginspage="http://www.macromedia.com/go/getflashplayer">','</embed>'].join("");};return tag;};function videoPlayerShow(publishId,title,rating){var infoHtml=["<div class='vp-title-info'>","<div>",htmlEscape(title),"</div>","<div class='rating sm'><div class='stars'><div style='width:"+Math.round(16.0*rating).toString()+"px;'/></div></div>","</div>"].join('');reviewsHide();GB_show('&nbsp;',videoPlayerTag(publishId)+infoHtml,370,450);};function videoPlayerHide(){GB_hide();};function playFeedPopup(publishId,titleId,title,rating){videoPlayerShow(publishId,title,rating);};function FindRoot(){var deepestParent=this;var maxDepths=5;var currentDepth=0;while(typeof deepestParent.parent!="undefined"&&deepestParent.parent!=null){deepestParent=deepestParent.parent;if(currentDepth++>maxDepths)break;}
return deepestParent;};function ParentRedirect(redirectUrl){var deepestParent=FindRoot();deepestParent.location.href=redirectUrl;return false;};function changeCaptcha(captchaImg){$.ajax({type:'GET',url:zipGlobal.ServerPath+'WebServices/Giftcard/wsGiftcard.asmx/ChangeImage',dataType:'xml',success:function(result){var img=zipGlobal.ServerPath+'giftmembership/CaptchaImage.aspx?'+Date.parse(new Date().toString());captchaImg.src=img;},failure:function(){}});};function enterIntercept(e,callFunction){var key=e.keyCode||e.which;if(13==key){callFunction();return false;}
return true;}