/* Detecting Server Settings... ------------------------------------*/ /* Environment: Live */ /* Media Server to use: http://media.ef.com */ /* Detecting Browser Settings... ------------------------------------*/ /* Country: us /* Language: us /* Web crawler? True /* Your browser: generic crawler /* Your browser version: 1 /* Your platform: function platform(str) { //Use this if you are using short hand like 'windows' or 'mac' //The more speciffic you are the more likely this will give you an accurate response if (platform_n.indexOf(str)!=-1) { Response.WriteBlock(35) Response.Write(str) Response.WriteBlock(36) Response.Write(platform_n) Response.WriteBlock(37) return true; } else { return false; } } /* Accepts Style sheets? False /* /* You can switch style sheets using the following scripts: /* (remove spaces between < and % for asp /* < %if(browser("IE==5")) {% > Your styles < %}% > /* for multiple use commas, for version equal to less than or greater than use conditionals <,>,==,!=,>=,<= /* < %if(browser("IE>5,firefox,safari<3")) {% > Your styles < %}% > /* /* the following variables may also be used /* browser_n (browser name), browser_v (version), isCrawler (boolean true if a spider) */ animTimeout = 0; curDiv = ""; loopNum = 0; fadeOutTimeout = 0; callSlideInterval = 0; fadeInTimeout = 0; ie5 = (document.all && document.getElementById) ? true : false; ns6 = (!document.all && document.getElementById) ? true : false; ie7 = (document.all && !window.opera && window.XMLHttpRequest) ? true : false; opac = 0; opac2 = 100; dropSpeed = 100; upSpeed = 1; //testimonial data slideNum = 0; slideArray = new Array(); url = "/_media/lt/Slideshow/homepage.xml"; pars = ""; function nfSlideSetup() { xmlOpen("GET",url,pars,notesResponseHandler); } function setArray (originalRequest) { var newData = originalRequest.responseXML; dataArray = newData.getElementsByTagName("slide"); } function setSlide(num) { slideNum = num; changeSlide(); } //grab the next item in the slide array and display it on the page. function changeSlide() { var slideDiv = document.getElementById("curSlide"); slideDiv.innerHTML = ""; var curSlideData = slideArray[slideNum]; var outStr = ""; slideDiv.innerHTML = outStr; slideNum ++; if(slideNum >= slideArray.length) { slideNum = 0; } } //this function is called when the page is loaded function slideSetup() { //we set the first slide changeSlide(); //then set up the 30 second loop callSlideInterval = setInterval("callSlideLoop()",30000); } //This one does what it says on the tin, fade out the current one, change the text //and fade the new one in again. function callSlideLoop() { fadeSlideOut(); slideTimeout = setTimeout("changeSlide()",2000); fadeInTimeout = setTimeout("fadeSlideIn()",2500); } function fadeSlideIn() { //increment the opacity and apply it to the div across IE6/7 and Firefox if(opac == 100){ opac = 0; } else { opac ++; if(ie7) { opac ++; document.getElementById('curSlide').style.filter = "alpha(opacity=" + opac + ");"; } else if(ns6) { document.getElementById('curSlide').style.MozOpacity = opac/100; } else { document.getElementById('curSlide').filters.alpha.opacity = opac; } setTimeout('fadeSlideIn()',1); } } function fadeSlideOut() { //decrement the opacity and apply it to the div across IE6/7 and Firefox if(opac2 == 0){ opac2 = 100; } else { opac2 --; if(ie7) { opac2 --; document.getElementById('curSlide').style.filter = "alpha(opacity=" + opac2 + ");"; } else if(ns6) { document.getElementById('curSlide').style.MozOpacity = opac2/100; } else { document.getElementById('curSlide').filters.alpha.opacity = opac2; } setTimeout('fadeSlideOut()',1); } } function xmlOpen(method, url, toSend, responseHandler) { if (window.XMLHttpRequest) { // browser has native support for XMLHttpRequest object req = new XMLHttpRequest(); } else if (window.ActiveXObject) { // try XMLHTTP ActiveX (Internet Explorer) version req = new ActiveXObject("Microsoft.XMLHTTP"); } if(req) { req.onreadystatechange = responseHandler; url = url + "?" + toSend; req.open(method, url, true); //req.setRequestHeader("content-type","application/x-www-form-urlencoded"); req.send(null); } else { alert('Your browser does not seem to support XMLHttpRequest.'); } } function notesResponseHandler() { // Make sure the request is loaded (readyState = 4) if (req.readyState == 4) { // Make sure the status is "OK" if (req.status == 200) { arrayNum = 0; slides = req.responseXML.getElementsByTagName("slide"); for(thing in slides) { if(slides[thing]["nodeType"] == 1) { slideArray[arrayNum] = slides[thing]["textContent"]; arrayNum ++; } } nfPromoSetup(); slideSetup(); } else { xmlOpen("GET",url,pars,notesResponseHandler); } } }