// JavaScript Document
/***********************************************
* 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/dynamicindex14/fadeinslideshow.htm for this script and 100s more.
***********************************************/
 
var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
//fadeimages[0]=["photo1.jpg", "", ""] //plain image syntax
fadeimages[0] = ["/images/random/random_121.jpg", "", ""] 
fadeimages[1] = ["/images/random/random_62.jpg", "/galleries/europe/england/london/day_2.htm", ""]  
fadeimages[2] = ["/images/random/random_63.jpg", "/galleries/europe/england/london/day_3.htm", ""]  
fadeimages[3] = ["/images/random/random_64.jpg", "/galleries/europe/england/london/day_5.htm", ""]  
fadeimages[4] = ["/images/random/random_65.jpg", "/galleries/europe/england/london/day_7.htm", ""]
fadeimages[5] = ["/images/random/random_66.jpg", "/galleries/europe/england/bristol.htm", ""] 
fadeimages[6] = ["/images/random/random_67.jpg", "/galleries/europe/france/cannes.htm", ""] 
fadeimages[7] = ["/images/random/random_68.jpg", "/galleries/europe/france/st_tropez_gallery_one.htm", ""] 
fadeimages[8] = ["/images/random/random_69.jpg", "/galleries/europe/france/st_tropez_gallery_one.htm", ""] 
fadeimages[9] = ["/images/random/random_70.jpg", "/galleries/europe/france/st_tropez_gallery_two.htm", ""]
fadeimages[10] = ["/images/random/random_71.jpg", "/galleries/europe/italy/florence.htm", ""] 
fadeimages[11] = ["/images/random/random_72.jpg", "", ""] 
fadeimages[12] = ["/images/random/random_3.jpg", "/galleries_models.htm", ""] 
fadeimages[13] = ["/images/random/random_73.jpg", "/galleries/europe/italy/venice.htm", ""] 
fadeimages[14] = ["/images/random/random_74.jpg", "/galleries/europe/italy/venice.htm", ""] 
fadeimages[15] = ["/images/random/random_75.jpg", "/galleries/europe/germany/dusseldorf.htm", ""] 
fadeimages[16] = ["/images/random/random_76.jpg", "/galleries/europe/spain/barcelona.htm", ""]
fadeimages[17] = ["/images/random/random_98.jpg", "", ""] 
fadeimages[18] = ["/images/random/random_77.jpg", "/galleries/europe/spain/pamplona.htm", ""] 
fadeimages[19] = ["/images/random/random_78.jpg", "/galleries/europe/spain/pamplona.htm", ""] 
fadeimages[20] = ["/images/random/random_95.jpg", "/galleries/mexico/sayulita/sayulita.htm", ""] 
fadeimages[21] = ["/images/random/random_79.jpg", "/galleries/europe/spain/san_sebastian.htm", ""] 
fadeimages[22] = ["/images/random/random_80.jpg", "/galleries/europe/spain/san_sebastian.htm", ""] 
fadeimages[23] = ["/images/random/random_81.jpg", "", ""] 
fadeimages[24] = ["/images/random/random_82.jpg", "", ""]
fadeimages[25] = ["/images/random/random_83.jpg", "", ""]
fadeimages[26] = ["/images/random/random_97.jpg", "", ""]
fadeimages[27] = ["/images/random/random_84.jpg", "/galleries/europe/spain/san_sebastian.htm", ""]
fadeimages[28] = ["/images/random/random_100.jpg", "/galleries/asia/thailand/2008/koh_phangan.htm", ""]
fadeimages[29] = ["/images/random/random_85.jpg", "/galleries/europe/spain/san_sebastian.htm", ""]
fadeimages[30] = ["/images/random/random_86.jpg", "/galleries/europe/france/st_tropez_gallery_two.htm", ""]
fadeimages[31] = ["/images/random/random_87.jpg", "/galleries/europe/france/st_tropez_gallery_two.htm", ""]
fadeimages[32] = ["/images/random/random_73.jpg", "", ""]
fadeimages[33] = ["/images/random/random_74.jpg", "", ""]
fadeimages[34] = ["/images/random/random_88.jpg", "/galleries/europe/france/st_tropez_gallery_one.htm", ""]
fadeimages[35] = ["/images/random/random_96.jpg", "/galleries/asia/hong_kong/2008/hong_kong_day_one.htm", ""]
fadeimages[36] = ["/images/random/random_89.jpg", "/galleries/europe/france/st_tropez_gallery_one.htm", ""]
fadeimages[37] = ["/images/random/random_90.jpg", "/galleries/europe/monaco/monte_carlo.htm", ""]
fadeimages[38] = ["/images/random/random_91.jpg", "/galleries/canada/prince_george/autumn_visit.htm", ""]
fadeimages[39] = ["/images/random/random_92.jpg", "/galleries/canada/beachomber/2007/thanksgiving_gallery_one.htm", ""]
fadeimages[40] = ["/images/random/random_93.jpg", "/galleries/canada/beachcomber/beachcomber_house.htm", ""]
fadeimages[41] = ["/images/random/random_94.jpg", "/galleries/mexico/puerto_vallarta/2008/puerto_vallarta.htm", ""]
fadeimages[42] = ["/images/random/random_122.jpg", "/galleries/europe/czech_republic/prague_I.htm",""]
fadeimages[43] = ["/images/random/random_123.jpg", "/galleries/europe/czech_republic/prague_I.htm", ""]
fadeimages[44] = ["/images/random/random_124.jpg", "/galleries/europe/czech_republic/prague_I.htm", ""]
fadeimages[45] = ["/images/random/random_51.jpg", "/galleries/usa/2007/30th_vegas/vegas_fsn.htm", ""]
fadeimages[46] = ["/images/random/random_124.jpg", "/galleries/europe/czech_republic/prague_I.htm", ""]
fadeimages[47] = ["/images/random/random_125.jpg", "/galleries/europe/czech_republic/prague_I.htm", ""]
fadeimages[48] = ["/images/random/random_56.jpg", "/galleries/canada/prince_george/adison_marie/addison_3.htm", ""]
fadeimages[49] = ["/images/random/random_59.jpg", "/galleries/canada/prince_george/adison_marie/addison_5.htm", ""]
fadeimages[50] = ["/images/random/random_97.jpg", "/galleries/canada/prince_george/adison_marie/addison_5.htm", ""]
fadeimages[51] = ["/images/random/random_100.jpg", "/galleries/asia/thailand/2008/koh_phangan.htm", ""]
fadeimages[52] = ["/images/random/random_101.jpg", "/galleries/asia/thailand/2008/koh_phangan.htm", ""]
fadeimages[53] = ["/images/random/random_102.jpg", "/galleries/asia/thailand/2008/koh_samui.htm", ""]
fadeimages[54] = ["/images/random/random_103.jpg", "/galleries/asia/thailand/2008/koh_samui.htm", ""]
fadeimages[55] = ["/images/random/random_104.jpg", "/galleries/asia/thailand/2008/chiang_mai.htm", ""]
fadeimages[56] = ["/images/random/random_105.jpg", "/galleries/asia/thailand/2008/chiang_mai.htm", ""]
fadeimages[57] = ["/images/random/random_106.jpg", "/galleries/asia/thailand/2008/chiang_mai.htm", ""]
fadeimages[58] = ["/images/random/random_107.jpg", "/galleries/asia/thailand/2008/bangkok.htm", ""]
fadeimages[59] = ["/images/random/random_108.jpg", "/galleries/asia/thailand/2008/bangkok.htm", ""]
fadeimages[60] = ["/images/random/random_109.jpg", "/galleries/asia/singapore/2008/singapore.htm", ""]
fadeimages[61] = ["/images/random/random_110.jpg", "/galleries/asia/singapore/2008/singapore.htm", ""]
fadeimages[62] = ["/images/random/random_111.jpg", "/galleries/asia/singapore/2008/singapore.htm", ""]
fadeimages[63] = ["/images/random/random_112.jpg", "/galleries/asia/malaysia/2008/KL_tower.htm", ""]
fadeimages[64] = ["/images/random/random_113.jpg", "/galleries/asia/malaysia/2008/KL_tower.htm", ""]
fadeimages[65] = ["/images/random/random_114.jpg", "/galleries/asia/malaysia/2008/KL_tower.htm", ""]
fadeimages[66] = ["/images/random/random_115.jpg", "/galleries/asia/malaysia/2008/KL_tower.htm", ""]
fadeimages[67] = ["/images/random/random_116.jpg", "/galleries/asia/malaysia/2008/KL.htm", ""]
fadeimages[68] = ["/images/random/random_117.jpg", "/galleries/asia/malaysia/2008/KL.htm", ""]
fadeimages[69] = ["/images/random/random_118.jpg", "/galleries/asia/malaysia/2008/KL.htm", ""]
fadeimages[70] = ["/images/random/random_126.jpg", "/galleries/europe/czech_republic/prague_I.htm", ""]
fadeimages[71] = ["/images/random/random_127.jpg", "/galleries/europe/czech_republic/prague_I.htm", ""]
fadeimages[72] = ["/images/random/random_128jpg", "/galleries/europe/denmark/copenhagen.htm", ""]
fadeimages[73] = ["/images/random/random_129.jpg", "/galleries/europe/denmark/copenhagen.htm", ""]
fadeimages[74] = ["/images/random/random_138.jpg", "/galleries/europe/france/paris_1.htm", ""]
fadeimages[75] = ["/images/random/random_131.jpg", "/galleries/europe/france/paris_1.htm", ""]
fadeimages[76] = ["/images/random/random_132.jpg", "/galleries/europe/france/paris_1.htm", ""]
fadeimages[77] = ["/images/random/random_133.jpg", "/galleries/europe/france/paris_1.htm", ""]
fadeimages[78] = ["/images/random/random_134.jpg", "/galleries/europe/france/paris_1.htm", ""]
fadeimages[79] = ["/images/random/random_135.jpg", "/galleries/europe/france/paris_1.htm", ""]
fadeimages[80] = ["/images/random/random_136.jpg", "/galleries/europe/france/paris_1.htm", ""]
fadeimages[81] = ["/images/random/random_137.jpg", "/galleries/europe/france/paris_1.htm", ""]
fadeimages[82] = ["/images/random/random_143.jpg", "/galleries/africa/morocco/casablanca_2.htm", ""]
fadeimages[83] = ["/images/random/random_144.jpg", "/galleries/africa/morocco/casablanca_2.htm", ""]
fadeimages[84] = ["/images/random/random_145.jpg", "/galleries/africa/morocco/casablanca_2.htm", ""]
fadeimages[85] = ["/images/random/random_146.jpg", "/galleries/africa/morocco/casablanca_2.htm", ""]
fadeimages[86] = ["/images/random/random_147.jpg", "/galleries/africa/morocco/casablanca_2.htm", ""]
fadeimages[87] = ["/images/random/random_150.jpg", "/galleries/africa/morocco/marrakech.htm", ""]
fadeimages[88] = ["/images/random/random_152.jpg", "/galleries/africa/morocco/marrakech.htm", ""]
fadeimages[89] = ["/images/random/random_153.jpg", "/galleries/africa/morocco/marrakech.htm", ""]
fadeimages[90] = ["/images/random/random_155.jpg", "/galleries/africa/morocco/marrakech.htm", ""]
fadeimages[91] = ["/images/random/random_157.jpg", "/galleries/africa/morocco/marrakech.htm", ""]



