/* start preload images */

navhome = new Image();
navhome.src = "imgs/navhome_over.gif";

navcontact = new Image();
navcontact.src = "imgs/navcontact_over.gif";

navplanners = new Image();
navplanners.src = "imgs/navplanners_over.gif";

navclients = new Image();
navclients.src = "imgs/navclients_over.gif";

navabout = new Image();
navabout.src = "imgs/navabout_over.gif";

navvideo = new Image();
navvideo.src = "imgs/navvideo_over.gif";

/* end preload images */

/* start rollover script */

function rollover(imgname,state) {

	document.images[imgname].src= 'imgs/' + imgname +'_'+state+'.gif';

}

/* end rollover script */

/* start setting the "in" states dynamically */

function checkState(imgname,state) {

	if (section == 'home') {
		document.images.navhome.src='imgs/navhome_in.gif';
	}

	if (section == 'contact') {
		document.images.navcontact.src='imgs/navcontact_in.gif';
	}
	
	if (section == 'meetingplanners') {
		document.images.navplanners.src='imgs/navplanners_in.gif';
	}
	
	if (section == 'satisfiedclients') {
		document.images.navclients.src='imgs/navclients_in.gif';
	}
	
	if (section == 'aboutliz') {
		document.images.navabout.src='imgs/navabout_in.gif';
	}
	
	if (section == 'videoseries') {
		document.images.navvideo.src='imgs/navvideo_in.gif';
	}
	
	
	
	
	if (section != 'home') {
		document.images.navhome.src='imgs/navhome_off.gif';
	}
	
	if (section != 'contact') {
		document.images.navcontact.src='imgs/navcontact_off.gif';
	}
	
	if (section != 'meetingplanners') {
		document.images.navplanners.src='imgs/navplanners_off.gif';
	}
	
	if (section != 'satisfiedclients') {
		document.images.navclients.src='imgs/navclients_off.gif';
	}
	
	if (section != 'aboutliz') {
		document.images.navabout.src='imgs/navabout_off.gif';
	}
	
	if (section != 'videoseries') {
		document.images.navvideo.src='imgs/navvideo_off.gif';
	}
	

}

function checkAllImages() {
	checkState('navhome','in');
	checkState('navcontact','in');
	checkState('navplanners','in');
	checkState('navclients','in');
	checkState('navabout','in');
	checkState('navvideo','in');
}

function checksubnav(section) {
/*	let's build an array of links,
	and if a link's href == the document's
	location, we change its appearance.		*/
	

	for (var i=0; i<document.links.length; i++) {
		if (document.links[i].className == "subnav") {	
			if (document.links[i].href == document.location) {
				document.links[i].style.color = "#00267f";
				document.links[i].style.fontWeight = "bold";
			}
			if (document.links[i].href != document.location) {
				if (document.links[i].parentElement) document.links[i].parentElement.style.backgroundColor = "#f5f5f5";
				if (document.links[i].parentNode) document.links[i].parentNode.style.backgroundColor = "#f5f5f5";

			}
		}
		if (document.links[i].className == "subsubnav") {	
			if (document.links[i].href == document.location) {
				document.links[i].style.color = "#00267f";
				document.links[i].style.fontWeight = "bold";
			}
			if (document.links[i].href != document.location) {
				if (document.links[i].parentElement) document.links[i].parentElement.parentElement.style.backgroundColor = "#fff";
				if (document.links[i].parentNode) document.links[i].parentNode.parentNode.style.backgroundColor = "#fff";

			}
		}
	}


/*	sweet									*/
}

/*	end setting the "in" state dynamically	*/

function showSecondaryAddressFields(){
	var x = document.getElementById('secondaryAddressFields');
	x.style.display = 'block';
}

function hideSecondaryAddressFields(){
	var x = document.getElementById('secondaryAddressFields');
	x.style.display = 'none';
}

// JavaScript Document
