/*jQuery(document).ready(function(){
	jQuery("#header").pngFix();
});*/

 
    $(document).ready(function(){ 
        $("#outerCont").pngFix(); 
		jQuery('#nav').superfish({ 
            delay:       1000, // one second delay on mouseout 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            speed:       'fast',  // faster animation speed 
            autoArrows:  false, // disable generation of arrow mark-up 
            dropShadows: false  // disable drop shadows 
        }); 
    }); 
function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
}


function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}

function formserialize(){
		if(document.Form1.firstname.value!==""){
			document.getElementById("apiFirstName").value=document.Form1.firstname.value;
		}else{
			alert("Please enter first name");
			return false;
		}
		if(document.Form1.lastname.value!=""){
			document.getElementById("apiLastName").value=document.Form1.lastname.value;
		}else{
			alert("Please enter last name");
			return false;
		}
		if(document.Form1.email.value!=""){
			document.getElementById("apiEmail").value=document.Form1.email.value;
		}else{
			alert("Please enter valid email");
			return false;
		}
		document.getElementById("apiPhone").value=document.Form1.phone.value;
		document.getElementById("apiComment").value=document.Form1.comments.value;
		
		return true;
	}	



function formserializecontact(){
  //alert("here");
	var bval = true;
  
	if (document.Form2.firstname.value==''){
		alert('Enter First Name');
		document.Form2.firstname.focus()
		bval=false;
	}
	if (bval== true && document.Form2.lastname.value==''){
		alert('Enter Last Name');
		document.Form2.lastname.focus()
		bval=false;
	}
	if (bval== true && document.Form2.email.value==''){
		alert('Enter Email Address');
		document.Form2.email.focus()
		bval=false;
	}
	if (bval== true && document.Form2.phone.value==''){
		alert('Enter Phone Number');
		document.Form2.phone.focus()
		bval=false;
	}  
	if (bval== true && document.Form2.state.value==''){
		alert('Select State');
		document.Form2.state.focus()
		bval=false;
	}  
	if (bval== true && document.Form2.zip.value==''){
	  alert('Enter Zip Code');
	  document.Form2.zip.focus()
	  bval=false;
	}  
  
	if (bval){
		document.getElementById("apiFirstName").value=document.Form2.firstname.value;
		document.getElementById("apiLastName").value=document.Form2.lastname.value;
		document.getElementById("apiEmail").value=document.Form2.email.value;
		document.getElementById("apiPhone").value=document.Form2.phone.value;
		document.getElementById("apiAddress").value=document.Form2.address.value;
		document.getElementById("apiCity").value=document.Form2.city.value;
		document.getElementById("apiStateCode").value=document.Form2.state.value;
		document.getElementById("apiZipCode").value=document.Form2.zip.value;
		document.getElementById("apiComment").value=document.Form2.comments.value;
		document.getElementById("apiTranKey").value='66D3A6E8-CA1B-425C-8646-4C2FCE91403D-ACCNT1153'; //Ttransaction Key is like XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX-XXXXXXXX format which will be provided by MML.   
		document.getElementById("apiRedirectPath").value='http://www.drbottger.com/thanks.html'; // full path of redirect page e.g. http://your website/thanks.html
		//document.Form2.submit();
	}
	return bval;  
}