displayMediaOverlay={transparentOverlay:null,tBody:null,modalWrapper:null,outerModalContainer:null,modalContainer:null,modalViewCloserDiv:null,preloaderAnimation:null,overlayPreloaderImage:new Image(),overlyPreloaderAnimationLocation:"/images/misc/loadingAnimation.gif",magnify:function(zoom){this.overlayPreloaderImage.src=this.overlyPreloaderAnimationLocation;if(((Seadragon.Utils.getBrowser())==1)&&((Seadragon.Utils.getBrowserVersion())<7)){Seadragon.Utils.makeAjaxRequest("/images/extra_large/"+defaultProductImageName+"_el.jpg",function(xhr){(xhr.status==200)?displayMediaOverlay.extraLargeImage():displayMediaOverlay.largeImage()})}else{if(zoom=="no"){Seadragon.Utils.makeAjaxRequest("/images/extra_large/"+defaultProductImageName+"_el.jpg",function(xhr){(xhr.status==200)?displayMediaOverlay.extraLargeImage():displayMediaOverlay.largeImage()})}else{Seadragon.Utils.makeAjaxRequest(dziDirectoryPath+defaultProductImageName+".xml",function(xhr){(xhr.status==200)?displayMediaOverlay.zoomify():displayMediaOverlay.magnify("no")})}}},zoomify:function(){this.createOverlay("zoom");viewer=new Seadragon.Viewer("modalContainer");viewer.addEventListener("error",displayMediaOverlay.defaultErrorImage);viewer.openDzi(dziDirectoryPath+defaultProductImageName+".xml")},extraLargeImage:function(eStatus){if(eStatus=="error"){imgBox=document.createElement("img");imgBox.setAttribute("src","/images/extra_large/"+defaultProductImageName+"_el.jpg");displayMediaOverlay.modalContainer.appendChild(imgBox);displayMediaOverlay.outerModalContainer.removeChild(displayMediaOverlay.outerModalContainer.lastChild);document.getElementById("catEntryId_1").style.display="none"}else{this.createOverlay("extralarge");imgBox=document.createElement("img");exImage=new Image();exImage.onload=function(){displayMediaOverlay.modalContainer.removeChild(displayMediaOverlay.preloaderAnimation);displayMediaOverlay.modalViewCloserDiv.style.width=(exImage.width)+"px";displayMediaOverlay.outerModalContainer.style.width=(exImage.width)+"px";displayMediaOverlay.modalContainer.style.width=(exImage.width)+"px";displayMediaOverlay.outerModalContainer.style.height=(exImage.height+25)+"px";displayMediaOverlay.modalContainer.style.height=(exImage.height)+"px";imgBox.setAttribute("src",exImage.src);displayMediaOverlay.modalContainer.appendChild(imgBox);document.getElementById("catEntryId_1").style.display="none"};exImage.src="/images/extra_large/"+defaultProductImageName+"_el.jpg"}},largeImage:function(eStatus){if(eStatus=="error"){displayMediaOverlay.outerModalContainer.removeChild(displayMediaOverlay.outerModalContainer.lastChild);displayMediaOverlay.outerModalContainer.style.height="450px";displayMediaOverlay.modalContainer.style.height="420px";imgBox=document.createElement("img");imgBox.setAttribute("src","/images/large/"+defaultProductImageName+"_cl.jpg");displayMediaOverlay.modalContainer.appendChild(imgBox);document.getElementById("catEntryId_1").style.display="none"}else{this.createOverlay("large");imgBox=document.createElement("img");deImage=new Image();deImage.onload=function(){displayMediaOverlay.modalContainer.removeChild(displayMediaOverlay.preloaderAnimation);imgBox.setAttribute("src",deImage.src);displayMediaOverlay.modalContainer.appendChild(imgBox);document.getElementById("catEntryId_1").style.display="none"};deImage.src="/images/large/"+defaultProductImageName+"_cl.jpg"}},defaultErrorImage:function(x){if(displayMediaOverlay.modalContainer.hasChildNodes()){displayMediaOverlay.modalContainer.removeChild(displayMediaOverlay.modalContainer.firstChild)}Seadragon.Utils.makeAjaxRequest("/images/extra_large/"+defaultProductImageName+"_el.jpg",function(xhr){(xhr.status==200)?displayMediaOverlay.extraLargeImage("error"):displayMediaOverlay.largeImage("error")})},videoOverlay:function(){if(Seadragon.Utils.getBrowser()==1){expandcontent(getullistlinkbyId("maintab","tcontent5"))}else{if(typeof(Qoof_WidgetId)!="undefined"){this.createOverlay("qoofVideo");this.modalViewCloserDiv.style.width=450+"px";this.outerModalContainer.style.width=450+"px";this.modalContainer.style.width=450+"px";var queryString="&id="+Qoof_WidgetId+"&w="+Qoof_widgetWidth+"&h="+Qoof_widgetHeight;var Qoof_HTTPReferrer=encodeURIComponent(document.location.href);var Qoof_swf_file="";if(Qoof_swf_file.length==0){Qoof_swf_file="widget.swf"}var Qoof_swf="http://flash.qoof.com/"+Qoof_swf_file+"?w="+Qoof_WidgetId;var Qoof_pass="";var Qoof_AffiliateData="";var Qoof_SessionId=generateQoofGuidInternal();qoofVideoObjectEl=document.createElement("object");qoofVideoObjectEl.setAttribute("classid","clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");qoofVideoObjectEl.setAttribute("id","Qoof_Widget"+Qoof_SessionId);qoofVideoObjectEl.setAttribute("width",Qoof_widgetWidth);qoofVideoObjectEl.setAttribute("height",Qoof_widgetHeight);qoofVideoObjectEl.setAttribute("codebase","http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab");qoofVideoParamEl1=document.createElement("param");qoofVideoParamEl1.setAttribute("name","movie");qoofVideoParamEl1.setAttribute("value",Qoof_swf);qoofVideoObjectEl.appendChild(qoofVideoParamEl1);qoofVideoParamEl2=document.createElement("param");qoofVideoParamEl2.setAttribute("name","quality");qoofVideoParamEl2.setAttribute("value","high");qoofVideoObjectEl.appendChild(qoofVideoParamEl2);qoofVideoParamEl3=document.createElement("param");qoofVideoParamEl3.setAttribute("name","bgcolor");qoofVideoParamEl3.setAttribute("value","#ffffff");qoofVideoObjectEl.appendChild(qoofVideoParamEl3);qoofVideoParamEl4=document.createElement("param");qoofVideoParamEl4.setAttribute("name","allowScriptAccess");qoofVideoParamEl4.setAttribute("value","always");qoofVideoObjectEl.appendChild(qoofVideoParamEl4);qoofVideoParamEl5=document.createElement("param");qoofVideoParamEl5.setAttribute("name","allowFullScreen");qoofVideoParamEl5.setAttribute("value","true");qoofVideoObjectEl.appendChild(qoofVideoParamEl5);qoofVideoParamEl6=document.createElement("param");qoofVideoParamEl6.setAttribute("name","wmode");qoofVideoParamEl6.setAttribute("value","transparent");qoofVideoObjectEl.appendChild(qoofVideoParamEl6);qoofVideoParamEl7=document.createElement("param");qoofVideoParamEl7.setAttribute("name","flashvars");qoofVideoParamEl7.setAttribute("value","id="+Qoof_WidgetId+"&session="+Qoof_SessionId+"&referer="+Qoof_HTTPReferrer);qoofVideoObjectEl.appendChild(qoofVideoParamEl7);qoofVideoEmbedEl=document.createElement("embed");qoofVideoEmbedEl.setAttribute("src",Qoof_swf);qoofVideoEmbedEl.setAttribute("FlashVars","id="+Qoof_WidgetId+"&session="+Qoof_SessionId+"&referer="+Qoof_HTTPReferrer);qoofVideoEmbedEl.setAttribute("allowFullScreen","true");qoofVideoEmbedEl.setAttribute("Quality","high");qoofVideoEmbedEl.setAttribute("bgcolor","#FFFFFF");qoofVideoEmbedEl.setAttribute("Width",Qoof_widgetWidth);qoofVideoEmbedEl.setAttribute("Height",Qoof_widgetHeight);qoofVideoEmbedEl.setAttribute("type","application/x-shockwave-flash");qoofVideoEmbedEl.setAttribute("PLUGINSPAGE","http://www.macromedia.com/go/getflashplayer");qoofVideoEmbedEl.setAttribute("allowScriptAccess","always");qoofVideoEmbedEl.setAttribute("wmode","transparent");qoofVideoObjectEl.appendChild(qoofVideoEmbedEl);qoofTrackingPixel=document.createElement("img");qoofTrackingPixel.setAttribute("src","http://track.qoof.com/pix.gif?w="+Qoof_WidgetId+"&s="+Qoof_SessionId+queryString);displayMediaOverlay.modalContainer.removeChild(displayMediaOverlay.preloaderAnimation);this.modalContainer.appendChild(qoofVideoObjectEl);this.modalContainer.appendChild(qoofTrackingPixel)}else{if(typeof(youTubeVideoId)!="undefined"){this.createOverlay("youtubeVideo");youTubeVideoObjectEl=document.createElement("object");youTubeVideoObjectEl.setAttribute("width",youTube_Width);youTubeVideoObjectEl.setAttribute("height",youTube_Height);youTubeVideoParamEl1=document.createElement("param");youTubeVideoParamEl1.setAttribute("name","movie");youTubeVideoParamEl1.setAttribute("value",youTubeVideoId);youTubeVideoObjectEl.appendChild(youTubeVideoParamEl1);youTubeVideoParamEl2=document.createElement("param");youTubeVideoParamEl2.setAttribute("name","allowFullScreen");youTubeVideoParamEl2.setAttribute("value","false");youTubeVideoObjectEl.appendChild(youTubeVideoParamEl2);youTubeVideoParamEl3=document.createElement("param");youTubeVideoParamEl3.setAttribute("name","allowscriptaccess");youTubeVideoParamEl3.setAttribute("value","always");youTubeVideoObjectEl.appendChild(youTubeVideoParamEl3);youTubeVideoEmbedEl=document.createElement("embed");youTubeVideoEmbedEl.setAttribute("src",youTubeVideoId);youTubeVideoEmbedEl.setAttribute("allowFullScreen","false");youTubeVideoEmbedEl.setAttribute("Quality","high");youTubeVideoEmbedEl.setAttribute("bgcolor","#FFFFFF");youTubeVideoEmbedEl.setAttribute("Width",youTube_Width);youTubeVideoEmbedEl.setAttribute("Height",youTube_Height);youTubeVideoEmbedEl.setAttribute("type","application/x-shockwave-flash");youTubeVideoEmbedEl.setAttribute("PLUGINSPAGE","http://www.macromedia.com/go/getflashplayer");youTubeVideoEmbedEl.setAttribute("allowScriptAccess","always");youTubeVideoEmbedEl.setAttribute("wmode","transparent");displayMediaOverlay.modalContainer.removeChild(displayMediaOverlay.preloaderAnimation);youTubeVideoObjectEl.appendChild(youTubeVideoEmbedEl);this.modalContainer.appendChild(youTubeVideoObjectEl)}}}},createOverlay:function(modalViewType){switch(modalViewType){case"zoom":oHeight="675px";mHeight="620px";break;case"extralarge":oHeight="675px";mHeight="620px";break;case"youtubeVideo":oHeight="440px";mHeight="400px";break;case"qoofVideo":oHeight="400px";mHeight="375px";break;default:oHeight="450px";mHeight="420px"}wh=this.getPageSize()[1];this.transparentOverlay=document.createElement("div");this.transparentOverlay.setAttribute("id","transparentOverlay");this.transparentOverlay.style.height=wh+"px";this.tBody=document.getElementsByTagName("body").item(0);this.tBody.appendChild(this.transparentOverlay);this.modalWrapper=document.createElement("div");this.modalWrapper.setAttribute("id","modalWrapper");this.outerModalContainer=document.createElement("div");this.outerModalContainer.setAttribute("id","outerModalContainer");this.outerModalContainer.style.height=oHeight;this.modalWrapper.style.top=((Math.ceil(Seadragon.Utils.getWindowSize().y*0.25))-50)+"px";this.modalViewCloserDiv=document.createElement("div");this.modalViewCloserDiv.setAttribute("id","modalViewCloser");modalViewCloserAnchor=document.createElement("a");modalViewCloserAnchor.setAttribute("id","modalViewCloserAnchor");modalViewCloserAnchor.setAttribute("href","javascript:displayMediaOverlay.closeModalView()");modalViewCloserText=document.createTextNode("x close");modalViewCloserAnchor.appendChild(modalViewCloserText);this.modalViewCloserDiv.appendChild(modalViewCloserAnchor);this.outerModalContainer.appendChild(this.modalViewCloserDiv);this.modalContainer=document.createElement("div");this.modalContainer.setAttribute("id","modalContainer");this.modalContainer.style.height=mHeight;this.outerModalContainer.appendChild(this.modalContainer);if(modalViewType=="zoom"){customZoomControl=document.createElement("div");customZoomControl.setAttribute("id","customZoomControl");this.outerModalContainer.appendChild(customZoomControl)}else{this.preloaderAnimation=document.createElement("img");this.preloaderAnimation.setAttribute("src",this.overlayPreloaderImage.src);this.preloaderAnimation.setAttribute("id","displayMediaPreloader");this.modalContainer.appendChild(this.preloaderAnimation)}this.modalWrapper.appendChild(this.outerModalContainer);this.tBody.appendChild(this.modalWrapper)},closeModalView:function(){document.getElementById("catEntryId_1").style.display="inline";this.tBody.removeChild(this.transparentOverlay);this.tBody.removeChild(this.modalWrapper)},getPageSize:function(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight}}var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth}else{windowWidth=self.innerWidth}windowHeight=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight}else{if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight}}}if(yScroll<windowHeight){pageHeight=windowHeight}else{pageHeight=yScroll}if(xScroll<windowWidth){pageWidth=xScroll}else{pageWidth=windowWidth}return[pageWidth,pageHeight]}};