function browser_class() {
	var b = navigator.appName;
	this.b = (b=="Netscape")?"ns":(b=="Microsoft Internet Explorer")?"ie":b;
	this.v = navigator.appVersion;
	/*if (this.b=='ie') {
		var ve = this.version.indexOf("MSIE")
		this.v = parseInt(this.version.substr(ve+4))
	}else this.v = parseInt(this.version)*/
	this.opera = (navigator.userAgent.indexOf('Opera') != -1)?1:0	;
	//this.ns4 = (document.layers)?1:0
	this.ns4 = (document.layers && !this.dom)?1:0;
	this.ns6 = (document.getElementById && !document.all && this.b == 'ns')?1:0;
	this.ie = (document.all)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera)?1:0;
	//this.ie4 = (document.all && !document.getElementById)?1:0
	this.ie5 = (document.all && document.getElementById)?1:0;
	this.ie5mac = (navigator.userAgent.indexOf('MSIE 5') != -1 && navigator.userAgent.indexOf('Mac') != -1);
	this.ie55 = (this.ie5 &&  this.v.indexOf('MSIE 5.5')>0)?1:0;
	this.ie6 = (this.ie5 &&  this.v.indexOf('MSIE 6.0')>0)?1:0;
	this.dom = (document.getElementById)?1:0;
	this.w3cdom = (!this.ie5mac && document.getElementsByTagName && document.createElement)?1:0;
}

br = new browser_class();
//if (!(is.ie55 || is.ie6)) window.location.href = 'atnaujinkite.htm'


//aprasymas: \info\javascript\straipsniai\JavaScript Programming dltypeof() v1.0
function dltypeof(vExpression)
{	
	var sTypeOf = typeof vExpression;
	if( sTypeOf == "function" )
	{
		var sFunction = vExpression.toString();
		if( ( /^\/.*\/$/ ).test( sFunction ) )
		{
			return "regexp";
		}
		else if( ( /^\[object.*\]$/i ).test( sFunction ) )
		{
			sTypeOf = "object";
        }
	}
	if( sTypeOf != "object" )
	{
		return sTypeOf;
	}
	
	switch( vExpression )
	{
		case null:
			return "null";
		case window:
			return "window";
		case window.event:	
			return "event";
	}
	
	if( window.event && ( event.type == vExpression.type ) )
	{
		return "event";
	}
	
	var fConstructor = vExpression.constructor;
    if( fConstructor != null )
	{
		switch( fConstructor )
		{																	
			case Array:
				sTypeOf = "array";
				break;
			case Date:
				return "date";
			case RegExp:
				return "regexp";
			case Object:
				sTypeOf = "jsobject";
				break;
			case ReferenceError:
				return "error";
			default:
				var sConstructor = fConstructor.toString();
				var aMatch = sConstructor.match( /\s*function (.*)\(/ );
				if( aMatch != null )
				{
					return aMatch[ 1 ];
				}
		}
	}

	var nNodeType = vExpression.nodeType;
	if( nNodeType != null )
	{	
		switch( nNodeType )
		{
			case 1:
				if( vExpression.item == null )
				{
					return "domelement";
				}
				break;
			case 3:
				return "textnode";
		}
	}
	
	if( vExpression.toString != null )
	{
		var sExpression = vExpression.toString();
		var aMatch = sExpression.match( /^\[object (.*)\]$/i );
		if( aMatch != null )	
		{
			var sMatch = aMatch[ 1 ];
			switch( sMatch.toLowerCase() )
			{
				case "event":
					return "event";
				case "math":
					return "math";
				case "error":	
					return "error";
				case "mimetypearray":
					return "mimetypecollection";
				case "pluginarray":
					return "plugincollection";
				case "windowcollection":
					return "window";
				case "nodelist":
				case "htmlcollection":
				case "elementarray":
					return "domcollection";
			}
		}
	}
	
	if( vExpression.moveToBookmark && vExpression.moveToElementText )
	{
		return "textrange";
	}
	else if( vExpression.callee != null )
	{
		return "arguments";
	}
	else if( vExpression.item != null )	
	{
		return "domcollection";
	}
	
	return sTypeOf;
}
