﻿document.onload = init_menu();

jQuery(document).ready(function(){
		
		$('#nh-slideshow').cycle({
			fx:    'fade',           //Choose your transition, many options at http://jquery.malsup.com/cycle/
			speed:   400,            // Transition speed, in milliseconds.
			timeout: 4000           // How much time each slide gets, in milliseconds.

		});
		
		$('#home-slideshow').cycle({
			fx:    'fade',           //Choose your transition, many options at http://jquery.malsup.com/cycle/
			speed:   400,            // Transition speed, in milliseconds.
			timeout: 4000           // How much time each slide gets, in milliseconds.

		});

		$('#header-slideshow').cycle({
			fx:    'fade',           //Choose your transition, many options at http://jquery.malsup.com/cycle/
			speed:   400,            // Transition speed, in milliseconds.
			timeout: 4000           // How much time each slide gets, in milliseconds.

		});

		$(".auto .jCarouselLite").jCarouselLite({
    		auto: 2000,
    		speed: 3000
		});
			
		loadIframe(); 
    });
    
function loadIframe()
	{ 	
		if (location.search.length > 0){ 
			url = unescape(location.search.substring(1)) 
			window.frames["myiframe"].location=url 
		} 
	} 

function changeImage(imgPath){
	var imgDiv = document.getElementById('selected-img');
	imgDiv.innerHTML = "<img src='siteart/" + imgPath + "' alt='' />";
}

function init_menu(){
	anylinkmenu.init("menuanchorclass");
}


function validation(passForm)
	{
		if (passForm.Primary_Name.value == "")
		{
			alert("You must enter a value for Name")
			passForm.Primary_Name.focus()
			return false
		}

		if (passForm.Email.value == "")
		{
			alert("You must enter a value for Email")
			passForm.Email.focus()
			return false
		}
		
		if (passForm.Daytime_Phone.value == "")
		{
			alert("You must enter a value for Daytime Phone")
			passForm.Daytime_Phone.focus()
			return false
		}

		return true
	}

 





