function Initcap(strTemp) {
	strTemp=strTemp.substr(0,1).toUpperCase() + strTemp.substr(1).toLowerCase()
	var intStart=0;
	var i=0;
	intStart=strTemp.indexOf(" ",0)

	while(intStart >-1 && intStart < strTemp.length )
	{
		var strT1=new String();
		strT1= strTemp.substring(0,intStart+1) + strTemp.substr(intStart+1,1).toUpperCase() + strTemp.substring(intStart+2);
		strTemp=strT1;
		intStart = strTemp.indexOf(" ",intStart+1)
	}
	return strTemp;
}

function CheckBrowser() {
	var strBrowserName = navigator.appName;
	if (strBrowserName=="Netscape") this.name = "ns";
	else if (strBrowserName=="Microsoft Internet Explorer") this.name = "ie";
	else this.name = strBrowserName;
	this.version = navigator.appVersion;
	this.majorversion = parseInt(this.version);
	this.ns = (this.name=="ns" && this.majorversion>=4);
	this.ns4 = (this.name=="ns" && this.majorversion==4);
	this.ns6 = (this.name=="ns" && this.majorversion==5);
	this.ie = (this.name=="ie" && this.majorversion>=4);
	this.ie4 = (this.version.indexOf('MSIE 4')>0);
	this.ie5 = (this.version.indexOf('MSIE 5')>0);
	this.ie6 = (this.version.indexOf('MSIE 6')>0);
	this.majority = (this.ns||this.ie);
}
userBrowser = new CheckBrowser();

function layerWrite(id,nestref,text) {
	if (userBrowser.ns4) {
		var lyr = (nestref)? eval('document.'+nestref+'.document.'+id+'.document') :	document.layers[id].document
		lyr.open()
		lyr.write(text)
		lyr.close()
	}
	else if (userBrowser.ie4) document.all[id].innerHTML = text
	else{
		var lyr = document.getElementById(id);
		lyr.innerHTML = text;
	}
}
