// LaurelCorona.com JavaScript Document
var menu=function(){
	var t=15,z=550,s=6,a;
	function dd(n){this.n=n; this.h=[]; this.c=[]}
	dd.prototype.init=function(p,c){
		a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
		for(i;i<l;i++){
			var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
			h.onmouseover=new Function(this.n+'.st('+i+',true)');
			h.onmouseout=new Function(this.n+'.st('+i+')');
		}
	}
	dd.prototype.st=function(x,f){
		var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];
		clearInterval(c.t); c.style.overflow='hidden';
		if(f){
			p.className+=' '+a;
			if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
			if(c.mh==c.offsetHeight){c.style.overflow='visible'}
			else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)}
		}else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)}
	}
	function sl(c,f){
		var h=c.offsetHeight;
		if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
			if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
			clearInterval(c.t); return
		}
		var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
		c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')';
		c.style.height=h+(d*f)+'px'
	}
	return{dd:dd}
}();

function switchDiv(box, div_id)
{
  var style_sheet = getStyleObject(div_id);
  if (style_sheet)
  {
	var status = checkBoxState(box);
	if (status)
	{

	changeObjectVisibility(div_id, "block");
  } else {
	   hide(div_id);
	   }
  } else  {
	alert("sorry, this only works in browsers that do Dynamic HTML");
  }
}

function getStyleObject(objectId) {
// checkW3C DOM, then MSIE 4, then NN 4.
  //
  if(document.getElementById && document.getElementById(objectId)) {
	return document.getElementById(objectId).style;
   }
   else if (document.all && document.all(objectId)) {  
	return document.all(objectId).style;
   } 
   else if (document.layers && document.layers[objectId]) { 
	return document.layers[objectId];
   } else {
	return false;
   }
}

function changeObjectVisibility(objectId, newVisibility) {
// first get the object's stylesheet
	var styleObject = getStyleObject(objectId);

	// then if we find a stylesheet, set its visibility
	// as requested
	//
	if (styleObject) {
	styleObject.display = newVisibility;
	return true;
	} else {
	return false;
	}
}

function hide(div_id)
{
   changeObjectVisibility(div_id,"none");
}


function shiftDiv(i){
	if (document.getElementById){
		if (document.getElementById('contentblock'+i).style.display=='block') {
			document.getElementById('contentblock'+i).style.display='none';
			document.getElementById('contentblockCollapse').style.display='none';
			document.getElementById('contentblockMore').style.display='block';
		}
		else {
			document.getElementById('contentblock'+i).style.display='block';
			document.getElementById('contentblockCollapse').style.display='block';
			document.getElementById('contentblockMore').style.display='none';
		}
	}
}
/***********************************************
* DHTML slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice must stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var photos=new Array()
var photoslink=new Array()
var caption=new Array()
var which=0
var linkornot=1
var captions=1

var lft_img_on="images/left_arrow_on.gif"
var lft_img_off="images/left_arrow_off.gif"
var rt_img_on="images/right_arrow_on.gif"
var rt_img_off="images/right_arrow_off.gif"



var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}

function changecaption() {
document.getElementById('caption').innerHTML=caption[which]
}

function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}

function backward(){
if (which==1){
which--
document.images.photoslider.src=photos[which]
document.images.lft_img.src=lft_img_off
document.images.rt_img.src=rt_img_on
keeptrack()
changecaption()
} else if (which>0) {
which--
document.images.photoslider.src=photos[which]
document.images.lft_img.src=lft_img_on
document.images.rt_img.src=rt_img_on
keeptrack()
changecaption()
} else {
document.images.lft_img.src=lft_img_off
}
}

function forward(){
if (which+1==photos.length-1){
which++
document.images.photoslider.src=photos[which]
document.images.rt_img.src=rt_img_off
document.images.lft_img.src=lft_img_on
keeptrack()
changecaption()
} else if (which<photos.length-1) {
which++
document.images.photoslider.src=photos[which]
document.images.rt_img.src=rt_img_on
document.images.lft_img.src=lft_img_on
keeptrack()
changecaption()
} else {
document.images.rt_img.src=rt_img_off
}
}

function transport(){
window.location=photoslink[which]
}
