function clear_textbox()
{
if (document.frmElectrician.srchPostcode.value == "Postcode")
document.frmElectrician.srchPostcode.value = "";
}
function add_textbox()
{
if (document.frmElectrician.srchPostcode.value == "")
document.frmElectrician.srchPostcode.value = "Postcode";
}
function clear_textbox2()
{
if (document.frmSearch.yider.value == "Word")
document.frmSearch.yider.value = "";
}
function add_textbox2()
{
if (document.frmSearch.yider.value == "")
document.frmSearch.yider.value = "Word";
}



// CSS Browser Selector   v0.2.5
var css_browser_selector = function() {
	var 
		ua=navigator.userAgent.toLowerCase(),
		is=function(t){ return ua.indexOf(t) != -1; },
		h=document.getElementsByTagName('html')[0],
		b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('gecko/')? 'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',
		os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';
	var c=b+os+' js';
	h.className += h.className?' '+c:c;
}();
// nav
navHover = function() {
	var lis = document.getElementById("navmenu").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);




// home icon
if (document.images) {
 img_on =new Image();  img_on.src ="../../pix/icons/home-on.gif"; 
 img_off=new Image();  img_off.src="../../pix/icons/home.gif"; 
}

function iconOver() { 
 if (document.images) document.imgName.src=img_on.src;
}

function iconOut() {
 if (document.images) document.imgName.src=img_off.src;
}

//open window
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}