
<!--
	function FormStep(step)
    {
          var userinfo = document.getElementById("userinfo");
          var Q1 = document.getElementById("Q1");
          var Q2 = document.getElementById("Q2");
          var Q3 = document.getElementById("Q3");
          var Q4 = document.getElementById("Q4");
          var Q5 = document.getElementById("Q5");
          var Q6 = document.getElementById("Q6");
          var Q7 = document.getElementById("Q7");
          var Q8 = document.getElementById("Q8");
          var schedule = document.getElementById("schedule");
		  var purchase = document.getElementById("purchase");
		  var white_box = document.getElementById("white_box");
		  var Qquestion = document.getElementById("Qquestion");
		  var Qanswers = document.getElementById("Qanswers");
		  var Qwording = document.getElementById("Qwording");
		  var navigation = document.getElementById("navigation");
		  var finalsubmit = document.getElementById("finalsubmit");
		  var commercial_reg = document.getElementById("commercial_reg");
		  var zipval = document.conreg.user_zip;
		  var addval = document.conreg.street_address;
		  var cityval = document.conreg.user_city;
		  var validate = document.conreg.validate;
		  
		  
		  		  
          switch(step)
          {
                case 1:
                userinfo.style.display = "block";
                Q1.style.display = "none";
                Q2.style.display = "none";
                Q3.style.display = "none";
                Q4.style.display = "none";
				Q5.style.display = "none";
				Q6.style.display = "none";
				Q7.style.display = "none";
				Q8.style.display = "none";
				schedule.style.display = "none";
				purchase.style.display = "none";
				commercial_reg.style.display = "none";
			    break;
                case 2:
               // ||Validatephone()
			/*if ((validateZIP(zipval.value)==false)||(addval.value==null)||(addval.value=="")||(cityval.value==null)||(cityval.value==""))
                {
                 
               
                if ((addval.value==null)||(addval.value=="")){
                alert("Please Enter a Valid Address")
                addval.value="";
                addval.focus();
                }
            	if ((cityval.value==null)||(cityval.value=="")){
            	alert("Please Enter a Valid City")
                cityval.value="";
                cityval.focus();
                }
               FormStep(1); 
               break;
            	}*/
            	
				userinfo.style.display = "none";
                Q1.style.display = "block";
                Q2.style.display = "none";
                Q3.style.display = "none";
                Q4.style.display = "none";
				Q5.style.display = "none";
				Q6.style.display = "none";
				Q7.style.display = "none";
				Q8.style.display = "none";
				schedule.style.display = "none";
				purchase.style.display = "none"; 
				commercial_reg.style.display = "none";
                break;
                case 3:
				userinfo.style.display = "none";
                Q1.style.display = "none";
                Q2.style.display = "block";
                Q3.style.display = "none";
                Q4.style.display = "none";
				Q5.style.display = "none";
				Q6.style.display = "none";
				Q7.style.display = "none";
				Q8.style.display = "none";
				schedule.style.display = "none";
				purchase.style.display = "none";
				commercial_reg.style.display = "none";
                break;
                case 4:
				userinfo.style.display = "none";
                Q1.style.display = "none";
                Q2.style.display = "none";
                Q3.style.display = "block";
                Q4.style.display = "none";
				Q5.style.display = "none";
				Q6.style.display = "none";
				Q7.style.display = "none";
				Q8.style.display = "none";
				schedule.style.display = "none";
				purchase.style.display = "none"; 
				commercial_reg.style.display = "none";
				
                break;
                case 5:
				userinfo.style.display = "none";
                Q1.style.display = "none";
                Q2.style.display = "none";
                Q3.style.display = "none";
                Q4.style.display = "block";
				Q5.style.display = "none";
				Q6.style.display = "none";
				Q7.style.display = "none";
				Q8.style.display = "none";
				schedule.style.display = "none";
				purchase.style.display = "none"; 
				commercial_reg.style.display = "none";
                break;
				case 6:
				userinfo.style.display = "none";
                Q1.style.display = "none";
                Q2.style.display = "none";
                Q3.style.display = "none";
                Q4.style.display = "none";
				Q5.style.display = "block";
				Q6.style.display = "none";
				Q7.style.display = "none";
				Q8.style.display = "none";
				schedule.style.display = "none";
				purchase.style.display = "none"; 
				commercial_reg.style.display = "none";
                break;
				case 7:
				userinfo.style.display = "none";
                Q1.style.display = "none";
                Q2.style.display = "none";
                Q3.style.display = "none";
                Q4.style.display = "none";
				Q5.style.display = "none";
				Q6.style.display = "block";
				Q7.style.display = "none";
				Q8.style.display = "none";
				schedule.style.display = "none";
				purchase.style.display = "none"; 
				commercial_reg.style.display = "none";
                break;
				case 8:
				userinfo.style.display = "none";
                Q1.style.display = "none";
                Q2.style.display = "none";
                Q3.style.display = "none";
                Q4.style.display = "none";
				Q5.style.display = "none";
				Q6.style.display = "none";
				Q7.style.display = "block";
				Q8.style.display = "none";
				schedule.style.display = "none";
				purchase.style.display = "none";
				commercial_reg.style.display = "none";
                break;
				case 9:
				userinfo.style.display = "none";
                Q1.style.display = "none";
                Q2.style.display = "none";
                Q3.style.display = "none";
                Q4.style.display = "none";
				Q5.style.display = "none";
				Q6.style.display = "none";
				Q7.style.display = "none";
				Q8.style.display = "block";
				schedule.style.display = "none";
				purchase.style.display = "none";
				commercial_reg.style.display = "none";
                break;
				case 10:
				
				userinfo.style.display = "none";
                Q1.style.display = "none";
                Q2.style.display = "none";
                Q3.style.display = "none";
                Q4.style.display = "none";
				Q5.style.display = "none";
				Q6.style.display = "none";
				Q7.style.display = "none";
				Q8.style.display = "none";
				schedule.style.display = "block";
				purchase.style.display = "none"; 
				commercial_reg.style.display = "none";
                break;
				case 11:
				if (validate.checked == false)
	 {alert('Please check the Validate Box to continue');
	 FormStep(10);
	 break;
	 }
	
				userinfo.style.display = "none";
                Q1.style.display = "none";
                Q2.style.display = "none";
                Q3.style.display = "none";
                Q4.style.display = "none";
				Q5.style.display = "none";
				Q6.style.display = "none";
				Q7.style.display = "none";
				Q8.style.display = "none";
				schedule.style.display = "none";
				purchase.style.display = "block"; 
				commercial_reg.style.display = "none";
				break;
				
          case 12:
				userinfo.style.display = "none";
                Q1.style.display = "none";
                Q2.style.display = "none";
                Q3.style.display = "none";
                Q4.style.display = "none";
				Q5.style.display = "none";
				Q6.style.display = "none";
				Q7.style.display = "none";
				Q8.style.display = "none";
				schedule.style.display = "none";
				purchase.style.display = "none";
				commercial_reg.style.display = "block";
				break;
				
          }
    }
	
	function FormStepfoot(step)
    {
		var navigation = document.getElementById("navigation_foot");
		var nikjames = document.getElementById("nikjames");
		var reg_trade = document.getElementById("reg_trade");
		var tweet = document.getElementById("tweet");
       
		
		switch(step)
          {
                case 1:				
				navigation.className =  "navigation_white_back";
				nikjames.className =  "nikjames_white";
				reg_trade.style.color =  "#02afef";
				tweet.style.color =  "#02afef";
                
                
                     
			    break;
				
                case 2:
				
				 break;}
	}
	
	
	function FormStepcont(step)
    {
		var service_locations = document.getElementById("service_locations");
        var email_us = document.getElementById("email_us");
		
		switch(step)
          {
                case 1:				
				service_locations.style.display = "block";
                email_us.style.display = "none";
				document.body.style.backgroundImage = "url(Images/GreenLocationsBG.jpg)";
                
                     
			    break;
				
                case 2:
				service_locations.style.display = "none";
                email_us.style.display = "block";
				document.body.style.backgroundImage = "url(Images/ServicesCommercialBackground.jpg)";
				 break;}
	}
	
	function FormStepnav(step)
    {
		switch(step)
          {
                case 1:
				
                document.body.style.backgroundImage = "url(Images/ServicesCommercialBackground.jpg)";
                location.href = "Services.php"     
			    break;
				
                case 2:
               
				document.body.style.backgroundImage = "url(Images/ServicesResidentialBackground.jpg)";
                location.href = "Services.php"
               break;}
	}
	
	function FormStepserv(step)
    {
          var commercial = document.getElementById("commercial");
          var residential = document.getElementById("residential");
		  
         
		  
		  
		  		  
          switch(step)
          {
                case 1:
                commercial.style.display = "block";
                residential.style.display = "none";
				document.body.style.backgroundImage = "url(Images/ServicesCommercialBackground.jpg)";    
			    break;
				
                case 2:
                commercial.style.display = "none";
                residential.style.display = "block";
				document.body.style.backgroundImage = "url(Images/ServicesResidentialBackground.jpg)";
               
               break;
			   }}
						
						
