/*   PRELOAD IMAGES   */

pic1= new Image(100,25); 
pic1.src="sunset.jpg"; 
pic2= new Image(100,25); 
pic2.src="snowcabin.jpg"; 
pic3= new Image(100,25); 
pic3.src="resortski.jpg";  





/*
 * Script developed by the experts at http://www.webxpertz.net/forums/
 */
var currentBG=0;
var bgImages = new Array(
"back_globe.jpg",
"back_deckchairs.jpg",
"back_summitskilodge.jpg",
"back_putter.jpg",
"back_gamble.jpg",
"back_bikers.jpg",
"back_baypier.jpg",
"back_skyline.jpg",
"back_harborsunset.jpg",
"back_keyheart.jpg",

"back_golfballs.jpg",


"back_snowcabin.jpg",
"back_snowbarn.jpg",
"back_resortski.jpg",
"back_vermont.jpg",
"back_mountains.jpg",
"back_beach.jpg",
"back_martini.jpg",
"back_water1.jpg",
"back_winewoman.jpg",

"back_hangglider.jpg"




);

function doNull()
{
x=1;
};



function bgRotate()
{
	currentBG = (currentBG + 1)% bgImages.length;
	var elem = document.getElementById("rotatebg")
	if(elem.filters)elem.filters[0].apply();
	elem.style.background="url( " + bgImages[currentBG] + ")";
	if(elem.filters)elem.filters[0].play();
};

function startNull()
{

/* do nothing this serves as trigger to rounded corner */
};

function startBgRotate()
{
	if(document.layers)return;
	for(var i=0 ; i<bgImages.length ; i++)
	{
		var tmp = new Image();
		tmp.src = bgImages[i];
	}
	var elem = document.getElementById("rotatebg")
	elem.style.background="url( " + bgImages[currentBG] + ")";
	setInterval("bgRotate()", 5000);
};








/***********************************************
* DHTML Billboard script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//List of transitional effects to be randomly applied to billboard:
var billboardeffects=["GradientWipe(GradientSize=1.0 Duration=1.0)", "Inset", "Iris", "Pixelate(MaxSquare=5 enabled=false)", "RadialWipe", "RandomBars", "Slide(slideStyle='push')", "Spiral", "Stretch", "Strips", "Wheel", "ZigZag"]

//var billboardeffects=["Iris"] //Uncomment this line and input one of the effects above (ie: "Iris") for single effect.

var tickspeed=6000 //ticker speed in miliseconds (2000=2 seconds)
var effectduration=1500 //Transitional effect duration in miliseconds
var hidecontent_from_legacy=1 //Should content be hidden in legacy browsers- IE4/NS4 (0=no, 1=yes).

var filterid=Math.floor(Math.random()*billboardeffects.length)

document.write('<style type="text/css">\n')
if (document.getElementById)
document.write('.billcontent{display:none;\n'+'filter:progid:DXImageTransform.Microsoft.'+billboardeffects[filterid]+'}\n')
else if (hidecontent_from_legacy)
document.write('#contentwrapper{display:none;}')
document.write('</style>\n')

var selectedDiv=0
var totalDivs=0

function contractboard(){
var inc=0
while (document.getElementById("billboard"+inc)){
document.getElementById("billboard"+inc).style.display="none"
inc++
}
}

function expandboard(){
var selectedDivObj=document.getElementById("billboard"+selectedDiv)
contractboard()
if (selectedDivObj.filters){
if (billboardeffects.length>1){
filterid=Math.floor(Math.random()*billboardeffects.length)
selectedDivObj.style.filter="progid:DXImageTransform.Microsoft."+billboardeffects[filterid]
}
selectedDivObj.filters[0].duration=effectduration/1000
selectedDivObj.filters[0].Apply()
}
selectedDivObj.style.display="block"
if (selectedDivObj.filters)
selectedDivObj.filters[0].Play()
selectedDiv=(selectedDiv<totalDivs-1)? selectedDiv+1 : 0
setTimeout("expandboard()",tickspeed)
}

function startbill(){
while (document.getElementById("billboard"+totalDivs)!=null)
totalDivs++
if (document.getElementById("billboard0").filters)
tickspeed+=effectduration
expandboard()
}






/*
Moving light on image script
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/


if (document.all&&window.spotlight){
var x=new Array()
var direction=new Array()
var y=new Array()
if (spotlight.length==null){
spotlight[0]=document.all.spotlight
x[0]=0
direction[0]="right"
y[0]=spotlight[0].height
spotlight[0].filters.light.addPoint(100,50,100,255,255,255,90)
}
else
for (i=0;i<spotlight.length;i++){
x[i]=0
direction[i]="right"
y[i]=spotlight[i].height
spotlight[i].filters.light.addPoint(100,50,100,255,255,255,90)
}
}

function slidelight(cur){
spotlight[cur].filters.light.MoveLight(0,x[cur],y[cur],200,-1)

if (x[cur]<spotlight[cur].width+200&&direction[cur]=="right")
x[cur]+=10
else if (x[cur]>spotlight[cur].width+200){
direction[cur]="left"
x[cur]-=10
}
else if (x[cur]>-200&&x[cur]<-185){
direction[cur]="right"
x[cur]+=10
}
else{
x[cur]-=10
direction[cur]="left"
}
}

if (document.all&&window.spotlight){
if (spotlight.length==null)
setInterval("slidelight(0)",spotlight[0].speed)
else
for (t=0;t<spotlight.length;t++){
var temp='setInterval("slidelight('+t+')",'+spotlight[t].speed+')'
eval(temp)
}
}






if (window.addEventListener)
window.addEventListener("load", startbill, false)
else if (window.attachEvent)
window.attachEvent("onload", startbill)
else if (document.getElementById)
window.onload=startbill














