function _png(element,img) {
	if (element.name==img) {
		return true;
	} else {
		element.name=img;
		var supported=/MSIE/.test(navigator.userAgent) && navigator.platform=="Win32";
		blankSrc="spacer.gif";
		ie5=/MSIE 5/.test(navigator.userAgent) && navigator.platform=="Win32";
		if (supported&&!ie5&&br.name!="Opera") {
			fixImage(element,img);
		};
		if ( (!supported&&!ie5)||(br.name=="Opera") ) {
			element.src=img;
		};
		return true;
	};
};

function fixImage(element,img) {
	var src=img;
	if (/\.png$/.test(src.toLowerCase())) {
		element.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"',sizingMethod='scale')";
	} else {
		element.runtimeStyle.filter="";
	};
};

function detectAgent() {
	with (navigator) {
		var tempAgent=userAgent;
		var tempName=appName;
		this.plainAgentStr=userAgent;
		this.plainNameStr=appName;
		this.plainVersionStr=appVersion;
		if (tempAgent.indexOf('Opera')>=0) {
			this.name="Opera";
			this.shortName="OPR";
			var tempVer=tempAgent.substring(tempAgent.indexOf("Opera")+6,tempAgent.length);
			this.version=tempVer.substring(0,tempVer.indexOf(" "));
			this.minorVer=this.version.substring(tempVer.indexOf(".")+1,tempVer.length);
			this.language=tempAgent.substring(tempAgent.indexOf("[")+1,tempAgent.indexOf("]"));
		} else {
			if (tempAgent.indexOf('MSIE')>=0) {
				this.name="Internet Explorer";
				this.shortName="EXP";
				var tempVer=tempAgent.substring(tempAgent.indexOf("MSIE")+5,tempAgent.length);
				this.version=tempVer.substring(0,tempVer.indexOf(";"));
				this.minorVer=this.version.substring(tempVer.indexOf(".")+1,tempVer.length);
				this.language=browserLanguage;
			} else {
				if (tempName.indexOf('Netscape')>=0) {
					this.name="Netscape Navigator";
					this.shortName="NAV";
					this.minorVer=appVersion.substring(appVersion.indexOf(".")+1,appVersion.indexOf(" "));
					this.language=tempAgent.substring(tempAgent.indexOf("[")+1,tempAgent.indexOf("]"));
					this.version=appVersion.substring(0,appVersion.indexOf(" "));			   
				} else {
					this.name="Unknown";
					this.shortName="UNK";
				};
			};
		};
	};
};

var br=new detectAgent();
