	/**
	*  Funkcja przekierowuje aktualnie 
	*  otwarta strone na inny adres
	*  url, jako parametr przyjmuje adres
	*  wykonywalnego pliku.
	*
	*  @access public
	*  @return void
	*  @param string url address
	**/
	function reload( href )
	{
		if ( document.all )
		{
		
			this.window.location.href( href );	
			
		} else {
		
			this.window.location.href = href;		
			
		}
	}
	
	
	/**
	*  Funkcja otwiera nowe okienko
	*  popup jako parametry przyjmuje
	*  adres wykonywalnego pliku oraz
	*  szerokosc i wysokosc okienka.
	*
	*  @access public
	*  @return void
	*  @param string url address
	*  @param integer popup width
	*  @param integer popup height
	**/
	function popup( href , width , height )
	{
		var newWindow = null;
		
		if( window.screen )
		{
			
			aw = screen.availWidth;
			ah = screen.availHeight;
			
		} else {
		
			aw = 640;
			ah = 450;
			
		}
		
		if( width == null )
		{
		
			width = 740;
			
		}
		
		if( height == null )
		{
			
			height = 500;
			
		}
		
		settings = 
		"left=" + (aw-width)/2 + ","
		+"top=" + (ah-height)/2 + ","
		+"screenX=" + (aw-width)/2 + ","
		+"screenY=" + (ah-height)/2 + ","
		+'directories=no, location=no, menubar=no, scrollbars=yes, status=no, toolbar=no, resizable=0, width='+width+',height='+height+'';
	

	
		newWindow = window.open( href , 'newWindow' , settings );
	}

	
	/**
	*  Dodaje strone do ulubionych,
	*  dziala tylko w Internet Explorer
	*
	*  @access public
	*  @return void
	*  @param string site title
	*  @param string url address
	**/
	function addBookmark( sTitle , sUrl ) 
	{
		if( !sTitle )
		{
			sTitle = 'w|m|r studio';
		}
	
		if( !sUrl )
		{
			sUrl = 'http://www.dotproject.pl';
		}

		if ( window.sidebar ) 
		{
			return true;
			// since this doesn't work, disabling, but it may work someday.
			//window.sidebar.addPanel(sTitle, sUrl,"");

		} else if( document.all ) {
		
			window.external.AddFavorite( sUrl, sTitle);
		
		} else if( window.opera && window.print ) {
		
			return true;
		}
	}

	
	/**
	*  Ustawia strone jako strone startowa
	*  przegladarki internetowej.
	*
	*  @access public
	*  @return void
	*  @param string url address
	**/
	function addStart( sUrl )
	{
		if( !sUrl )
		{
			sUrl = 'http://www.dotproject.pl';
		}
	
		this.style.behavior = 'url(#default#homepage)'; 
		this.setHomePage( sUrl );
	}
	
	function imagePopup(imageURL,imageTitle)
	{
		width  = 740;
		height = 500;

		if( window.screen )
		{
			
			aw = screen.availWidth;
			ah = screen.availHeight;
			
		} else {
		
			aw = 640;
			ah = 450;
			
		}

		if( !imageTitle )
		{
			imageTitle = '::::::::::::::::::::::::';
		}
		
		var AutoClose = true;
		
		if ( parseInt( navigator.appVersion.charAt(0) ) >=4 )
		{
			var isNN = ( navigator.appName=="Netscape" ) ? 1:0;
			var isIE = ( navigator.appName.indexOf("Microsoft") !=-1 ) ? 1:0;
		}

		
		var optNN='scrollbars=no,width='+width+',height='+height+',left='+(aw-width)/2+',top='+(ah-height)/2;
		var optIE='scrollbars=no,width='+width+',height='+height+',left='+(aw-width)/2+',top='+(ah-height)/2;

		
		if (isNN)
		{
			imgWin = window.open( 'about:blank' , '' , optNN );
		}
		
		if (isIE)
		{
			imgWin = window.open( 'about:blank' , '' , optIE );
		}
		
		with (imgWin.document)
		{
			
			writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
			writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
			writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
			writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
			writeln('width=100-(document.body.clientWidth-document.images[0].width);');
			writeln('height=100-(document.body.clientHeight-document.images[0].height);');
			writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
			writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
			writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');

			if (!AutoClose) writeln('</head><body scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
			else writeln('</head><body scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
			writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
			
			close();
		}
	}


