function checkEmpty(srci)
{
	if(srci == "") 
		return false;
	else
		return true;
}

function bookmarksite(title, url)
{
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
		window.sidebar.addPanel(title, url, "")
	
	alert(url+" has been successfully bookmarked.");
}

function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}



<!--
function SelectAccessories(name1)
{

	var frm = document.Form1;

	var length = document.getElementsByName("accessoriesSelected").length;
	var commasep="";
	for(var i=0;i<length;i++)
	{
		if(document.getElementsByName("accessoriesSelected")[i].checked)
		{

			commasep=document.getElementsByName("accessoriesSelected")[i].value+","+commasep;
		}
	}

	frm.selected_accessories.value = commasep;
}

function calcPrice()
{
/*
var cash_price = 4725;
var a36_lease_price = 149.78;
var a48_lease_price = 117.73;
var a60_lease_price = 98.6;
var basePrice = 0;
var totalPrice=0;
var totalVat=0;


if (document.Form1.optPaymentType[0].checked)
{
	basePrice = cash_price;

}
if (document.Form1.optPaymentType[1].checked)
{
	basePrice = a36_lease_price;
}
if (document.Form1.optPaymentType[2].checked)
{
	basePrice = a48_lease_price;
}
if (document.Form1.optPaymentType[3].checked)
{
	basePrice = a60_lease_price;
}

*/

if(document.Form1.txtQuantity.value!="" && isNaN(document.Form1.txtQuantity.value))
{
	alert("Please enter a numeric value");
	document.Form1.txtQuantity.focus();
}
else
{
	var quantity = 1;
	if(document.Form1.txtQuantity.value!="")
	{
		quantity = document.Form1.txtQuantity.value;
	}

	totalPrice = quantity * document.Form1.txtPayment.value;

	totalVat = Math.round(totalPrice + (totalPrice * (17.5/100)));
	document.Form1.txtTotalPrice.value = totalPrice;
	document.Form1.txtTotalVat.value=totalVat;

}


}

function validateOrderForm() {
var fr = document.Form1;
if(!checkEmpty(fr.txtName.value))
{
	alert("Enter the Name");
	fr.txtName.focus();
	return false;
}

if(!checkEmpty(fr.txtAddress.value))
{
	alert("Enter the address");
	fr.txtAddress.focus();
	return false;
}

if(!checkEmpty(fr.txtPostCode.value))
{
	alert("Enter the Postcode");
	fr.txtPostCode.focus();
	return false;
}

if(!checkEmpty(fr.txtTelNo.value))
{
	alert("Enter your phone number");
	fr.txtTelNo.focus();
	return false;
}

if(!validateEmail(fr.txtEmailAddress.value))
{
	alert("Enter your valid email address");
	fr.txtEmailAddress.focus();
	return false;
}
calcPrice();
return true;
}

function validateQuote() {
	var frm = document.quote;
	if(!checkEmpty(frm.name.value))
	{
		alert("Enter the Name");
		frm.name.focus();
		return false;
	}
	if(!checkEmpty(frm.company.value))
	{
		alert("Enter Company Name");
		frm.company.focus();
		return false;
	}
	if(!checkEmpty(frm.phone.value))
	{
		alert("Enter phone number");
		frm.phone.focus();
		return false;
	}
	if(!checkEmpty(frm.postcode.value))
	{
		alert("Enter postcode");
		frm.postcode.focus();
		return false;
	}
	if(!checkEmpty(frm.email.value))
	{
		alert("Enter email address");
		frm.email.focus();
		return false;
	}
	return true;	
}

function validateMessage()
{
	var frm = document.msgFrm;
	if(!checkEmpty(frm.fname.value))
	{
		alert("Enter Friend's Name");
		frm.fname.focus();
		return false;
	}
	if(!checkEmpty(frm.femail.value))
	{
		alert("Enter Friend's Email");
		frm.femail.focus();
		return false;
	}
	if(!checkEmpty(frm.yname.value))
	{
		alert("Enter Your Name");
		frm.yname.focus();
		return false;
	}
	if(!checkEmpty(frm.yemail.value))
	{
		alert("Enter your email address");
		frm.yemail.focus();
		return false;
	}
	return true;
}