/************************************************************
 *
 *  JC Photography  - Javascript Page
 *
 ************************************************************/


/***********************************************
* Image Thumbnail Viewer II script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Specify image paths and optional link (set link to "" for no link):
var dynimages=new Array()
dynimages[0]=["graphics/photo0.jpg", ""]
dynimages[1]=["graphics/photo1.jpg", ""]
dynimages[2]=["graphics/photo2.jpg", ""]
dynimages[3]=["graphics/photo3.jpg", ""]
dynimages[4]=["graphics/photo4.jpg", ""]
dynimages[5]=["graphics/photo5.jpg", ""]
dynimages[6]=["graphics/photo6.jpg", ""]
dynimages[7]=["graphics/photo7.jpg", ""]
dynimages[8]=["graphics/photo8.jpg", ""]
dynimages[9]=["graphics/photo9.jpg", ""]
dynimages[10]=["graphics/photo10.jpg", ""]
dynimages[11]=["graphics/photo11.jpg", ""]
dynimages[12]=["graphics/photo12.jpg", ""]
dynimages[13]=["graphics/photo13.jpg", ""]
dynimages[14]=["graphics/photo14.jpg", ""]
dynimages[15]=["graphics/photo15.jpg", ""]
dynimages[16]=["graphics/photo16.jpg", ""]
dynimages[17]=["graphics/photo17.jpg", ""]
dynimages[18]=["graphics/photo18.jpg", ""]
dynimages[19]=["graphics/photo19.jpg", ""]
dynimages[20]=["graphics/photo20.jpg", ""]
dynimages[21]=["graphics/photo21.jpg", ""]
dynimages[22]=["graphics/photo22.jpg", ""]
dynimages[23]=["graphics/photo23.jpg", ""]
dynimages[24]=["graphics/photo24.jpg", ""]
dynimages[25]=["graphics/photo25.jpg", ""]
dynimages[26]=["graphics/photo26.jpg", ""]
dynimages[27]=["graphics/photo27.jpg", ""]
dynimages[28]=["graphics/photo28.jpg", ""]
dynimages[29]=["graphics/photo29.jpg", ""]
dynimages[30]=["graphics/photo30.jpg", ""]
dynimages[31]=["graphics/photo31.jpg", ""]
dynimages[32]=["graphics/photo32.jpg", ""]
dynimages[33]=["graphics/photo33.jpg", ""]
dynimages[34]=["graphics/photo34.jpg", ""]
dynimages[35]=["graphics/photo35.jpg", ""]
dynimages[36]=["graphics/photo36.jpg", ""]
dynimages[37]=["graphics/photo37.jpg", ""]
dynimages[38]=["graphics/photo38.jpg", ""]
dynimages[39]=["graphics/photo39.jpg", ""]
dynimages[40]=["graphics/photo40.jpg", ""]
dynimages[41]=["graphics/photo41.jpg", ""]
dynimages[42]=["graphics/photo42.jpg", ""]
dynimages[43]=["graphics/photo43.jpg", ""]
dynimages[44]=["graphics/photo44.jpg", ""]


//Preload images ("yes" or "no"):
var preloadimg="no"

//Set optional link target to be added to all images with a link:
var optlinktarget=""

//Set image border width
var imgborderwidth=0

//Optionally, change 1.0 and 0.7 below to affect Wipe gradient size and duration in seconds in IE5.5+:
var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=5.0 Duration=0.5)"

///////No need to edit beyond here/////

if (preloadimg=="yes"){
for (x=0; x<dynimages.length; x++){
var myimage=new Image()
myimage.src=dynimages[x][0]
}
}

function returnimgcode(theimg){
var imghtml=""
if (theimg[1]!="")
imghtml='<a href="'+theimg[1]+'" target="'+optlinktarget+'">'
imghtml+='<img src="'+theimg[0]+'" border="'+imgborderwidth+'">'
if (theimg[1]!="")
imghtml+='</a>'
return imghtml
}

function modifyimage(loadarea, imgindex){
if (document.getElementById){
var imgobj=document.getElementById(loadarea)
if (imgobj.filters && window.createPopup){
imgobj.style.filter=filterstring
imgobj.filters[0].Apply()
}
imgobj.innerHTML=returnimgcode(dynimages[imgindex])
if (imgobj.filters && window.createPopup)
imgobj.filters[0].Play()
return false
}
}

   /***********************************************
    * 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()
//SET IMAGE PATHS. Extend or contract array as needed
//array index=["image path","link","target"]
fadeimages[0]=["graphics/photo0.jpg", "weddingfolio.html", ""] 
fadeimages[1]=["graphics/photo5.jpg", "familyfolio.html", ""] 
fadeimages[2]=["graphics/photo10f.jpg", "seniorfolio.html",""] 
   
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]=["graphics/option1alt.jpg", "weddingfolio.html", ""] 
fadeimages2[1]=["graphics/option2alt.jpg", "familyfolio.html", ""]  
fadeimages2[2]=["graphics/option3alt.jpg", "seniorfolio.html", ""] 
  
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 .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()}, 200) // image transition speed originally 50
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+"])",100)
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()
}
 


function loadMenu() { 
	document.write('<img src="graphics/nav.jpg" width="508" height="24" border="0" usemap="#navmap">',
        '<map id="navmap" name="navmap">',
	'<area shape="rect" coords="12,6,63,18" href="default.html">',
	'<area shape="rect" coords="136,6,234,18" href="weddingfolio.html">',
        '<area shape="rect" coords="305,6,378,18" href="pricing.html">',
        '<area shape="rect" coords="433,6,496,18" href="about.html"></map>');
	}




