if(!window.MI){window.MI={}}if(document.createEventObject){MI.IE=true}else{if(/firefox/i.test(navigator.userAgent)){MI.FF=true}}if(MI.IE){MI.IE_JSCRIPT=(ScriptEngineMajorVersion()+"."+ScriptEngineMinorVersion())*1;try{MI.IE=navigator.userAgent.match(/msie\s*(\d)/i)[1]*1;MI.IE_ASSUME=false}catch(err){MI.IE=7;MI.IE_ASSUME=true}}else{if(MI.FF){try{MI.FF=navigator.userAgent.match(/firefox\/?(\d\.\d)/i)[1]*1}catch(err){MI.FF=2}}}MI.XHR=function(){try{return new XMLHttpRequest()}catch(a){try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){throw new Error("Browser does not support XHR")}}}};MI.addEvent=function(a,c,b){if(a!=null&&c!=null&&b!=null){if(MI.IE){a.attachEvent("on"+c,b)}else{a.addEventListener(c,b,false)}}};MI.removeEvent=function(a,c,b){if(MI.IE){a.detachEvent("on"+c,b)}else{a.removeEventListener(c,b,false)}};MI.setOpacity=function(b,a){if(MI.IE<=6){b.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+(a*100)+")"}else{b.style.opacity=a}};MI.getPosition=function(d,a){var b={x:0,y:0,s:""};var c=d;do{b.x+=c.offsetLeft;b.y+=c.offsetTop;c=c.offsetParent;if(a&&c){if(MI.IE){s=c.currentStyle.position}else{s=document.defaultView.getComputedStyle(c,null).position}if(s=="relative"||s=="absolute"){break}}}while(c);return b};MI.checkImage=function(a){var b=document.createElement("div");b.className="logo";b.appendChild(document.createTextNode(a.alt));a.parentNode.replaceChild(b,a)};MI.findSource=function(b){if(!b||!b.target){b=event;b.target=b.srcElement}var c=b.target;var a=false;while(c!=null&&c!=document.body){if(c&&c.id=="AutoSuggestBox"){var a=true}if(c!=null){c=c.parentNode}}};MI.addEvent(window,"load",function(){MI.addEvent(document,"click",MI.findSource)});MI.toggleLogin=function(g){if(dojo.byId("Logon_Username_Textbox")!=null){dojo.byId("Logon_Username_Textbox").value=""}if(dojo.byId("Logon_Password_Textbox")!=null){dojo.byId("Logon_Password_Textbox").value=""}if(!g||!g.target){g=event;g.target=g.srcElement}var j=document.getElementById("loginBox");var b=parseInt(j.style.height);var i=j.style.display=="none"?1:-1;if(i===1){j.style.height=0;j.style.overflow="hidden";j.style.display="block"}var f=20;var c=20;var a=window.setInterval(function(){var d=parseInt(j.style.height);if(i==-1){if(isNaN(d)){d=j.offsetHeight}if(d-c>0){j.style.height=d-c+"px"}else{j.style.height=0;j.style.display="none";window.clearInterval(a)}}else{if(isNaN(d)){d=0}if(d+c<211){j.style.height=d+c+"px"}else{j.style.height="auto";if(document.getElementById("loginBox")!=null&&document.getElementById("loginBox").style.display=="block"){document.getElementById("Logon_Username_Textbox").focus()}window.clearInterval(a)}}},f)};MI.initSidebar=function(){var d=document.getElementById("sidebar");var c=d.getElementsByTagName("div");for(var b in c){if(/head/i.test(c[b].className)){var a=c[b].getElementsByTagName("a")[0]}else{if(!/bodyOnly/i.test(c[b].className)&&/body/i.test(c[b].className)){a._body=c[b];c[b].style.overflow="hidden";a.onclick=MI.toggleSidebar;console.log("mapping "+c[b].className+" to "+a.parentNode.parentNode.className)}}}d.style.display="block"};MI.toggleSidebar=function(g,b){g._onclick=g.onclick;g.onclick=function(){return false};var c=g.parentNode.parentNode;if(/open/i.test(c.className)){c.className=c.className.replace(/Open/,"Close");var h=-1}else{c.className=c.className.replace(/Close/,"Open");b.style.height=0;b.style.overflow="hidden";b.style.display="block";var h=1}var f=20;var e=20;var a=window.setInterval(function(){var d=b;var i=parseInt(d.style.height);if(h==-1){if(isNaN(i)){i=d.offsetHeight}if(i-e>0){d.style.height=i-e+"px"}else{d.style.height=0;d.style.display="none";g.onclick=g._onclick;window.clearInterval(a)}}else{if(isNaN(i)){i=0}if(i+e<d.scrollHeight){d.style.height=i+e+"px"}else{d.style.height="auto";g.onclick=g._onclick;window.clearInterval(a)}}},f);return false};MI.IMG_PATH="/wcsstore/ManutanStorefrontAssetStore/images/menu2nd/";MI.COL_NUM=4;MI.DELAY_OPEN=250;MI.menuMouseover=function(g){if(!g||!g.target){g=event;g.target=g.srcElement}if(g.target.nodeName.toLowerCase()!="li"){var h=g.target.parentNode;try{while(h.nodeName.toLowerCase()!="li"){h=h.parentNode}}catch(c){throw new Error("Event target on mouseover event have no LI ancestor element")}}else{var h=g.target}if(MI.menuCurrent){MI.menuClearCurrent()}MI.menuCurrent=h;MI.removeEvent(h,"mouseover",MI.menuMouseover);MI.menuTable.style.display="none";if(MI.IFR){MI.IFR.style.display="none"}var k=MI.menu[h.index];var n=Math.ceil(k.length/2);if(n>MI.COL_NUM){n=MI.COL_NUM}n=n*161+2*26;MI.menuTable.style.width=n+"px";MI.menuTable.content.innerHTML="";var b=k.length;var j,f,m;for(var d=0;d<b;d++){j=document.createElement("a");j.href=k[d].href;j.title=k[d].cap.replace(/~/,"'");j.className="menuitem";f=document.createElement("img");f.src=k[d].src;if(MI.IE==6&&/\.png\s*$/.test(k[d].src)){f.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+k[d].src+"', sizingMethod='scale')";f.src="/wcsstore/ManutanStorefrontAssetStore/images/blank.gif"}f.alt="";f.onerror=function(){if(MI.IE==6){if(!/blank\.gif$/.test(this.src)){this.src="/wcsstore/ManutanStorefrontAssetStore/images/blank.gif"}this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/wcsstore/ManutanStorefrontAssetStore/images/icons/nophoto-small.png', sizingMethod='scale')"}else{this.src="/wcsstore/ManutanStorefrontAssetStore/images/icons/nophoto-small.png"}};f.style.height="35px";f.style.width="35px";f.style.margin="5px 0 0 5px";j.appendChild(f);m=document.createElement("span");if(k[d].cap.length>36){m.appendChild(document.createTextNode(k[d].cap.substr(0,35).replace(/~/,"'")+"...."))}else{m.appendChild(document.createTextNode(k[d].cap.replace(/~/,"'")))}j.appendChild(m);MI.menuTable.content.appendChild(j);MI.addEvent(j,"mouseover",MI.menuToggleItem);MI.addEvent(j,"mouseout",MI.menuToggleItem)}h.style.background="url("+MI.IMG_PATH+"menu_mouseover.gif) repeat-x center";h.getElementsByTagName("a")[0].className="selected";h.inv=window.setTimeout(function(){var o=MI.getPosition(h);MI.menuTable.style.left=o.x-13+"px";MI.menuTable.style.top=o.y+h.offsetHeight+1+"px";MI.menuTable.style.display="block";var i=document.getElementById("head");var l=MI.getPosition(i);var a=o.x-h.offsetLeft+h.parentNode.offsetWidth;if(o.x+MI.menuTable.offsetWidth>l.x+i.offsetWidth){var e=o.x+MI.menuTable.offsetWidth-(l.x+i.offsetWidth);MI.menuTable.style.left=parseInt(MI.menuTable.style.left)-e+26+"px"}if(MI.IE==6){if(!MI.IFR){var q=document.createElement("iframe");q.style.position="absolute";q.style.display="none";q.src="blank.html";q.style.zIndex=19;MI.IFR=q;document.body.appendChild(MI.IFR)}var o=MI.getPosition(MI.menuTable);MI.IFR.style.left=o.x+14+"px";MI.IFR.style.top=o.y+"px";var e=MI.menuTable.offsetWidth-28;MI.IFR.style.width=(e>0?e:0)+"px";var i=MI.menuTable.offsetHeight-28;MI.IFR.style.height=(i>0?i:0)+"px";MI.IFR.style.display="block"}g.target.inv=null},MI.DELAY_OPEN)};MI.menuToggleItem=function(b){if(!b||!b.target){b=event;b.target=b.srcElement}var a=b.target.nodeName.toLowerCase()!="a"?b.target.parentNode:b.target;if(b.type=="mouseover"){a.style.background="url("+MI.IMG_PATH+"menuitem_mouseover.gif) no-repeat left center"}else{a.style.backgroundImage="none"}};MI.menuClearCurrent=function(){if(!MI.menuCurrent){return}if(MI.menuCurrent.inv){window.clearTimeout(MI.menuCurrent.inv)}MI.menuCurrent.style.background="";MI.menuCurrent.getElementsByTagName("a")[0].className="menu-link";MI.addEvent(MI.menuCurrent,"mouseover",MI.menuMouseover)};MI.menuMain=function(){var d=null;if(document.getElementById("menu")!=null){d=document.getElementById("menu").getElementsByTagName("ul")[0]}var h=function(i){if(!i||!i.target){i=event;i.target=i.srcElement}var f=MI.getPosition(d);if(!(f.x<i.clientX&&i.clientX<f.x+d.offsetWidth&&i.clientY>f.y)){MI.menuTable.style.display="none";if(MI.IFR){MI.IFR.style.display="none"}MI.menuClearCurrent()}};MI.addEvent(d,"mouseout",h);if(document.getElementById("menu")!=null){var e=document.getElementById("menu").getElementsByTagName("li");var a=e.length}for(var c=0;c<a;c++){e[c].index=c;MI.addEvent(e[c],"mouseover",MI.menuMouseover)}MI.menuTable=document.createElement("table");MI.menuTable.className="menugridcontainer";MI.menuTable.style.zIndex=200;MI.menuTable.style.display="none";if(MI.IFR){MI.IFR.style.display="none"}var h=function(i){if(!i||!i.target){i=event;i.target=i.srcElement}var f=MI.getPosition(MI.menuTable);if(!(f.x<i.clientX-20&&i.clientX+25<f.x+MI.menuTable.offsetWidth&&i.clientY<f.y+MI.menuTable.offsetHeight)){MI.menuTable.style.display="none";if(MI.IFR){MI.IFR.style.display="none"}MI.menuClearCurrent()}};MI.addEvent(MI.menuTable,"mouseout",h);var b=document.createElement("tbody");var g=document.createElement("tr");var j=document.createElement("td");j.className="menu2nd-c01";g.appendChild(j);MI.menuTable.content=document.createElement("td");MI.menuTable.content.className="menu2nd-c02";g.appendChild(MI.menuTable.content);j=document.createElement("td");j.className="menu2nd-c03";g.appendChild(j);b.appendChild(g);g=document.createElement("tr");j=document.createElement("td");j.className="menu2nd-c04";g.appendChild(j);j=document.createElement("td");j.className="menu2nd-c05";g.appendChild(j);j=document.createElement("td");j.className="menu2nd-c06";g.appendChild(j);b.appendChild(g);MI.menuTable.appendChild(b);document.body.appendChild(MI.menuTable);MI.addEvent(document,"click",function(f){if(MI.menuTable){MI.menuTable.style.display="none";if(MI.IFR){MI.IFR.style.display="none"}}if(MI.menuCurrent){MI.menuClearCurrent()}})};MI.toggleLoadProgress=function(a){var b=dijit.byId("LoadProgress");if(!b){parseWidget("LoadProgress");b=dijit.byId("LoadProgress");b.closeButtonNode.style.display="none"}if(a){b.show()}else{b.hide()}};MI.initTabs=function(b){if(b==null||b==undefined){b="tab0"}var a=document.getElementById(b);MI.addEvent(document.getElementById("tabs"),"click",function(c){if(!c||!c.target){c=event;c.target=c.srcElement}if(/tab\d+/.test(c.target.id)){if(c.target==a){return}var d=a.id.match(/tab(\d+)/)[1];document.getElementById("tabContent"+d).className=document.getElementById("tabContent"+d).className.replace(/active/,"");a.className=a.className.replace(/selected/,"");var f=c.target.id.match(/tab(\d+)/)[1];if(f==0){refreshSummary()}document.getElementById("tabContent"+f).className+=" active";c.target.className+=" selected";a=c.target}MessageHelper.hideAndClearMessage()})};MI.changeTab=function(c){var b=document.getElementById("tab"+c);if(MI.IE){b.fireEvent("onclick")}else{var a=document.createEvent("MouseEvent");a.initMouseEvent("click",true,true,window,1,0,0,0,0,false,false,false,false,1,null);b.dispatchEvent(a)}};MI.initTableSort=function(){var a=document.getElementsByTagName("table");for(var b in a){if(!a[b]._init&&/sortable/i.test(a[b].className)){a[b].onclick=function(d){if(!d||!d.target){d=event;d.target=d.srcElement}if(d.target.parentNode.nodeName.toLowerCase()=="th"){var c=d.target.parentNode}else{var c=d.target}if(c.nodeName.toLowerCase()=="th"){MI.tableSort(this,c.cellIndex,true,true,true)}};a[b]._lc=null;a[b]._lco=-1;a[b]._init=true}}};MI.tableSort=function(o,j,b,h,k){if(o){var g=o.tBodies[0];if(g!=null&&g.rows.length>0){var m=[];var e=g.rows.length;for(var f=0;f<e;f++){m[f]=new String(g.rows[f].cells[j].innerHTML);m[f].r=g.rows[f]}if(o._lco!==undefined){var h=o._lc==o.tHead.rows[0].cells[j]&&o._lco==1?-1:1}o._lc=o.tHead.rows[0].cells[j];o._lco=h;m.sort(function(l,i){if(b){var d=null;var c=null;var n=/[a-zA-Z0-9]/;var q=/^[\D]*(\d*([\,|\s]\d*)*|(\d*))([\.|\,]\d{2})$/;var v=/^(\d*([\,|\s]\d*)*|(\d*))(([\.|\,]\d{2})[\D]*)$/;if(j==0){var u=l.replace(/<\/?[a-z][^>]*>/img,"").split("/");var t=i.replace(/<\/?[a-z][^>]*>/img,"").split("/");var x=new Date(u[2],u[1],u[0]);var w=new Date(t[2],t[1],t[0]);d=x.getTime()*1;c=w.getTime()*1;j=j*-1}else{d=l.replace(/<strike.*?strike>/im,"");c=i.replace(/<strike.*?strike>/im,"");d=d.replace(/<a.*?a>/im,"");c=c.replace(/<a.*?a>/im,"");d=d.replace(/<br>/im,"");c=c.replace(/<br>/im,"");d=d.replace("&nbsp;","");c=c.replace("&nbsp;","");d=d.replace("&nbsp;","");c=c.replace("&nbsp;","");d=d.replace(" ","");c=c.replace(" ","");if((q.test(d)&&q.test(c))||(v.test(d)&&v.test(c))){d=d.replace(/[\,\.\s]/,"");d=d.match(/\d*/g);d=d.join("");c=c.replace(/[\,\.\s]/,"");c=c.match(/\d*/g);c=c.join("")}else{if(n.test(d)){}else{d=l*1;c=i*1}}}if(!isNaN(d)&&!isNaN(c)){l=d*1;i=c*1}}if(MI.IE){if(/^\s*<A/.test(l)&&/^\s*<A/.test(i)){l=l.replace(/^\s*<[^>]+>(.*?)<.*$/img,"$1");i=i.replace(/^\s*<[^>]+>(.*?)<.*$/img,"$1")}}else{if(/^\s*<a/.test(l)&&/^\s*<a/.test(i)){l=l.replace(/<\s*\w.*?>/g,"$1");l=l.replace(/<\s*\/\s*\w\s*.*?>|<\s*br\s*>/g,"$1");i=i.replace(/<\s*\w.*?>/g,"$1");i=i.replace(/<\s*\/\s*\w\s*.*?>|<\s*br\s*>/g,"$1")}}var a=l>i?h:l<i?-h:0;return a});g=o.removeChild(o.tBodies[0]);for(var f=0;f<e;f++){g.appendChild(g.removeChild(m[f].r));delete m[f].r}o.appendChild(g);if(k){var p=o.tBodies[0].rows;var e=p.length;for(var f=0;f<e;f++){console.log(f,f%2);if(!(f%2)){if(!/\s*even\s*/.test(p[f].className)){p[f].className+=" even"}}else{p[f].className=p[f].className.replace(/\s*even\s*/,"")}}}m=null;g=null}}};MI.initTableSortFromRefresh=function(a){if(a._init){return}a.onclick=null;MI.addEvent(a,"click",function(c){if(!c||!c.target){c=event;c.target=c.srcElement}if(c.target.parentNode.nodeName.toLowerCase()=="th"){var b=c.target.parentNode}else{var b=c.target}if(b.nodeName.toLowerCase()=="th"){MI.tableSort(a,b.cellIndex,true,true,true)}});a._lc=null;a._lco=-1;a._init=true};MI.popupCurrentOpen=null;MI.popupCreate=function(p,l){var o=document.createElement("table");o.cellSpacing=0;o.cellPadding=0;o.className=p;var f=document.createElement("tbody");for(var h=0;h<3;h++){var m=document.createElement("tr");for(var e=0;e<3;e++){var d=document.createElement("td");d.className="c"+h+""+e;m.appendChild(d)}f.appendChild(m)}o.appendChild(f);var c=f.rows[1].cells[1];var b=document.createElement("div");b.className="lbHead";o._header=document.createElement("h2");if(l){o._header.appendChild(document.createTextNode(l))}b.appendChild(o._header);var g=document.createElement("img");g.className="close";g.src="/wcsstore/ManutanStorefrontAssetStore/images/lb/lb_close.gif";var n=document.createElement("a");n.href="#";n.onclick=function(){o._close();return false};n.appendChild(g);b.appendChild(n);var k=document.createElement("div");k.className="clear";b.appendChild(k);c.appendChild(b);o._body=document.createElement("div");o._body.className="lbBody";c.appendChild(o._body);o._opener=null;o._open=MI.popupOpen;o._close=MI.popupClose;o._setHeader=MI.popupSetHeader;o._setBody=MI.popupSetBody;return o};MI.popupOpen=function(d,a,e,b,c){if(MI.popupCurrentOpen){MI.popupCurrentOpen._close()}if(!isNaN(a)){this.style.left=a+"px"}if(!isNaN(e)){this.style.top=e+"px"}if(!isNaN(b)){this.style.width=b+"px"}if(!isNaN(c)){this.style.height=c+"px"}this.opener=d;MI.popupCurrentOpen=this;if(this.opener&&this.opener.onopen){this.opener.onopen()}if(this.onopen){this.onopen()}this.style.display="block";MI.addEvent(document,"click",MI.popupCloseOnDocumentClick);MI.addEvent(document,"keyup",MI.popupCloseOnEscape)};MI.popupClose=function(){if(this.opener&&this.opener.onclose){this.opener.onclose()}this.opener=null;this.style.display="none";MI.popupCurrentOpen=null;MI.removeEvent(document,"click",MI.popupCloseOnDocumentClick);MI.removeEvent(document,"keyup",MI.popupCloseOnEscape)};MI.popupCloseOnEscape=function(a){if(!a||!a.target){a=event;a.target=a.srcElement}if(MI.popupCurrentOpen&&a.keyCode==27){MI.popupCurrentOpen._close()}};MI.popupCloseOnDocumentClick=function(a){if(!MI.popupCurrentOpen){return}if(!a||!a.target){a=event;a.target=a.srcElement}var c=false;var b=a.target;while(b!=document.body){if(b==MI.popupCurrentOpen||b==MI.popupCurrentOpen.opener){c=true;break}b=b.parentNode}if(!c){MI.popupCurrentOpen._close()}};MI.popupSetHeader=function(a){this._header.innerHTML=a};MI.popupSetBody=function(a,b){if(b){this._body.innerHTML=a+'<div class="clear"></div>'}else{this._body.innerHTML="";this._body.appendChild(a);var c=document.createElement("div");c.className="clear";this._body.appendChild(c)}};MI.detectSpinner=function(b){if(!b||!b.target){b=event;b.target=b.srcElement}var a=b.target.className.match(/spinner(up|down)/i);if(a&&a[1]){MI.execSpinner(b,a)}};MI.initSpinners=function(){var d=document.body.getElementsByTagName("input");var a=d.length;for(var b=0;b<a;b++){if(/spinner/.test(d[b].parentNode.className)){MI.addEvent(d[b],"keydown",MI.spinnerConstraint)}}MI.addEvent(document,"mousedown",MI.detectSpinner)};MI.spinnerConstraint=function(f){if(!f||!f.target){f=event;f.target=f.srcElement;f.preventDefault=function(){f.returnValue=false;return false}}var c=f.keyCode;if(!((48<=c&&c<=57)||(96<=c&&c<=105)||(37<=c&&c<=40)||c==8||c==46)){f.preventDefault();return false}var d=f.target.getAttribute("min")*1;var a=f.target.getAttribute("max")*1;var b=f.target.value*1;if(b>a){f.target.value=a}else{if(b<d){f.target.value=d}}};MI.execSpinner=function(h,c){var d=h.target.parentNode.getElementsByTagName("input")[0];var f=d.getAttribute("min")*1;var b=d.getAttribute("max")*1;var i=d.getAttribute("delta")*1;var g=d.value*1;if(c[1]=="Down"){i=-1*i}if(f<=g+i&&g+i<=b){d.value=g+i}else{return}var a=window.setTimeout(function(){var e=window.setInterval(function(){var j=d.value*1+i;if(f<=j&&j<=b){d.value=j}else{window.clearInterval(e)}},80);MI.addEvent(document,"mouseup",function(){MI.removeEvent(document,"mouseup",arguments.callee);window.clearInterval(e)})},700);MI.addEvent(document,"mouseup",function(){MI.removeEvent(document,"mouseup",arguments.callee);window.clearInterval(a)})};MI.addChangeMonitorToAllPageInput=function(c){var b=document.getElementsByTagName("input");for(var a=0;a<b.length;a++){if(b[a].type=="text"){MI.addEvent(b[a],"change",c)}}};MI.copyInputInTxt=function(a,c){var d=document.getElementById(c);if(!d){console.log("text element not found id :"+c);return}var b=document.getElementById(a);if(!b){console.log("input element not found id :"+a);return}d.innerHTML=b.value};MI.printBskt=function(a){if(a){if(MI.inputChanged){MI.copyInputInTxt("inputPrintBskTitle","txtPrintBskTitle");MI.copyInputInTxt("inputPrintBskName","txtPrintBskName");MI.copyInputInTxt("inputPrintBskSurName","txtPrintBskSurName");MI.copyInputInTxt("inputPrintBskEmail","txtPrintBskEmail");MI.copyInputInTxt("inputPrintCustNumber","txtPrintCustNumber");if(document.getElementById("inputPrintCompanyName").value==document.getElementById("inputCompanyNameHidden").value){document.getElementById("inputPrintCompanyName").value=""}if(document.getElementById("inputShippingPostCode").value==document.getElementById("inputShippingPostCodeHidden").value){document.getElementById("inputShippingPostCode").value=""}if(document.getElementById("inputShippingCity").value==document.getElementById("inputShippingCityHidden").value){document.getElementById("inputShippingCity").value=""}if(document.getElementById("inputShippingCountry").value==document.getElementById("inputShippingCountryHidden").value){document.getElementById("inputShippingCountry").value=""}if(document.getElementById("inputBillingPostCode").value==document.getElementById("inputBillingPostCodeHidden").value){document.getElementById("inputBillingPostCode").value=""}if(document.getElementById("inputBillingCity").value==document.getElementById("inputBillingCityHidden").value){document.getElementById("inputBillingCity").value=""}if(document.getElementById("inputBillingCountry").value==document.getElementById("inputBillingCountryHidden").value){document.getElementById("inputBillingCountry").value=""}MI.copyInputInTxt("inputPrintCompanyName","txtCompanyName");MI.copyInputInTxt("inputShippingAddress","txtShippingAddress");MI.copyInputInTxt("inputShippingPostCode","txtShippingPostCode");MI.copyInputInTxt("inputShippingCity","txtShippingCity");MI.copyInputInTxt("inputShippingCountry","txtShippingCountry");MI.copyInputInTxt("inputBillingAddress","txtBillingAddress");MI.copyInputInTxt("inputBillingPostCode","txtBillingPostCode");MI.copyInputInTxt("inputBillingCity","txtBillingCity");MI.copyInputInTxt("inputBillingCountry","txtBillingCountry");document.getElementById("inputPrint").style.visibility="hidden";document.getElementById("inputPrint").style.display="none";document.getElementById("txtPrint").style.visibility="visible";document.getElementById("txtPrint").style.display="inline"}else{document.getElementById("inputPrint").style.visibility="hidden";document.getElementById("inputPrint").style.display="none";document.getElementById("txtPrint").style.visibility="hidden";document.getElementById("txtPrint").style.display="none"}}window.print();if(a&&MI.inputChanged){}else{window.close()}return false};MI.inputChanged=false;MI.inputChangeMonitor=function(){MI.inputChanged=true};MI.submitSearch=function(b){if(MI.checkForValidFormatSearch("CachedHeaderDisplay_searchtext_textbox",b)){var a=dojo.byId("CatalogSearchForm");a.action=getAbsoluteURL("0")+"CategoryDisplay";a.submit();return false}else{return false}};MI.submitSearch=function(c,a){if(MI.checkForValidFormatSearch("CachedHeaderDisplay_searchtext_textbox",c,a)){var b=dojo.byId("CatalogSearchForm");b.action=getAbsoluteURL("0")+"CategoryDisplay";b.submit();return false}else{return false}};MI.checkForValidFormatSearch=function(c,b,a){if(dojo.byId(c)!=null){if(!MI.hasValueSearch(dojo.byId(c).value)){MI.alertErrorSearch(c,b);return false}else{if(dojo.byId(c).value==b||dojo.byId(c).value==a){MI.alertErrorSearch(c,b);return false}}}return true};MI.hasValueSearch=function(a){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};return(a.trim().length!=0)};MI.alertErrorSearch=function(b,a){dojo.byId(b).style.background="yellow";dojo.byId(b).value=a};
