
var price_global="";
var brand_global="";
var cvlocation_global="";
var reputation_global="";
var returncustomer_global="";


var newtires_two_global="";
var change_two_global="";
var package_two_global="";
var alignment_two_global="";
var brakes_two_global="";
var oilchange_two_global="";
var carwash_two_global="";
var autodetail_two_global="";


var promptservice_three_global="";
var estimatedtime_three_global="";
var vehicleclean_three_global="";
var professional_three_global="";
var neatandclean_three_global=""; 
var servicelmerchandise_three_global="";
var duringyourvisi_three_global="";
var returnjts_three_global="";


var jtsyears_four_global=""; 
var phonebook_four_global="";
var advertising_four_global="";
var drivingby_four_global="";
var mailing_four_global="";
var onlinesearch_four_global="";
var recfriend_four_global="";


function textCounter(field,cntfield,maxlimit) { 
if (field.value.length > maxlimit) 
field.value = field.value.substring(0, maxlimit);

else
cntfield.value = maxlimit - field.value.length;
}



function viewComments()
{
	//alert('hai'); 
	
	var servicepoint = $('#address').val();
	var monthofservice = $('#start_month').val();
	var dateofservice = $('#start_day').val();
	var yearofservice = $('#start_year').val();
	var vlicense = $('#license').val();
	var custname = $('#custname').val();
	var lastname = $('#lastname').val();
	var addressone = $('#addr_one').val();
	var addresstwo = $('#addr_two').val();
	var city = $('#city').val();
	var state = $('#state').val();
	var zipcode = $('#zipcode').val();
	var phoneno = $('#phone').val();
	var email = $('#email').val();
	var confemail = $('#confemail').val();
	var others_txtone = $('#others_txtone').val();
	var others_txttwo = $('#others_txttwo').val();
	var others_txtfour = $('#others_txtfour').val();
	var messag = $('#messag').val();
	
	
	
    var result="";
	var resultmoreoptions="";
   $.post("view_info.php",{servicePoint:servicepoint,vLicense:vlicense,custName:custname,lastName:lastname,addressOne:addressone,addressTwo:addresstwo,City:city,Zipcode:zipcode,State:state,phoneNo:phoneno,Email:email,Cemail:confemail,Monthofservice:monthofservice,Dateofservice:dateofservice,Yearofservice:yearofservice,Price_one:price_global,Brand_one:brand_global,Cvlocation_one:cvlocation_global,Reputation_one:reputation_global,Returningcustomer_one:returncustomer_global,
Others_txtone:others_txtone,		  
		  Newtires_two:newtires_two_global,Change_two:change_two_global,Package_two:package_two_global,Alignment_two:alignment_two_global,Brakes_two:brakes_two_global,Oilchange_two:oilchange_two_global,Carwash_two:carwash_two_global,Autodetail_two:autodetail_two_global,Others_txttwo:others_txttwo,
		  
		  Promptservice_three:promptservice_three_global,Estimatedtime_three:estimatedtime_three_global,Vehicleclean_three:vehicleclean_three_global,Professional_three:professional_three_global,Neatandclean_three:neatandclean_three_global,Servicelmerchandise_three:servicelmerchandise_three_global,Duringyourvisi_three:duringyourvisi_three_global,Returnjts_three:returnjts_three_global,
		  
		  Jtsyears_four:jtsyears_four_global,Phonebook_four:phonebook_four_global,Advertising_four:advertising_four_global,Drivingby_four:drivingby_four_global,Mailing_four:mailing_four_global,Onlinesearch_four:onlinesearch_four_global,Recfriend_four:recfriend_four_global,Others_txtfour:others_txtfour,Opinion:messag

		   
		   },
	 
 
   
   function(data){
		
		 /*document.getElementById('messages').innerHTML = "loading"; 
		 var t=setTimeout(showErrorMsg('Your Comments Posted Successfully'),5000);*/
		showErrorMsg('Your Comments Posted Successfully');
		document.getElementById("couponpage").style.visibility = "visible";
		
		document.feedback.address.value=0;
		document.feedback.license.value="";
		document.feedback.custname.value="";
		document.feedback.lastname.value="";
		document.feedback.addr_one.value="";
		document.feedback.addr_two.value="";
		document.feedback.city.value="";
		document.feedback.state.value="";
		document.feedback.zipcode.value="";
		document.feedback.phone.value="";
		document.feedback.email.value="";
		document.feedback.confemail.value="";
		document.feedback.others_txtone.value="";
		document.feedback.others_txttwo.value="";
		document.feedback.others_txtfour.value="";
		document.feedback.messag.value="";
		
		if(document.feedback.price.checked)
		{
			
			quest_one_error="";
		
		}
		
				
		
		document.feedback.price.checked="";
		document.feedback.brand.checked="";
		document.feedback.cvlocation.checked="";
		document.feedback.reputation.checked="";
		document.feedback.returncustomer.checked="";
		document.feedback.others_one.checked="";
		document.feedback.newtire.checked="";
		document.feedback.changeover.checked="";
		document.feedback.premtpackage.checked="";
		document.feedback.alignment.checked="";
		document.feedback.brakes.checked="";
		document.feedback.oilchange.checked="";
		document.feedback.carwash.checked="";
		document.feedback.autodetail.checked="";
		document.feedback.others_two.checked="";
		
		
	
		
		document.feedback.prompt_service[0].checked = false;
		document.feedback.prompt_service[1].checked = false;
		document.feedback.warranty[0].checked = false;
		document.feedback.warranty[1].checked = false;
		document.feedback.time[0].checked = false;
		document.feedback.time[1].checked = false;
		document.feedback.contact_you[0].checked = false;
		document.feedback.contact_you[1].checked = false;
		document.feedback.pro_wash[0].checked= false;
		document.feedback.pro_wash[1].checked = false;
		document.feedback.ourservice[0].checked = false;
		document.feedback.ourservice[1].checked = false;
		document.feedback.satisfied[0].checked = false;
		document.feedback.satisfied[1].checked = false;
		document.feedback.returnjts[0].checked = false;
		document.feedback.returnjts[1].checked = false;
		
		document.feedback.jtsyears.checked="";
		document.feedback.phonebook.checked="";
		document.feedback.advertising.checked="";
		document.feedback.drivingby.checked="";
		document.feedback.mailing.checked="";
		document.feedback.onlinesearch.checked="";
		document.feedback.recfriend.checked="";
		document.feedback.other_four.checked="";
				
		
		});

           
}


