
function enableMakeMode(selectValueMake,selectobj) {
//alert(selectValueMake);
// if make is none , disable model year
if(selectValueMake == "")
	selectobj.disabled=true;
else // if make not null , enable model year
	selectobj.disabled=false;
}
// if vehicles All is checked reset and disable specific selections.
function enableChoices(checkBoxValue) {
if(checkBoxValue){
	document.getElementById('choices').disabled=true;
	document.submitSelections.subscription_make1.disabled=true;
	document.submitSelections.subscription_model_year1.disabled=true;
	document.submitSelections.sb_all.disabled=true;
	document.submitSelections.motor_all.disabled=true;
	
	document.submitSelections.subscription_make2.disabled=true;
	document.submitSelections.subscription_model_year2.disabled=true;
	
	document.submitSelections.subscription_make3.disabled=true;
	document.submitSelections.subscription_model_year3.disabled=true;
	
	document.submitSelections.subscription_make4.disabled=true;
	document.submitSelections.subscription_model_year4.disabled=true;
	
	document.submitSelections.subscription_make5.disabled=true;
	document.submitSelections.subscription_model_year5.disabled=true;
	
	
	document.submitSelections.subscription_make1.selectedIndex =0;
	document.submitSelections.subscription_make2.selectedIndex =0;
	document.submitSelections.subscription_make3.selectedIndex =0;
	document.submitSelections.subscription_make4.selectedIndex =0;
	document.submitSelections.subscription_make5.selectedIndex =0;
	document.submitSelections.subscription_model_year1.selectedIndex =0;
	document.submitSelections.subscription_model_year2.selectedIndex =0;
	document.submitSelections.subscription_model_year3.selectedIndex =0;
	document.submitSelections.subscription_model_year4.selectedIndex =0;
	document.submitSelections.subscription_model_year5.selectedIndex =0;
	document.submitSelections.sb_all.checked=false;
	document.submitSelections.motor_all.checked=false;
	document.submitSelections.add_veh4.disabled=true; 
	document.submitSelections.add_veh4.className = 'bttnd';
	document.getElementById('subscription_addButton_4').style.display='block';
	document.getElementById('subscription_addButton_5').style.display='none';
	document.getElementById('subscription_row_4').style.display='none';
	document.getElementById('subscription_row_5').style.display='none';
	}
else{

	document.getElementById('choices').disabled=false;
	document.submitSelections.subscription_make1.disabled=false;
	document.submitSelections.subscription_model_year1.disabled=false;
	document.submitSelections.sb_all.disabled=false;
	document.submitSelections.motor_all.disabled=false;
	
	document.submitSelections.subscription_make1.selectedIndex =0;
	document.submitSelections.subscription_make2.selectedIndex =0;
	document.submitSelections.subscription_make3.selectedIndex =0;
	document.submitSelections.subscription_make4.selectedIndex =0;
	document.submitSelections.subscription_make5.selectedIndex =0;
	document.submitSelections.subscription_model_year1.selectedIndex =0;
	document.submitSelections.subscription_model_year2.selectedIndex =0;
	document.submitSelections.subscription_model_year3.selectedIndex =0;
	document.submitSelections.subscription_model_year4.selectedIndex =0;
	document.submitSelections.subscription_model_year5.selectedIndex =0;
	
	document.submitSelections.sb_all.checked=false;
	document.submitSelections.motor_all.checked=false;
	
	
	}
}

function checkFilter(frm) {

	var m1 =IsNotEmpty(frm.subscription_make1);
	var m2 =IsNotEmpty(frm.subscription_make2);
	var m3 =IsNotEmpty(frm.subscription_make3);
	var m4 =IsNotEmpty(frm.subscription_make4);
	var m5 =IsNotEmpty(frm.subscription_make5);
	var my1 =IsNotEmpty(frm.subscription_model_year1);
	var my2 =IsNotEmpty(frm.subscription_model_year2);
	var my3 =IsNotEmpty(frm.subscription_model_year3);
	var my4 =IsNotEmpty(frm.subscription_model_year4);
	var my5 =IsNotEmpty(frm.subscription_model_year5);

if(m1 && my1){
	document.submitSelections.subscription_make2.disabled=false;
	document.submitSelections.subscription_model_year2.disabled=false;

}

if(m2 && my2){
	document.submitSelections.subscription_make3.disabled=false;
	document.submitSelections.subscription_model_year3.disabled=false;

}

if(m3 && my3){
	document.submitSelections.subscription_make4.disabled=false;
	document.submitSelections.subscription_model_year4.disabled=false;

}

if(m3 && my3){
	document.submitSelections.subscription_make4.disabled=false;
	document.submitSelections.subscription_model_year4.disabled=false;
	document.submitSelections.add_veh4.disabled=false; 
	document.submitSelections.add_veh4.className = 'bttn';
}

if(m4 && my4){
	//document.submitSelections.subscription_addButton_4.style.display='none';
	document.submitSelections.subscription_make5.disabled=false;
	document.submitSelections.subscription_model_year5.disabled=false;
	document.submitSelections.add_veh5.disabled=false;
	
	//document.submitSelections.subscription_addButton_5.style.display='block';
}





	

}


function addVehicle4(frm) {
document.getElementById('subscription_addButton_4').style.display='none';
document.getElementById('subscription_addButton_5').style.display='block';
document.getElementById('subscription_row_4').style.display='block';


}
function addVehicle5(frm) {
document.getElementById('subscription_row_5').style.display='block';
document.getElementById('subscription_addButton_5').style.display='none';

}

 
   function openSampleEmail(){
	var url = "email.html";
	    sampleEmailWindowHandle=window.open(url, "sample", "status=yes,height=800,width=1000,left=200,top=50");
		sampleEmailWindowHandle.focus();	
		
	}
