function addBookmark() 
{
if (window.sidebar)
{ 
window.sidebar.addPanel(document.title,location.href,""); 
} 
else if( document.all )
{
window.external.AddFavorite(location.href,document.title);
} 
else if( window.opera && window.print )
{
return true;
}
}


function EmailPage()
{
strEmailBody = "mailto:?body=You have been sent a link from " + document.title + "%0D%0D" + location.href
location.href = strEmailBody
}


//	Validate Feedback Options

function ValidateFeedbackOptions(){
// if (document.feedbackoptionsform.feedbackoptions.value.length==0){
// alert("Error : Please make a selection.")
// return false;
// }
document.feedbackoptionsform.submit();
}

//	Validate Feedback Options - End



//	Validate email


function CheckEmail(){

if (document.contact_form.email.value.length==0){
document.contact_form.email.focus();
alert("Error : Email address must be present.")
return false;
}
var str=document.contact_form.email.value
var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
var testresults
if (filter.test(str))
testresults=true
else{
document.contact_form.email.focus()
alert("Error - Please input a valid email address")
return false;
}
checkfields();
//document.contact_form.submit();
}


//	Validate email - End




//	Validate Trade Application Form


function CheckTradeApplication(){

if (document.contact_form.full_name.value.length==0){
document.contact_form.full_name.focus();
alert("Error : Full name must be present.")
return false;
}

if (document.contact_form.company_name.value.length==0){
document.contact_form.company_name.focus();
alert("Error : Company name must be present.")
return false;
}

if (document.contact_form.address_line_1.value.length==0){
document.contact_form.address_line_1.focus();
alert("Error : Address line 1 must be present.")
return false;
}

if (document.contact_form.city_or_town.value.length==0){
document.contact_form.city_or_town.focus();
alert("Error : City/Town must be present.")
return false;
}


if (document.contact_form.postcode.value.length==0){
document.contact_form.postcode.focus();
alert("Error : Postcode must be present.")
return false;
}

if (document.contact_form.telephone_number.value.length==0){
document.contact_form.telephone_number.focus();
alert("Error : Telephone number must be present.")
return false;
}

if (document.contact_form.email.value.length==0){
document.contact_form.email.focus();
alert("Error : Email address must be present.")
return false;
}

var str=document.contact_form.email.value
var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
var testresults
if (filter.test(str))
testresults=true
else{
document.contact_form.email.focus()
alert("Error - Please input a valid email address")
return false;
}


if (document.contact_form.VAT_number.value.length==0){
document.contact_form.VAT_number.focus();
alert("Error : VAT number must be present.")
return false;
}

checkfields();
//document.contact_form.submit();
}

//	Validate Trade Application Form - End




