function validateVote()
{
		valid = true;
		
		var obj1 = document.getElementById('yesvote');
		var obj2 = document.getElementById('novote');
		
		if (obj1.checked == false && obj2.checked == false)
		{
			alert("Please vote first.");
			valid = false;
		}
		
		return valid;
}

function checkVote(selection)
{
	if(selection.value == 'yes')
	{
			document.getElementById('novote').checked = false;
	}
	else
	{
			document.getElementById('yesvote').checked = false;
	}
}

function showIT(selection)
{
	document.getElementById('autonews').style.display = 'none';	
	document.getElementById('autolaunch').style.display = 'none';	
	document.getElementById('autoreview').style.display = 'none';	
	document.getElementById('autosport').style.display = 'none';	
	document.getElementById('autofeatures').style.display = 'none';	
	document.getElementById('autoletters').style.display = 'none';	
	document.getElementById('autoeditorial').style.display = 'none';	
	document.getElementById('autocrimewatch').style.display = 'none';	
	
	document.getElementById(selection).style.display = 'block';
}

function getChoice(selection)
{
		selection = parseInt(selection);
		var obj = document.getElementById('must_have_addon1');
		switch(selection)
		{
			case 6:
				arrText = new Array("Both", "Electric Windows", "Electric Mirrors");
				arrValue = new Array("1","2","3");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}
				break;
			case 7:
				arrText = new Array("Sound System", "CD Shuttle");
				arrValue = new Array("1","2");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}
				break;
			case 9:
				arrText = new Array("All", "Immobiliser", "Alarm", "Gear lock");
				arrValue = new Array("1","2","3","4");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}
				break;
			case 21:
				arrText = new Array("All", "Driver Air Bag", "Front Airbags", "Side Airbags", "Curtain Airbags", "ITS Airbags");
				arrValue = new Array("1","2","3","4","5","6");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}	
				break;
			case 23:
				arrText = new Array("All", "Front Foglights", "Rear Foglights");
				arrValue = new Array("1","2","3");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}	
				break;
			case 24:
				arrText = new Array("All", "Remote Boot Opening", "Remote Fuel Cap Opening");
				arrValue = new Array("1","2","3");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}	
				break;
			case 37:
				arrText = new Array("13\" alloys","14\" alloys","15\" alloys","16\" alloys","17\" alloys","18\" alloys", "19\" alloys", "20\" alloys");
				arrValue = new Array("1","2","3","4","5","6", "7", "8");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}	
				break;
			case 39:
				arrText = new Array("Roof Rack", "Roof Rails");
				arrValue = new Array("1","2");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}
				break;
			default:
				document.getElementById('mustHave_row').style.display = 'none';
				selection = 0;
				break;
		}
		
		if (selection != 0)
			document.getElementById('mustHave_row').style.display = 'block';
}

function getChoice2(selection)
{
		selection = parseInt(selection);
		var obj = document.getElementById('must_have_addon2');
		switch(selection)
		{
			case 23:
				arrText = new Array("All", "Front Foglights", "Rear Foglights");
				arrValue = new Array("1","2","3");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}	
				break;
			case 24:
				arrText = new Array("All", "Remote Boot Opening", "Remote Fuel Cap Opening");
				arrValue = new Array("1","2","3");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}	
				break;
			case 37:
				arrText = new Array("13\" alloys","14\" alloys","15\" alloys","16\" alloys","17\" alloys","18\" alloys", "19\" alloys", "20\" alloys");
				arrValue = new Array("1","2","3","4","5","6", "7", "8");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}	
				break;
			case 39:
				arrText = new Array("Roof Rack", "Roof Rails");
				arrValue = new Array("1","2");
				for (var i=0;i<arrText.length;i++) 
				{
					option = new Option(arrText[i],arrValue[i]); //text, value
					obj.options[i] = option;
				}
				break;
			default:
				document.getElementById('mustHave_row2').style.display = 'none';
				selection = 0;
				break;
		}
		
		if (selection != 0)
			document.getElementById('mustHave_row2').style.display = 'block';
}

function changeTo(obj)
{
	document.getElementById(obj).className = 'menuBlue';
}

function changeFrom(obj)
{
	document.getElementById(obj).className = 'menuBlack';
}

function changeTotalFree(val, refnum)
{
	//document.getElementById('week_value1').value = ((val - 1) * 180)+'.00';
	location.href="/basket.php?ttl="+val+"&rn="+refnum;
}

function changeTotal(val, count, refnum)
{
	//document.getElementById('week_value'+count).value = (val * 180)+'.00';
	location.href="/basket.php?ttl="+val+"&rn="+refnum;
}

/*function changeTotal(val, count){
	
	var vl = (val * 180)+'.00';
	$('xxx').load('/updateweeks.php?ttl='+vl);
	//location.href="#down";
}*/