// JavaScript Functions Document

function createEmail(text,name,host) {
	var ename = name;
	var ehost = host;
	document.write(text + "<a href=" + "mail" + "to:" + ename + "&#64;" + ehost + ">" + ename + "&#64;" + ehost + "</a>");
}

function createEmailimage(name,host) {
	var ename = name;
	var ehost = host;
	document.write("<a href='" + "mail" + "to:" + ename + "&#64;" + ehost + "'><img alt='Email the Spa' title='Email the Spa' src='/wp-content/themes/imaginespa/images/navigation_email.gif' width='158px' height='32px' /></a>");
}



function getFocus(element,string) {
	if (element.value == string) {
		element.value = "";
	}
}

function getBlur(element,string) {
	if (element.value == "") {
		element.value = string;
	}
}

function borderOn(theID) {
	containerID = document.getElementById(theID);
	containerID.style.borderColor = '#541800';
}

function borderOff(theID) {
	containerID = document.getElementById(theID);
	containerID.style.borderColor = '#c6c4ab';
}

function createGoogleMap(mapID) {
	markeup = "<iframe height='350' frameborder='1' width='678' scrolling='no' src='";
	url = "http://maps.google.co.uk/maps/ms?f=q&amp;hl=en&amp;geocode=&amp;num=10&amp;ie=UTF8&amp;s=AARTsJqSV2rHM2dIzGviwHcyZ5i6H1AFkg&amp;msa=0&amp;msid=115883555000030036392.0004468184baeb220354b&amp;ll=52.781066,0.468636&amp;spn=0.018171,0.062141&amp;z=14&amp;output=embed";
	markup += "' marginwidth='0' marginheight='0'></iframe><br />";
	markup += "<a class='view_larger_map' href='";
	markup += url;
	markup += "'>View Larger Map</a>";
	
	document.write(markup);
}
