var About_EIM = new Array(" About EIM","   Company Info","   Time Line","   Clients","   Office Locations"," ") var Actuator_Controls = new Array(" Actuator Controls","   TEC 2000","   M2CP","   MCP","   HQ Series"," ") var Documents = new Array(" Documents","   Outline Drawings - Multi Turn","   Outline Drawings - Part Turn","   Documents - Wiring Diagram"," ") var EIM_Sales = new Array(" EIM Sales","   USA","   International"," ") var HQ_Series = new Array(" HQ Series","   Control Options","   Wiring Diagrams","   Outline Drawings","   Manuals","   HQ Ratings"," ") var M2CP = new Array(" M2CP","   Wiring Diagrams","   Outline Drawings","   Brochures"," ") var Manual_Bevel_Gears = new Array(" Manual Bevel Gears","   Bevel Gears","   Bevel Gear Ratings","   Bevel Gear Outlines","   Part-turn Gears"," ") var Manual_Gears = new Array(" Manual Gears","   Part-turn Gears"," ") var Manual_Worm_Gears = new Array(" Manual Worm Gears","   Worm Gears","   Worm Gear Ratings","   Worm Gear Outlines"," ") var MCP = new Array(" MCP","   Outline Drawings"," ") var Part_Turn_Electric = new Array(" Part Turn Electric","   Series 2000 Part-turn","   HQ Series Part-turn"," ") var Pneumatic_Actuators = new Array(" Pneumatic Actuators","   Low Pressure Pneumatic","   High Pressure Pneumatic"," ") var Products = new Array(" Products","   Electric Actuators","   Pneumatic Actuators","   Actuator Controls","   Network Controls","   Manual Actuators"," ") var Products_Literature = new Array(" Products Literature","   Instructional Manual","   Sales Brochures"," ") var TEC2000 = new Array(" TEC2000","   Wiring Diagrams","   Outline Drawings","   Literature","   TecLinc Software"," ") var pathname = (window.location.pathname); var fullpath = pathname.substring(0,(pathname.lastIndexOf('.nsf')+5)) function removeDoc(docUNID) { currentURL = document.URL; //Run "Remove Web View Document" Agent var url = fullpath + 'rwvd?OpenAgent&ID='; url += docUNID; url += "&Return="+currentURL; window.location.replace(url) } function isEmail(s){ if (isEmpty(s)){ return false; } // there must be >= 1 character before @, so we // start looking at character position 1 // (i.e. second character) var i = 1; var sLength = s.length; // look for @ while ((i < sLength) && (s.charAt(i) != "@")){ i++ } if ((i >= sLength) || (s.charAt(i) != "@")) return false; else i += 2; // look for . while ((i < sLength) && (s.charAt(i) != ".")){ i++ } // there must be at least one character after the . if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false; else return true; } function isEmpty(s){ return ((s == null) || (s.length == 0)) } IE4 = document.all; function newAlert(title,mess,icon,mods) { (IE4) ? makeMsgBox(title,mess,icon,0,0,mods) : alert(mess); } function newConfirm(title,mess,icon,defbut,mods) { if (IE4) { icon = (icon==0) ? 0 : 2; defbut = (defbut==0) ? 0 : 1; retVal = makeMsgBox(title,mess,icon,4,defbut,mods); retVal = (retVal==6); } else { retVal = confirm(mess); } return retVal; } function newPrompt(title,mess,def) { retVal = (IE4) ? makeInputBox(title,mess,def) : prompt(mess,def); return retVal; } function IEBox(title,mess,icon,buts,defbut,mods) { retVal = (IE4) ? makeMsgBox(title,mess,icon,buts,defbut,mods) : null; return retVal; } function verifyEmail(form,v_email) { if (isEmpty(v_email) || !isEmail(v_email)){ newAlert('E-mail Validation','Please provide a valid e-mail address.',4,0); return false } else { register(v_email); eval("document."+form+".submit()"); } } function findMyAccount(email) { if ( isEmpty(email) || !isEmail(email) ) { alert('Please type in a valid e-mail address'); return false } else { document._TPLogin.submit(); } } // ------- Begin Cookie Functions function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function FixCookieDate (date) { var base = new Date(0); var skew = base.getTime(); // dawn of (Unix) time - should be 0 if (skew > 0) // Except on the Mac - ahead of its time date.setTime (date.getTime() - skew); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name,value) { var expDays = 365; // number of days the cookie should last var expDate = new Date(); expDate.setTime(expDate.getTime() + (24 * 60 * 60 * 1000 * expDays)); path="/"; document.cookie = name + "=" + escape (value) + "; expires=" + expDate + "; path=" + path } function DeleteCookie (name,path,domain) { if (GetCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } function separatedata(datain,delimin){ var i=0; var xarray=new Array(datain); var j=0; for(i=0;i0){ var k=x+i; xarray[j++]=datain.substring(i,k); i+=x} else{ xarray[j++]=tempstring; i=datain.length} } return xarray; } function register(name) { SetCookie("TPUser", name); } function loadCookie(cookie_name,form,field_name) { var cookieValue = GetCookie(cookie_name); if (cookieValue != null ) { eval("document.forms['"+form+"']."+field_name+".value = '" + cookieValue + "'"); } } function popupModal(targetURL,w,h) { var szUrl; var szFeatures; var szField; szUrl = targetURL; szFeatures = 'dialogWidth:'+w+'; dialogHeight:'+h+'; status:0; help:0; scroll:1; '; szName = window.showModalDialog(szUrl, "", szFeatures) } function getSelectedDocs( form ){ var x = 0; var seldocs = new Array(); for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].type == "checkbox") { if (form.elements[i].name == "$$SelectDoc") { if(form.elements[i].checked) { seldocs[x]=form.elements[i].value x++; } } } } return seldocs; } function removeDocuments( form ) { var pathname = window.location.pathname; var path = pathname.substring(0,(pathname.lastIndexOf('.nsf')+5)); var url = path + 'rmwd?OpenAgent&UNIDs='; var docs = getSelectedDocs( form ); if (docs.length != 0) { for (var i = 0; i < docs.length; i++) { url += '%%' + docs[i]; } url += "%%&Return="+pathname; window.location.replace(url) } else { alert("You must select one or more documents first."); } }