<!--
//Dreamwearver functs
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//Bespoke functions
function copyrightDate(){
	wriYr = new Date
	var doYr = wriYr.getFullYear()
	document.write(doYr)
}
function targetBlank (url) {
  blankWin = window.open(url,'_blank','menubar=yes,toolbar=yes,location=yes,directories=yes,fullscreen=no,titlebar=yes,hotkeys=yes,status=yes,scrollbars=yes,resizable=yes');
}
function checkform() {
	//check all compulsary fields have been completed
	if ((document.getElementById("fullname").value == "") 
	|| (document.getElementById("telemail").value == "") 
	|| (document.getElementById("comments").value == "")) {
		alert("Please fill in your name, phone number or email address and any comments, thanks.");
		return(false)
	}

	//check fields for invalid characters
	if (!(checkformfield("fullname"))
	|| !(checkformfield("position"))
	|| !(checkformfield("company"))
	|| !(checkformfield("telemail"))
	|| !(checkformfield("comments"))) {
		alert ("The following characters are invalid and may not be used: < > ` \"");
		return(false)
	}

}
function checkformfield(fieldname) {
	fieldnamevalue=document.getElementById(fieldname).value;
//	alert (fieldnamevalue);
	if ((fieldnamevalue.search('<') != -1)
	|| (fieldnamevalue.search('>') != -1)
	|| (fieldnamevalue.search('`') != -1)
	|| (fieldnamevalue.search('"') != -1)) {
		return(false)
	} else {
		return(true)
	}
}

function dorook(id,img) {
	if (document.getElementById(id)) {
		document.getElementById(id).src = img;
	}
}
function buildeaddresses (id) {
  switch (id) {
		case "mailid":
			who = "info";
			whereat = "ebsmedia.co.uk";
		break
	}

	eaddress = who + "@" + whereat;
	alias = eaddress;
	elink = "mailto:" + eaddress;

	node1 = document.getElementById(id);
	node1.setAttribute("href",elink);

	node2 = document.createTextNode(alias);
	node1.appendChild(node2);
}


//-->
