//Chrome Drop Down Menu v2.01- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated: November 14th 06- added iframe shim technique

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout
disablemenuclick: true, //when user clicks on a menu item with a drop down menu, disable menu item's link?
enableswipe: 1, //enable swipe effect? 1 for yes, 0 for no
enableiframeshim: 1, //enable "iframe shim" technique to get drop down menus to correctly appear on top of controls such as form objects in IE5.5/IE6? 1 for yes, 0 for no

//No need to edit beyond here////////////////////////
dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all, swipetimer: undefined, bottomclip:0,

getposOffset:function(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
},

swipeeffect:function(){
if (this.bottomclip<parseInt(this.dropmenuobj.offsetHeight)){
this.bottomclip+=10+(this.bottomclip/10) //unclip drop down menu visibility gradually
this.dropmenuobj.style.clip="rect(0 auto "+this.bottomclip+"px 0)"
}
else
return
this.swipetimer=setTimeout("cssdropdown.swipeeffect()", 10)
},

showhide:function(obj, e){
if (this.ie || this.firefox)
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover"){
if (this.enableswipe==1){
if (typeof this.swipetimer!="undefined")
clearTimeout(this.swipetimer)
obj.clip="rect(0 auto 0 0)" //hide menu via clipping
this.bottomclip=0
this.swipeeffect()
}
obj.visibility="visible"
}
else if (e.type=="click")
obj.visibility="hidden"
},

iecompattest:function(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
},

clearbrowseredge:function(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=this.ie && !window.opera? this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?
edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=this.ie && !window.opera? this.iecompattest().scrollTop : window.pageYOffset
var windowedge=this.ie && !window.opera? this.iecompattest().scrollTop+this.iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?
edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?
edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
},

dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.dropmenuobj.style.visibility="hidden" //hide menu
this.clearhidemenu()
if (this.ie||this.firefox){
obj.onmouseout=function(){cssdropdown.delayhidemenu()}
obj.onclick=function(){return !cssdropdown.disablemenuclick} //disable main menu item link onclick?
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(e){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style, e)
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
this.positionshim() //call iframe shim function
}
},

positionshim:function(){ //display iframe shim function
if (this.enableiframeshim && typeof this.shimobject!="undefined"){
if (this.dropmenuobj.style.visibility=="visible"){
this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"
this.shimobject.style.height=this.dropmenuobj.offsetHeight+"px"
this.shimobject.style.left=this.dropmenuobj.style.left
this.shimobject.style.top=this.dropmenuobj.style.top
}
this.shimobject.style.display=(this.dropmenuobj.style.visibility=="visible")? "block" : "none"
}
},

hideshim:function(){
if (this.enableiframeshim && typeof this.shimobject!="undefined")
this.shimobject.style.display='none'
},

contains_firefox:function(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
},

dynamichide:function(e){
var evtobj=window.event? window.event : e
if (this.ie&&!this.dropmenuobj.contains(evtobj.toElement))
this.delayhidemenu()
else if (this.firefox&&e.currentTarget!= evtobj.relatedTarget&& !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))
this.delayhidemenu()
},

delayhidemenu:function(){
this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'; cssdropdown.hideshim()",this.disappeardelay) //hide menu
},

clearhidemenu:function(){
if (this.delayhide!="undefined")
clearTimeout(this.delayhide)
},

startchrome:function(){
for (var ids=0; ids<arguments.length; ids++){
var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
for (var i=0; i<menuitems.length; i++){
if (menuitems[i].getAttribute("rel")){
var relvalue=menuitems[i].getAttribute("rel")
menuitems[i].onmouseover=function(e){
var event=typeof e!="undefined"? e : window.event
cssdropdown.dropit(this,event,this.getAttribute("rel"))
}
}
}
}
if (window.createPopup && !window.XmlHttpRequest){ //if IE5.5 to IE6, create iframe for iframe shim technique
document.write('<IFRAME id="iframeshim"  src="" style="display: none; left: 0; top: 0; z-index: 90; position: absolute; filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)" frameBorder="0" scrolling="no"></IFRAME>')
this.shimobject=document.getElementById("iframeshim") //reference iframe object
}
}

}

