function getBaseDomain(){var b=document.domain;var a=b.indexOf(".");b=b.substring(a+1);return b;}function getAppDomain(){var a=getBaseDomain();var b=a.indexOf("netcrm");if(b!=-1){a=a.substring(0,b)+"netsuite"+a.substring(b+6);}return a;}function getQueryParameter(d){var b=document.URL.indexOf(d+"=");if(b!=-1){var c=b+d.length+1;var a=document.URL.substring(c).indexOf("&");if(a==-1){return document.URL.substring(c);}else{return document.URL.substring(c,c+a);}}else{return null;}}function getCookie(c){var b=document.cookie;var e=c+"=";var d=b.indexOf("; "+e);if(d==-1){d=b.indexOf(e);if(d!=0){return null;}}else{d+=2;}var a=document.cookie.indexOf(";",d);if(a==-1){a=b.length;}return unescape(b.substring(d+e.length,a));}function setCookie(c,e,a,g,d,f){if(e==""){e=null;a=new Date();}var b=c+"="+escape(e)+((a)?"; expires="+a.toGMTString():"")+((g)?"; path="+g:"")+((d)?"; domain="+d:"")+((f)?"; secure":"");document.cookie=b;}function setCookieFromParam(a){var b=getQueryParameter(a);var c=new Date(new Date().getTime()+(10*365*1000*3600*24));if(b!=null){setCookie(a,b,c,"/",getBaseDomain(),null);}return b;}function setPartnerCookie(){var a=getQueryParameter("partner");var b=new Date(new Date().getTime()+(10*365*1000*3600*24));if(a==null){a=getQueryParameter("affiliateid");}if(a!=null){setCookie("partner",a,b,"/",getBaseDomain(),null);}return a;}function getPartnerCode(){var b=setPartnerCookie();if(b!=null){return b;}b=getCookie("partner");if(b==null){b=getCookie("visitorCookie");if(b!=null&&b.length>-1){var a=b.split(",");b=a[1];if(b!=null&&b!=""){setCookie("partner",b,"/",null,getBaseDomain(),null);}}}if(b==""){b=null;}return b;}function setleadformparams(){var a=getPartnerCode();setCookieFromParam("promocode");setCookieFromParam("osb");setCookieFromParam("id");setCookieFromParam("email");setCookieFromParam("custentity210");setCookieFromParam("origin");return a;}function writecobrandimage(a){if(a==null){a="http://www.netsuite.com/portal/hk/images/pages/logo_netsuite.gif";}var b=setleadformparams();if(b!=null){var c="http://content."+getAppDomain()+"/app/crm/common/nlcorp/partnercobrand.nl?image="+b+"_30.gif";document.write("          <TD WIDTH='100%' HEIGHT='69'>\n");document.write("          <TABLE WIDTH='375' BORDER='0' CELLSPACING='0' CELLPADDING='0'>\n");document.write("            <TR HEIGHT='10'>\n");document.write("              <TD ROWSPAN='3' WIDTH='173' HEIGHT='69'><A HREF='http://www.netsuite.com/portal/hk/home.shtml'><IMG SRC='"+a+"' ALT='NetSuite Business Software: Accounting, CRM, Ecommerce, ERP, Inventory' HEIGHT='69' WIDTH='173' BORDER='0'></A></TD>\n");document.write("              <TD ROWSPAN='3' WIDTH='16' HEIGHT='69'><IMG SRC='http://www.netsuite.com/portal/hk/images/pages/spacer.gif' ALT='' HEIGHT='69' WIDTH='16' BORDER='0'></TD>\n");document.write("              <TD WIDTH='10' HEIGHT='10'><IMG SRC='http://www.netsuite.com/portal/hk/images/pages/spacer.gif' ALT='' HEIGHT='10' WIDTH='10' BORDER='0'></TD>\n");document.write("              <TD ROWSPAN='3' WIDTH='175' HEIGHT='69'><img src='"+c+"' height=30 width=175 vspace=7 border=0></TD>\n");document.write("            </TR>\n");document.write("            <TR HEIGHT='49'>\n");document.write("              <TD WIDTH='1' HEIGHT='49' BACKGROUND='http://www.netsuite.com/portal/hk/images/pages/dots_vert.gif'><IMG SRC='http://www.netsuite.com/portal/hk/images/pages/spacer.gif' ALT='' HEIGHT='49' WIDTH='1' BORDER='0'></TD>\n");document.write("            </TR>\n");document.write("            <TR HEIGHT='10'>\n");document.write("              <TD WIDTH='1' HEIGHT='10'><IMG SRC='http://www.netsuite.com/portal/hk/images/pages/spacer.gif' ALT='' HEIGHT='10' WIDTH='1' BORDER='0'></TD>\n");document.write("            </TR>\n");document.write("          </TABLE>\n");document.write("        </TD>\n");}else{document.write("<TD WIDTH='100%' HEIGHT='69'><A HREF='http://www.netsuite.com/portal/hk/home.shtml'><IMG SRC='"+a+"' ALT='NetSuite Business Software: Accounting, CRM, Ecommerce, ERP, Inventory' HEIGHT='69' WIDTH='173' BORDER='0'></A></TD>\n");}return true;}function redirecttologin(){var b=getCookie("loginredirect");var a=getQueryParameter("noredirect");if(a==null&&b!=null){document.location="https://system.netsuite.com/pages/customerlogin.jsp?country=HK";}return true;}function gotoform(a){document.location="http://shopping."+getAppDomain()+"/internal/portal/formredirect.nl?formid="+a;return true;}function gototestdrive(){document.location="http://testdrive."+getAppDomain()+"/internal/trial/testdrivelogin.nl";return true;}function selectAndGo(a){newPage=a.options[a.selectedIndex].value;if(newPage!=""){window.location.href=newPage;}}function openTourWindow(){tour=window.open("/portal/popuptour.nl","Tour","scrollbars=yes,resizable=yes,width=820,height=508");tour.focus();}function closeAndGoTo(a){opener.location=a;window.close();}function populateEmailFromCookie(){var a="";if(document.cookie.indexOf("OSBuserName=")>-1){thisCookie=document.cookie.split("; ");for(i=0;i<thisCookie.length;i++){if("OSBuserName"==thisCookie[i].split("=")[0]){a=thisCookie[i].split("=")[1];document.forms[0].elements.email.value=a;document.forms[0].elements.rememberme.checked="T";document.forms[0].elements.password.focus();return;}}}else{document.forms[0].elements.email.focus();}}function hasFlash(){if((navigator.appName=="Microsoft Internet Explorer"&&navigator.appVersion.indexOf("Mac")==-1&&navigator.appVersion.indexOf("3.1")==-1)||(navigator.plugins&&navigator.plugins["Shockwave Flash"])||navigator.plugins["Shockwave Flash 2.0"]){return true;}else{return false;}}function getSecureFlash(g,a,e,b,h,f){if(MM_FlashCanPlay){var c='<OBJECT CLASSID="'+f+'"WIDTH="'+g+'" HEIGHT="'+a+'"CODEBASE="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"><PARAM NAME="MOVIE" VALUE="'+e+'"><PARAM NAME="PLAY" VALUE="true"><PARAM NAME="LOOP" VALUE="'+b+'"><PARAM NAME="QUALITY" VALUE="high"><PARAM NAME="MENU" VALUE="false"><EMBED SRC="'+e+'"WIDTH="'+g+'" HEIGHT="'+a+'"PLAY="true"LOOP="'+b+'"QUALITY="high"MENU="false"TYPE="application/x-shockwave-flash"PLUGINSPAGE="https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>';document.write(c);}else{var d='<IMG SRC="'+h+'" HEIGHT="'+a+'" WIDTH="'+g+'" BORDER="0">';document.write(d);}}function getFlash(a,k,c,e,b,f,h){if(MM_FlashCanPlay){var d="http:";if(null!=top.location.protocol&&top.location.protocol=="https:"){d="https:";}var g='<OBJECT CLASSID="'+f+'"WIDTH="'+a+'" HEIGHT="'+k+'"CODEBASE="'+d+'//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"><PARAM NAME="MOVIE" VALUE="'+c+'"><PARAM NAME="PLAY" VALUE="true"><PARAM NAME="LOOP" VALUE="'+e+'"><PARAM NAME="QUALITY" VALUE="high"><PARAM NAME="MENU" VALUE="false"><EMBED SRC="'+c+'"WIDTH="'+a+'" HEIGHT="'+k+'"PLAY="true"LOOP="'+e+'"QUALITY="high"MENU="false"TYPE="application/x-shockwave-flash"PLUGINSPAGE="'+d+'//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>';document.write(g);}else{var j='<IMG SRC="'+b+'" HEIGHT="'+k+'" WIDTH="'+a+'" BORDER="0" usemap="'+h+'">';document.write(j);}}function globalNavOver(a){a.src="/web-common/assets/rt_blu_arrow.gif";}function globalNavOut(a){a.src="/web-common/assets/1x1_spacer.gif";}function swapImage(daImage,daSrc){var objStr,obj;if(document.images){if(typeof(daImage)=="string"){objStr="document."+daImage;obj=eval(objStr);obj.src=daSrc;}else{if((typeof(daImage)=="object")&&daImage&&daImage.src){daImage.src=daSrc;}}}}if(typeof dontDetectFlash=="undefined"){dontDetectFlash=false;}if(!dontDetectFlash){var MM_contentVersion=5;var plugin=(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"])?navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin:0;if(plugin){var words=navigator.plugins["Shockwave Flash"].description.split(" ");for(var i=0;i<words.length;++i){if(isNaN(parseInt(words[i]))){continue;}var MM_PluginVersion=words[i];}var MM_FlashCanPlay=MM_PluginVersion>=MM_contentVersion;}else{if(navigator.userAgent&&navigator.userAgent.indexOf("MSIE")>=0&&(navigator.appVersion.indexOf("Win")!=-1)){document.write("<SCRIPT LANGUAGE=VBScript> \n");document.write("on error resume next \n");document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');document.write("</SCRIPT> \n");}}}var timeout=500;var closetimer=0;var ddmenuitem=0;function mopen(a){mcancelclosetime();if(ddmenuitem){ddmenuitem.style.visibility="hidden";}ddmenuitem=document.getElementById(a);ddmenuitem.style.visibility="visible";}function mclose(){if(ddmenuitem){ddmenuitem.style.visibility="hidden";}}function mclosetime(){closetimer=window.setTimeout(mclose,timeout);}function mcancelclosetime(){if(closetimer){window.clearTimeout(closetimer);closetimer=null;}}document.onclick=mclose;function MM_jumpMenu(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if(restore){selObj.selectedIndex=0;}}function openPopup(a){remoteWindow=window.open(a,"mynewWindow","toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=650,height=500");}var mboxCopyright="&copy; 2004-2007 Offermatica &trade; Corporation";mboxUrlBuilder=function(d,c){this.a=d;this.b=c;this.c=new Array();this.d=function(a){return a;};this.f=null;};mboxUrlBuilder.prototype.addParameter=function(f,e){var d=new RegExp("('|\")");if(d.exec(f)){throw"Parameter '"+f+"' contains invalid characters";}for(var c=0;c<this.c.length;c++){var b=this.c[c];if(b.name==f){b.value=e;return this;}}var a=new Object();a.name=f;a.value=e;this.c[this.c.length]=a;return this;};mboxUrlBuilder.prototype.addParameters=function(d){if(!d){return this;}for(var b=0;b<d.length;b++){var a=d[b].indexOf("=");if(a==-1||a==0){continue;}this.addParameter(d[b].substring(0,a),d[b].substring(a+1,d[b].length));}return this;};mboxUrlBuilder.prototype.setServerType=function(a){this.o=a;};mboxUrlBuilder.prototype.setBasePath=function(a){this.f=a;};mboxUrlBuilder.prototype.setUrlProcessAction=function(a){this.d=a;};mboxUrlBuilder.prototype.buildUrl=function(){var f=this.f?this.f:"/m2/"+this.b+"/mbox/"+this.o;var d=document.location.protocol=="file:"?"http:":document.location.protocol;var g=d+"//"+this.a+f;var c=g.indexOf("?")!=-1?"&":"?";for(var b=0;b<this.c.length;b++){var a=this.c[b];g+=c+a.name+"="+encodeURIComponent(a.value);c="&";}return this.t(this.d(g));};mboxUrlBuilder.prototype.getParameters=function(){return this.c;};mboxUrlBuilder.prototype.setParameters=function(a){this.c=a;};mboxUrlBuilder.prototype.clone=function(){var b=new mboxUrlBuilder(this.a,this.b);b.setServerType(this.o);b.setBasePath(this.f);b.setUrlProcessAction(this.d);for(var a=0;a<this.c.length;a++){b.addParameter(this.c[a].name,this.c[a].value);}return b;};mboxUrlBuilder.prototype.t=function(a){return a.replace(/\"/g,"&quot;").replace(/>/g,"&gt;");};mboxStandardFetcher=function(){};mboxStandardFetcher.prototype.getType=function(){return"standard";};mboxStandardFetcher.prototype.fetch=function(a){a.setServerType(this.getType());document.write('<script src="'+a.buildUrl()+'" language="JavaScript"><\/script>');};mboxStandardFetcher.prototype.cancel=function(){};mboxAjaxFetcher=function(){};mboxAjaxFetcher.prototype.getType=function(){return"ajax";};mboxAjaxFetcher.prototype.fetch=function(a){a.setServerType(this.getType());var b=a.buildUrl();this.x=document.createElement("script");this.x.src=b;document.body.appendChild(this.x);};mboxAjaxFetcher.prototype.cancel=function(){};mboxFactory=function(d,a){this.z=new mboxList();this.A=typeof document.createElement("div").replaceChild!="undefined"&&(function(){return true;})()&&typeof document.getElementById!="undefined"&&typeof(window.attachEvent||document.addEventListener||window.addEventListener)!="undefined"&&typeof encodeURIComponent!="undefined";this.B=this.A;if(mboxGetPageParameter("mboxDisable")!=null){this.B=false;}if(!mboxCookies.isEnabled()){this.B=false;}if(mboxCookies.getCookie("disable")=="true"){this.B=false;}if(this.isAdmin()){this.enable();}this.C=mboxGenerateId();this.D=new mboxSession(this.C,"mboxSession","session",31*60);this.E=new mboxPC(this.C,"PC",63072000);this.w=new mboxUrlBuilder(d,a);this.F();this.G=new Date().getTime();this.H=this.G;var c=this;this.addOnLoad(function(){c.H=new Date().getTime();});if(this.A){this.addOnLoad(function(){c.getMboxes().each(function(b){b.finalize();});});this.limitTraffic(100,10368000);if(this.B){this.K();this.L=new mboxSignaler(function(e,b){return c.create(e,b);});}}};mboxFactory.prototype.isEnabled=function(){return this.B;};mboxFactory.prototype.isSupported=function(){return this.A;};mboxFactory.prototype.disable=function(a){if(typeof duration=="undefined"){a=60*60;}if(!this.isAdmin()){this.B=false;mboxCookies.setCookie("disable","true",a);}};mboxFactory.prototype.enable=function(){this.B=true;mboxCookies.deleteCookie("disable");};mboxFactory.prototype.isAdmin=function(){return document.location.href.indexOf("mboxEnv")!=-1;};mboxFactory.prototype.limitTraffic=function(a,b){};mboxFactory.prototype.addOnLoad=function(a){if(window.addEventListener){window.addEventListener("load",a,false);}else{if(document.addEventListener){document.addEventListener("load",a,false);}else{if(document.attachEvent){window.attachEvent("onload",a);}}}};mboxFactory.prototype.getEllapsedTime=function(){return this.H-this.G;};mboxFactory.prototype.getEllapsedTimeUntil=function(a){return a-this.G;};mboxFactory.prototype.getMboxes=function(){return this.z;};mboxFactory.prototype.get=function(b,a){return this.z.get(b).getById(a||0);};mboxFactory.prototype.update=function(b,a){if(!this.isEnabled()){return;}if(this.z.get(b).length()==0){throw"Mbox "+b+" is not defined";}this.z.get(b).each(function(c){c.setFetcher(new mboxAjaxFetcher());c.getUrlBuilder().addParameter("mboxRandomRequestId",mboxGenerateId());c.load(a);});};mboxFactory.prototype.create=function(h,g){if(!this.isSupported()){return null;}var f=this.w.clone();f.addParameter("mboxCount",this.z.length()+1);f.addParameters(g);try{var b=this;var d=new mbox(h,this.z.get(h).length(),f);d.setOnError(function(c,e){d.setMessage(c);if(e=="standard"){d.activate();if(!d.isActivated()){b.disable();window.location.reload(false);}}else{throw c;}});d.setFetcher(new mboxStandardFetcher());this.z.add(d);}catch(a){this.disable();throw"Failed creating mbox, the error was: "+a;}return d;};mboxFactory.prototype.getPageId=function(){return this.C;};mboxFactory.prototype.getPCId=function(){return this.E;};mboxFactory.prototype.getSessionId=function(){return this.D;};mboxFactory.prototype.getSignaler=function(){return this.L;};mboxFactory.prototype.getUrlBuilder=function(){return this.w;};mboxFactory.prototype.F=function(){var b=this.w;b.addParameter("mboxHost",document.location.hostname).addParameter("mboxSession",this.D.getId()).addParameter("mboxPC",this.E.getId()).addParameter("mboxPage",this.C);var a=mboxCookies.getCookie("edge");if(a!=null){b.addParameter("edge",a);}b.setUrlProcessAction(function(d){d+="&mboxURL="+escape(document.location);var c=escape(document.referrer);if(d.length+c.length<2000){d+="&mboxReferrer="+c;}d+="&mboxVersion="+mboxVersion;return d;});};mboxFactory.prototype.W=function(){return"";};mboxFactory.prototype.K=function(){document.write("<style>.mboxDefault { visibility:hidden; }</style>");};mboxSignaler=function(f){var e=mboxCookies.getCookieNames("signal-");for(var c=0;c<e.length;c++){var d=e[c];var b=mboxCookies.getCookie(d).split("&");var a=f(b[0],b);a.put();a.load();mboxCookies.deleteCookie(d);}};mboxSignaler.prototype.signal=function(a,b){mboxCookies.setCookie("signal-"+a,mboxShiftArray(arguments).join("&"),45*60);};mboxList=function(){this.z=new Array();};mboxList.prototype.add=function(a){if(a!=null){this.z[this.z.length]=a;}};mboxList.prototype.get=function(d){var c=new mboxList();for(var b=0;b<this.z.length;b++){var a=this.z[b];if(a.getName()==d){c.add(a);}}return c;};mboxList.prototype.getById=function(a){return this.z[a];};mboxList.prototype.length=function(){return this.z.length;};mboxList.prototype.each=function(b){if(typeof b!="function"){throw"Action must be a function, was: "+typeof(b);}for(var a=0;a<this.z.length;a++){b(this.z[a]);}};mboxUpdate=function(a){mboxFactoryDefault.update(a,mboxShiftArray(arguments));};mboxCreate=function(b){var a=mboxFactoryDefault.create(b,mboxShiftArray(arguments));if(a){a.put();if(mboxFactoryDefault.isEnabled()){a.load();}}return a;};mbox=function(c,b,a){this.eb=null;this.fb=0;this.gb=null;this.hb=new mboxOfferContent();this.ib=this.getDefaultDiv();this.w=a;this.message="";this.jb=new Object();this.kb=0;this.db=b;this.g=c;this.lb();this.mb=new mboxStandardFetcher();a.addParameter("mbox",c).addParameter("mboxId",b);this.nb=function(){};this.ob=function(){};};mbox.prototype.getId=function(){return this.db;};mbox.prototype.lb=function(){if(this.g.length>250){throw"Mbox Name "+this.g+" exceeds max length of 250 characters.";}else{if(this.g.match(/^\s+|\s+$/g)){throw"Mbox Name "+this.g+" has leading/trailing whitespace(s).";}}};mbox.prototype.getName=function(){return this.g;};mbox.prototype.parameters=function(){return this.w.getParameters();};mbox.prototype.setOnLoad=function(a){this.ob=a;return this;};mbox.prototype.setMessage=function(a){this.message=a;return this;};mbox.prototype.setOnError=function(a){this.nb=a;return this;};mbox.prototype.setFetcher=function(a){this.mb.cancel();this.mb=a;return this;};mbox.prototype.getFetcher=function(){return this.mb;};mbox.prototype.put=function(){document.write('<div id="'+this.getMarkerName()+'" style="visibility:hidden;display:none"></div>');};mbox.prototype.load=function(d){this.setEventTime("load.start");this.cancelTimeout();var a=(d&&d.length>0)?this.w.clone().addParameters(d):this.w;this.mb.fetch(a);var b=this;this.qb=setTimeout(function(){b.nb("Fetch of mbox timed out",b.mb.getType());},15000);this.setEventTime("load.end");};mbox.prototype.activate=function(){if(this.fb){return this.fb;}this.setEventTime("activate"+ ++this.kb+".start");if(this.show()){this.cancelTimeout();this.fb=1;}this.setEventTime("activate"+this.kb+".end");return this.fb;};mbox.prototype.isActivated=function(){return this.fb;};mbox.prototype.setOffer=function(a){if(a&&a.show&&a.setOnLoad){this.hb=a;}else{throw"Invalid offer";}return this;};mbox.prototype.getOffer=function(){return this.hb;};mbox.prototype.show=function(){this.setEventTime("show.start");var a=this.hb.show(this);this.setEventTime(a==1?"show.end.ok":"show.end");return a;};mbox.prototype.showContent=function(a){if(a==null){return 0;}if(this.ib==null){this.ib=this.getDefaultDiv();if(this.ib==null){return 0;}}this.sb(this.ib);this.ib.parentNode.replaceChild(a,this.ib);this.ib=a;this.tb(a);this.ob();return 1;};mbox.prototype.hide=function(){this.setEventTime("hide.start");var a=this.showContent(this.getDefaultDiv());this.setEventTime(a==1?"hide.end.ok":"hide.end.fail");return a;};mbox.prototype.finalize=function(){this.setEventTime("finalize.start");this.cancelTimeout();if(this.getDefaultDiv()==null){this.gb=document.createElement("div");this.gb.className="mboxDefault";var a=document.getElementById(this.getMarkerName());a.parentNode.insertBefore(this.gb,a);this.setMessage("No default content, an empty one has been added");}if(!this.activate()){this.hide();this.setEventTime("finalize.end.hide");}this.setEventTime("finalize.end.ok");};mbox.prototype.cancelTimeout=function(){if(this.qb){clearTimeout(this.qb);}this.mb.cancel();};mbox.prototype.getDiv=function(){return this.ib;};mbox.prototype.getDefaultDiv=function(){if(this.gb!=null){return this.gb;}var a=document.getElementById(this.getMarkerName());while(a!=null){if((a.nodeType==1)&&(a.nodeName=="DIV")){if(a.className.indexOf("mboxMarker-")>0){return null;}else{if(a.className=="mboxDefault"){this.gb=a;return a;}}}a=a.previousSibling;}return null;};mbox.prototype.getMarkerName=function(){return"mboxMarker-"+this.g+"-"+this.db;};mbox.prototype.setEventTime=function(a){this.jb[a]=(new Date()).getTime();};mbox.prototype.getEventTimes=function(){return this.jb;};mbox.prototype.getURL=function(){return this.w.buildUrl();};mbox.prototype.getUrlBuilder=function(){return this.w;};mbox.prototype.xb=function(a){return a.style.display!="none";};mbox.prototype.tb=function(a){this.yb(a,true);};mbox.prototype.sb=function(a){this.yb(a,false);};mbox.prototype.yb=function(a,b){a.style.visibility=b?"visible":"hidden";a.style.display=b?"block":"none";};mboxOfferContent=function(){this.ob=function(){};};mboxOfferContent.prototype.show=function(a){var b=a.showContent(document.getElementById(this.Ab(a)));if(b==1){this.ob();}return b;};mboxOfferContent.prototype.setOnLoad=function(a){this.ob=a;};mboxOfferContent.prototype.Ab=function(a){return"mboxImported-"+a.getName()+"-"+a.getId();};mboxOfferAjax=function(a){this.rb=a;this.ob=function(){};};mboxOfferAjax.prototype.setOnLoad=function(a){this.ob=a;};mboxOfferAjax.prototype.show=function(b){var a=document.createElement("div");a.id="mboxImported-"+b.getName()+"-"+b.getId();a.innerHTML=this.rb;var c=b.showContent(a);if(c==1){this.ob();}return c;};mboxOfferDefault=function(){};mboxOfferDefault.prototype.setOnLoad=function(a){};mboxOfferDefault.prototype.show=function(a){return a.hide();};mboxCookieManager=function mboxCookieManager(b,a){this.g=b;this.Cb=a==""||a.indexOf(".")==-1?"":"; domain="+a;this.loadCookies();};mboxCookieManager.prototype.isEnabled=function(){this.setCookie("check","true",60);this.loadCookies();return this.getCookie("check")=="true";};mboxCookieManager.prototype.setCookie=function(e,c,f){if(typeof e!="undefined"&&typeof c!="undefined"&&typeof f!="undefined"){var a=this.Db.length;for(var b=0;b<this.Db.length;b++){if(this.Db[b].name==e){a=b;break;}}var d=new Object();d.name=e;d.value=escape(c);d.expireOn=Math.ceil(f+new Date().getTime()/1000);this.Db[a]=d;this.saveCookies();}};mboxCookieManager.prototype.getCookie=function(c){for(var a=0;a<this.Db.length;a++){var b=this.Db[a];if(b.name==c){return unescape(b.value);}}return null;};mboxCookieManager.prototype.deleteCookie=function(c){var d=new Array();for(var a=0;a<this.Db.length;a++){var b=this.Db[a];if(b.name!=c){d[d.length]=b;}}this.Db=d;this.saveCookies();};mboxCookieManager.prototype.getCookieNames=function(d){var a=new Array();for(var b=0;b<this.Db.length;b++){var c=this.Db[b];if(c.name.indexOf(d)==0){a[a.length]=c.name;}}return a;};mboxCookieManager.prototype.saveCookies=function(){var b=new Array();var c=0;for(var a=0;a<this.Db.length;a++){var d=this.Db[a];b[b.length]=d.name+"#"+d.value+"#"+d.expireOn;if(c<d.expireOn){c=d.expireOn;}}var e=new Date(c*1000);document.cookie=this.g+"="+b.join("|")+"; expires="+e.toGMTString()+"; path=/"+this.Cb;};mboxCookieManager.prototype.loadCookies=function(){this.Db=new Array();var g=document.cookie.indexOf(this.g+"=");if(g!=-1){var a=document.cookie.indexOf(";",g);if(a==-1){a=document.cookie.indexOf(",",g);if(a==-1){a=document.cookie.length;}}var b=document.cookie.substring(g+this.g.length+1,a).split("|");var d=Math.ceil(new Date().getTime()/1000);for(var c=0;c<b.length;c++){var f=b[c].split("#");if(d<=f[2]){var e=new Object();e.name=f[0];e.value=f[1];e.expireOn=f[2];this.Db[this.Db.length]=e;}}}};mboxSession=function(c,d,b,a){this.Rb=d;this.Z=b;this.Sb=a;this.Tb=false;this.db=typeof mboxForceSessionId!="undefined"?mboxForceSessionId:mboxGetPageParameter(this.Rb);if(this.db==null||this.db.length==0){this.db=mboxCookies.getCookie(b);if(this.db==null||this.db.length==0){this.db=c;this.Tb=true;}}mboxCookies.setCookie(b,this.db,a);};mboxSession.prototype.getId=function(){return this.db;};mboxSession.prototype.forceId=function(a){this.db=a;mboxCookies.setCookie(this.Z,this.db,this.Sb);};mboxPC=function(c,b,a){this.Z=b;this.Sb=a;this.db=typeof mboxForcePCId!="undefined"?mboxForcePCId:mboxCookies.getCookie(b);if(this.db==null||this.db.length==0){this.db=c;}mboxCookies.setCookie(b,this.db,a);};mboxPC.prototype.getId=function(){return this.db;};mboxPC.prototype.forceId=function(a){if(this.db!=a){this.db=a;mboxCookies.setCookie(this.Z,this.db,this.Sb);return true;}return false;};mboxGetPageParameter=function(a){var d=null;var b=new RegExp(a+"=([^&]*)");var c=b.exec(document.location);if(c!=null&&c.length>=2){d=c[1];}return d;};mboxSetCookie=function(b,a,c){return mboxCookies.setCookie(b,a,c);};mboxGetCookie=function(a){return mboxCookies.getCookie(a);};mboxCookiePageDomain=function(){var c=(/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1];var a=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/;if(!a.exec(c)){var b=(/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(c);if(b){c=b[0];}}return c?c:"";};mboxShiftArray=function(b){var c=new Array();for(var a=1;a<b.length;a++){c[c.length]=b[a];}return c;};mboxGenerateId=function(){return(new Date()).getTime()+"-"+Math.floor(Math.random()*999999);};if(typeof mboxVersion=="undefined"){var mboxVersion=28;var mboxCookies=new mboxCookieManager("mbox",(function(){return mboxCookiePageDomain();})());var mboxFactoryDefault=new mboxFactory("mbox5.offermatica.com","netsuite");}mboxDisplayDebugInfo=function(){mboxDebugger.show();};mboxCookieIsEnabled=function(){mboxCookies.setCookie("check","true",60);return mboxCookies.getCookie("check")=="true";};mboxDebug=function(b,c,d){this.cc=b;this.p=null;var a=mboxGetPageParameter(c);if(a==null){a=mboxCookies.getCookie(this.cc);}if(a!=null){if(a.indexOf("x")==0){this.p=new mboxDebugActionNone();document.write('<script language="Javascript1.2" src="http://admin5.offermatica.com/admin/mbox/mbox_debug_'+a+".jsp?mboxServerHost=mbox5.offermatica.com&clientCode=netsuite&session="+mboxCookies.getCookie("session")+'"><\/script>');}else{if(a.indexOf("log")==0){this.p=new mboxDebugActionLog(a);}else{if(a=="reset"){a=null;}else{this.p=new mboxDebugActionDefault();}}}}if(this.p!=null){if(d.isSupported()){d.addOnLoad(mboxDisplayDebugInfo);}else{alert("mbox functionality is not supported on this browser");this.disable();}}if(a!=null){mboxCookies.setCookie(this.cc,a,45*60);}else{this.disable();}};mboxDebug.prototype.isEnabled=function(){return this.p!=null;};mboxDebug.prototype.disable=function(){mboxCookies.deleteCookie(this.cc);};mboxDebug.prototype.setShowAction=function(a){this.p=a;};mboxDebug.prototype.show=function(){if(this.p!=null){this.p.show();}};mboxDebugActionLog=function(a){this.dc=a;this.ec=(new Date()).getTime();};mboxDebugActionLog.prototype.show=function(){var a=(new Date()).getTime();var b=new mboxDebugWindow("Debug Log");b.putPageStart();b.put("<img src='"+document.location.protocol+"//mbox5.offermatica.com/images/log.gif?mboxDebug="+this.dc+"&mboxClient=netsuite&mboxPageLoadTime="+(a-this.ec)+"'/>");b.put("<br />");b.putCloseButton();b.putPageEnd();};mboxDebugActionNone=function(){};mboxDebugActionNone.prototype.show=function(){alert("Debug mode not defined\n('x-mode' not supported when debug is remote in mbox.js)");};mboxDebugActionDefault=function(){};mboxDebugActionDefault.prototype.show=function(){var a=new mboxDebugWindow("Debug");a.putPageStart();a.put("  <b>Mbox Debug Window (version:"+mboxVersion+")</b></br>");a.put("<p/>");a.put("<b>Page</b>: "+document.location);a.put(" <ul>");if(mboxFactoryDefault.isEnabled()){a.put("  <li>Enabled: true</li>");}else{a.put('  <li>Enabled: <span style="color:red"><b>false</b></span></li>');}a.put("  <li>Cookies enabled: "+mboxCookieIsEnabled()+"</li>");a.put("  <li>Page URL: '"+document.location+"'</li>");a.put("  <li>Cookies: '"+document.cookie+"'</li>");mboxFactoryDefault.getMboxes().each(function(b){var d=b.getName();a.put("  <li>mbox: '"+d+"'");a.put("   <ul>");if(b.message!=""){a.put('   <li><span style="color: red"><b>Error: '+b.message+"</b></span></li>");}var c=document.getElementById(b.getMarkerName());if(c==null){a.put('    <li><span style="color: red"><b>Error: can not find mbox in dom</b></span></li>');}a.put('    <li><a href="'+b.getURL()+'">'+b.getURL()+"</a></li>");a.put("   </ul>");a.put("  </li>");});a.put(" </ul>");a.putCloseButton();a.putPageEnd();};mboxDebugWindow=function(b){this.g=b+" "+document.location.hostname;var c=/\W/g;var a=this.g.replace(c,"_");this.gc=window.open("","mboxDebugWindow"+a,"width=600,height=300,resizable,scrollbars=yes,toolbar=yes");if(this.gc==null){alert("Unable to open Offermatica's mboxDebugWindow Window.\nAre you blocking popups?\n");}};mboxDebugWindow.prototype.put=function(a){if(this.gc==null){return;}try{this.gc.document.writeln(a);this.gc.scrollBy(0,1000);}catch(b){alert("Unable to write to the current mboxDebug window.\nPlease close any open debug window");this.gc=null;}};mboxDebugWindow.prototype.putCloseButton=function(){this.put('<a href="javascript:mboxDebugWindowClose()">click here to close debug window</a>');};mboxDebugWindow.prototype.putPageStart=function(){this.put("<html><head> <title>"+this.g+"</title>  <script>   function mboxDebugWindowClose() {     try {       window.opener.mboxDebugger.disable();     } catch(e) {       alert('Could not disable debug mode.\\n'         + 'Browse to a page containing an mbox and\\n'         + 'click on close link.');     }     window.close();   }  <\/script> </head> <body>");};mboxDebugWindow.prototype.putPageEnd=function(){this.put("</body></html>");if(this.gc!=null){this.gc.document.close();}};if(typeof mboxDebugger=="undefined"){mboxDebugger=new mboxDebug("debug","mboxDebug",mboxFactoryDefault);}