function getBaseDomain() { var domain = document.domain; var ifirst= domain.indexOf("."); domain=domain.substring(ifirst+1); return domain; } // for netcrm the appdomain is netsuite, perform this replacement. function getAppDomain() { var domain = getBaseDomain(); var iCRM=domain.indexOf("netcrm"); if (iCRM != -1) domain=domain.substring(0,iCRM)+"netsuite"+domain.substring(iCRM+6); return domain; } function getQueryParameter(param) { var idx = document.URL.indexOf(param+"="); if (idx != -1) { var sidx = idx+param.length+1; var len = document.URL.substring(sidx).indexOf("&"); if (len == -1) return document.URL.substring(sidx); else return document.URL.substring(sidx, sidx+len); } else return null; } function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else begin += 2; var end = document.cookie.indexOf(";", begin); if (end == -1) end = dc.length; return unescape(dc.substring(begin + prefix.length, end)); } function setCookie(name, value, expires, path, domain, secure) { if (value == "") { value = null; expires = new Date(); } var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie; } function setCookieFromParam(name) { var value = getQueryParameter(name); //set the cookie to expire 10 years from the day it is set var expiresDate = new Date(new Date().getTime() + (10 * 365 * 1000 * 3600 * 24)); if (value != null) setCookie(name, value, expiresDate, "/", getBaseDomain(), null); return value; } //sets the cookie and returns the partner code function setPartnerCookie() { var partner = getQueryParameter("partner"); //set the cookie to expire 10 years from the day it is set var expiresDate = new Date(new Date().getTime() + (10 * 365 * 1000 * 3600 * 24)); if(partner == null) partner = getQueryParameter("affiliateid"); if (partner != null) setCookie("partner", partner, expiresDate, "/", getBaseDomain(), null); return partner; } //JS function to extract the partnercode from cookies function getPartnerCode() { // check for the partner code from the query parameters, return if // return that value if we retreived the partner code var partner = setPartnerCookie(); if(partner != null) return partner; //partner will replace the overloaded visitorCookie going forward partner = getCookie("partner"); // visitorCookie is deprecated going forward so we want to extract the partner code (if one exists) // and re-cookie with partner if(partner == null) { partner = getCookie("visitorCookie"); if(partner != null && partner.length > -1) { var vCookieVals = partner.split(","); partner = vCookieVals[1]; //document.cookie = "visitorCookie; path=/portal/; domain="www.<%=NLConfig.getSystemDomain()%>"; expires=Fri, 02-Jan-1970 00:00:00"; // setCookie("visitorCookie", null, null, , "www.<%=NLConfig.getSystemDomain()%>", secure) if(partner != null && partner != "") setCookie("partner", partner, "/", null, getBaseDomain(), null) } } //return null if no partner code exists for consistency's sake if(partner == "") partner = null; return partner; } // the following cookies all for the standard parameters that we're interested in if available. function setleadformparams() { var partner = getPartnerCode(); setCookieFromParam("promocode"); setCookieFromParam("osb"); setCookieFromParam("id"); setCookieFromParam("email"); // this represents the add medium. setCookieFromParam("custentity210"); // this represents scompid for the referring partner. // id of corresponding custom field in ns is custentity_ref_comp_id setCookieFromParam("origin"); return partner; } function writecobrandimage(defaultImage) { // use the Std. NetSuite logo as the default if no image is specified if (defaultImage == null) {defaultImage="http://www.netsuite.com/portal/images/pages/logo_netledger.gif";} var partner = setleadformparams(); if(partner != null) { var imageurl = "http://content."+getAppDomain()+"/app/crm/common/nlcorp/partnercobrand.nl?image=" + partner + "_30.gif"; document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write(" \n"); document.write("
NetSuite Business Software: Accounting, CRM, Ecommerce, ERP, Inventory
\n"); document.write(" \n"); } else { document.write("NetSuite Business Software: Accounting, CRM, Ecommerce, ERP, Inventory\n"); } return true; } function redirecttologin() { var redirect = getCookie("loginredirect"); var noredirect = getQueryParameter("noredirect"); // cmk 3/9/2005 -- need to explicitly send them to the secure pages if(noredirect == null && redirect != null) document.location = "https://system.netsuite.com/pages/customerlogin.jsp?country=US"; return true; } function gotoform(formid) { document.location = 'http://shopping.'+getAppDomain()+'/internal/portal/formredirect.nl?formid=' + formid; return true; } function gototestdrive() { document.location = 'http://testdrive.'+getAppDomain()+'/internal/trial/testdrivelogin.nl'; return true; } function selectAndGo(newLoc) { newPage = newLoc.options[newLoc.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(url) { opener.location = url; window.close(); } function populateEmailFromCookie() { var cookieVal = ""; if (document.cookie.indexOf("OSBuserName=") > -1) { thisCookie = document.cookie.split("; "); for(i=0; i' + '' + '' + '' + '' + '' + '' + '' + ''; document.write(oeTags); } else { var alternateContent = '' document.write(alternateContent); } } /******** * displays flash content or alternate * content is flash not detected. ********/ function getFlash(width, height, file, loop, alternate, classid, usemap) { if (MM_FlashCanPlay) { var curProtocol = "http:"; if (null != top.location.protocol && top.location.protocol=='https:') { curProtocol = "https:"; } var oeTags = '' + '' + '' + '' + '' + '' + '' + '' + ''; document.write(oeTags); } else { var alternateContent = '' document.write(alternateContent); } } /******** * Image rollovers for global navigation ********/ function globalNavOver(image_name) { image_name.src = "/web-common/assets/rt_blu_arrow.gif"; } function globalNavOut(image_name) { image_name.src = "/web-common/assets/1x1_spacer.gif"; } /******** * Image swaping (mouseover) for the Web site ********/ 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; } } } //getFlash// 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(' \n'); //FS hide this from IE4.5 Mac by splitting the tag document.write('on error resume next \n'); document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n'); document.write(' \n'); } } var BaynoteJSVersion="$Revision: 1.24 $";var BN_READY_SIGNAL="ReadySignal";if(typeof(baynote_globals)=="undefined")var baynote_globals=new Object();baynote_globals.waitForReady=false;function BNLog(){this.timeBase=new Date().getTime();this.lines=new Array();this.lastLine="";this.repCount=0;} BNLog.prototype.log=function(str){if(str==this.lastLine){++this.repCount;return;} if(this.repCount>0){this.lines.push("___ ABOVE REPEATED "+this.repCount+" TIME"+((this.repCount>1)?"S":""));} this.lastLine=str;this.repCount=0;var elapsed=new Date().getTime()-this.timeBase this.lines.push(elapsed+": "+str);} BNLog.prototype.toString=function(){if(this.repCount>0){this.lines.push("___ ABOVE REPEATED "+this.repCount+" TIME" +((this.repCount>1)?"S":""));this.lastLine="";this.repCount=0;} return this.lines.join("\n");} if(typeof(bnLog)=="undefined"){var bnLog=new BNLog();} function BNCriticalSectionQueue(){this.waitList=new Object();this.lastId=0;} BNCriticalSectionQueue.prototype.issueId=function(){return++this.lastId;} BNCriticalSectionQueue.prototype.enqueue=function(id,item){this.waitList[id]=item;} BNCriticalSectionQueue.prototype.getWaiter=function(id){return(id==null)?null:this.waitList[id];} BNCriticalSectionQueue.prototype.firstWaiter=function(){return this.getWaiter(this.nextWaiterKeyAfter(null));} BNCriticalSectionQueue.prototype.nextWaiterAfter=function(id){return this.getWaiter(this.nextWaiterKeyAfter(id));} BNCriticalSectionQueue.prototype.nextWaiterKeyAfter=function(id){for(var currKey in this.waitList){if(typeof(this.waitList[currKey])!="object")continue;if(id==null)return currKey;if(id==currKey)id=null;} return null;} BNCriticalSectionQueue.prototype.nextPredecessor=function(target,start){for(var currWaiter=start;currWaiter!=null;currWaiter=this.nextWaiterAfter(currWaiter.id)){if(currWaiter.enter||(currWaiter.number!=0&&(currWaiter.number4096)return false;document.cookie=cookieStr;return true;} BNSystem.prototype.removeCookie=function(cookieName,cookieDomain){this.setCookie(cookieName,"","/","Mon, 1 Jan 1990 00:00:00",cookieDomain);} BNSystem.prototype.getURLParam=function(name,url){if(!url)var url=window.location.href;var regex=new RegExp("[\\?&]"+name+"=([^&#]*)");var match=regex.exec(url);if(!match)return null;else return match[1];} BNSystem.prototype.getTestServer=function(){if(this.testServer!=null)return this.testServer;var testServer=this.getURLParam("bn_test");if(testServer)this.setCookie("bn_test",testServer,"/","SESSION");else if(testServer=="")this.removeCookie("bn_test");else{testServer=this.getCookieValue("bn_test");if(!testServer)testServer="";} this.testServer=testServer;return testServer;} if(typeof(bnSystem)=="undefined"){var bnSystem=new BNSystem();} if(typeof(BNTag)=="undefined"){function BNTag(previousTag){if(previousTag){this.id=previousTag.id+1;this.server=previousTag.server;this.customerId=previousTag.customerId;this.code=previousTag.code;} else this.id=0;this.attrs=new Object();this.docAttrs=new Object();this.css=new Object();}} BNTag.prototype.getCommonResourceId=function(){return"Common";} BNTag.prototype.getCommonResourceAddress=function(tag){return(this.server+"/baynote/tags2/common.js");} BNTag.prototype.getFailsafeResourceId=function(){return"Failsafe";} BNTag.prototype.getFailsafeResourceAddress=function(){return(this.server+"/baynote/customerstatus2?customerId="+this.customerId+"&code="+this.code+"&x="+this.id+(new Date().getTime()));} BNTag.prototype.show=function(parentElemId){if(this.id==0)document.write("");this.placeHolderId="bn_placeholder"+this.id;var placeHolderType;if(this.placeHolderElement)placeHolderType=this.placeHolderElement;else placeHolderType=this.popup?"span":"div";if(parentElemId){var placeHolder=document.createElement(placeHolderType);placeHolder.id=this.placeholderId;document.getElementById(parentElemId).appendChild(placeHolder);} else document.write("<"+placeHolderType+" id='"+this.placeHolderId+"'>");window["bn_tags"][this.id]=this;var testServer=bnSystem.getTestServer();if(testServer){var reValidTestServer=new RegExp("^https?://[^/]*\.baynote\.(com|net)(:\d+)?(/.*)?");if(reValidTestServer.test(testServer))this.server=testServer;else alert("Ignoring invalid test server \""+testServer+"\"");} this.showWhenReady(this);baynote_tag=new BNTag(this);} BNTag.prototype.showWhenReady=function(tag){if(baynote_globals.waitForReady&&!bnResourceManager.getResource(BN_READY_SIGNAL)){bnResourceManager.waitForResource(BN_READY_SIGNAL,function(){tag.showWhenReady(tag);});return;} var failsafeId=this.getFailsafeResourceId();if(!bnResourceManager.getResource(failsafeId)){bnResourceManager.waitForResource(failsafeId,function(){tag.showWhenReady(tag);},this.getFailsafeResourceAddress(),"img");return;} var commonId=this.getCommonResourceId();if(!bnResourceManager.getResource(commonId)){bnResourceManager.waitForResource(commonId,function(){tag.showWhenReady(tag);},this.getCommonResourceAddress(),"script");return;} bnTagManager.show(tag.id);} BNTag.prototype.noshow=function(){window["bn_tags"][this.id]=this;baynote_tag=new BNTag(this);} BNTag.prototype.getParam=function(name,defaultValue){var value=this[name];if(typeof(value)=="undefined"||value==null)return defaultValue;else return value;} if(typeof(baynote_tag)=="undefined"){window["bn_tags"]=new Array();var baynote_tag=new BNTag(null);} function bnReadySignal(){bnResourceManager.registerResource(BN_READY_SIGNAL);} function bnCall(resName,methodName,methodArg){var resource=bnResourceManager.getResource(resName);if(!resource){bnResourceManager.waitForResource(resName,function(){bnCall(resName,methodName,methodArg);});return;} if(typeof(resource)!="object"){return;} var method=resource[methodName];if(typeof(method)!="function"){return;} method.call(resource,methodArg);} //--> function show_baynote_guide(pagetype) { var bn_location_href = window.location.href; if (bn_location_href.indexOf("https://") == 0) { baynote_tag.server = "https://netsuite-www.baynote.net"; } else { baynote_tag.server = "http://netsuite-www.baynote.net"; } baynote_tag.customerId = "netsuite"; baynote_tag.code = "www"; baynote_tag.type="guide"; if(pagetype == "ContentGuide"){ baynote_tag.guide = "ContentGuide"; baynote_tag.listSize = 5; } baynote_tag.show(); bnResourceManager.waitForResource("GLResults0", "baynote_waitForGuide(1)"); } function baynote_isNotEmpty(name) { return (typeof(name) != "undefined") && (name != null) && (name != ""); } function getElementsByClassName(oElm, strTagName, strClassName){ var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName); var arrReturnElements = new Array(); strClassName = strClassName.replace(/\-/g, "\\-"); var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)"); var oElement; for(var i=0; i