

var slideshow_width=254 
var slideshow_height=192 
var pause=3000

var fadeimages=new Array()
fadeimages[0]="../images/DSCN1769.jpg"
fadeimages[1]="../images/DSCN1770.jpg"
fadeimages[2]="../images/DSCN1796.jpg"
fadeimages[3]="../images/DSCN1794.jpg"
fadeimages[4]="../images/fp0010.jpg"
fadeimages[5]="../images/fp0018.jpg"
fadeimages[6]="../images/fp0127.jpg"
fadeimages[7]="../images/fpt0017.jpg"

var preloadedimages=new Array()
for (p=0;p<fadeimages.length;p++){
preloadedimages[p]=new Image()
preloadedimages[p].src=fadeimages[p]
}

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1

var curpos=10
var degree=10
var curcanvas="canvas0"
var curimageindex=0
var nextimageindex=1


function fadepic(){
if (curpos<100){
curpos+=10
if (tempobj.filters)
tempobj.filters.alpha.opacity=curpos
else if (tempobj.style.MozOpacity)
tempobj.style.MozOpacity=curpos/100
}
else{
clearInterval(dropslide)
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML='<img border="2" bordercolor="675A4B" src="'+fadeimages[nextimageindex]+'">'
nextimageindex=(nextimageindex<fadeimages.length-1)? nextimageindex+1 : 0
setTimeout("rotateimage()",pause)
}
}

function rotateimage(){
if (ie4||dom){
resetit(curcanvas)
var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.style.zIndex++
var temp='setInterval("fadepic()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else
document.images.defaultslide.src=fadeimages[curimageindex]
curimageindex=(curimageindex<fadeimages.length-1)? curimageindex+1 : 0
}

function resetit(what){
curpos=10
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
if (crossobj.filters)
crossobj.filters.alpha.opacity=curpos
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=curpos/100
}

function startit(){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML='<img border="2" bordercolor="675A4B" src="'+fadeimages[curimageindex]+'">'
rotateimage()
}

function SetDate() {
	var mydate=new Date();
	var year=mydate.getYear()
	if (year < 1000)
		year+=1900
		var day=mydate.getDay()
		var month=mydate.getMonth()
		var daym=mydate.getDate()
	if (daym<10)
		daym="0"+daym
		var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
		var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")

document.all.MyDate.innerText = dayarray[day] + ", " + montharray[month] + " " + daym + ", " + year;
}

function IMGSwap1a() {
	document.all.legends1.style.color = "3863EB";
	document.all.IMAGE1.src = "../images/ComBGlegends.jpg";
}

function IMGSwap3() {
	document.all.legends3.style.color = "3863EB";
	document.all.IMAGE1.src = "../images/ComBGlegends.jpg";
}

function IMGSwap4() {
	document.all.sterling1.style.color = "3863EB";
	document.all.IMAGE1.src = "../images/ComBGsterling.jpg";
}

function IMGSwap5() {
	document.all.sterling2.style.color = "3863EB";
	document.all.IMAGE1.src = "../images/ComBGsterlingGlen.jpg";
}

function IMGSwap6() {
	document.all.canterbury.style.color = "3863EB";
	document.all.IMAGE1.src = "../images/ComBGsterlingRanch.jpg";
}

function IMGreset1a() {
	document.all.legends1.style.color = "1E3069";
	document.all.IMAGE1.src = "../images/ComBG.jpg";
}

function IMGreset3() {
	document.all.legends3.style.color = "1E3069";
	document.all.IMAGE1.src = "../images/ComBG.jpg";
}
function IMGreset4() {
	document.all.sterling1.style.color = "1E3069";
	document.all.IMAGE1.src = "../images/ComBG.jpg";
}

function IMGreset5() {
	document.all.sterling2.style.color = "1E3069";
	document.all.IMAGE1.src = "../images/ComBG.jpg";
}
function IMGreset6() {
	document.all.canterbury.style.color = "1E3069";
	document.all.IMAGE1.src = "../images/ComBG.jpg";
}

function IMGreset1b() {
	document.all.legends1.style.color = "1E3069";
	document.all.IMAGE1.src = "../images/ComBGhouse.jpg";
}

function IMGreset3b() {
	document.all.legends3.style.color = "1E3069";
	document.all.IMAGE1.src = "../images/ComBGhouse.jpg";
}
function IMGreset4b() {
	document.all.sterling1.style.color = "1E3069";
	document.all.IMAGE1.src = "../images/ComBGhouse.jpg";
}

function IMGreset5b() {
	document.all.sterling2.style.color = "1E3069";
	document.all.IMAGE1.src = "../images/ComBGhouse.jpg";
}
function IMGreset6b() {
	document.all.canterbury.style.color = "1E3069";
	document.all.IMAGE1.src = "../images/ComBGhouse.jpg";
} 

function IMGSwap1(a) {
	a.style.color = "3863EB";
}

function IMGreset1(a) {
	a.style.color = "1E3069";
}

function ElevationSwap(pict,text) {
	document.getElementById("Elevation").src=pict;
	document.getElementById("ElevationLabel").innerText = text.innerText;
}

function getCommunity() {
	if (window.parent != window) {
	document.getElementById("CommunityLabel").innerText = parent.document.all.Community.value;
	}
	else {document.getElementById("CommunityLabel").innerText =""}
}	
