﻿

	function its() {
		var n = navigator;
		var ua = ' ' + n.userAgent.toLowerCase();
		var pl = n.platform.toLowerCase();
		var an = n.appName.toLowerCase();

		// browser version
		this.version = n.appVersion;
		this.nn = ua.indexOf('mozilla') > 0;

		// 'compatible' versions of mozilla aren't navigator
		if(ua.indexOf('compatible') > 0) {
			this.nn = false;
		}
		
		this.opera = ua.indexOf('opera') > 0;
		this.ie = ua.indexOf('msie') > 0;
		this.major = parseInt( this.version );
		this.minor = parseFloat( this.version );

		// platform
		this.mac = ua.indexOf('mac') > 0;
		this.win = ua.indexOf('win') > 0;

		// workaround for IE5 which reports itself as version 4.0
		if(this.ie) {
			if(ua.indexOf("msie 5") > 1) {
			var msieIndex = navigator.appVersion.indexOf("MSIE") + 5;
			this.major = parseFloat(navigator.appVersion.substr(msieIndex,3));
			}
		}

		return this;
	}

	function browserNaming() {
		its = new its();
		
		// DOM-enabled browser?
		if (!document.getElementById) {
			browserNew = false;
		} else {
			browserNew = true;
		}

		// browser name
		if (its.opera) {
			browserName = "Opera";
		} else if (its.ie) {
			browserName = "IE";
		} else {
			browserName = "NS";
		}

		// browser number
		browserNameLong = browserName + its.major;
	}
	

	


	function setIdProperty(id,property,value) {
		var styleObject = document.getElementById( id );
		if (styleObject != null) {
			styleObject = styleObject.style;
			styleObject[ property ] = value;
		}
	}




	function show(id) {
		if (browserNew) {
			setIdProperty(id,"visibility","visible");
		} else {
			if (browserName == "NS") { document.layers[id].visibility = "show"; }
			else { document.all[id].style.visibility = "visible"; }
		}
	}

