//browse sniffer and loader of stylesheet & nav system
if (document.layers) {
	//Netscape 4
		document.write("<link rel='stylesheet' type='text/css' href='http://www.greaterunion.com.au/gu_ns4.css'>");
	//Render the DHTML stylesheet
		document.write("<link rel='stylesheet' type='text/css' href='http://www.greaterunion.com.au/gu_dhtml.css'>");
} else if(document.all) {
	//IE
document.write("<link rel='stylesheet' type='text/css' href='http://www.greaterunion.com.au/gu.css'>");
	//Render the DHTML stylesheet
document.write("<link rel='stylesheet' type='text/css' href='http://www.greaterunion.com.au/gu_dhtml.css'>");
} else if(document.getElementById) {
	//Netscape 6
document.write("<link rel='stylesheet' type='text/css' href='http://www.greaterunion.com.au/gu.css'>");
	//Render the DHTML stylesheet
document.write("<link rel='stylesheet' type='text/css' href='http://www.greaterunion.com.au/gu_dhtml.css'>");
} else {
	//Older than 4.0 browser
	
}

//Generic button rollover script
function buttonroll(state, whichnav) {
if (document.all) {
	if (state==0) eval(whichnav).src = "/images/nav/" + whichnav + ".gif";
	if (state==1) eval(whichnav).src = "/images/nav/" + whichnav + "_on.gif";
} else {
	if (state==0) document.getElementById(whichnav).src = "/images/nav/" + whichnav + ".gif";
	if (state==1) document.getElementById(whichnav).src = "/images/nav/" + whichnav + "_on.gif";
}
}

//Generic window popper
function genPopWin(url, top, left, width, height) {
	window.open(decode(url), 'guPop', 'top='+top+', left='+left+', width='+width+', height='+height+', scrollbars=yes, location=no, address=no');
}

function decode(str) {
     var result = "";
     for (var i = 0; i < str.length; i++) {
          if (str.charAt(i) == "+") {
			result += "PLUS";
          } else {
			result += str.charAt(i);
			}
	}
	return unescape(result);
}