function FormStepinstall(step)
    {
          
		  var our_installers = document.getElementById("our_installers");
		  var installations_process = document.getElementById("installation_process");
         
		  
		  
		  		  
          switch(step)
          {
                case 1:
                our_installers.style.display = "none";
				installations_process.style.display = "block";
				document.body.style.backgroundImage = "url(Images/ServicesCommercialBackground.jpg)";    
			    break;
				
                case 2:
                our_installers.style.display = "block";
				installations_process.style.display = "none";
                 document.body.style.backgroundImage = "url(Images/ServicesOurInstallersBackground.jpg)"; 
               break;
			   
			        	}
						}
            	
			
//-->

/**
 * DHTML phone number validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;
// Maximum no of digits in an america phone no.
var maxDigitsInIPhoneNumber = 13;
//US Area Code
var AreaCode=new Array(205,251,659,256,334,907,403,780,264,268,520,928,480,602,623,501,479,870,242,246,441,250,604,778,284,341,442,628,657,669,747,752,764,951,209,559,408,831,510,213,310,424,323,562,707,369,627,530,714,949,626,909,916,760,619,858,935,818,415,925,661,805,650,600,809,345,670,211,720,970,303,719,203,475,860,959,302,411,202,767,911,239,386,689,754,941,954,561,407,727,352,904,850,786,863,305,321,813,470,478,770,678,404,706,912,229,710,473,671,808,208,312,773,630,847,708,815,224,331,464,872,217,618,309,260,317,219,765,812,563,641,515,319,712,876,620,785,913,316,270,859,606,502,225,337,985,504,318,318,204,227,240,443,667,410,301,339,351,774,781,857,978,508,617,413,231,269,989,734,517,313,810,248,278,586,679,947,906,616,320,612,763,952,218,507,651,228,601,557,573,636,660,975,314,816,417,664 ,406,402,308,775,702,506,603,551,848,862,732,908,201,973,609,856,505,575,585,845,917,516,212,646,315,518,347 ,718,607,914,631,716,709,252,336,828,910,980,984,919,704,701,283,380,567,216,614,937,330,234,440,419,740,513 ,580,918,405,905,289,647,705,807,613,519,416,503,541,971,445,610,835,878,484,717,570,412,215,267,814,724,902,787,939,438,450,819,418,514,401,306,803,843,864,605,869,758,784,731,865,931,423,615,901,325,361,430,432,469,682,737,979,214,972,254,940,713,281,832,956,817,806,903,210,830,409,936,512,915,868,649,340,385,435,801,802,276,434,540,571,757,703,804,509,206,425,253,360,564,304,262,920,414,715,608,307,867)

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}
function trim(s)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not a whitespace, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (c != " ") returnString += c;
    }
    return returnString;
}
function checkInternationalPhone(strPhone){
strPhone=trim(strPhone)
if(strPhone.indexOf("00")==0) strPhone=strPhone.substring(2)
if(strPhone.indexOf("+")>1) return false
if(strPhone.indexOf("+")==0) strPhone=strPhone.substring(1)
if(strPhone.indexOf("(")==-1 && strPhone.indexOf(")")!=-1)return false
if(strPhone.indexOf("(")!=-1 && strPhone.indexOf(")")==-1)return false
s=stripCharsInBag(strPhone,validWorldPhoneChars);
if(strPhone.length>10){var CCode=s.substring(0,s.length-10);}
else{CCode="";}
if(strPhone.length>7){var NPA=s.substring(s.length-10,s.length-7);}
else{NPA=""}
var NEC=s.substring(s.length-7,s.length-4)
if(CCode!="" && CCode!=null){
	if(CCode!="1" && CCode!="011" && CCode!="001") return false
	}
if(NPA!=""){
  if(checkAreaCode(NPA)==false){ //Checking area code is vaid or not
  	return false
	}
}
else{return false}
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber  &&  s.length <= maxDigitsInIPhoneNumber );
}
//Checking area code is vaid or not
function checkAreaCode(val){
	var res=false;
	for (var i=0; i<AreaCode.length;i++){
		if(AreaCode[i]==val) res=true;
	}
	return res
}

function Validatephone(){
	var Phone=document.conreg.phone
	
	if ((Phone.value==null)||(Phone.value=="")){
		alert("Please Enter your Phone Number")
		Phone.focus()
		return false
	}
	if (checkInternationalPhone(Phone.value)==false){
		alert("Please Enter a Valid Phone Number")
		Phone.value=""
		Phone.focus()
		return false
	}
	return true
 }



<!-- Original:  Brian Swalwell -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function validateZIP(field) {
var valid = "0123456789-";
var hyphencount = 0;

if (field.length!=5 && field.length!=10) {
alert("Please enter your 5 digit or 5 digit+4 zip code.");
return false;
}
for (var i=0; i < field.length; i++) {
temp = "" + field.substring(i, i+1);
if (temp == "-") hyphencount++;
if (valid.indexOf(temp) == "-1") {
alert("Invalid characters in your zip code.  Please try again.");
return false;
}
if ((hyphencount > 1) || ((field.length==10) && ""+field.charAt(5)!="-")) {
alert("The hyphen character should be used with a properly formatted 5 digit+four zip code, like '12345-6789'.   Please try again.");
return false;
   }
}
return true;
}
//  End -->

/**
 * DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}

function passcheck(pass1,pass2){
		
			if (pass1!=pass2){
			alert("Passwords don't match")
			return false
			}
		return true
		}
		
function checkPassword(strng) {
 var error = "";
     var illegalChars = /^\w+$/; // allow only letters and numbers and underscores
    if ((strng.length < 6) || (strng.length > 15)) {
       alert("Error: Password must contain at least six characters!");
	   return false
	   
    }
    else if (!illegalChars.test(strng)) {
      alert("The password contains illegal characters.");
	  return false
    }
	return true
}

function ValidateForm(){
	var emailID=document.registration.email
	var password=document.registration.password
	var conpassword=document.registration.confirm_password
	var firstID=document.registration.first
	var lastID=document.registration.last
	
	var emailalert
	var passalert
	var firstalert
	var lastalert
	var alertfinal
	
	if ((emailID.value==null)||(emailID.value=="")||(password.value==null)||(password.value=="")||(conpassword.value==null)||(conpassword.value=="")||(firstID.value==null)||(firstID.value=="")||(lastID.value==null)||(lastID.value=="")){
		
		if ((firstID.value==null)||(firstID.value=="")){
	    firstalert="Please Enter a First Name"
	    alertfinal=firstalert
		firstID.focus()	}
		
		if ((lastID.value==null)||(lastID.value=="")){
	    lastalert="Please Enter a Last Name"
	    	if((alertfinal==null)){
	   		 alertfinal=lastalert}
	   		else {
	    	alertfinal=alertfinal + '\n' + lastalert}
	    lastID.focus()}
	
		if ((emailID.value==null)||(emailID.value=="")){
		emailalert="Please Enter you Email ID"
			if((alertfinal==null)){
	   		 alertfinal=emailalert}
	   		 else{
	    	alertfinal=alertfinal + '\n' + emailalert}
		emailID.focus()}
	
		if ((password.value==null)||(password.value=="")){
		passalert="Please Enter a valid Password"
			if((alertfinal==null)){
	   		 alertfinal=passalert}
	   		else {
			alertfinal=alertfinal + '\n' + passalert}
		password.focus()
		}
		else if ((conpassword.value==null)||(conpassword.value=="")){
		passalert="Please Enter a valid Password"
			if((alertfinal==null)){
	   		 alertfinal=passalert}
	   		else { 
		alertfinal=alertfinal + '\n' + passalert}
		conpassword.focus()
		}
	alert(alertfinal)
	return false
	}
	
	
	
		
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	
	if (passcheck(password.value,conpassword.value)==false){
		password.value=""
		conpassword.value=""
		password.focus()
		conpassword.focus()
		return false
	}
	
	if (checkPassword(password.value)==false){
		password.value=""
		password.focus()
		return false
	}
	
	
	return true
 }

function ValidateFormlogin(){
	var emailID_login=document.login_form.email
	var password_login=document.login_form.password
	var emailalert
	var passalert
	var firstalert
	var lastalert
	var alertfinal
	
		
	if ((emailID_login.value==null)||(emailID_login.value=="")||(password_login.value==null)||(password_login.value=="")){
		
		if ((emailID_login.value==null)||(emailID_login.value=="")){
		emailalert="Please Enter you Email ID"
			if((alertfinal==null)){
	   		 alertfinal=emailalert}
	   		 else{
	    	alertfinal=alertfinal + '\n' + emailalert}
		emailID_login.focus()}
	
		if ((password_login.value==null)||(password_login.value=="")){
		passalert="Please Enter a valid Password"
			if((alertfinal==null)){
	   		 alertfinal=passalert}
	   		else {
			alertfinal=alertfinal + '\n' + passalert}
		password_login.focus()
		}
		
	alert(alertfinal)
	return false
	}
	
	if (echeck(emailID_login.value)==false){
		emailID_login.value=""
		emailID_login.focus()
		return false
	}
	
	if (checkPassword(password_login.value)==false){
		password_login.value=""
		password_login.focus()
		return false
	}
	
		
		
		
	return true
 }
 

		

$(document).ready(function(){
	$("#nav-one li").hover(
		function(){ $("ul", this).fadeIn("fast"); }, 
		function() { } 
	);
	if (document.all) {
		$("#nav-one li").hoverClass("sfHover");
	}
});

$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};	

function populate(o)
		{
			d=document.getElementById('vehiclemodel');
			if(!d){return;}			
			var mitems=new Array();
			mitems['Chevrolet']=['Volt'];
			mitems['Nissan']=['Leaf'];
			mitems['Mitsubishi']=['i-MiEV'];
			mitems['Toyota']=['Prius'];
			
			if((o == 'Chevrolet')||(o == 'Nissan')||(o == 'Mitsubishi')||(o == 'Toyota'))
			{
			d.options.length=0;
			cur=mitems[o];
			if(!cur){return;}
			d.options.length=cur.length;
			for(var i=0;i<cur.length;i++)
			{
				d.options[i].text=cur[i];
				d.options[i].id=cur[i];
				d.options[i].value=cur[i];
			}
			}
			
			else
			{
			d.options.length=0;
			cur=mitems[o.options[o.selectedIndex].value];
			if(!cur){return;}
			d.options.length=cur.length;
			for(var i=0;i<cur.length;i++)
			{
				d.options[i].text=cur[i];
				d.options[i].id=cur[i];
				d.options[i].value=cur[i];
			}
			}
		}


/*
$(document).ready(function(){  
		$("#vehiclemake").click(function () {
	    $("#blank").show();  
		$("#Volt").show();         
		$("#Leaf").show();         
		});     
		$("#Nissan").click(function () {         
		$("#Volt").hide();         
		$("#Leaf").show();         
		});     
		$("#Cheverlot").click(function () {         
		$("#Volt").show();         
		$("#Leaf").hide();         
		}); 
		}); 

$(document).ready(function() {              //Default Action             
						   $(".tab_content").hide(); 
						   //Hide all content            
						   $("ul.tabs li:first").addClass("active").show(); 
						   //Activate first tab            
						   $(".tab_content:first").show(); 
						   //Show first tab content              
						   //On Click Event             
						   $("ul.tabs li").hover(function() {                 
								$("ul.tabs li").removeClass("active"); 
								//Remove any "active" class                 
								$(this).addClass("active"); 
								//Add "active" class to selected tab                 
								$(".tab_content").hide(); 
								//Hide all tab content                 
								var activeTab = $(this).find("a").attr("href"); 
								//Find the rel attribute value to identify the active tab + content                 
								$(activeTab).fadeIn(); //Fade in the active content                 
								return false;            
								});         
						   });


Code Highlighting 
Courtesy of Dean Edwards star-light 
http://dean.edwards.name/my/behaviors/#star-light.htc
	- with jQuery methods added, of course
*/
	
