
	/**
	 * Rozszerzenie funkcjonalności SMARTY
	 * 
	 * @author     Bartosz Hornik 
	 * @version    1.0
	 */

	function baner(obj)
	{
		if(typeof(obj) == "string") return document.getElementById(obj);
			else return obj;
	}

	function in_b1(obj)
	{
		mint.fx.Fade(obj, 0, 20, 200);
	}
	
	function in_b2(obj)
	{
		mint.fx.Fade(obj, 50, 20, 200);
	}
	
	function out_b1(obj)
	{
		mint.fx.Fade(obj, 100, 20, 200);
	}
	
	function in_b3(obj)
	{
		mint.fx.Fade(obj, 100, 20, 200);
	}
	
	function out_b3(obj)
	{
		mint.fx.Fade(obj, 70, 20, 200);
	}
	
	
	function gd(page)
	{	
		window.page = page;
		window.to_div = "window1";
		window.form_id = null;
		mint.fx.Fade("window1", 0, 20, 500, null, getdata2);
		return false;
	}
	
	function gd(page, form_id)
	{	
		window.page = page;
		window.to_div = "window1";
		window.form_id = form_id;
		mint.fx.Fade("window1", 0, 20, 500, null, getdata2);
		return false;
	}
	
	function getdata2()
	{
		var req = mint.Request();
    	req.AddParam("get", window.page);
	    
		req.OnAbort =
	    function()
	    {
	        alert("Serwer www.programista-php.com.pl ma problemy z odebraniem zapytania. Spróbuj ponownie późnej.");
	    }
	    req.OnSuccess =
	    function()
	    {
	        $(window.to_div).innerHTML = this.responseText;
	    	setTimeout("getdata3()", 10);
	    }
		
	    if (window.form_id)
		{
			req.SendForm(window.form_id, null, "post");
		}
		else
		{
    		req.Send("request.php", window.to_div);
		}
		return false;
	}
	
	function getdata3()
	{
    	mint.fx.Fade(window.to_div, 100, 20, 500);
	}	
