document.write('<div id="SubmodelObj" style="display:none;"></div>');var gPopupMask=null;var gPopupContainer=null;var gPopFrame=null;var gReturnFunc;var gPopupIsShown=false;var gHideSelects=false;var gTabIndexes=new Array();var gTabbableTags=new Array("A","BUTTON","TEXTAREA","INPUT","IFRAME");if(!document.all){document.onkeypress=keyDownHandler}function initPopUp(){theBody=document.getElementById("SubmodelObj");popmask=document.createElement("div");popmask.id="popupMask";theBody.appendChild(popmask);popcont=document.createElement("div");popcont.id="popupContainer";popcontInner=document.createElement("div");popcontInner.id="popupInner";popTitleBar=document.createElement("div");popTitleBar.id="popupTitleBar";popTitle=document.createElement("div");popTitle.id="popupTitle";popTitle.innerHTML='<img src="../R6Images/SPProductColorStyle/title_BuyItNow.gif"/>';popTitleBar.appendChild(popTitle);popTitleClose=document.createElement("div");popTitleClose.id="popupControls";popTitleClose.innerHTML='<img src="../R6Images/SPProductColorStyle/btn_close.gif" id="popCloseBox"/>';popTitleClose.onclick=hidePopWin;popTitleBar.appendChild(popTitleClose);popcontInner.appendChild(popTitleBar);popcontIframe=document.createElement("iframe");popcontIframe.src="../R6Images/loadingHTML/loading.html";popcontIframe.frameBorder="0";popcontIframe.id="popupFrame";popcontIframe.name="popupFrame";popcontIframe.width="100%";popcontIframe.height="100%";popcontIframe.scrolling="no";popcontInner.appendChild(popcontIframe);popcont.appendChild(popcontInner);theBody.appendChild(popcont);gPopupMask=document.getElementById("popupMask");gPopupContainer=document.getElementById("popupContainer");gPopFrame=document.getElementById("popupFrame");var d=parseInt(window.navigator.appVersion.charAt(0),10);if(d<=6&&window.navigator.userAgent.indexOf("MSIE")>-1){gHideSelects=true}var c=document.getElementsByTagName("a");for(i=0;i<c.length;i++){if(c[i].className.indexOf("submodal")==0){c[i].onclick=function(){var a=400;var b=200;params=this.className.split("-");if(params.length==3){a=parseInt(params[1]);b=parseInt(params[2])}showPopWin(this.href,a,b,null);return false}}}}initPopUp();function showPopWin(n,j,o,l,m,h){if(m==null||m==true){document.getElementById("popCloseBox").style.display="block"}else{document.getElementById("popCloseBox").style.display="none"}document.getElementById("popupTitleBar").style.display="block";document.getElementById("SubmodelObj").style.display="block";gPopupIsShown=true;disableTabIndexes();gPopupMask.style.display="block";gPopupContainer.style.display="block";centerPopWin(j,o);var k=parseInt(document.getElementById("popupTitleBar").offsetHeight,10);gPopupContainer.style.width=j+"px";gPopupContainer.style.height=(o+k)+"px";setMaskSize();gPopFrame.style.width=parseInt(document.getElementById("popupTitleBar").offsetWidth,10)+"px";gPopFrame.style.height=(o)+"px";document.getElementById("popupTitleBar").style.display="block";if(h==false){document.getElementById("popupTitleBar").style.display="none"}if(n){gPopFrame.src=n}else{gPopFrame.src="../R6Images/loadingHTML/loading.html"}gReturnFunc=l;if(gHideSelects==true){hideSelectBoxes()}window.setTimeout("setPopTitle();",600)}var gi=0;function centerPopWin(o,m){if(gPopupIsShown==true){if(o==null||isNaN(o)){o=gPopupContainer.offsetWidth}if(m==null){m=gPopupContainer.offsetHeight}var q=document.getElementsByTagName("BODY")[0];q.style.overflow="hidden";var l=parseInt(document.documentElement.scrollTop);var j=parseInt(document.documentElement.scrollLeft,10);gPopupMask.style.top="0px";gPopupMask.style.left=j+"px";setMaskSize();var p=parseInt(document.getElementById("popupTitleBar").offsetHeight,10);var k=getViewportHeight();var n=getViewportWidth();gPopupContainer.style.top=(l+((k-(m+p))/2))+"px";gPopupContainer.style.left=(j+((n-o)/2))+"px"}}addEvent(window,"resize",centerPopWin);function OnscrollAction(){centerPopWin()}window.onscroll=OnscrollAction;function setMaskSize(){var d=document.getElementsByTagName("BODY")[0];var e=getViewportHeight();var f=getViewportWidth();if(e>d.scrollHeight){popHeight=e}else{popHeight=d.scrollHeight}if(f>d.scrollWidth){popWidth=f}else{popWidth=d.scrollWidth}gPopupMask.style.height=popHeight+"px";gPopupMask.style.width=popWidth+"px"}function hidePopWin(callReturnFunc){document.getElementById("popupTitle").innerHTML='<img src="../R6Images/SPProductColorStyle/title_BuyItNow.gif"/>';document.getElementById("popupControls").style.display="block";gPopupIsShown=false;document.getElementById("SubmodelObj").style.display="none";var theBody=document.getElementsByTagName("BODY")[0];theBody.style.overflow="";restoreTabIndexes();if(gPopupMask==null){return}gPopupMask.style.display="none";gPopupContainer.style.display="none";if(callReturnFunc==true&&gReturnFunc!=null){gReturnFunc(window.frames.popupFrame.returnVal)}if(gReturnFunc!=null&&gReturnFunc!=""){eval(gReturnFunc)()}gPopFrame.src="../R6Images/loadingHTML/loading.html";if(gHideSelects==true){displaySelectBoxes()}}function setPopTitle(){return;if(window.frames.popupFrame.document.title==null){window.setTimeout("setPopTitle();",10)}else{document.getElementById("popupTitle").innerHTML=window.frames.popupFrame.document.title}}function keyDownHandler(b){if(gPopupIsShown&&b.keyCode==9){return false}}function disableTabIndexes(){if(document.all){var f=0;for(var g=0;g<gTabbableTags.length;g++){var e=document.getElementsByTagName(gTabbableTags[g]);for(var h=0;h<e.length;h++){gTabIndexes[f]=e[h].tabIndex;e[h].tabIndex="-1";f++}}}}function restoreTabIndexes(){if(document.all){var f=0;for(var g=0;g<gTabbableTags.length;g++){var e=document.getElementsByTagName(gTabbableTags[g]);for(var h=0;h<e.length;h++){e[h].tabIndex=gTabIndexes[f];e[h].tabEnabled=true;f++}}}}function hideSelectBoxes(){for(var d=0;d<document.forms.length;d++){for(var c=0;c<document.forms[d].length;c++){if(document.forms[d].elements[c].tagName=="SELECT"){document.forms[d].elements[c].style.visibility="hidden"}}}}function displaySelectBoxes(){for(var d=0;d<document.forms.length;d++){for(var c=0;c<document.forms[d].length;c++){if(document.forms[d].elements[c].tagName=="SELECT"){document.forms[d].elements[c].style.visibility="visible"}}}}function addEvent(e,f,h){if(e.addEventListener){e.addEventListener(f,h,false);return true}else{if(e.attachEvent){var g=e.attachEvent("on"+f,h);return g}else{return false}}}function removeEvent(j,k,g,h){if(j.removeEventListener){j.removeEventListener(k,g,h);return true}else{if(j.detachEvent){var f=j.detachEvent("on"+k,g);return f}else{alert("Handler could not be removed")}}}function getViewportHeight(){if(window.innerHeight!=window.undefined){return window.innerHeight}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientHeight}if(document.body){return document.body.clientHeight}return window.undefined}function getViewportWidth(){if(window.innerWidth!=window.undefined){return window.innerWidth}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientWidth}if(document.body){return document.body.clientWidth}return window.undefined}function ControlMask(){document.getElementById("popupTitle").innerHTML="";document.getElementById("popupControls").style.display="none";showPopWin("../R6Images/loadingHTML/loading.html",220,130,"",true)};
