/*Preload Images*/

nav_h = new Image();
nav_h.src = 'images/nav_h.png';
send_h = new Image();
send_h.src = 'images/send_h.gif';

/*Form Highlighting*/

if (navigator.userAgent.toLowerCase().indexOf('applewebkit') == -1) { // filter out Safari, as it has it's own formfield highlighting
	// preload
	left = new Image();
	left.src = 'images/fh_left.png';
	top_left = new Image();
	top_left.src = 'images/fh_top_left.png';
	top_right = new Image();
	top_right.src = 'images/fh_top_right.png';
	right = new Image();
	right.src = 'images/fh_right.png';
	bottom_left = new Image();
	bottom_left.src = 'images/fh_bottom_left.png';
	bottom_right = new Image();
	bottom_right.src = 'images/fh_bottom_right.png';
	
	function setBg(elem) {
		if (document.getElementById) {
			box = elem.parentNode.parentNode;
			box.style.background = 'url(/images/fh_left.png) repeat-y left';
			box.childNodes[0].style.background = 'url(/images/fh_top_left.png) no-repeat top left';
			box.childNodes[0].childNodes[0].style.background = 'url(/images/fh_top_right.png) no-repeat top right';
			box.childNodes[1].style.background = 'url(/images/fh_right.png) repeat-y right';
			box.childNodes[1].childNodes[0].style.border = '1px solid #fff';
			box.childNodes[2].style.background = 'url(/images/fh_bottom_left.png) no-repeat bottom left';
			box.childNodes[2].childNodes[0].style.background = 'url(/images/fh_bottom_right.png) no-repeat bottom right';
		}
	}
	function removeBg(elem) {
		if (document.getElementById) {
			box = elem.parentNode.parentNode;
			box.style.background = 'transparent';
			box.childNodes[0].style.background = 'transparent';
			box.childNodes[0].childNodes[0].style.background = 'transparent';
			box.childNodes[1].style.background = 'transparent';
			box.childNodes[1].childNodes[0].style.border = '1px solid #ccccb4';
			box.childNodes[2].style.background = 'transparent';
			box.childNodes[2].childNodes[0].style.background = 'transparent';
		}
	}
}