﻿/*document.onload = go();*/

jQuery(document).ready(function(){
		
        jQuery('#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.
		});
		
		jQuery('#slideshow2').cycle({
			fx:    'fade',           //Choose your transition, many options at http://jquery.malsup.com/cycle/
			speed:   1000,            // Transition speed, in milliseconds.
			timeout: 4000          // How much time each slide gets, in milliseconds.
		});
		
		jQuery('#slideshow3').cycle({
			fx:    'fade',           //Choose your transition, many options at http://jquery.malsup.com/cycle/
			speed:   1000,            // Transition speed, in milliseconds.
			timeout: 4000          // How much time each slide gets, in milliseconds.
		});
		
		jQuery('#slideshow4').cycle({
			fx:    'fade',           //Choose your transition, many options at http://jquery.malsup.com/cycle/
			speed:   1000,            // Transition speed, in milliseconds.
			timeout: 4000          // How much time each slide gets, in milliseconds.
		});


		loadIframe();
    });
    
function loadIframe()
	{ 	
		if (location.search.length > 0){ 
			url = unescape(location.search.substring(1)) 
			window.frames["myiframe"].location=url 
		} 
	} 
	
function go(){
	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.form_subject.value == "")
		{
			alert("You must enter a value for Subject")
			passForm.form_subject.focus()
			return false
		}
		
		if (passForm.form_to.value == "")
		{
			alert("You must enter a value for Category")
			passForm.form_to.focus()
			return false
		}
		
		if (passForm.Message.value == "")
		{
			alert("You must enter a value for Message")
			passForm.Message.focus()
			return false
		}
		
		var answer = document.getElementById('CaptchaAnswer').value;
		if (answer == "")
		{
			alert("You must enter a value for the Captcha.")
			document.getElementById('CaptchaAnswer').focus()
			return false
		}

		return true
	}

function techvalidation(passForm)
	{
		if (passForm.Primary_Name.value == "")
		{
			alert("You must enter a value for Name")
			passForm.Primary_Name.focus()
			return false
		}

		if (passForm.Phone.value == "")
		{
			alert("You must enter a value for Phone")
			passForm.Phone.focus()
			return false
		}

		if (passForm.Email.value == "")
		{
			alert("You must enter a value for Email")
			passForm.Email.focus()
			return false
		}
		
		if (passForm.VIN.value == "")
		{
			alert("You must enter a value for VIN")
			passForm.VIN.focus()
			return false
		}
				
		if (passForm.Problems.value == "")
		{
			alert("You must describe the problem(s) you are having")
			passForm.Problems.focus()
			return false
		}
		
		var answer = document.getElementById('CaptchaAnswer').value;
		if (answer == "")
		{
			alert("You must enter a value for the Captcha.")
			document.getElementById('CaptchaAnswer').focus()
			return false
		}

		return true
	}

 





