 
function preloader() 
{
var images=new Array()
images[0]=["/media/fade/102sycamore.jpg", "102sycamore.jpg", ""]images[1]=["/media/fade/7517woodbury.jpg", "7517woodbury.jpg", ""]images[2]=["/media/fade/738ridgewood.jpg", "738ridgewood.jpg", ""]images[3]=["/media/fade/7030fernwood.jpg", "7030fernwood.jpg", ""]images[4]=["/media/fade/627dogwood.jpg", "627dogwood.jpg", ""]images[5]=["/media/fade/6147mill.jpg", "6147mill.jpg", ""]images[6]=["/media/fade/602california.jpg", "602california.jpg", ""]images[7]=["/media/fade/5stonemillct.jpg", "5stonemillct.jpg", ""]images[8]=["/media/fade/55brown.jpg", "55brown.jpg", ""]images[9]=["/media/fade/511springtime.jpg", "511springtime.jpg", ""]images[10]=["/media/fade/4607thelma.jpg", "4607thelma.jpg", ""]images[11]=["/media/fade/4587thelma.jpg", "4587thelma.jpg", ""]images[12]=["/media/fade/4512brigantineblvd.jpg", "4512brigantineblvd.jpg", ""]images[13]=["/media/fade/422seggharborrd.jpg", "422seggharborrd.jpg", ""]images[14]=["/media/fade/3016tremont.jpg", "3016tremont.jpg", ""]images[15]=["/media/fade/285kochave.jpg", "285kochave.jpg", ""]images[16]=["/media/fade/2524ridge.jpg", "2524ridge.jpg", ""]images[17]=["/media/fade/208muccio.jpg", "208muccio.jpg", ""]images[18]=["/media/fade/1904bayshoredr.jpg", "1904bayshoredr.jpg", ""]images[19]=["/media/fade/802main.jpg", "802main.jpg", ""]images[20]=["/media/fade/11980969822.jpg", "", ""]images[21]=["/media/fade/11980969823.jpg", "", ""]	

new fade(images, 6000)
} 
var fadebgcolor="#eeeeee"
var fadewidth=354				 
var fadeheight=300
 
var fadearray=new Array() //array to cache fade instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fade(theimages, delay){
this.delay=delay
this.degree=0 //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"
this.theimages=theimages
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]
this.postimages[p].title=theimages[p][1]
}

 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="margin:5px 0px 0px 70px;float:left;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=0);-moz-opacity:0;-khtml-opacity:0;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=0);-moz-opacity:0;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'" style="border:none;" alt="Siracusa Homes New Jersey."></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)
}
}
 
fade.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][2]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][2]+'">'
//slideHTML+='<div id="fade_title">'+this.postimages[picindex].title+'</div>'
slideHTML+='<img src="'+this.postimages[picindex].src+'" style="border:2px solid #999999;margin:0px;" alt="Siracusa Homes, New Jersey.">'
if (this.theimages[picindex][2]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fade.prototype.rotateimage=function(){
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
}
fade.prototype.resetit=function(){
this.degree=0
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
}
fade.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
this.rotateimage()
}



a = new Image();
a.src = "/media/images/main_buttons/home_floor.jpg";
b = new Image();
b.src = "/media/images/main_buttons/featured.jpg";
c = new Image();
c.src = "/media/images/main_buttons/about.jpg";
ao = new Image();
ao.src = "/media/images/main_buttons/home_floor-o.jpg";
bo = new Image();
bo.src = "/media/images/main_buttons/featured-o.jpg";
co = new Image();
co.src = "/media/images/main_buttons/about-o.jpg";

da = new Image();
ea = new Image();
fa = new Image();
ga = new Image();
ha = new Image();
d = new Image();
e = new Image();
f = new Image();
g = new Image();
h = new Image();
d.src = "/media/images/main_buttons/buttons_r1_c1.gif";
e.src = "/media/images/main_buttons/buttons_r2_c1.jpg";
f.src = "/media/images/main_buttons/buttons_r3_c1.jpg";
g.src = "/media/images/main_buttons/buttons_r4_c1.jpg";
h.src = "/media/images/main_buttons/buttons_r5_c1.jpg";
da.src = "/media/images/main_buttons/buttons-a_r1_c1.gif";
ea.src = "/media/images/main_buttons/buttons-a_r2_c1.jpg";
fa.src = "/media/images/main_buttons/buttons-a_r3_c1.jpg";
ga.src = "/media/images/main_buttons/buttons-a_r4_c1.jpg";
ha.src = "/media/images/main_buttons/buttons-a_r5_c1.jpg";

function mover(imgSrc, imgName)
{ 
if (document.images) 
{ 
imgOn=eval(imgSrc + ".src"); 
document[imgName].src= imgOn; 
//document[pic1].src=pic1on.src 
}
}
function mout(imgSrc, imgName)
{ 
if (document.images) 
{ 
imgOn=eval(imgSrc + ".src"); 
document[imgName].src= imgOn; 
//document[pic1].src=pic1on.src
}
}
