function car_model_chk()
{
	var car_model_value = form_car_add.car_model.value;
	if (car_model_value == "MG Other") {
		if (document.layers) { //Netscape
			document.layers['id_form_car_model_other'].visibility = 'visible';
			document.form_unique.car_model_other.select();
			document.form_unique.car_model_other.focus();
		}
		if (document.all) {  //IE
			document.all('id_form_car_model_other').style.visibility = 'visible';
			document.all('id_form_car_model_other').select();
			document.all('id_form_car_model_other').focus();
			//document.form_unique.car_model_other.select();
			//document.form_unique.car_model_other.focus();
		}
		if (document.getElementById) { //Netscape 6
			if (navigator.appName == 'Netscape') {
				document.getElementById('id_form_car_model_other').style.visibility = 'visible';
				document.getElementById('id_form_car_model_other').select();
				document.getElementById('id_form_car_model_other').focus();
			}//if
		}//if
	}//if
	else {
		if (document.layers) { //Netscape
			document.layers['id_form_car_model_other'].visibility = 'hide';
		}
		if (document.all) {  //IE
			document.all('id_form_car_model_other').style.visibility = 'hidden';
		}
		if (document.getElementById) { //Netscape 6
			if (navigator.appName == 'Netscape') {
				document.getElementById('id_form_car_model_other').style.visibility = 'hidden';
			}//if
		}//if
	}
}//function

function car_model_chk_2()
{
	var car_model_value = form_cant_find.car_model.value;
	if (car_model_value == "MG Other") {
		if (document.layers) { //Netscape
			document.layers['id_form_car_model_other'].visibility = 'visible';
			document.form_unique.car_model_other.select();
			document.form_unique.car_model_other.focus();
		}
		if (document.all) {  //IE
			document.all('id_form_car_model_other').style.visibility = 'visible';
			document.all('id_form_car_model_other').select();
			document.all('id_form_car_model_other').focus();
			//document.form_unique.car_model_other.select();
			//document.form_unique.car_model_other.focus();
		}
		if (document.getElementById) { //Netscape 6
			if (navigator.appName == 'Netscape') {
				document.getElementById('id_form_car_model_other').style.visibility = 'visible';
				document.getElementById('id_form_car_model_other').select();
				document.getElementById('id_form_car_model_other').focus();
			}//if
		}//if
	}//if
	else {
		if (document.layers) { //Netscape
			document.layers['id_form_car_model_other'].visibility = 'hide';
		}
		if (document.all) {  //IE
			document.all('id_form_car_model_other').style.visibility = 'hidden';
		}
		if (document.getElementById) { //Netscape 6
			if (navigator.appName == 'Netscape') {
				document.getElementById('id_form_car_model_other').style.visibility = 'hidden';
			}//if
		}//if
	}
}//function

function open_window(url, strWidth, strHeight)
{
	url = url + '&w='+ strWidth + '&h='+ strHeight;
	
	if (opener && !opener.closed) {
		opener.focus();
		opener.location.href = url;
	}
	else {
		new_command_window = window.open(url,'Image','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=yes,scrollbars=yes,width=' + strWidth + ',height=' + strHeight + ',screenX=200,screenY=200,top=200,left=200');
		opener = new_command_window;
	}

}

function payment_method_chk()
{
	var str_payment_method = form_car_add.car_payment_method.value;
	if ((str_payment_method.indexOf("Order")>0) || (str_payment_method.indexOf("Cheque")>0)) {
		if (opener && !opener.closed) {
			opener.focus();
		}
		else {
			strWidth = 400;
			strHeight = 140;
			new_command_window = window.open('car_sales_popup.htm','Info','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=yes,scrollbars=yes,width=' + strWidth + ',height=' + strHeight + ',screenX=200,screenY=200,top=200,left=200');
			opener = new_command_window;
		}
		if (document.layers) { //Netscape
			document.layers['submitButtonSubmit'].value = 'Submit';
		}
		if (document.all) {  //IE
			document.all('submitButtonSubmit').value = 'Submit';
		}
		if (document.getElementById) { //Netscape 6
			if (navigator.appName == 'Netscape') {
				document.getElementById('submitButtonSubmit').value = 'Submit';
			}//if
		}//if
		form_car_add.next_action.value = 'cheque';
	}//if
	else {
		//Selected credit card
		if (str_payment_method != '') {
			if (document.layers) { //Netscape
				document.layers['submitButtonSubmit'].value = 'Next >>';
			}
			if (document.all) {  //IE
				document.all('submitButtonSubmit').value = 'Next >>';
			}
			if (document.getElementById) { //Netscape 6
				if (navigator.appName == 'Netscape') {
					document.getElementById('submitButtonSubmit').value = 'Next >>';
				}//if
			}//if
			form_car_add.next_action.value = 'credit';
		}//if
		else {
			//Selected nothing
			if (document.layers) { //Netscape
				document.layers['submitButtonSubmit'].value = 'Submit';
			}
			if (document.all) {  //IE
				document.all('submitButtonSubmit').value = 'Submit';
			}
			if (document.getElementById) { //Netscape 6
				if (navigator.appName == 'Netscape') {
					document.getElementById('submitButtonSubmit').value = 'Submit';
				}//if
			}//if
			form_car_add.next_action.value = 'cheque';
		}
	}
}//function
