function Is(){
        //browser leválogatás
        agent = navigator.userAgent.toLowerCase();
        this.agent = navigator.userAgent.toLowerCase();
        this.major = parseInt(navigator.appVersion);
        this.minor = parseFloat(navigator.appVersion);
        this.ns = ( ( agent.indexOf( 'mozilla' ) != -1 ) && ( ( agent.indexOf( 'spoofer' ) == -1 ) && ( agent.indexOf( 'compatible' ) == -1 ) ) );
        this.ns4 = ( this.ns && ( this.major <= 4 ) && ( this.minor < 5 ) );
        this.ns6 = ( this.ns && ( this.major >= 5 ) );
		this.firefox = (this.agent.indexOf("firefox") != -1);
        this.opera = ( agent.indexOf( 'opera' ) != -1 );
        this.opera6 = ( this.major >= 6 );
        this.ie = ( agent.indexOf( "msie" ) != -1 );
		this.ie4 = ( this.ie && ( this.major == 4 ) && ( agent.indexOf( "msie 5.0" ) == -1 ) );
        this.ie5 = ( this.ie && ( this.major == 4 ) && ( agent.indexOf( "msie 5" ) != -1 ) );
        this.ie6 = ( this.ie && ( this.major == 4 ) && ( agent.indexOf( "msie 6" ) != -1 ) );
        this.ie7 = ( this.ie && ( this.major == 4 ) && ( agent.indexOf( "msie 7" ) != -1 ) );
        this.iframe = ( this.ie || this.ns6 || this.opera6 );
        this.popup = ( this.ie || this.ns6 || this.opera6 );
        this.layer = ( this.ie || this.ns6 );

		if (this.firefox){
			this.ns = false;
			this.ns6 = false;
		}
    } 


	var amI = new Is();

	function clearMsg(){
		window.status = "";
	}

	//delay in sec
	function showStatusMsg(msg, delay){
		var t;
		t = clearTimeout();
		t = setTimeout("clearMsg()", delay*1000);
		return msg;
	}

 	function addToFavs(url, favTitle){
		if (url == null || url == ""){
			var locUrl = location.href;
		} else{
			var locUrl = url;
		}

		if (favTitle == null || favTitle == ""){
			if (document.title != ""){
				var locfavTitle = document.title;
			}else{
				var locfavTitle = "rnd title_BFS" + Math.round(Math.random()*10000);
				window.status = showStatusMsg("WARNING: favTitle parameter missing; can't get <title>", 2);
			}
		} else{
			var locfavTitle = favTitle;
		}

		//check for "http://"
		if (locUrl.indexOf("http://") == -1){
			locUrl = "http://" + locUrl;  
		}

		if (amI.ie){
			window.external.AddFavorite(locUrl, locfavTitle);
		}else if(amI.ns6 || amI.firefox){
		       window.sidebar.addPanel(locfavTitle, locUrl, "");
		}
	}


	function setAsHomePage(url){
		if (url == null || url == ""){
			var locUrl = location.href;
		} else{
			var locUrl = url;
		}


		if (amI.ie){
			document.body.style.behavior='url(#default#homepage)';
			document.body.setHomePage(locUrl);
		}
	}