//NEW SEV JAVASCRIPT function pop_up_file(filename, tall, wide){ window.open(filename,'special','top=20,screenx=20,left=20,screeny=20,width=' + wide + ',height=' + tall + ',buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no'); } function pop_up_file_scroll(filename, tall, wide){ window.open(filename,'special','top=20,screenx=20,left=20,screeny=20,width=' + wide + ',height=' + tall + ',buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no'); } function glossary(filename){ window.open(filename,'special','top=20,screenx=20,left=20,screeny=20,width=632,height=535,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no'); } function prod_pop(filename){ window.open(filename,'special','top=20,screenx=20,left=20,screeny=20,width=557,height=535,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no'); } function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features); } //Galileo31.com Javascript functions - 101503 //B.Arlen function readCookie(name) { if (document.cookie == '') { // there's no cookie, so go no further return false; } else { // there is a cookie var firstChar, lastChar; var theBigCookie = document.cookie; firstChar = theBigCookie.indexOf(name); // find the start of 'name' if(firstChar != -1) { // if you found the cookie firstChar += name.length + 1; // skip 'name' and '=' lastChar = theBigCookie.indexOf(';', firstChar); // Find the end of the value string (i.e. the next ';'). if(lastChar == -1) lastChar = theBigCookie.length; return unescape(theBigCookie.substring(firstChar, lastChar)); } else { // If there was no cookie of that name, return false. return false; } } } // end readCookie function setCookie(name,value) { var the_value = value; var the_cookie = name+"=" + escape(the_value) + ";" ; var the_cookie = the_cookie + "path=/;"; var the_cookie = the_cookie + "domain=www.scottevest.com;"; //var the_date = new Date("December 31, 2023"); var the_date = new Date().add(Date.MONTH, 1);//expire this cookie in 1 mo. var the_cookie_date = the_date.toGMTString(); //alert(the_cookie); document.cookie = the_cookie + ";expires=" + the_cookie_date; } // end setCookie function getScrollValue() { //check to see if the cookie value is empty, if so return 1, if not return a random number from 1 -3 var cookieVal = readCookie('scrolleritem'); //get the cookie value var newVal; if (cookieVal) { //if there is a value set a new one from 2-4 newVal= Math.floor(Math.random()*3)+1; } else {//value was not found //set cookie value to 0 newVal =0; setCookie('scrolleritem',newVal); } //DEBUG //alert("old val is: "+cookieVal+" new val is: "+newVal); return newVal; } //end getValue //OLD SEV JAVASCRIPT function newWindowT(picture) { windowTall = window.open(picture,'picWin1', 'top=100,screeny=100,left=100,screenx=100,width=293,height=443,scrollbars=no'); windowTall.focus() } function newWindowW(picture) { windowWide = window.open(picture,'picWin2', 'top=100,screeny=100,left=100,screenx=100,width=393,height=293,scrollbars=no'); windowWide.focus() } /* old cold: function emailFriend() { //use this line when galileo31.com under maintenance //emailWindow = window.open('/_g31_live/email_friend_maint.htm', 'emailWin', //'top=30,screeny=30,left=30,screenx=30,width=620,height=250,resizable=yes,scrollbars=yes'); //use this line when galileo31.com is live //emailWindow = window.open('http://scottevest.galileo31.com/email_friend.asp?geturl=' + window.location.href, 'emailWin', //'top=30,screeny=30,left=30,screenx=30,width=620,height=600,resizable=yes,scrollbars=yes'); //emailWindow.focus(); } */ function emailFriend() { // Nay /* Modified on 2007/08/22 to work with Google Analytics */ emailWindow = window.open('http://www.scottevest.com/v3_popups/email_friend.shtml', 'emailWin', 'top=30,screeny=30,left=30,screenx=30,width=620,height=600,resizable=yes,scrollbars=yes'); emailWindow.focus(); } function emailFriendContest() { emailWindow = window.open('http://scottevest.galileo31.com/email_friend.asp?geturl=http://www.scottevest.com', 'emailWin', 'top=30,screeny=30,left=30,screenx=30,width=620,height=600,resizable=yes,scrollbars=yes'); emailWindow.focus() } function contestRules(){ rulesWindow = window.open('/contest_rules.htm', 'rulesWin', 'width=575,scrollbars=yes,resizable=no,toolbar=no,menubar=no') rulesWindow.focus() } //b.arlen 061903 modified to point to /_g31_live redirect folder function emailSignup(){ emailWindow = window.open('/_g31_live/subscribe.htm', 'emailWin', 'width=420,height=350,scrollbars=no,resizable=no,toolbar=no,menubar=no') emailWindow.focus() } //b.arlen 061903 added vestimonial pop up function. called from index.htm function vestimonial(){ vWindow = window.open('/_g31_live/vestimonial.htm', 'emailWin', 'width=350,height=450,scrollbars=no,resizable=no,toolbar=no,menubar=no') vWindow.focus() } function vestPop(){ popWindow = window.open('/_g31_live/vestimonial.htm', 'SubmitVESTimonial', 'width=275,height=420,scrollbars=no,buttons=no,toolbar=no,location=no,menubar=no,resizable=no,directories=no') popWindow.focus() } function sizesPop(){ sizeWindow = window.open('/product/sizechart_pop.html', 'sizeWin', 'width=438,height=550,scrollbars=yes,resizable=no,toolbar=no,menubar=no') sizeWindow.focus() } function shippingPop(){ shipWindow = window.open('/faq/shipping_pop.shtml', 'ShippingInformation', 'width=438,height=550,scrollbars=yes,resizable=no,toolbar=no,menubar=no') shipWindow.focus() } function carePop(){ shipWindow = window.open('/faq/care_pop.shtml', 'CareInformation', 'width=438,height=550,scrollbars=yes,resizable=no,toolbar=no,menubar=no') shipWindow.focus() } function openCompare() { compareWindow = window.open('/product/compare25flash/compare_evest2pop.htm','SCOTTeVESTComparisonChart','width=725,height=450,scrollbars=no,resizable=no,toolbar=no,menubar=no') compareWindow.focus() } function backorderPop(){ popWindow = window.open('/backorder.htm', 'BACKORDER', 'width=325,height=325,scrollbars=no,buttons=no,toolbar=no,location=no,menubar=no,resizable=no,directories=no') popWindow.focus() } function soldoutPop(){ popWindow = window.open('/soldout.htm', 'SOLDOUT', 'width=335,height=350,scrollbars=no,buttons=no,toolbar=no,location=no,menubar=no,resizable=no,directories=no') popWindow.focus() } function xyberpop() { xyberWindow = window.open('http://www.xybernaut.com', 'xyberwin', 'width=600,height=500,scrollbars=yes,resizable=yes,toolbar=no,location=no') xyberWindow.focus() } function sportlitePop(){ //hide old path code //popWindow = window.open('http://technologyenabledclothing.com/newsev2.5/web/product/slviewer/slviewer.html', 'SportLiteViewer','width=226,height=275,scrollbars=no,resizable=no,toolbar=no,menubar=no') popWindow = window.open('/product/slviewer/slviewer.html', 'SportLiteViewer','width=226,height=275,scrollbars=no,resizable=no,toolbar=no,menubar=no') popWindow.focus() } function sale1_pop(){ saleWindow = window.open('/pop-v1sale.html', 'saleWin', 'top=100,left=100,screenx=100,screeny=100,width=250,height=300,scrollbars=no,buttons=no,toolbar=no,location=no,menubar=no,resizable=no,directories=no') saleWindow.focus() } function legal_pop(){ window.open('legal_pop.htm','legal_pop','top=100,screeny=100,left=100,screenx=100,width=400,height=350,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no'); } function legal_pop2(){ window.open('../legal_pop.htm','legal_pop','top=100,screeny=100,left=100,screenx=100,width=400,height=350,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no'); } function kelly(){ window.open('/company/kelly.htm','kelly','top=100,screenx=100,left=100,screeny=100,width=298,height=298,buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no'); } function validateform() { var strForm = "frmSubscribe" var subEmail = trimAll(document[strForm].email.value) //var toEmail = trimAll(document[strForm].strToEmail.value) //var fromName = trimAll(document[strForm].strFromName.value) //var toName = trimAll(document[strForm].strToName.value) //var subject = trimAll(document[strForm].strSubject.value) var maxMessage = 200 //check that email is valid if (subEmail == '') { alert ('Please An Enter Your Email Address. Thanks.') document[strForm].email.focus(); return false; } if (subEmail != '') { if (isEmail(subEmail)== false) { alert ('Your Email Address Has An Invalid Format. Please Try Again') document[strForm].email.focus(); return false; } } }//end Validator /** * SWFObject v1.4.1: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ * * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License: * http://www.opensource.org/licenses/mit-license.php * * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for * legal reasons. */ if(typeof deconcept == "undefined") var deconcept = new Object(); if(typeof deconcept.util == "undefined") deconcept.util = new Object(); if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object(); deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){ if (!document.createElement || !document.getElementById) { return; } this.DETECT_KEY = detectKey ? detectKey : 'detectflash'; this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY); // this.skipDetect=true; // alert(this.skipDetect); this.params = new Object(); this.variables = new Object(); this.attributes = new Array(); if(swf) { this.setAttribute('swf', swf); } if(id) { this.setAttribute('id', id); } if(w) { this.setAttribute('width', w); } if(h) { this.setAttribute('height', h); } if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); } this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute('version'), useExpressInstall); if(c) { this.addParam('bgcolor', c); } var q = quality ? quality : 'high'; this.addParam('quality', q); this.setAttribute('useExpressInstall', useExpressInstall); this.setAttribute('doExpressInstall', false); var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location; this.setAttribute('xiRedirectUrl', xir); this.setAttribute('redirectUrl', ''); if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); } } deconcept.SWFObject.prototype = { setAttribute: function(name, value){ this.attributes[name] = value; }, getAttribute: function(name){ return this.attributes[name]; }, addParam: function(name, value){ this.params[name] = value; }, getParams: function(){ return this.params; }, addVariable: function(name, value){ this.variables[name] = value; }, getVariable: function(name){ return this.variables[name]; }, getVariables: function(){ return this.variables; }, getVariablePairs: function(){ var variablePairs = new Array(); var key; var variables = this.getVariables(); for(key in variables){ variablePairs.push(key +"="+ variables[key]); } return variablePairs; }, getSWFHTML: function() { var swfNode = ""; if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "PlugIn"); swfNode = ' 0){ swfNode += 'flashvars="'+ pairs +'"'; } swfNode += '/>'; } else { // PC IE if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "ActiveX"); swfNode = ''; swfNode += ''; var params = this.getParams(); for(var key in params) { swfNode += ''; } var pairs = this.getVariablePairs().join("&"); if(pairs.length > 0) {swfNode += '';} swfNode += ""; } return swfNode; }, write: function(elementId){ if(this.getAttribute('useExpressInstall')) { // check to see if we need to do an express install var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]); if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) { this.setAttribute('doExpressInstall', true); this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl'))); document.title = document.title.slice(0, 47) + " - Flash Player Installation"; this.addVariable("MMdoctitle", document.title); } } if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){ var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId; n.innerHTML = this.getSWFHTML(); return true; }else{ if(this.getAttribute('redirectUrl') != "") { document.location.replace(this.getAttribute('redirectUrl')); } } return false; } } /* ---- detection functions ---- */ deconcept.SWFObjectUtil.getPlayerVersion = function(reqVer, xiInstall){ var PlayerVersion = new deconcept.PlayerVersion([0,0,0]); if(navigator.plugins && navigator.mimeTypes.length){ var x = navigator.plugins["Shockwave Flash"]; if(x && x.description) { PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")); } }else{ try{ var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); for (var i=3; axo!=null; i++) { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i); PlayerVersion = new deconcept.PlayerVersion([i,0,0]); } }catch(e){} if (reqVer && PlayerVersion.major > reqVer.major) return PlayerVersion; // version is ok, skip minor detection // this only does the minor rev lookup if the user's major version // is not 6 or we are checking for a specific minor or revision number // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/ if (!reqVer || ((reqVer.minor != 0 || reqVer.rev != 0) && PlayerVersion.major == reqVer.major) || PlayerVersion.major != 6 || xiInstall) { try{ PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(",")); }catch(e){} } } return PlayerVersion; } deconcept.PlayerVersion = function(arrVersion){ this.major = parseInt(arrVersion[0]) != null ? parseInt(arrVersion[0]) : 0; this.minor = parseInt(arrVersion[1]) || 0; this.rev = parseInt(arrVersion[2]) || 0; } deconcept.PlayerVersion.prototype.versionIsValid = function(fv){ if(this.major < fv.major) return false; if(this.major > fv.major) return true; if(this.minor < fv.minor) return false; if(this.minor > fv.minor) return true; if(this.rev < fv.rev) return false; return true; } /* ---- get value of query string param ---- */ deconcept.util = { getRequestParameter: function(param){ var q = document.location.search || document.location.hash; if(q){ var startIndex = q.indexOf(param +"="); var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length; if (q.length > 1 && startIndex > -1) { return q.substring(q.indexOf("=", startIndex)+1, endIndex); } } return ""; } } /* fix for video streaming bug */ deconcept.SWFObjectUtil.cleanupSWFs = function() { var objects = document.getElementsByTagName("OBJECT"); for (var i=0; i < objects.length; i++) { for (var x in objects[i]) { if (typeof objects[i][x] == 'function') { objects[i][x] = null; } } } } if (typeof window.onunload == 'function') { var oldunload = window.onunload; window.onunload = function() { deconcept.SWFObjectUtil.cleanupSWFs(); oldunload(); } } else { window.onunload = deconcept.SWFObjectUtil.cleanupSWFs; } /* add Array.push if needed (ie5) */ if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }} /* add some aliases for ease of use/backwards compatibility */ var getQueryParamValue = deconcept.util.getRequestParameter; var FlashObject = deconcept.SWFObject; // for legacy support var SWFObject = deconcept.SWFObject; /* Following code was added by Nay (Avetar Interactive) on Nov 08, 2006 * This code is used in v3_customer_service\contact_us.shtml * Following Function Validate_Form checks for a valid email, First, Last Name, and Comments */ function Trim(x) { var i; if (x.length == 0) {return "";}; i = x.length - 1; while (x.substring(i,i+1) == " " && i > 0 ) { x = x.substring(0,i); i--; } if (x.length == 0) {return "";}; while (x.substring(0,1) == " " && x != "" ) { x = x.substring(1,x.length); i++; } return x; }// end Trim function echeck(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1){ alert("Invalid E-mail ID") return false } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ alert("Invalid E-mail ID") return false } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){ alert("Invalid E-mail ID") return false } if (str.indexOf(at,(lat+1))!=-1){ alert("Invalid E-mail ID") return false } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){ alert("Invalid E-mail ID") return false } if (str.indexOf(dot,(lat+2))==-1){ alert("Invalid E-mail ID") return false } if (str.indexOf(" ")!=-1){ alert("Invalid E-mail ID") return false } return true }//echeck function Validate_Form(){ var f = document.contactForm; if (Trim(f.First_Name.value).length < 1) { alert("Please Enter your First Name"); f.First_Name.focus(); f.First_Name.select(); return false; } if (Trim(f.Last_Name.value).length < 1) { alert("Please Enter your Last Name"); f.Last_Name.focus(); f.Last_Name.select(); return false; } var emailID=document.contactForm.Email if ((emailID.value==null)||(emailID.value=="")){ alert("Please Enter your Email ID") emailID.focus() return false } if (echeck(emailID.value)==false){ emailID.value="" emailID.focus() return false } if (Trim(f.Comments.value).length < 1) { alert("Please Enter your Comments"); f.Comments.focus(); f.Comments.select(); return false; } return true }// Validate_Form