<!--

// Preload navigation

	image1 = new Image();
	image1.src = "images/home_roll.gif";

	image2 = new Image();
	image2.src = "images/search_roll.gif";

	image3 = new Image();
	image3.src = "images/directory_roll.gif";

	image4 = new Image();
	image4.src = "images/onlineshopping_roll.gif";
	
	image5 = new Image();
	image5.src = "images/getlisted_roll.gif";

	image6 = new Image();
	image6.src = "images/articles_roll.gif";

	image7 = new Image();
	image7.src = "images/contactus_roll.gif";


// variables
var textnormal		= "#376287";
var textactive		= "#E7F1F9";
var cellnormal	 	= "#E7F1F9";
var cellactive		= "#376287";

// mouseover-effect
function highlight_cell(cell) {
	cell.style.cursor = 'hand';
	cell.bgColor = cellactive;
	cell.children.tags('A')[0].style.color = textactive;
}

// mouseout-effect
function normal_cell(cell) {
	cell.style.cursor = 'hand';
	cell.bgColor = cellnormal;
	cell.children.tags('A')[0].style.color = textnormal;
}

// link-simulation
function cell_link(cell) {
	cell.children.tags('A')[0].click();
}

//-->

/*  Validate the form for contact us page */
function checkFields() {

	var missinginfo = "";

	if (document.form.Contact.value == "") {
		missinginfo += "\n     -  Name";
	}

	if ((document.form.eMail.value == "") || (document.form.eMail.value.indexOf('@') == -1) || (document.form.eMail.value.indexOf('.') == -1)) {
		missinginfo += "\n     -  Email address";
	}
	if (document.form.Comments.value == "") {
		missinginfo += "\n     -  Enquiry/Comments";
	}

	if (missinginfo != "") {
		missinginfo ="_____________________________\n" +
		"You failed to correctly fill in your:\n" +
		missinginfo + "\n_____________________________" +
		"\nPlease re-enter and submit again";
		alert(missinginfo);
		return false;
	}
	else 
		return true;
}

//check length of textarea input
function textLimit(field, maxlen) {
if (field.value.length > maxlen + 1)
alert('maximum length used');
if (field.value.length > maxlen)
field.value = field.value.substring(0, maxlen);
}

/*  Validate the form for contact us page */
function checkSO() {

	var missinginfo = "";

	if (document.form.sname.value == "") {
		missinginfo += "\n     -  Company name";
	}

	if (document.form.bank.value == "") {
		missinginfo += "\n     -  Bank name";
	}

	if (document.form.bankadd1.value == "") {
		missinginfo += "\n     -  Bank Address";
	}

	if (document.form.sortcode.value == "") {
		missinginfo += "\n     -  Sortcode";
	}

	if (document.form.accno.value == "") {
		missinginfo += "\n     -  Account Number";
	}

	if (missinginfo != "") {
		missinginfo ="_____________________________\n" +
		"You failed to correctly fill in your:\n" +
		missinginfo + "\n_____________________________" +
		"\nPlease re-enter and submit again";
		alert(missinginfo);
		return false;
	}
	else 
		return true;
}