function validate() {
	
	var quest_one_error=0;
	var quest_second_error=0;
	var quest_three_error=0;
	var quest_four_error=0;
	var messag=0;
	var address=0;
	var email=0;
	var confemail=0;
	var license=0;
	var address=0;
	var city=0;
	var state=0;
	var custname=0;
	var lastname=0;
	var zipcode=0;
	var phoneno=0;

	/*my_window= window.open ("","coupon_comments.php","status=1,width=635,height=350");
	my_window.document.write('<html><head><link type="text/css" rel="stylesheet" href="css/style.css" /></head><div class="popup-box"><div class="popup-box-text-top"><p>Thank you for your feedback!</p><p>Please print this page and cut-out the coupon below.  Redeem at any JTS location.</p></div><div class="popup-box-inner"><div class="popup-box-inner-img"></div><div class="popup-box-inner-text"><h1>$5.00 off your Next Purchase</h1><h2>All Products and Services</h2><p>One coupon per customer.  Coupon may not be combined wih any other offer.</p></div></div><div class="popup-footer"><a href="#"> <p>print</p><img src="img/print-icon.png" style="border:none;"/></a></div></div></html>');*/
	
			/*GB_showCenter("Magic", "coupon_comments.php", 650, 800);*/
		
	  if (document.feedback.address.value < 1) 
    	{
       
       	var loading = document.getElementById('messages');
		loading.style.display = 'block';
		document.getElementById('messages').innerHTML = 'Please comments all required field data';	
		//alert("Please Answer for the First Question");
		return false;
    	}
    	
		if(""==document.feedback.license.value)
		{
		   
		    showErrorMsg('Please comments all required field data'); 
			return;
			
		}
	
		/*if(""==document.feedback.messag.value)
		{
		    alert("hai");
		    showErrorMsg('Please comments all required field data'); 
		    return;
		}*/
	
	
			
	//	Question 1
		if(document.feedback.price.checked)
		{
			
			quest_one_error=1;
		
		}
		else if (document.feedback.brand.checked)
		{
			quest_one_error=1;
			
		}
		
		else if (document.feedback.cvlocation.checked)
		{
			quest_one_error=1;
			
		}
		else if (document.feedback.reputation.checked)
		{
			quest_one_error=1;
			
		}
		else if (document.feedback.returncustomer.checked)
		{
			quest_one_error=1;
			
		}
		else if (document.feedback.others_one.checked)
		{
			quest_one_error=1;
			
		}
				
		if(quest_one_error==0)
		{
			
		var loading = document.getElementById('messages');
		loading.style.display = 'block';
		document.getElementById('messages').innerHTML = 'Please comments all required field data';	
		//alert("Please Answer for the First Question");
		return false;
		}
	
		
	
	
		if(document.feedback.price.checked)
			price_global="Price";
		else if(!document.feedback.price.checked)
			price_global="";
			
		if(document.feedback.brand.checked)
			brand_global="The Selection/Brand";
		else if(!document.feedback.brand.checked)
			brand_global="";
			
		if(document.feedback.cvlocation.checked)
			cvlocation_global="Convenient Location";
		else if(!document.feedback.cvlocation.checked)
			cvlocation_global="";
			
		if(document.feedback.reputation.checked)
			reputation_global="Reputation";
		else if(!document.feedback.reputation.checked)
			reputation_global="";
			
		if(document.feedback.returncustomer.checked)
			returncustomer_global="Returning Customer";
		else if(!document.feedback.returncustomer.checked)
			returncustomer_global="";
			
		if(document.feedback.others_one.checked)
			others_one_global="Other";
		else if(!document.feedback.others_one.checked)
			others_one_global="";
	
	
			//Question 2
		
		if(document.feedback.newtire.checked)
		{
		
			quest_second_error=1;
		
		}
		else if (document.feedback.changeover.checked)
		{
			quest_second_error=1;
			
		}
		
		else if (document.feedback.premtpackage.checked)
		{
			quest_second_error=1;
			
		}
		else if (document.feedback.alignment.checked)
		{
			quest_second_error=1;
			
		}
		else if (document.feedback.brakes.checked)
		{
			quest_second_error=1;
			
		}
		else if (document.feedback.oilchange.checked)
		{
			quest_second_error=1;
			
		}
		else if (document.feedback.carwash.checked)
		{
			quest_second_error=1;
			
		}
		else if (document.feedback.autodetail.checked)
		{
			quest_second_error=1;
			
		}
		else if (document.feedback.others_two.checked)
		{
			quest_second_error=1;
			
		}
		if(quest_second_error==0)
		{
		var loading = document.getElementById('messages');
		loading.style.display = 'block';
		document.getElementById('messages').innerHTML = 'Please comments all required field data';	
		//alert("Please Answer for the First Question");
		return false;
		}
	
		
		
		if(document.feedback.newtire.checked)
		newtires_two_global="New Tires";
	else if(!document.feedback.newtire.checked)
		newtires_two_global="";
		
	if(document.feedback.changeover.checked)
		change_two_global="Tire Change-Over";
	else if(!document.feedback.changeover.checked)
		change_two_global="";
		
	if(document.feedback.premtpackage.checked)
		package_two_global="Preventive Maintenance Package";
	else if(!document.feedback.premtpackage.checked)
		package_two_global="";
		
	if(document.feedback.alignment.checked)
		alignment_two_global="Alignment";
	else if(!document.feedback.alignment.checked)
		alignment_two_global="";
		
	if(document.feedback.brakes.checked)
		brakes_two_global="Brakes";
	else if(!document.feedback.brakes.checked)
		brakes_two_global="";
		
	if(document.feedback.oilchange.checked)
		oilchange_two_global="Oil Change";
	else if(!document.feedback.oilchange.checked)
		oilchange_two_global="";
	if(document.feedback.carwash.checked)
		carwash_two_global="Car Wash";
	else if(!document.feedback.carwash.checked)
		carwash_two_global="";
	if(document.feedback.autodetail.checked)
		 autodetail_two_global="Auto Detail";
	else if(!document.feedback.autodetail.checked)
		 autodetail_two_global="";
	if(document.feedback.others_two.checked)
		other_two_global="Other";
	else if(!document.feedback.others_two.checked)
		other_two_global="";
	
	
	
	//Question Three
		
		
		
		for (var rad=0; rad<document.feedback.prompt_service.length; rad++) 
		{
			if (document.feedback.prompt_service[rad].checked == true)
			{
				promptservice_three_global=document.feedback.prompt_service[rad].value;
				quest_three_error=1;
				
			}
			
		}
	
	
	
		for (var rad=0; rad<document.feedback.warranty.length; rad++) 
		{
			if (document.feedback.warranty[rad].checked == true)
			{
				estimatedtime_three_global=document.feedback.warranty[rad].value;
				quest_three_error=1;
				
			}
			
		}
		
		
		for (var rad=0; rad<document.feedback.time.length; rad++) 
		{
			if (document.feedback.time[rad].checked == true)
			{
				vehicleclean_three_global=document.feedback.time[rad].value;
				quest_three_error=1;
				
			}
			
		}
		
		
		for (var rad=0; rad<document.feedback.contact_you.length; rad++) 
		{
			if (document.feedback.contact_you[rad].checked == true)
			{
				professional_three_global=document.feedback.contact_you[rad].value;
				quest_three_error=1;
				
			}
			
		}
		
		
		for (var rad=0; rad<document.feedback.pro_wash.length; rad++) 
		{
			if (document.feedback.pro_wash[rad].checked == true)
			{
				neatandclean_three_global=document.feedback.pro_wash[rad].value;
				quest_three_error=1;
				
			}
			
		}
		
		for (var rad=0; rad<document.feedback.ourservice.length; rad++) 
		{
			if (document.feedback.ourservice[rad].checked == true)
			{
				servicelmerchandise_three_global=document.feedback.ourservice[rad].value;
				quest_three_error=1;
				
			}
			
		}
		
		
		for (var rad=0; rad<document.feedback.satisfied.length; rad++) 
		{
			if (document.feedback.satisfied[rad].checked == true)
			{
				duringyourvisi_three_global=document.feedback.satisfied[rad].value;
				quest_three_error=1;
				
			}
			
		}
		
		
		for (var rad=0; rad<document.feedback.returnjts.length; rad++) 
		{
			if (document.feedback.returnjts[rad].checked == true)
			{
				returnjts_three_global=document.feedback.returnjts[rad].value;
				quest_three_error=1;
				
			}
			
		}
				
		

		
		
		
		
		
		if(document.feedback.prompt_service.checked)
		{
			
			quest_three_error=1;
		
		}
		else if (document.feedback.warranty.checked)
		{	
			quest_three_error=1;
			
		}
		
		else if (document.feedback.time.checked)
		{	
			quest_three_error=1;
			
		}
		else if (document.feedback.contact_you.checked)
		{	
			quest_three_error=1;
			
		}
		else if (document.feedback.pro_wash.checked)
		{	
			quest_three_error=1;
			
		}
		else if (document.feedback.ourservice.checked)
		{	
			quest_three_error=1;
			
		}
		else if (document.feedback.satisfied.checked)
		{	
			quest_three_error=1;
			
		}
		else if (document.feedback.returnjts.checked)
		{	
			quest_three_error=1;
			
		}
		
		if(quest_three_error==0)
		{
		var loading = document.getElementById('messages');
		loading.style.display = 'block';
		document.getElementById('messages').innerHTML = 'Please comments all required field data';	
		return false;
		}

				
		

		
	
	
	//Question Four
	
	if(document.feedback.jtsyears.checked)
		{
		
			quest_four_error=1;
		
		}
		else if (document.feedback.phonebook.checked)
		{
			quest_four_error=1;
			
		}
		
		else if (document.feedback.advertising.checked)
		{
			quest_four_error=1;
			
		}
		else if (document.feedback.drivingby.checked)
		{
			quest_four_error=1;
			
		}
		else if (document.feedback.mailing.checked)
		{
			quest_four_error=1;
			
		}
		else if (document.feedback.onlinesearch.checked)
		{
			quest_four_error=1;
			
		}
		else if (document.feedback.recfriend.checked)
		{
			quest_four_error=1;
			
		}
		else if (document.feedback.other_four.checked)
		{
			quest_four_error=1;
			
		}
		if(quest_four_error==0)
		{
		var loading = document.getElementById('messages');
		loading.style.display = 'block';
		document.getElementById('messages').innerHTML = 'Please comments all required field data';	
		return false;
		}

	
	
	
		if(document.feedback.jtsyears.checked)
			jtsyears_four_global="I've been coming to JTS for years";
		else if(!document.feedback.jtsyears.checked)
			jtsyears_four_global="";
			
		if(document.feedback.phonebook.checked)
			phonebook_four_global="Phonebook";
		else if(!document.feedback.phonebook.checked)
			phonebook_four_global="";
			
		if(document.feedback.advertising.checked)
			advertising_four_global="Saw/heard advertising";
		else if(!document.feedback.advertising.checked)
			advertising_four_global="";
			
		if(document.feedback.drivingby.checked)
			drivingby_four_global="Just driving by";
		else if(!document.feedback.drivingby.checked)
			drivingby_four_global="";
			
		if(document.feedback.mailing.checked)
			mailing_four_global="Catalogue/mailing";
		else if(!document.feedback.mailing.checked)
			mailing_four_global="";
			
		if(document.feedback.onlinesearch.checked)
			onlinesearch_four_global="Online/search";
		else if(!document.feedback.onlinesearch.checked)
			onlinesearch_four_global="";
		if(document.feedback.recfriend.checked)
			recfriend_four_global="Recommendation from a friend";
		else if(!document.feedback.recfriend.checked)
			recfriend_four_global="";
	

				
		//Question 5
		
		if(""==document.feedback.messag.value)
		
		{	
			 showErrorMsg('Please comments all required field data'); 
		  	 return false;
		}	
	   

		
		if(""==document.feedback.custname.value)
		{
			 showErrorMsg('Please comments all required field data'); 
		  	 return false;
		}	
		
		
		if(""==document.feedback.lastname.value)
		{
			 showErrorMsg('Please comments all required field data');
		   	 return false;
		}	
		
		
		if(""==document.feedback.addr_one.value)
		{
			 showErrorMsg('Please comments all required field data');
		   	 return false;
		}	
		/*
		if(""==document.feedback.addr_two.value)
		{
			 showErrorMsg('Please comments all required field data');
		     return false;
		}	*/
		
		
		if(""==document.feedback.city.value)
		{
			 showErrorMsg('Please comments all required field data');
		     return false;
		}	
		
		if(""==document.feedback.state.value)
		{
			showErrorMsg('Please comments all required field data');
		    return false;
		}	
		
		
		if(""==document.feedback.zipcode.value)
		{
			 showErrorMsg('Please comments all required field data');
		     return false;
		}	
		
		
		if(""==document.feedback.phone.value)
		{
			showErrorMsg('Please comments all required field data');
			return false;
		}	
		
		/*
		if(""==document.feedback.email.value)
		{
			showErrorMsg('Please Enter valid Email Address');
			return false;
		}	*/
		
		/*if(""==document.feedback.confemail.value)
		{
			showErrorMsg('Please Enter valid Email Address');
			return false;
		}	*/
		
		
		
		
   		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   		var eaddress = document.feedback.email.value;
   		if(reg.test(eaddress) == false) 
		{
      		showErrorMsg('Please Enter Email Address');
     	 	return false;
   		}
		
		var eaddress = document.feedback.confemail.value;
   		if(reg.test(eaddress) == false) 
		{
      		showErrorMsg('Please Confirm Email Address');
     	 	return false;
   		}
		if(document.feedback.email.value!=document.feedback.confemail.value)
		{
			showErrorMsg('Email address not match');
			return false;
		}
		else
		{
			
			//showErrorMsg('Your Comments MPosted Successfully');
		}
			
			viewComments();	
			/*comments_popup_window();*/
			popup();

}




 function showErrorMsg(arg1) 
     {
         //alert(arg1);
     
         var loading = document.getElementById('messages');
         loading.style.display = 'block';
         document.getElementById('messages').innerHTML = arg1; 
         
     
     }


 function home_comment_new()
 	{
	 
	 	var name_txt = $('#name_txt').val();
		var email_txt = $('#email_txt').val();
		var phone_txt = $('#phone_txt').val();
		var ask_commentss = $('#ask_commentss').val();

		
		
		
	 	var result="";
		var resultmoreoptions="";
   		$.post("view_info.php",{Name_txt:name_txt,Email_txt:email_txt,Phone_txt:phone_txt,Ask_commentss:ask_commentss
		   
		   },
	 function(data)
	 {	
		
		showErrorMsg_submitcomments('Your Comments Posted Successfully');
		document.home_comment.name_txt.value="";
		document.home_comment.email_txt.value="";
		document.home_comment.phone_txt.value="";
		document.home_comment.ask_commentss.value="";
		
		});

           
	}
	
	function home_validatenew()
	{
		name_txt = 0;
		email_txt = 0;
		phone_txt = 0;
		ask_commentss = 0;
	
		
		
		if(""==document.home_comment.name_txt.value)
		{
		   
		   	showErrorMsg_name('*');
		    return false;
		}
		
		
		
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   		var eaddress = document.home_comment.email_txt.value;
   		if(reg.test(eaddress) == false) 
		{
      		showErrorMsg_email('*');
     	 	return false;
   		}
		
		
		if(""==document.home_comment.phone_txt.value)
		{
		   
		   	showErrorMsg_phone('*');
		    return false;
		}
		
		if(""==document.home_comment.ask_commentss.value)
		{
		   
		   	showErrorMsg_comments('*');
		    return false;
		}
			home_comment_new();
	}
	
	 function showErrorMsg_name(arg1) 
     {
         //alert(arg1);
     
         var loading = document.getElementById('star_name');
         loading.style.display = 'block';
         document.getElementById('star_name').innerHTML = arg1; 
         
     
     }
	  function showErrorMsg_email(arg1) 
     {
         //alert(arg1);
     
         var loading = document.getElementById('star_email');
         loading.style.display = 'block';
         document.getElementById('star_email').innerHTML = arg1; 
         
     
     }
	  function showErrorMsg_phone(arg1) 
     {
         //alert(arg1);
     
         var loading = document.getElementById('star_phone');
         loading.style.display = 'block';
         document.getElementById('star_phone').innerHTML = arg1; 
         
     
     }
	  function showErrorMsg_comments(arg1) 
     {
         //alert(arg1);
     
         var loading = document.getElementById('star_comments');
         loading.style.display = 'block';
         document.getElementById('star_comments').innerHTML = arg1; 
         
     
     }
	 
	  function showErrorMsg_submitcomments(arg1) 
     {
         //alert(arg1);
     
         var loading = document.getElementById('submit_comments');
         loading.style.display = 'block';
         document.getElementById('submit_comments').innerHTML = arg1; 
         
     
     }
	 
	/* function comments_popup_window() 
	 {
		
		 my_window= window.open ("","coupon_comments.php",'status=yes,toolbar=no,menubar=no,location=no,resizable=no,dependent=no,width=635,height=350');
		 my_window.document.write('<html><head><link type="text/css" rel="stylesheet" href="css/style.css" /></head><div class="popup-box"><div class="popup-box-text-top"><p>Thank you for your feedback!</p><p>Please print this page and cut-out the coupon below.  Redeem at any JTS location.</p></div><div class="popup-box-inner"><div class="popup-box-inner-img"></div><div class="popup-box-inner-text"><h1>$5.00 off your Next Purchase</h1><h2>All Products and Services</h2><p>One coupon per customer.  Coupon may not be combined wih any other offer.</p></div></div><div class="popup-footer"><a href="coupon_comments.php"  onclick="window.print();return false;"> <p>print</p><img src="img/print-icon.png" style="border:none;"/></a></div></div></html>');
	return false;	 
	}*/
		
		/*	
	function popitup(url) {
	newwindow=window.open(coupon_comments.php,'name','height=200,width=150');
	
	return false;
	}
*/

