var repository="/international/web/lg/nl/likelgfarmadomonl30.nsf/RepositoryByAlias/Like20Std/$FILE/"; var repository1="/international/web/lg/nl/likelgfarmadomonl30.nsf/RepositoryByAlias/Like20Std1/$FILE/"; var repository2="/international/web/lg/nl/likelgfarmadomonl30.nsf/RepositoryByAlias/Like30Std/$FILE/"; // Will check if site is framed and break out. (Except where there are i-frames, then the name must be "likeframe") if (window.name != "likeframe") { if (window != top) { top.location.href = location.href } } // Redirects the page to ../docbyalias/xxx if the full path is not included in the url myurl=document.URL.toLowerCase(); validpages = new Array(".nsf/docbyalias/",".nsf/0/",".nsf/$$search",".nsf/(searchview)",".nsf/(newssearch)",".nsf/(agentslocator)","sitemap.html",".nsf/order",".nsf/contact",".nsf/wcc_contact",".nsf/confirmation",".nsf/srchimagelib"); doredirect = 1; for (i=0;i= 4) { if (navigator.appName == "Microsoft Internet Explorer") ie = true; if (navigator.appName == "Netscape") ns = true; } function SubTitleHeader(Subtitle) { document.writeln(""); document.writeln(""); document.writeln(""); document.writeln(""); document.writeln("
"+Subtitle+"
"); } function TopNextLinks(Next) { document.writeln("
"); document.writeln(""); document.writeln("") if (Next != "") { document.writeln("") } document.writeln("
TopNext
") document.writeln("
") document.writeln("
") } // Std function for opening pop-up windows. For example the contact forms popupWins = new Array(); function windowOpener(url, name, args) { if ( typeof( popupWins[name] ) != "object" ) { popupWins[name] = window.open(url,name,args); } else { if (!popupWins[name].closed){ popupWins[name].location.href = url; } else { popupWins[name] = window.open(url, name,args); } } popupWins[name].focus(); } function doQuickSearch() { str = document.forms['QuickSearch'].elements['QuickSearchStr'].value; sortBy="&SearchOrder=4"; start="&Start=1"; count="&Count=50"; if (str != "") { document.location.href=dbPath+"(SearchView)?SearchView&Query=("+str+")"+start+count+sortBy; } else { alert("Typ een sleutelwoord in om te zoeken."); } } // Creates code for inserting Flash element function wFlash(file,w,h) { document.writeln("") document.writeln("") document.writeln("") document.writeln("") document.writeln("") } // Creates code for inserting Windows Media element function ctrlWindowsMedia(alias,action) { if (action == "play") { if (ie) {document.all[alias].play()} } if (action == "pause") { if (ie) {document.all[alias].pause()} } if (action == "stop") { if (ie) {document.all[alias].stop();document.all[alias].CurrentPosition = 0} } if (action == "rewind") { if (ie) {document.all[alias].CurrentPosition = 0} } } function wWindowsMedia(alias,file,w,h) { document.writeln("
") document.writeln("") document.writeln("") document.writeln("") document.writeln("") document.writeln("") document.writeln("
") document.writeln("") document.writeln("") document.writeln("") document.writeln("") document.writeln("
") } // Cookie functions function setCookie(cookieName, cookieVal, days) { if (!days) days = 1; var expDate = new Date(); expDate.setTime(expDate.getTime() + days*24*60*60*1000); var expDateString = expDate.toGMTString(); document.cookie = cookieName + "="+escape(cookieVal) + ";path=/;expires="+expDateString; } function getCookie(cookieName) { cookieName = cookieName+"="; var allCookies = document.cookie; if (allCookies.length > 0) { var start = allCookies.indexOf(cookieName); if (start != -1) { start = start + cookieName.length; var end = allCookies.indexOf(";",start); if (end == -1) end = allCookies.length; return unescape(allCookies.substring(start,end)); } } return null; } function delCookie(cookieName) { document.cookie = cookieName + "=" + ";path=/;expires=Thu, 01-Jan-70 00:00:01 GMT"; } // Generates a 30 digit random number used for tracking individual users in statistics id = getCookie('session') if (id == null) { id = "" for (i=0;i<30;i++) { tempid = Math.random()*10 tempid = Math.floor(tempid) id = id + tempid } setCookie('session',id,365) } // Used in Sitemap to navigate main window. function gotoPage(u) { if(top.opener!=null){ top.opener.location.href = u; } } // Stores the last viewed pages in a cookie string. Used in tool subforms - params=Title, Alias, Flag (boolean flag if the list should be printed or only stored) function doPageHistory(title,ref,flag) { myHistory = getCookie("pagehistory") list = new Array() if ((myHistory == null) || (myHistory == "")) { setCookie("pagehistory",title+"@"+ref,365) document.writeln("-") return true } else { list = myHistory.split("@") // Check if the list should be diplayed or not if (flag) { document.writeln("") counter=1 for (i=0;i") counter++ } document.writeln("
"+counter+". "+list[i]+" 
") } for (i=0;i 10) { list = list.slice(0,10) } // Add current page to list setCookie("pagehistory",list.join("@"),365) } } // Pop-up and pop-down abstract text when hovering navigation elements. var flag = 0; function navPopUp(text) { if ((ie) && (text != "") && (flag==1)) { myObj = document.all['navPopUpText']; myObj1 = document.all['navPopConnector1']; myObj2 = document.all['navPopConnector2']; myObj3 = document.all['navPopConnector3']; myObj4 = document.all['navPopArrow']; myObj1Y = (window.event.y - window.event.offsetY) + 6; myObj1.style.top = myObj1Y; myObj4.style.top = myObj1Y-3; myObj.style.top = myObj1Y - 100; myObj3.style.top = myObj1Y - 80; myObj2.style.top = myObj3.style.top; myObj2.style.height = 80; myObj.innerHTML = text; myObj.style.visibility = "visible"; myObj1.style.visibility = "visible"; myObj2.style.visibility = "visible"; myObj3.style.visibility = "visible"; myObj4.style.visibility = "visible"; } } function navPopDown() { if ((ie) && (flag==1)) { myObj = document.all['navPopUpText']; myObj1 = document.all['navPopConnector1']; myObj2 = document.all['navPopConnector2']; myObj3 = document.all['navPopConnector3']; myObj4 = document.all['navPopArrow']; myObj.style.visibility = "hidden"; myObj1.style.visibility = "hidden"; myObj2.style.visibility = "hidden"; myObj3.style.visibility = "hidden"; myObj4.style.visibility = "hidden"; } } // Jump script for WebSiteFinder Tool function gotoSite(v) { if (v == "http://0") { return false; } else { window.open(v) } } /******************************************************************** Validation functions start ********************************************************************/ function valObj() { var errors = null; var field = null; var errorMessage = null; } function addError(varFieldName, varError, varField) { if(!isNaN(varError)) { switch (varError) { case 1: varError = "The field is empty"; break; case 2: varError = "Not a valid e-mail format"; break; case 3: varError = "No country code is entered"; break; case 4: varError = "No area code is entered"; break; case 5: varError = "No phone number is entered"; break; case 6: varError = "Phone number must use numbers only"; break; } } if (this.errors == null) { this.errors = (varFieldName + ": " + varError); } else { this.errors += (varFieldName + ": " + varError); } this.errors += "\r\n\r\n"; if(this.field == null) this.field = varField; errorMessage = true; } function errorCheck(f) { var preMessage = "The following problems were encountered:"; var postMessage = "The information could not be sent. Please make necessary changes and re-send."; var flag = true; if(this.errors != null && this.errorMessage == true) { alert(preMessage + "\r\n\r\n" + this.errors + postMessage); flag = false; } if(this.errors == null || flag==true) { return true; } fieldFocus = eval("f."+this.field+".focus()"); if(this.field != null) fieldFocus; this.errors = null; this.field = null; this.errorMessage = null; return false; } // whitespace characters var whitespace = " \t\n\r"; function isEmpty(s) { return ((s == null) || (s.length == 0)) } function charInString (c, s) { for (i = 0; i < s.length; i++) { if (s.charAt(i) == c) return true; } return false } function isWhitespace (s) { var i; if (isEmpty(s)) return true; for (i = 0; i < s.length; i++) { var c = s.charAt(i); if (whitespace.indexOf(c) == -1) return false; } return true; } function stripInitialWhitespace (s) { var i = 0; while ((i < s.length) && charInString (s.charAt(i), whitespace)) i++; return s.substring (i, s.length); } function isEmail (s) { var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid if (!reg1.test(s) && reg2.test(s)) { // if syntax is valid return true; } return false; } /******************************************************************** Validation functions end ********************************************************************/