var limg;

function fpreload(){
	limg = new Image();
	limg.src = '/images/menu_back.gif';
}

function formokcancel(inid) { 
	if (confirm('Are you sure?')){
		document.getelementById('inid').submit();
	}
} 

function linkokcancel(inlink) { 
	if(confirm('Are you sure?')){
		window.location.href = inlink;
	}
} 

function fchangeimage(inid){
	document.getElementById(inid).style.background = 'url('+limg.src+') no-repeat 5px 2px;';
}

function fchangeimage_out(inid){
	document.getElementById(inid).style.background = '';
}

function fgeta(lhost,lil,lact){
	if (lact=='')lact = lil + "@" + lhost;
	document.write("<a href=" + "mail" + "to:" + lil + "@" + lhost+ ">" + lact + "</a>");
}

function fgetany(la,lb){
	document.write(la+lb);
}

function fcontact_validate(){
	var ltxt = '';
	if (document.getElementById('contact_form').frm_yourname.value == '') ltxt = ltxt + 'Your Name\n';
	if (document.getElementById('contact_form').frm_businessname.value == '') ltxt = ltxt + 'Your Businesses Name\n';
	if (document.getElementById('contact_form').frm_tel.value == '') ltxt = ltxt + 'Your Telephone No\n';
	if (document.getElementById('contact_form').frm_email.value == '') ltxt = ltxt + 'Your Email Address\n';
	if (document.getElementById('contact_form').frm_message.value == '') ltxt = ltxt + 'Your Message\n';
	if (ltxt != ''){
		ltxt = 'Please ensure you have entered the following information;\n\n'+ltxt;
		alert(ltxt);
		return false;
	}
	return true;
}

function decodeHTML(html) {
	return html.replace(/&lt;/g, "<").replace(/&gt;/g, ">");
}