﻿// JScript File
/***********************************************
* Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
 
var fadeimages=new Array()
//******************************************
//INSTRUCTIONS:
// The format for adding rotating items is as follows:
// Set three variables
// 1. "/uploadedimages/Rotator_Images/filename.jpg" -- this is the picture which is rotated in sequence on the screen
// 2. "/uploadedFiles/WebSite/News_And_Media/cnbc_high.wmv" -- this is the target of the link when clicked; the file can be added manually to the Ektron library
// 3. "_new" or "" -- indicates whether the link opens in a new window; in the case of video, leave this as "" since they will launch in the client's media player anyway. In the case of HTML files, choose new or existing window, depending upon your preference.
//*******************************************

//*******************************************
//LEFT HAND (STANDARD FORMAT) ROTATOR FOR INTERIOR PAGES
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["/uploadedimages/Rotator_Images/TheViewsm.jpg","/uploadedFiles/WebSite/News_And_Media/theview.wmv",""]
fadeimages[1]=["/uploadedimages/Rotator_Images/TODAYsm.jpg","/uploadedFiles/WebSite/News_And_Media/today_show.wmv",""]
fadeimages[2]=["/uploadedimages/Rotator_Images/CNBCsm.jpg","/NewsAndMedia/Default.aspx?id=1794","_new"]
fadeimages[3]=["/uploadedimages/Rotator_Images/CBSsm.jpg","/uploadedFiles/WebSite/News_And_Media/earlyshow.wmv",""]
fadeimages[4]=["/uploadedimages/Rotator_Images/Extremehomesm.jpg","/NewsAndMedia/Default.aspx?id=1798","_new"]
fadeimages[5]=["/uploadedimages/Rotator_Images/Foxsm.jpg","/uploadedFiles/WebSite/News_And_Media/renovatemyfamily256.wmv",""]
fadeimages[6]=["/uploadedimages/Rotator_Images/Ulsm.jpg","/GettingStarted/Why_GarageTek.aspx",""]
fadeimages[7]=["/uploadedimages/Rotator_Images/toyotasm.jpg","/uploadedfiles/WebSite/News_And_Media/ToyotaArticlelores.pdf","_new"]
fadeimages[8]=["/uploadedimages/Rotator_Images/Preventionsm.jpg","/uploadedfiles/WebSite/News_And_Media/PreventionMagazine.pdf","_new"]
fadeimages[9]=["/uploadedimages/Rotator_Images/NAPOsm.jpg","/PartnerWithUs/PartnerWithUs.aspx?id=386",""]
fadeimages[10]=["/uploadedimages/Rotator_Images/Moneysm.jpg","/uploadedfiles/WebSite/News_And_Media/showcontent.aspx?id=1758","_new"]
fadeimages[11]=["/uploadedimages/Rotator_Images/Kiplingerssm.jpg","/uploadedfiles/WebSite/News_And_Media/Kiplingers.pdf","_new"]
fadeimages[12]=["/uploadedimages/Rotator_Images/HSCsm.jpg","/uploadedfiles/WebSite/News_And_Media/HomeSafetyCouncilNews.pdf","_new"]
fadeimages[13]=["/uploadedimages/Rotator_Images/Homesm.jpg","/uploadedfiles/WebSite/News_And_Media/HomeMagazineMay2004.pdf","_new"]
fadeimages[14]=["/uploadedimages/Rotator_Images/fransurveysm.jpg","/FranchiseOpportunities/Default.aspx?id=94",""]
fadeimages[15]=["/uploadedimages/Rotator_Images/EntrepreneurTopsm.jpg","/WorkArea/showcontent.aspx?id=1734","_new"]
fadeimages[16]=["/uploadedimages/Rotator_Images/Entrepreneursm.jpg","/WorkArea/showcontent.aspx?id=1734","_new"]
fadeimages[17]=["/uploadedimages/Rotator_Images/CustHomeGearsm.jpg","/WorkArea/showcontent.aspx?id=1732","_new"]
fadeimages[18]=["/uploadedimages/Rotator_Images/Coastalivingsm.jpg","/uploadedfiles/WebSite/News_And_Media/CoastalLiving.pdf","_new"]
fadeimages[19]=["/uploadedimages/Rotator_Images/CNNsm.jpg","/WorkArea/showcontent.aspx?id=1764","_new"]
fadeimages[20]=["/uploadedimages/Rotator_Images/CNBClunchsm.jpg","/NewsAndMedia/Default.aspx?id=1794","_new"]
fadeimages[21]=["/uploadedimages/Rotator_Images/BusWeekcomsm.jpg","/WorkArea/showcontent.aspx?id=1728","_new"]
fadeimages[22]=["/uploadedimages/Rotator_Images/BusWeeksm.jpg","/WorkArea/showcontent.aspx?id=1766","_new"]
fadeimages[23]=["/uploadedimages/Rotator_Images/ASIDsm.jpg","/PartnerWithUs/PartnerWithUs.aspx?id=388","_new"]
fadeimages[24]=["/uploadedimages/Rotator_Images/Acurasm.jpg","/WorkArea/showcontent.aspx?id=1502","_new"]
fadeimages[25]=["/uploadedimages/Rotator_Images/HouseBeautifulsm.jpg","/WorkArea/showcontent.aspx?id=1754","_new"]
fadeimages[26]=["/uploadedimages/Rotator_Images/moneyboomsm.jpg","/uploadedfiles/WebSite/News_And_Media/August2003HottestFranchises.pdf","_new"]
fadeimages[27]=["/uploadedimages/Rotator_Images/WSJChaossm.jpg","/uploadedfiles/WebSite/News_And_Media/WallStreetJournalNewspaperVersion.pdf","_new"]
fadeimages[28]=["/uploadedimages/Rotator_Images/Roundelsm.jpg","/uploadedfiles/WebSite/News_And_Media/Roundel(1).pdf","_new"]
fadeimages[29]=["/uploadedimages/Rotator_Images/OrganizeMagsm.jpg","/uploadedfiles/WebSite/News_And_Media/OrganizeFinal.pdf","_new"]
fadeimages[30]=["/uploadedimages/Rotator_Images/OCRegsm.jpg","/uploadedfiles/WebSite/News_And_Media/OCRegisterNewspaperVersion.pdf","_new"]
fadeimages[31]=["/uploadedimages/Rotator_Images/GoodHousekeepingsm.jpg","/uploadedfiles/WebSite/News_And_Media/GoodhousekeepingFinal.pdf","_new"]
fadeimages[32]=["/uploadedimages/Rotator_Images/BetterHomesm.jpg","/uploadedfiles/WebSite/News_And_Media/BetterHomesandGardensStorage2(1).pdf","_new"]


//*******************************************

//*******************************************
//HOME PAGE (WIDE FORMAT) ROTATOR
var fadeimages3=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages3[0]=["/uploadedimages/Rotator_Images/TheViewlg.jpg","/uploadedFiles/WebSite/News_And_Media/theview.wmv",""]
fadeimages3[1]=["/uploadedimages/Rotator_Images/TODAYlg.jpg","/uploadedFiles/WebSite/News_And_Media/today_show.wmv",""]
fadeimages3[2]=["/uploadedimages/Rotator_Images/CNBClg.jpg","/NewsAndMedia/Default.aspx?id=1794","_new"]
fadeimages3[3]=["/uploadedimages/Rotator_Images/CBSlg.jpg","/uploadedFiles/WebSite/News_And_Media/earlyshow.wmv",""]
fadeimages3[4]=["/uploadedimages/Rotator_Images/Extremehomelg.jpg","/NewsAndMedia/Default.aspx?id=1798","_new"]
fadeimages3[5]=["/uploadedimages/Rotator_Images/Foxlg.jpg","/uploadedFiles/WebSite/News_And_Media/renovatemyfamily256.wmv",""]
fadeimages3[6]=["/uploadedimages/Rotator_Images/Ullg.jpg","/GettingStarted/Why_GarageTek.aspx",""]
fadeimages3[7]=["/uploadedimages/Rotator_Images/Toyotalg.jpg","/WorkArea/showcontent.aspx?id=1746","_new"]
fadeimages3[8]=["/uploadedimages/Rotator_Images/Preventionlg.jpg","/WorkArea/showcontent.aspx?id=1744","_new"]
fadeimages3[9]=["/uploadedimages/Rotator_Images/NAPOlg.jpg","/PartnerWithUs/PartnerWithUs.aspx?id=386","_new"]
fadeimages3[10]=["/uploadedimages/Rotator_Images/Moneylg.jpg","/WorkArea/showcontent.aspx?id=1758","_new"]
fadeimages3[11]=["/uploadedimages/Rotator_Images/Kiplingerslg.jpg","/WorkArea/showcontent.aspx?id=1740","_new"]
fadeimages3[12]=["/uploadedimages/Rotator_Images/HSClg.jpg","/WorkArea/showcontent.aspx?id=1736","_new"]
fadeimages3[13]=["/uploadedimages/Rotator_Images/Homelg.jpg","/WorkArea/showcontent.aspx?id=1778","_new"]
fadeimages3[14]=["/uploadedimages/Rotator_Images/Fransurveylg.jpg","/FranchiseOpportunities/Default.aspx?id=94",""]
fadeimages3[15]=["/uploadedimages/Rotator_Images/EntrepreneurToplg.jpg","/WorkArea/showcontent.aspx?id=1734","_new"]
fadeimages3[16]=["/uploadedimages/Rotator_Images/Entrepreneurlg.jpg","/WorkArea/showcontent.aspx?id=1734","_new"]
fadeimages3[17]=["/uploadedimages/Rotator_Images/CustHomeGearlg.jpg","/WorkArea/showcontent.aspx?id=1732","_new"]
fadeimages3[18]=["/uploadedimages/Rotator_Images/Coastalivinglg.jpg","/uploadedfiles/WebSite/News_And_Media/Coastal Living.pdf","_new"]
fadeimages3[19]=["/uploadedimages/Rotator_Images/CNNlg.jpg","/WorkArea/showcontent.aspx?id=1764","_new"]
fadeimages3[20]=["/uploadedimages/Rotator_Images/CNBCLunch.jpg","/NewsAndMedia/Default.aspx?id=1794","_new"]
fadeimages3[21]=["/uploadedimages/Rotator_Images/BusWeekcomlg.jpg","/WorkArea/showcontent.aspx?id=1728","_new"]
fadeimages3[22]=["/uploadedimages/Rotator_Images/BusWeeklg.jpg","/WorkArea/showcontent.aspx?id=1766","_new"]
fadeimages3[23]=["/uploadedimages/Rotator_Images/ASIDlg.jpg","/PartnerWithUs/PartnerWithUs.aspx?id=388","_new"]
fadeimages3[24]=["/uploadedimages/Rotator_Images/Acuralg.jpg","/WorkArea/showcontent.aspx?id=1502","_new"]
fadeimages3[25]=["/uploadedimages/Rotator_Images/HouseBeautifullg.jpg","/WorkArea/showcontent.aspx?id=1754","_new"]
fadeimages3[26]=["/uploadedimages/Rotator_Images/moneyboomlg.jpg","/WorkArea/showcontent.aspx?id=1768","_new"]
fadeimages3[27]=["/uploadedimages/Rotator_Images/HerHomelg.jpg","/WorkArea/showcontent.aspx?id=1760","_new"]
fadeimages3[28]=["/uploadedimages/Rotator_Images/Roundellg.jpg","/uploadedfiles/WebSite/News_And_Media/Roundel(1).pdf","_new"]
fadeimages3[29]=["/uploadedimages/Rotator_Images/OrganizeMaglg.jpg","/uploadedfiles/WebSite/News_And_Media/OrganizeFinal.pdf","_new"]
fadeimages3[30]=["/uploadedimages/Rotator_Images/OCReglg.jpg","/uploadedfiles/WebSite/News_And_Media/OCRegisterNewspaperVersion.pdf","_new"]
fadeimages3[31]=["/uploadedimages/Rotator_Images/GoodHousekeepinglg.jpg","/uploadedfiles\WebSite\News_And_Media/GoodhousekeepingFinal.pdf","_new"]
fadeimages3[32]=["/uploadedimages/Rotator_Images/BetterHomeslg.jpg","/uploadedfiles/WebSite/News_And_Media/BetterHomesandGardensStorage2(1).pdf","_new"]
fadeimages3[33]=["/uploadedimages/Rotator_Images/WSJChaoslg.jpg","/uploadedfiles/WebSite/News_And_Media/WallStreetJournalNewspaperVersion.pdf","_new"]
fadeimages3[34]=["/uploadedimages/Rotator_Images/Cleanhouselg.jpg","/uploadedfiles/WebSite/News_And_Media/CleanHousefinal.doc","_new"]

var topSplash=new Array();
//Images/links for homepage splash
//SET IMAGE PATHS. Extend or contract array as needed
topSplash[0]=["/uploadedImages/WebsiteHomepageImages/BlueCoatedCoupleWebMD.jpg","/MakeoverAndTips/MakeOverAndTips.aspx",""];
topSplash[1]=["/uploadedImages/WebsiteHomepageImages/GreenTileMiniCoupleWebFinal.jpg","/MakeoverAndTips/MakeOverAndTips.aspx",""]; 
topSplash[2]=["/uploadedImages/WebsiteHomepageImages/GreenTileCoupleWebTX.jpg","/MakeoverAndTips/MakeOverAndTips.aspx",""]; 
topSplash[3]=["/uploadedImages/WebsiteHomepageImages/FishingWebFinal.jpg","/MakeoverAndTips/MakeOverAndTips.aspx",""]; 
topSplash[4]=["/uploadedImages/WebsiteHomepageImages/BlueTileGolferWebFinal.jpg","/MakeoverAndTips/MakeOverAndTips.aspx",""]; 
topSplash[5]=["/uploadedImages/WebsiteHomepageImages/GreenCoatedCoupleWebFL.jpg","/MakeoverAndTips/MakeOverAndTips.aspx",""]; 
topSplash[6]=["/uploadedImages/WebsiteHomepageImages/BlueTileCoupleWebNC.jpg","/MakeoverAndTips/MakeOverAndTips.aspx",""]; 
topSplash[7]=["/uploadedImages/WebsiteHomepageImages/HopscotchWebFinal.jpg","/MakeoverAndTips/MakeOverAndTips.aspx",""]; 
topSplash[8]=["/uploadedImages/WebsiteHomepageImages/OrangeAdShotCoatedWebFinal.jpg","/MakeoverAndTips/MakeOverAndTips.aspx",""]; 
topSplash[9]=["/uploadedImages/WebsiteHomepageImages/GreenCoatedCoupleWebFinal.jpg","/MakeoverAndTips/MakeOverAndTips.aspx",""];
topSplash[10]=["/uploadedImages/WebsiteHomepageImages/BlueCoatedCoupleWebFinal.jpg","/MakeoverAndTips/MakeOverAndTips.aspx",""]; 

//*******************************************
  
var fadebgcolor="white"
 
////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser = document.all

function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
} 

