/***************************************************** * ypSlideOutMenu * 3/04/2001 * --youngpup-- *****************************************************/ /* Helper Functions */ function getButtonHandler(menuName) { iMenuNumber = menuName.charAt(menuName.length - 1); sButtonName = "button" + iMenuNumber; return sButtonName; } function changeButtonState(buttonID, state) { if (document.getElementById) { oButton = document.getElementById(buttonID); sClassName = oButton.className; // keeps the selected menu items in "selected" state if (state == "on" && sClassName != "selected") { } // resets the menu item to "normal" state if (state == "off") { if (!oButton.className) { } } } } /* End Helper Functions */ ypSlideOutMenu.Registry = [] ypSlideOutMenu.aniLen = 0 ypSlideOutMenu.hideDelay = 0 ypSlideOutMenu.minCPUResolution = 10 // constructor function ypSlideOutMenu(id, dir, width, height) { this.ie = document.all ? 1 : 0 this.ns4 = document.layers ? 1 : 0 this.dom = document.getElementById ? 1 : 0 if (this.ie || this.ns4 || this.dom) { this.id = id this.dir = dir this.orientation = dir == "left" || dir == "right" ? "h" : "v" this.dirType = dir == "right" || dir == "down" ? "-" : "+" this.dim = this.orientation == "h" ? width : height this.hideTimer = false this.aniTimer = false this.open = false this.over = false this.startTime = 0 this.gRef = "ypSlideOutMenu_"+id eval(this.gRef+"=this") ypSlideOutMenu.Registry[id] = this var d = document var strCSS = '' //alert ("css=\n" +strCSS) d.write(strCSS) this.load() } } ypSlideOutMenu.prototype.load = function() { var d = document var lyrId1 = this.id + "Container" var lyrId2 = this.id + "Content" var obj1 = this.dom ? d.getElementById(lyrId1) : this.ie ? d.all[lyrId1] : d.layers[lyrId1] if (obj1) var obj2 = this.ns4 ? obj1.layers[lyrId2] : this.ie ? d.all[lyrId2] : d.getElementById(lyrId2) var temp if (!obj1 || !obj2) window.setTimeout(this.gRef + ".load()", 100) else { this.container = obj1 this.menu = obj2 this.style = this.ns4 ? this.menu : this.menu.style this.homePos = eval("0" + this.dirType + this.dim) this.outPos = 0 this.accelConst = (this.outPos - this.homePos) / ypSlideOutMenu.aniLen / ypSlideOutMenu.aniLen // set event handlers. if (this.ns4) this.menu.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT); this.menu.onmouseover = new Function("ypSlideOutMenu.showMenu('" + this.id + "')") this.menu.onmouseout = new Function("ypSlideOutMenu.hideMenu('" + this.id + "')") //set initial state this.endSlide() } } ypSlideOutMenu.showMenu = function(id) { if (!document.layers) { var reg = ypSlideOutMenu.Registry var obj = ypSlideOutMenu.Registry[id] if (obj.container) { obj.over = true for (menu in reg) if (id != menu) ypSlideOutMenu.hide(menu) if (obj.hideTimer) { reg[id].hideTimer = window.clearTimeout(reg[id].hideTimer) } if (!obj.open && !obj.aniTimer) reg[id].startSlide(true) } sButtonName = getButtonHandler(id); changeButtonState(sButtonName,"on"); } } ypSlideOutMenu.hideMenu = function(id) { var obj = ypSlideOutMenu.Registry[id] if (obj.container) { if (obj.hideTimer) window.clearTimeout(obj.hideTimer) obj.hideTimer = window.setTimeout("ypSlideOutMenu.hide('" + id + "');", ypSlideOutMenu.hideDelay); } } ypSlideOutMenu.hideAll = function() { var reg = ypSlideOutMenu.Registry for (menu in reg) { ypSlideOutMenu.hide(menu); if (menu.hideTimer) window.clearTimeout(menu.hideTimer); } } ypSlideOutMenu.hide = function(id) { var obj = ypSlideOutMenu.Registry[id] obj.over = false if (obj.hideTimer) window.clearTimeout(obj.hideTimer) obj.hideTimer = 0 if (obj.open && !obj.aniTimer) obj.startSlide(false) sButtonName = getButtonHandler(id); changeButtonState(sButtonName,"off"); } ypSlideOutMenu.prototype.startSlide = function(open) { this[open ? "onactivate" : "ondeactivate"]() this.open = open if (open) this.setVisibility(true) this.startTime = (new Date()).getTime() this.aniTimer = window.setInterval(this.gRef + ".slide()", ypSlideOutMenu.minCPUResolution) } ypSlideOutMenu.prototype.slide = function() { var elapsed = (new Date()).getTime() - this.startTime if (elapsed > ypSlideOutMenu.aniLen) this.endSlide() else { var d = Math.round(Math.pow(ypSlideOutMenu.aniLen-elapsed, 2) * this.accelConst) if (this.open && this.dirType == "-") d = -d else if (this.open && this.dirType == "+") d = -d else if (!this.open && this.dirType == "-") d = -this.dim + d else d = this.dim + d } } ypSlideOutMenu.prototype.endSlide = function() { this.aniTimer = window.clearTimeout(this.aniTimer) if (!this.open) this.setVisibility(false) if ((this.open && !this.over) || (!this.open && this.over)) { this.startSlide(this.over) } } ypSlideOutMenu.prototype.setVisibility = function(bShow) { var s = this.ns4 ? this.container : this.container.style s.visibility = bShow ? "visible" : "hidden" } ypSlideOutMenu.prototype.getPos = function(c) { return parseInt(this.style[c]) } ypSlideOutMenu.prototype.onactivate = function() { } ypSlideOutMenu.prototype.ondeactivate = function() { } // menu object = function call (name, alignment, x position, y position, width, height // needs to be one of these for every menu rollover option //left nav rollouts var level1_01 = new ypSlideOutMenu("menu1", "left", 180, 280) var level1_02 = new ypSlideOutMenu("menu2", "left", 180, 200) var level1_03 = new ypSlideOutMenu("menu3", "left", 180, 280) var level1_04 = new ypSlideOutMenu("menu4", "left", 180, 280) //added this - JWL 01.08.2007 var level1_05 = new ypSlideOutMenu("menu5", "left", 180, 280) // secondary navigation elements: door images function getDNButtonHandler(menuName) { iMenuNumber = menuName.substr(menuName.length - 2, 2); sButtonName = "dn_button" + iMenuNumber; return sButtonName; } function changeButtonState(buttonID, state) { if (document.getElementById) { oButton = document.getElementById(buttonID); //added this if/then in case there are less top menu items than this code sets up - jwl 05.23.2007 if (oButton) { oDoorImageName = 'dn_img'+buttonID.substr(buttonID.length - 2, 2); sDoorImageNumber = buttonID.substr(buttonID.length - 2, 2); sClassName = oButton.className; // keeps the selected menu items in "selected" state // if (state == "on" && sClassName != "on") { // document.images[oDoorImageName].src = 'images/int_nav_'+sDoorImageNumber+'_on.jpg'; // } else if (state == "on" && sClassName == "off") { // document.images[oDoorImageName].src = 'images/int_nav_'+sDoorImageNumber+'_off.jpg'; // } else if (state == "off" && sClassName == "off") { // document.images[oDoorImageName].src = 'images/int_nav_'+sDoorImageNumber+'_off.jpg'; // } // resets the menu item to "normal" state //if (state == "off") { // if (!oButton.className) { // document.images[oDoorImageName].src = 'images/int_nav_'+sDoorImageNumber+'_off.jpg'; // } //} } } } ypSlideOutMenu_level2.Registry = [] ypSlideOutMenu_level2.aniLen = 0 ypSlideOutMenu_level2.hideDelay = 0 ypSlideOutMenu_level2.minCPUResolution = 10 // constructor function ypSlideOutMenu_level2(id, dir, width, height) { this.ie = document.all ? 1 : 0 this.ns4 = document.layers ? 1 : 0 this.dom = document.getElementById ? 1 : 0 if (this.ie || this.ns4 || this.dom) { this.id = id this.dir = dir this.orientation = dir == "left" || dir == "right" ? "h" : "v" this.dirType = dir == "right" || dir == "down" ? "-" : "+" this.dim = this.orientation == "h" ? width : height this.hideTimer = false this.aniTimer = false this.open = false this.over = false this.startTime = 0 this.gRef = "ypSlideOutMenu_level2_"+id eval(this.gRef+"=this") ypSlideOutMenu_level2.Registry[id] = this var d = document var strCSS = '' d.write(strCSS) this.load() } } ypSlideOutMenu_level2.prototype.load = function() { var d = document var lyrId1 = this.id + "Container" var lyrId2 = this.id + "Content" var obj1 = this.dom ? d.getElementById(lyrId1) : this.ie ? d.all[lyrId1] : d.layers[lyrId1] if (obj1) var obj2 = this.ns4 ? obj1.layers[lyrId2] : this.ie ? d.all[lyrId2] : d.getElementById(lyrId2) var temp if (!obj1 || !obj2) window.setTimeout(this.gRef + ".load()", 100) else { this.container = obj1 this.menu = obj2 this.style = this.ns4 ? this.menu : this.menu.style this.homePos = eval("0" + this.dirType + this.dim) this.outPos = 0 this.accelConst = (this.outPos - this.homePos) / ypSlideOutMenu_level2.aniLen / ypSlideOutMenu_level2.aniLen // set event handlers. if (this.ns4) this.menu.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT); this.menu.onmouseover = new Function("ypSlideOutMenu_level2.showMenu('" + this.id + "')") this.menu.onmouseout = new Function("ypSlideOutMenu_level2.hideMenu('" + this.id + "')") //set initial state this.endSlide() } } ypSlideOutMenu_level2.showMenu = function(id) { if (!document.layers) { var reg = ypSlideOutMenu_level2.Registry var obj = ypSlideOutMenu_level2.Registry[id] if (obj.container) { obj.over = true for (menu in reg) if (id != menu) ypSlideOutMenu_level2.hide(menu) if (obj.hideTimer) { reg[id].hideTimer = window.clearTimeout(reg[id].hideTimer) } if (!obj.open && !obj.aniTimer) reg[id].startSlide(true) } sButtonName = getDNButtonHandler(id); changeButtonState(sButtonName,"on"); } } ypSlideOutMenu_level2.hideMenu = function(id) { var obj = ypSlideOutMenu_level2.Registry[id] if (obj.container) { if (obj.hideTimer) window.clearTimeout(obj.hideTimer) obj.hideTimer = window.setTimeout("ypSlideOutMenu_level2.hide('" + id + "');", ypSlideOutMenu_level2.hideDelay); } } ypSlideOutMenu_level2.hideAll = function() { var reg = ypSlideOutMenu_level2.Registry for (menu in reg) { ypSlideOutMenu_level2.hide(menu); if (menu.hideTimer) window.clearTimeout(menu.hideTimer); } } ypSlideOutMenu_level2.hide = function(id) { var obj = ypSlideOutMenu_level2.Registry[id] obj.over = false if (obj.hideTimer) window.clearTimeout(obj.hideTimer) obj.hideTimer = 0 if (obj.open && !obj.aniTimer) obj.startSlide(false) sButtonName = getDNButtonHandler(id); changeButtonState(sButtonName,"off"); } ypSlideOutMenu_level2.prototype.startSlide = function(open) { this[open ? "onactivate" : "ondeactivate"]() this.open = open if (open) this.setVisibility(true) this.startTime = (new Date()).getTime() this.aniTimer = window.setInterval(this.gRef + ".slide()", ypSlideOutMenu_level2.minCPUResolution) } ypSlideOutMenu_level2.prototype.slide = function() { var elapsed = (new Date()).getTime() - this.startTime if (elapsed > ypSlideOutMenu_level2.aniLen) this.endSlide() else { var d = Math.round(Math.pow(ypSlideOutMenu_level2.aniLen-elapsed, 2) * this.accelConst) if (this.open && this.dirType == "-") d = -d else if (this.open && this.dirType == "+") d = -d else if (!this.open && this.dirType == "-") d = -this.dim + d else d = this.dim + d } } ypSlideOutMenu_level2.prototype.endSlide = function() { this.aniTimer = window.clearTimeout(this.aniTimer) if (!this.open) this.setVisibility(false) if ((this.open && !this.over) || (!this.open && this.over)) { this.startSlide(this.over) } } ypSlideOutMenu_level2.prototype.setVisibility = function(bShow) { var s = this.ns4 ? this.container : this.container.style s.visibility = bShow ? "visible" : "hidden" } ypSlideOutMenu_level2.prototype.getPos = function(c) { return parseInt(this.style[c]) } ypSlideOutMenu_level2.prototype.onactivate = function() { } ypSlideOutMenu_level2.prototype.ondeactivate = function() { } // interior top nav rollouts var dn_menu01 = new ypSlideOutMenu_level2("dn_menu01", "left", 290, 120) var dn_menu02 = new ypSlideOutMenu_level2("dn_menu02", "left", 290, 120) var dn_menu03 = new ypSlideOutMenu_level2("dn_menu03", "left", 290, 120) var dn_menu04 = new ypSlideOutMenu_level2("dn_menu04", "left", 290, 120) var dn_menu05 = new ypSlideOutMenu_level2("dn_menu05", "left", 290, 120) var dn_menu06 = new ypSlideOutMenu_level2("dn_menu06", "left", 290, 120) var dn_menu07 = new ypSlideOutMenu_level2("dn_menu07", "left", 290, 120) var dn_menu08 = new ypSlideOutMenu_level2("dn_menu08", "left", 290, 120) var dn_menu09 = new ypSlideOutMenu_level2("dn_menu09", "left", 290, 120) var dn_menu10 = new ypSlideOutMenu_level2("dn_menu10", "left", 290, 120) var dn_menu11 = new ypSlideOutMenu_level2("dn_menu11", "left", 290, 120) /*-- downloads form submit --*/ function jsDateLongFormat(myDate) { convDate = "" if (myDate != "") { convYear = myDate.substr(0, 4) convMonth = myDate.substr(5, 2) convDay = myDate.substr(8, 2) //alert ("convMonth before: " + convMonth) if (convMonth.charAt(0) == "0") { convMonth = convMonth.substr(1) } //alert ("convMonth after: " + convMonth) //alert ("convDay before: " + convDay) if (convDay.charAt(0) == "0") { convDay = convDay.substr(1) } //alert ("convDay after: " + convDay) var arrMon = new Array(11) arrMon[0] = "January" arrMon[1] = "Febuary" arrMon[2] = "March" arrMon[3] = "April" arrMon[4] = "May" arrMon[5] = "June" arrMon[6] = "July" arrMon[7] = "August" arrMon[8] = "September" arrMon[9] = "October" arrMon[10] = "November" arrMon[11] = "December" convMonth = parseInt(convMonth) convDate = (arrMon[convMonth - 1] + " " + convDay + ", " + convYear) } return(convDate); } function convertSlashDate(sDate) { year = sDate.substring(0,4) month = sDate.substring(5,7) day = sDate.substring(8,10) cDate = month + "/" + day + "/" + year return cDate; } //functions below are for submitting docs to be mailed function fnCheckItemCount() { var count = 0; var alertmsg = ""; for (var i = 0; i < document.downloadsForm.mail_doc.length; i++) { if (document.downloadsForm.mail_doc[i].checked) { count = count+1 if (count>5) { alertmsg = (" - you have selected ") + count + (" items.\n - the maximum allowed is 5.\n"); } } } if (alertmsg!="") { alert("Incorrect Information: \n\n" + alertmsg + "\nPlease return to the form and correct your information.\n\nThank You.\n") alertmsg = "" return false; } submitDownloadsForm() return true; } function submitDownloadsForm() { var myWin = window.open('','amarrPopup','toolbar=0,menubar=0,status=0,scrollbars=1,width=600,height=450,resizable'); if (myWin.opener == null) { myWin.opener = window; } } //added 01.04.2008 by JWL (created by PR - onRamp function fnCheckEmailForm(form) { var alertmsg = "" /* if (form.sender_first_name.value == "") { alertmsg = alertmsg + ("- your FIRST NAME is required\n") } if (form.sender_last_name.value == "") { alertmsg = alertmsg + ("- your LAST NAME is required\n") } */ if (form.sender_name.value == "") { alertmsg = alertmsg + ("- your NAME is required\n") } if (form.sender_email_address.value == "") { alertmsg = alertmsg + ("- your EMAIL ADDRESS is required\n") } if (form.recipient_name.value == "") { alertmsg = alertmsg + ("- your FRIEND'S NAME is required\n") } if (form.recipient_email_address.value == "") { alertmsg = alertmsg + ("- your FRIEND'S EMAIL ADDRESS is required\n") } if (alertmsg!="") { alert("Incorrect Information: \n\n" + alertmsg + "\nPlease return to the form and correct your information.\n\nThank You.\n") alertmsg = "" return false } return true; } //added 12.03.2008 by CB (copied fnCheckEmailForm from above and adjusted) function fnCheckRegForm(form) { var alertmsg = "" /* if (form.sender_first_name.value == "") { alertmsg = alertmsg + ("- your FIRST NAME is required\n") } if (form.sender_last_name.value == "") { alertmsg = alertmsg + ("- your LAST NAME is required\n") } */ if (form.registrant_fname.value == "") { alertmsg = alertmsg + ("- your FIRST NAME is required\n") } if (form.registrant_lname.value == "") { alertmsg = alertmsg + ("- your LAST NAME is required\n") } if (form.registrant_email_address.value == "") { alertmsg = alertmsg + ("- your EMAIL ADDRESS is required\n") } if (form.registrant_address.value == "") { alertmsg = alertmsg + ("- your ADDRESS is required\n") } if (form.registrant_city.value == "") { alertmsg = alertmsg + ("- your CITY is required\n") } if (form.registrant_state.value == "") { alertmsg = alertmsg + ("- your STATE is required\n") } if (form.registrant_zip.value == "") { alertmsg = alertmsg + ("- your ZIP is required\n") } if (form.registrant_phone.value == "") { alertmsg = alertmsg + ("- your PHONE is required\n") } if (alertmsg!="") { alert("Incorrect Information: \n\n" + alertmsg + "\nPlease return to the form and correct your information.\n\nThank You.\n") alertmsg = "" return false } return true; } //added 05.13.2009 by CB (copied fnCheckEmailForm from above and adjusted) function fnCheckAppDealerForm(form) { var alertmsg = "" if (form.first_name.value == "") { alertmsg = alertmsg + ("- your FIRST NAME is required\n") } if (form.last_name.value == "") { alertmsg = alertmsg + ("- your LAST NAME is required\n") } if (form.company_name.value == "") { alertmsg = alertmsg + ("- your COMPANY NAME is required\n") } if (form.address1.value == "") { alertmsg = alertmsg + ("- your ADDRESS is required\n") } if (form.city.value == "") { alertmsg = alertmsg + ("- your CITY is required\n") } if (form.country.value == "") { alertmsg = alertmsg + ("- your COUNTRY is required\n") } if (form.email.value == "") { alertmsg = alertmsg + ("- your EMAIL ADDRESS is required\n") } else {apos=form.email.value.indexOf("@"); dotpos=form.email.value.lastIndexOf("."); if (apos<1||dotpos-apos<2) {alertmsg = alertmsg + ("- valid EMAIL ADDRESS is required\n")}} if(form.phone.value!=""){ if (isNaN(parseInt(form.phone.value))) { alertmsg = alertmsg + ("- valid PHONE NUMBER is required\n") } } if(form.fax.value!=""){ if (isNaN(parseInt(form.fax.value))) { alertmsg = alertmsg + ("- valid FAX is required\n") } } if (alertmsg!="") { alert("Incorrect Information: \n\n" + alertmsg + "\nPlease return to the form and correct your information.\n\nThank You.\n") alertmsg = "" return false } return true; } //added 05.13.2009 by CB (copied fnCheckEmailForm from above and adjusted) function fnCheckContactUsForm(form) { var alertmsg = "" if (form.first_name.value == "") { alertmsg = alertmsg + ("- your FIRST NAME is required\n") } if (form.last_name.value == "") { alertmsg = alertmsg + ("- your LAST NAME is required\n") } if (form.address1.value == "") { alertmsg = alertmsg + ("- your ADDRESS is required\n") } if (form.city.value == "") { alertmsg = alertmsg + ("- your CITY is required\n") } if (form.country.value == "") { alertmsg = alertmsg + ("- your COUNTRY is required\n") } if (form.email.value == "") { alertmsg = alertmsg + ("- your EMAIL ADDRESS is required\n") } else {apos=form.email.value.indexOf("@"); dotpos=form.email.value.lastIndexOf("."); if (apos<1||dotpos-apos<2) {alertmsg = alertmsg + ("- valid EMAIL ADDRESS is required\n")}} if(form.phone.value!=""){ if (isNaN(parseInt(form.phone.value))) { alertmsg = alertmsg + ("- valid PHONE NUMBER is required\n") } } if(form.fax.value!=""){ if (isNaN(parseInt(form.fax.value))) { alertmsg = alertmsg + ("- valid FAX is required\n") } } if (alertmsg!="") { alert("Incorrect Information: \n\n" + alertmsg + "\nPlease return to the form and correct your information.\n\nThank You.\n") alertmsg = "" return false } return true; } /*THE FUNCTIONS BELOW ARE SPECIFICALLY FOR COMPARE DOORS*/ var alertmsg = ''; function fnCheckNumberOfDoorsSelected(compare_item) { var iCounter = 0; for (var i=0; i < compare_item.length; i++) { if (compare_item[i].checked) { iCounter = iCounter+1; } } return iCounter; } function fnShowCount(form) { var i = fnCheckNumberOfDoorsSelected(form.compare_item); if (i<= 1 || i > 5) { //alert("Important Information:\n\n Please note that you may only select 5 or less doors to compare.\n Please deselect one of your door choices.\n\n Thank You."); MM_showHideLayers('error','','show'); return false; } MM_showHideLayers('error','','hide'); return true; } function fnShowCountThisItem(form, item) { var i = fnCheckNumberOfDoorsSelected(form.compare_item); if (i > 5) { //alert("Important Information:\n\n Please note that you may only select 5 or less doors to compare.\n\n Thank You."); MM_showHideLayers('error','','show'); return false; } MM_showHideLayers('error','','hide'); return true; } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i this.findHt) { this.D = this.A > 0 ? this.targetY - this.findHt : this.targetY + this.findHt; this.A = this.A > 0 ? this.findHt : -this.findHt; } else { this.D = this.currentY; } } function animator() { var now = new Date(); var newY = this.A * Math.sin( this.B * ( now.getTime() - this.C ) ) + this.D; newY = Math.round(newY); if (( this.A > 0 && newY > this.currentY ) || ( this.A < 0 && newY < this.currentY )) { if ( ie4 )document.all.error.style.pixelTop = newY; if ( ns4 )document.layers["error"].top = newY; if ( ns6 )document.getElementById('error').style.top = newY + "px"; } } function floatObject() { if (ns4 || ns6) { findHt = window.innerHeight; } else if(ie4) { findHt = document.body.clientHeight; } } /*THE FUNCTIONS ABOVE ARE SPECIFICALLY FOR COMPARE DOORS*/ /*****************************************************/ /* START FROM AC_RunActiveContent.js - added 06.19.2008 by JWL*/ /*****************************************************/ //v1.7 // Flash Player Version Detection // Detect Client Browser type // Copyright 2005-2007 Adobe Systems Incorporated. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false; function ControlVersion() { var version; var axo; var e; // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry try { // version will be set for 7.X or greater players axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); version = axo.GetVariable("$version"); } catch (e) { } if (!version) { try { // version will be set for 6.X players only axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); // installed player is some revision of 6.0 // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29, // so we have to be careful. // default to the first public version version = "WIN 6,0,21,0"; // throws if AllowScripAccess does not exist (introduced in 6.0r47) axo.AllowScriptAccess = "always"; // safe to call for 6.0r47 or greater version = axo.GetVariable("$version"); } catch (e) { } } if (!version) { try { // version will be set for 4.X or 5.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); version = axo.GetVariable("$version"); } catch (e) { } } if (!version) { try { // version will be set for 3.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); version = "WIN 3,0,18,0"; } catch (e) { } } if (!version) { try { // version will be set for 2.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); version = "WIN 2,0,0,11"; } catch (e) { version = -1; } } return version; } // JavaScript helper required to detect Flash Player PlugIn version information function GetSwfVer(){ // NS/Opera version >= 3 check for Flash plugin in plugin array var flashVer = -1; if (navigator.plugins != null && navigator.plugins.length > 0) { if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; var descArray = flashDescription.split(" "); var tempArrayMajor = descArray[2].split("."); var versionMajor = tempArrayMajor[0]; var versionMinor = tempArrayMajor[1]; var versionRevision = descArray[3]; if (versionRevision == "") { versionRevision = descArray[4]; } if (versionRevision[0] == "d") { versionRevision = versionRevision.substring(1); } else if (versionRevision[0] == "r") { versionRevision = versionRevision.substring(1); if (versionRevision.indexOf("d") > 0) { versionRevision = versionRevision.substring(0, versionRevision.indexOf("d")); } } var flashVer = versionMajor + "." + versionMinor + "." + versionRevision; } } // MSN/WebTV 2.6 supports Flash 4 else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4; // WebTV 2.5 supports Flash 3 else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3; // older WebTV supports Flash 2 else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2; else if ( isIE && isWin && !isOpera ) { flashVer = ControlVersion(); } return flashVer; } // When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) { versionStr = GetSwfVer(); if (versionStr == -1 ) { return false; } else if (versionStr != 0) { if(isIE && isWin && !isOpera) { // Given "WIN 2,0,0,11" tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"] tempString = tempArray[1]; // "2,0,0,11" versionArray = tempString.split(","); // ['2', '0', '0', '11'] } else { versionArray = versionStr.split("."); } var versionMajor = versionArray[0]; var versionMinor = versionArray[1]; var versionRevision = versionArray[2]; // is the major.revision >= requested major.revision AND the minor version >= requested minor if (versionMajor > parseFloat(reqMajorVer)) { return true; } else if (versionMajor == parseFloat(reqMajorVer)) { if (versionMinor > parseFloat(reqMinorVer)) return true; else if (versionMinor == parseFloat(reqMinorVer)) { if (versionRevision >= parseFloat(reqRevision)) return true; } } return false; } } function AC_AddExtension(src, ext) { if (src.indexOf('?') != -1) return src.replace(/\?/, ext+'?'); else return src + ext; } function AC_Generateobj(objAttrs, params, embedAttrs) { var str = ''; if (isIE && isWin && !isOpera) { str += ' '; } str += ''; } else { str += '