/*function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=650,height=450,scrollbars=yes');
return false;
}
	*/
function popup(mylink, windowname)
{
	
if (! window.focus)return true;

	var href;
	if (typeof(mylink) == 'string')
	href=mylink;
	else
	href=mylink.href;
	window.open(href, windowname, 'width=630,height=370,scrollbars=yes');
	return false;
}



	
function showpicture()
{
	
obj = document.getElementById("mediar_picture_content");
obj.style.display="block"; 
obj = document.getElementById("mediarevised_content");
obj.style.display="none";
obj = document.getElementById("mediar_article_content");
obj.style.display="none";
}

function showarticles()
{
	
obj = document.getElementById("mediar_picture_content");
obj.style.display="none"; 
obj = document.getElementById("mediarevised_content");
obj.style.display="none";
obj = document.getElementById("mediar_article_content");
obj.style.display="block";

document.getElementById("article_iframe").src="orbit.php";

}

function showvideos()
{
obj = document.getElementById("mediarevised_content");
obj.style.display="block";
obj = document.getElementById("mediar_picture_content");
obj.style.display="none";
obj = document.getElementById("mediar_article_content");
obj.style.display="none";
}
 



   function service_page_menus(str){
		 //alert(str);
		   	var result="";
			$.post("service_menus.php",{ sendValue: encodeURI(str) },
            function(data){
			  
			 //alert(data);
			 //document.write(str.split() + "<br />");
			//document.write(data.split(" ^") + "<br />");
			/*var par=data.split(" ^") + "<br />";
			/*var parts=(data.split(" ^") + "<br />");
			alert(parts);
			 
			 alert(par);*/
			
			 var service_cont=(data.split("^"));
			
			 
			 /* service_cont[0]+" "+service_cont[1]+" "+service_cont[2]+" "+service_cont[3]+" "+service_cont[4]+" "+service_cont[5]+" "+service_cont[6]+" "+service_cont[7]+" "+service_cont[8]*/
			
			
			if(str=='PreventiveMaintenance')
			{
				
				result = result+'<div class="link_heading" style="height:65px; width:354px;"><div><img src="img/services/services.jpg" /></div><div style="padding-top:12px"><div  class="carwashmenu" style="left:0px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'PreventiveMaintenance\');" id="servicePrevenMT"><img src="img/services/preventivemaintainance_active.png" /></a></div><div  class="carwashmenu" style="left:115px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'Alignment\');" id="serviceAlignment"><img src="img/services/alignment.png" /></a></div><div  class="carwashmenu" style="left:252px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'OilChange\');" id="serviceOilchange"><img src="img/services/oil_change.png" /></a></div><div  class="carwashmenu" style="left:389px;width:155px;"><a href="javascript:void(0)" onclick="service_page_menus(\'Brakes\');" id="serviceBreak"><img src="img/services/break.png" /></a></div></div></div><div class="content_one" style="margin-top:20px; height:220px;"><p>'+service_cont[1]+'</p></div><div class="content_feature_price_head" style="margin-top:0px;"><div class="feature_left_image"></div><div class="content_feature_price_head_lines" style="text-align:center"><p>'+service_cont[4]+'</p></div><div class="feature_right_image"></div></div><div class="content_feature_price_firstbox"style="width:165px; height:70px; margin-top:18px;"><p>'+service_cont[5]+'</p></div><div class="content_feature_price_secondbox" style="width:165px; height:70px; margin-top:18px;"><p>'+service_cont[6]+'</p></div><div class="content_feature_price_thirdbox" style="width:170px; height:70px; margin-top:18px;"><p>'+service_cont[7]+'</p></div><div class="feature_price_bottom" align="center" style="margin-top:24px;"></div><div class="whychooseus" style="margin-top:15px;"><h2>WHY CHOOSE US?</h2><br /><p><ul><li type="disc" style="margin-left:20px">Alaska Owned and Operated</li><li type="disc" style="margin-left:20px">One Stop and You are Done!</li><li type="disc" style="margin-left:20px">	We Service all Makes and Models</li><li type="disc" style="margin-left:20px">Voted "Best of Alaska" by Anchorage Daily News Readers</li></ul></p></div><div class="content_box" align="center" style="margin-top:18px;" ><br />HOW CAN WE HELP YOU TODAY?<br />PLEASE CALL THE LOCATION NEAREST YOU!</div>';
			
			
			}
			
			
			else if(str=='Alignment')
			{
			
				result = result+'<div class="link_heading" style="height:65px; width:354px;"><div><img src="img/services/services.jpg" /></div><div style="padding-top:12px"><div  class="carwashmenu" style="left:0px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'PreventiveMaintenance\');" id="servicePrevenMT"><img src="img/services/preventivemaintainance.png" /></a></div><div  class="carwashmenu" style="left:115px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'Alignment\');" id="serviceAlignment"><img src="img/services/alignment_active.png" /></a></div><div  class="carwashmenu" style="left:252px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'OilChange\');" id="serviceOilchange"><img src="img/services/oil_change.png" /></a></div><div  class="carwashmenu" style="left:389px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'Brakes\');" id="serviceBreak"><img src="img/services/break.png" /></a></div></div></div><div class="content_one" style=" height:220px; margin-top:20px;"><p>'+service_cont[1]+'</p></div><div class="content_feature_price_head" style="margin-top:0px;"><div class="feature_left_image"></div><div class="content_feature_price_head_lines" style="text-align:center"><p>'+service_cont[4]+'</p></div><div class="feature_right_image"></div></div><div class="content_feature_price_firstbox" style="margin-left:10px;height:70px;"><p>'+service_cont[5]+'</p></div><div class="content_feature_price_secondbox" style="height:70px;"><p>'+service_cont[6]+'</p></div><div class="content_feature_price_thirdbox"><p>'+service_cont[7]+'</p></div><div class="comments_boxs" align="center" style="padding-top:5px;"><p>'+service_cont[8]+'</p></div><div class="feature_price_bottom" align="center" style="margin-top:10px;"></div><div class="whychooseus" style="margin-top:15px;"><h2>WHY CHOOSE US?</h2><br /><p><ul><li type="disc" style="margin-left:20px">Alaska Owned and Operated</li><li type="disc" style="margin-left:20px">One Stop and You are Done!</li><li type="disc" style="margin-left:20px">	We Service all Makes and Models</li><li type="disc" style="margin-left:20px">Voted "Best of Alaska" By Anchorage Daily News Readers</li></ul></p></div><div class="content_box_align" align="center" style="margin-top:10px;" ><br />HOW CAN WE HELP YOU TODAY?<br />PLEASE CALL THE LOCATION NEAREST YOU!</div>';
				
						
			}
			
			
			else if(str=='OilChange')
			{
			
				result = result+'<div class="link_heading" style="height:65px;width:354px;"><div><img src="img/services/services.jpg" /></div><div style="padding-top:12px"><div  class="carwashmenu" style="left:0px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'PreventiveMaintenance\');" id="servicePrevenMT"><img src="img/services/preventivemaintainance.png" /></a></div><div  class="carwashmenu" style="left:115px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'Alignment\');" id="serviceAlignment"><img src="img/services/alignment.png" /></a></div><div  class="carwashmenu" style="left:252px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'OilChange\');" id="serviceOilchange"><img src="img/services/oil_active.png" /></a></div><div  class="carwashmenu" style="left:389px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'Brakes\');" id="serviceBreak"><img src="img/services/break.png" /></a></div></div></div><div class="content_one" style="margin-top:20px;  height:220px;"><p>'+service_cont[1]+'</p></div><div class="content_feature_price_head" style="margin-top:0px;"><div class="feature_left_image"></div><div class="content_feature_price_head_lines" style="text-align:center"><p>'+service_cont[4]+'</p></div><div class="feature_right_image"></div></div><div class="content_feature_price_firstbox" style="margin-left:80px;width:165px; height:70px; margin-top:20px;"><p>'+service_cont[5]+'</p></div><div class="content_feature_price_secondbox" style="margin-left:30px; width:165px;  height:70px; margin-top:20px;"><p>'+service_cont[6]+'</p></div><div class="feature_price_bottom" align="center" style="margin-top:30px;"></div><div class="whychooseus" style="margin-top:15px;"><h2>WHY CHOOSE US?</h2><br /><p><ul><li type="disc" style="margin-left:20px">Alaska Owned and Operated</li><li type="disc" style="margin-left:20px">One Stop and You are Done!</li><li type="disc" style="margin-left:20px">We Service all Makes and Models</li><li type="disc" style="margin-left:20px">Voted "Best of Alaska" By Anchorage Daily News Readers</li></ul></p></div><div class="content_box" align="center" style="margin-top:10px;" ><br />HOW CAN WE HELP YOU TODAY?<br />PLEASE CALL THE LOCATION NEAREST YOU!</div>';
				
						
			}
			else if(str=='Brakes')
			{
			
				result = result+'<div class="link_heading" style="height:65px; width:354px;"><div><img src="img/services/services.jpg" /></div><div style="padding-top:12px"><div  class="carwashmenu" style="left:0px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'PreventiveMaintenance\');" id="servicePrevenMT"><img src="img/services/preventivemaintainance.png" /></a></div><div  class="carwashmenu" style="left:115px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'Alignment\');" id="serviceAlignment"><img src="img/services/alignment.png" /></a></div><div  class="carwashmenu" style="left:252px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'OilChange\');" id="serviceOilchange"><img src="img/services/oil_change.png" /></a></div><div  class="carwashmenu" style="left:389px;width:155px"><a href="javascript:void(0)" onclick="service_page_menus(\'Brakes\');" id="serviceBreak"><img src="img/services/break_active.png" /></a></div></div></div><div class="content_one" style="height:220px; margin-top:20px;"><p>'+service_cont[1]+'</p></div><div class="content_feature_price_head" style="margin-top:10px;"><div class="feature_left_image"></div><div class="content_feature_price_head_lines" style="text-align:center" style="text-align:center"><p>'+service_cont[4]+'</p></div><div class="feature_right_image"></div></div><div class="content_feature_price_firstbox" style="width:230px; margin-left:110px;margin-top:20px; height:70px;"><p>'+service_cont[5]+'</p></div><div class="comments_boxs" align="center" style="padding-top:5px;"><p>'+service_cont[8]+'</p></div><div class="feature_price_bottom" align="center" style="margin-top:10px;"></div><div class="whychooseus" style="margin-top:15px;"><h2>WHY CHOOSE US?</h2><br /><p><ul><li type="disc" style="margin-left:20px">Alaska Owned and Operated</li><li type="disc" style="margin-left:20px">One Stop and You are Done!</li><li type="disc" style="margin-left:20px">We Service all Makes and Models</li><li type="disc" style="margin-left:20px">Voted "Best of Alaska" By Anchorage Daily News Readers</li></ul></p></div><div class="content_box" align="center" style="margin-top:5px;"><br />HOW CAN WE HELP YOU TODAY?<br />PLEASE CALL THE LOCATION NEAREST YOU!</div>';
				
						
			}
			

			   $('#service_datas').html(result);
            });
			 
			 
		 return false;	
           
        }
		
		
		
		
function limitText(limitField, limitCount, limitNum) { alert("test");
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}

	 function slectboxhide()
	 {
			
		 document.getElementById('tireSelectYear').style.visibility='hidden';
		 document.getElementById('tireModelSelect').style.visibility='hidden';
		 document.getElementById('tireManufactureSelect').style.visibility='hidden';
		  
		 
	 }
			
			
	function show_select()
	{
					
		document.getElementById('tireSelectYear').style.visibility='visible';
		document.getElementById('tireManufactureSelect').style.visibility='visible';
		document.getElementById('tireModelSelect').style.visibility='visible';
		
	}
