/* Create Timestamp for localConnection connection */
var timestamp = new Date();

/* Browsers and plug-ins detection */
function checkBrowser()
{
	this.ver = navigator.appVersion;
	this.dom = document.getElementById?1:0;
	this.ua = navigator.userAgent.toLowerCase();	
	this.opera= this.ua.indexOf("opera")>-1;	// before ns or ie
	this.ie6 = (this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie55 = (this.ver.indexOf("MSIE 5.5")>-1 && this.dom)?1:0;
	this.ie5 = (this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4 = (document.all && !this.dom)?1:0;
	this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0; 	
	this.ns5 = (this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4 = (document.layers)?1:0;
	this.bw  = (this.ie5 || this.ie4 || this.ns4 || this.ns5 || this.ie55);
	this.os  = (this.ver.indexOf("Macintosh")>-1)? "mac":"pc";
	this.ie  = (this.ie5 || this.ie4 || this.ie55 || this.ie6);
	this.ns  = (this.ns4 || this.ns5);
	this.win = (this.ver.indexOf("Win")>-1) ? 1:0;
	this.mac = (this.ver.indexOf("Mac")>-1) ? 1:0;
	this.lin = ((this.ver.indexOf("Lin")>-1) || (this.ver.indexOf("X11")>-1)) ? 1:0;
	return this;
}