var be_slide=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
//fadeimages[0]=["photo1.jpg", "", ""] //plain image syntax
be_slide[0] = ["/images/welcome/BE_1.jpg", "", ""]
be_slide[1] = ["/images/welcome/BE_2.jpg", "", ""]
be_slide[2] = ["/images/welcome/BE_3.jpg", "", ""]
be_slide[3] = ["/images/welcome/BE_4.jpg", "", ""]
be_slide[4] = ["/images/welcome/BE_20.jpg", "", ""]
be_slide[5] = ["/images/welcome/BE_6.jpg", "", ""]
be_slide[6] = ["/images/welcome/BE_7.jpg", "", ""]
be_slide[7] = ["/images/welcome/BE_8.jpg", "", ""]
be_slide[8] = ["/images/welcome/BE_9.jpg", "", ""]
be_slide[9] = ["/images/welcome/BE_19.jpg", "", ""]
be_slide[10] = ["/images/welcome/BE_11.jpg", "galleries/models/brandon.htm", ""]
be_slide[11] = ["/images/welcome/BE_12.jpg", "galleries/models/brandon.htm", ""]
be_slide[12] = ["/images/welcome/BE_21.jpg", "galleries/models/brandon.htm", ""]
be_slide[13] = ["/images/welcome/BE_18.jpg", "galleries/models/brandon.htm", ""]
be_slide[14] = ["/images/welcome/BE_15.jpg", "galleries/models/brandon.htm", ""]
be_slide[15] = ["/images/welcome/BE_16.jpg", "galleries/models/brandon.htm", ""]
be_slide[16] = ["/images/welcome/BE_21.jpg", "galleries/models/brandon.htm", ""]
be_slide[17] = ["/images/welcome/BE_18.jpg", "galleries/models/brandon.htm", ""]



//fadeimages[1]=["photo2.jpg", "http://www.cssdrive.com", ""] //image with link syntax
//fadeimages[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new"] //image with link and target syntax
 
//var fadeimages2=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
//fadeimages2[0]=["photo1.jpg", "", ""] //plain image syntax
//fadeimages2[1]=["photo2.jpg", "http://www.cssdrive.com", ""] //image with link syntax
//fadeimages2[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new"] //image with link and target syntax
 
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()
}
 