/***********************************************
* 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 fadeimages2=new Array()
fadeimages2[0]=["/graphics/main.img2.01.jpg", "", ""] //plain image syntax
fadeimages2[1]=["/graphics/main.img2.02.jpg", "", ""]
fadeimages2[2]=["/graphics/main.img2.04.jpg", "", ""]
fadeimages2[3]=["/graphics/main.img2.06.jpg", "", ""]
fadeimages2[4]=["/graphics/main.img2.07.jpg", "", ""]
fadeimages2[5]=["/graphics/main.img2.08.jpg", "", ""]
fadeimages2[6]=["/graphics/main.img2.09.jpg", "", ""]
fadeimages2[7]=["/graphics/main.img2.10.jpg", "", ""]
fadeimages2[8]=["/graphics/main.img2.11.jpg", "", ""]
fadeimages2[9]=["/graphics/main.img2.12.jpg", "", ""]
fadeimages2[10]=["/graphics/main.img2.16.jpg", "", ""]
fadeimages2[11]=["/graphics/main.img2.17.jpg", "", ""]
fadeimages2[12]=["/graphics/main.img2.18.jpg", "", ""]
fadeimages2[13]=["/graphics/main.img2.19.jpg", "", ""]
fadeimages2[14]=["/graphics/main.img2.20.jpg", "", ""]
fadeimages2[15]=["/graphics/main.img2.21.jpg", "", ""]
fadeimages2[16]=["/graphics/main.img2.22.jpg", "", ""]
fadeimages2[17]=["/graphics/main.img2.23.jpg", "", ""]
fadeimages2[18]=["/graphics/main.img2.24.jpg", "", ""]
fadeimages2[19]=["/graphics/main.img2.25.jpg", "", ""]
fadeimages2[20]=["/graphics/main.img2.27.jpg", "", ""]
fadeimages2[21]=["/graphics/main.img2.28.jpg", "", ""]
fadeimages2[22]=["/graphics/main.img2.29.jpg", "", ""]
fadeimages2[23]=["/graphics/main.img2.30.jpg", "", ""]
fadeimages2[24]=["/graphics/main.img2.31.jpg", "", ""]
fadeimages2[25]=["/graphics/main.img2.32.jpg", "", ""]
fadeimages2[26]=["/graphics/main.img2.33.jpg", "", ""]
fadeimages2[27]=["/graphics/main.img2.34.jpg", "", ""]
fadeimages2[28]=["/graphics/main.img2.35.jpg", "", ""]
fadeimages2[29]=["/graphics/main.img2.36.jpg", "", ""]
fadeimages2[30]=["/graphics/main.img2.37.jpg", "", ""]
fadeimages2[31]=["/graphics/main.img2.38.jpg", "", ""]
fadeimages2[32]=["/graphics/main.img2.39.jpg", "", ""]
fadeimages2[33]=["/graphics/main.img2.40.jpg", "", ""]
fadeimages2[34]=["/graphics/main.img2.41.jpg", "", ""]
fadeimages2[35]=["/graphics/main.img2.42.jpg", "", ""]
fadeimages2[36]=["/graphics/main.img2.43.jpg", "", ""]
fadeimages2[37]=["/graphics/main.img2.44.jpg", "", ""]

//HOME
var fadeimages=new Array()
fadeimages[0]=["/graphics/main.img.01.jpg", "", ""] //plain image syntax
fadeimages[1]=["/graphics/main.img.02.jpg", "", ""]
fadeimages[2]=["/graphics/main.img.03.jpg", "", ""]
fadeimages[3]=["/graphics/main.img.04.jpg", "", ""]
fadeimages[4]=["/graphics/main.img.05.jpg", "", ""]
fadeimages[5]=["/graphics/main.img.06.jpg", "", ""]
fadeimages[6]=["/graphics/main.img.07.jpg", "", ""]
fadeimages[7]=["/graphics/main.img.08.jpg", "", ""]
fadeimages[8]=["/graphics/main.img.09.jpg", "", ""]
fadeimages[9]=["/graphics/main.img.10.jpg", "", ""]
fadeimages[10]=["/graphics/main.img.11.jpg", "", ""]
fadeimages[11]=["/graphics/main.img.12.jpg", "", ""]
fadeimages[12]=["/graphics/main.img.13.jpg", "", ""]
fadeimages[13]=["/graphics/main.img.14.jpg", "", ""]
fadeimages[14]=["/graphics/main.img.15.jpg", "", ""]
fadeimages[15]=["/graphics/main.img.16.jpg", "", ""]
fadeimages[16]=["/graphics/main.img.17.jpg", "", ""]
fadeimages[17]=["/graphics/main.img.18.jpg", "", ""]
fadeimages[18]=["/graphics/main.img.19.jpg", "", ""]
fadeimages[19]=["/graphics/main.img.20.jpg", "", ""]
fadeimages[20]=["/graphics/main.img.21.jpg", "", ""]
fadeimages[21]=["/graphics/main.img.22.jpg", "", ""]
fadeimages[22]=["/graphics/main.img.23.jpg", "", ""]
fadeimages[23]=["/graphics/main.img.24.jpg", "", ""]
fadeimages[24]=["/graphics/main.img.26.jpg", "", ""]
fadeimages[25]=["/graphics/main.img.27.jpg", "", ""]
fadeimages[26]=["/graphics/main.img.28.jpg", "", ""]
fadeimages[27]=["/graphics/main.img.29.jpg", "", ""]
fadeimages[28]=["/graphics/main.img.30.jpg", "", ""]
fadeimages[29]=["/graphics/main.img.31.jpg", "", ""]
fadeimages[30]=["/graphics/main.img.33.jpg", "", ""]
fadeimages[31]=["/graphics/main.img.34.jpg", "", ""]
fadeimages[32]=["/graphics/main.img.35.jpg", "", ""]
fadeimages[33]=["/graphics/main.img.36.jpg", "", ""]
fadeimages[34]=["/graphics/main.img.37.jpg", "", ""]
fadeimages[35]=["/graphics/main.img.38.jpg", "", ""]
fadeimages[36]=["/graphics/main.img.39.jpg", "", ""]
fadeimages[37]=["/graphics/main.img.40.jpg", "", ""]
fadeimages[38]=["/graphics/main.img.41.jpg", "", ""]
fadeimages[39]=["/graphics/main.img.42.jpg", "", ""]
fadeimages[40]=["/graphics/main.img.43.jpg", "", ""]
fadeimages[41]=["/graphics/main.img.44.jpg", "", ""]
fadeimages[42]=["/graphics/main.img.45.jpg", "", ""]
fadeimages[43]=["/graphics/main.img.46.jpg", "", ""]
fadeimages[44]=["/graphics/main.img.47.jpg", "", ""]
fadeimages[45]=["/graphics/main.img.48.jpg", "", ""]
fadeimages[46]=["/graphics/main.img.49.jpg", "", ""]
fadeimages[47]=["/graphics/main.img.50.jpg", "", ""]
fadeimages[48]=["/graphics/main.img.51.jpg", "", ""]
fadeimages[49]=["/graphics/main.img.52.jpg", "", ""]
fadeimages[50]=["/graphics/main.img.53.jpg", "", ""]
fadeimages[51]=["/graphics/main.img.54.jpg", "", ""]
fadeimages[52]=["/graphics/main.img.56.jpg", "", ""]
fadeimages[53]=["/graphics/main.img.57.jpg", "", ""]
fadeimages[54]=["/graphics/main.img.58.jpg", "", ""]
fadeimages[55]=["/graphics/main.img.59.jpg", "", ""]
fadeimages[56]=["/graphics/main.img.60.jpg", "", ""]
fadeimages[57]=["/graphics/main.img.61.jpg", "", ""]
fadeimages[58]=["/graphics/main.img.62.jpg", "", ""]
fadeimages[59]=["/graphics/main.img.63.jpg", "", ""]
fadeimages[60]=["/graphics/main.img.64.jpg", "", ""]
fadeimages[61]=["/graphics/main.img.65.jpg", "", ""]
fadeimages[62]=["/graphics/main.img.66.jpg", "", ""]
fadeimages[63]=["/graphics/main.img.67.jpg", "", ""]
fadeimages[64]=["/graphics/main.img.68.jpg", "", ""]
fadeimages[65]=["/graphics/main.img.69.jpg", "", ""]
fadeimages[66]=["/graphics/main.img.71.jpg", "", ""]
fadeimages[67]=["/graphics/main.img.73.jpg", "", ""]
fadeimages[68]=["/graphics/main.img.75.jpg", "", ""]
fadeimages[69]=["/graphics/main.img.76.jpg", "", ""]
fadeimages[70]=["/graphics/main.img.77.jpg", "", ""]
fadeimages[71]=["/graphics/main.img.78.jpg", "", ""]
fadeimages[72]=["/graphics/main.img.79.jpg", "", ""]


var fadebgcolor="#FFFFFF"
////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);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;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);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;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 if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
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=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}

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 rotateTestimonials()
{
  var index = Math.floor(Math.random()*testimonialQuote.length)
  document.getElementById('testimonialQuote').innerHTML = testimonialQuote[index];
  document.getElementById('testimonialSignature').innerHTML = testimonialSignature[index];
}

function openMCEditor(targetField) {
	height = 490;
	width = 800;
	LinkToField = document.getElementById(targetField);
	win1=window.open("/event.manager/editor/?f=regform&a=content","editorwin",'resizable=yes,width='+width+',height='+height);
	if (win1.opener == null) win1.opener = self;
}