function showNews(id)
{
	//load	
	$("desc_news_" + id).innerHTML = "<div id=\"ajax-loading\"> </div>";          	
	//pobierz film
    var req = mint.Request();
    req.method="get";
    req.AddParam("id", id);
    req.OnSuccess = function()
    {  	   
   	   	$("desc_news_" + id).innerHTML = req.responseText;      	   	  	   
    }
    
    req.Send("request/show_news.php"); 
}

function closeNews(id)
{
	handle = document.getElementById("desc_news_" + id);	
	handle.innerHTML = '';     
}

function showNewsHome(id)
{
    //load	
	$("news-content").innerHTML = "<div id=\"ajax-loading\"> </div>";          	   	
    //get
    var req = mint.Request();
    req.method="get";
    req.AddParam("id", id);
    req.OnSuccess = function()
    {  	   
    	mint.fx.Fade($("news-content"), 0, 1, 1);
     	mint.fx.Fade($("news-content"), 100, 20, 500);
   	   	$("news-content").innerHTML = req.responseText;      	   	     	
    }
    
    req.Send("request/show_news_home.php"); 
}

function closeNewsHome(id)
{
		$("news-content").innerHTML = '';
}

//send newsletter add
function sendNewsletter()
{
	//load	
	$("response-nl").innerHTML = "<div id=\"ajax-loading-nl\"> </div>";          	
	
    var req = mint.Request();
               
    req.OnSuccess = function() {
        $("response-nl").innerHTML = this.responseText;
    }
               
    req.SendForm("form-nl","request/newsletter_add.php","get");
}

function showPhotoMoto(id,nr)
{
	//load	
	$("response-photo-moto").style.visibility = "visible";
	$("response-photo-moto").style.display = "block";              	   	
	$("response-photo-moto").innerHTML = "<div id=\"ajax-loading-moto\"> </div>";          	   	
    
    var req = mint.Request();
    req.method="get";
    req.AddParam("id", id);
    req.AddParam("nr", nr);
    req.OnSuccess = function()
    {  	   
   	   	$("response-photo-moto").innerHTML = req.responseText;      	   	     	
    }
    
    req.Send("request/show_photo_moto.php"); 
}

function closePhotoMoto()
{
	$("response-photo-moto").innerHTML = "";          	   	
	$("response-photo-moto").style.display = "none";          	   	
}

function showExchange()
{
	//load	
	$("exchange").innerHTML = "<div id=\"ajax-loading-exc\"> </div>";          	
	//pobierz film
    var req = mint.Request();
    req.OnSuccess = function()
    {  	   
   	   	$("exchange").innerHTML = req.responseText;      	   	  	   
    }
    
    req.Send("request/get_exchange.php"); 
}

function showCurrency()
{
	//load	
	$("currency").innerHTML = "<div id=\"ajax-loading-curr\"> </div>";          	
	//pobierz film
    var req = mint.Request();
    req.OnSuccess = function()
    {  	   
   	   	$("currency").innerHTML = req.responseText;      	   	  	   
    }
    
    req.Send("request/get_currency.php"); 
}

//send form leasing
function sendFormLeasing()
{
	$("response-form").style.visibility = "visible";
	$("response-form").style.display = "block";      
	$("response-form").innerHTML = "<div id=\"ajax-loading-form\"> </div>";    	
	mint.fx.Fade($("response-form"), 90, 20, 500);  
	
    var req = mint.Request();
               
    req.OnSuccess = function() {
        $("response-form").innerHTML = this.responseText;
    }
               
    req.SendForm("form-leasing","request/form_leasing_send.php","get","get");
}

function closeResForm()
{
	$("response-form").innerHTML = "";          	   	
	$("response-form").style.display = "none";          	   	
}


//send form kredyt
function sendFormKredyt()
{
	$("response-form").style.visibility = "visible";
	$("response-form").style.display = "block";      
	$("response-form").innerHTML = "<div id=\"ajax-loading-form\"> </div>";    	
	mint.fx.Fade($("response-form"), 90, 20, 500);  
	
    var req = mint.Request();
               
    req.OnSuccess = function() {
        $("response-form").innerHTML = this.responseText;
    }
               
    req.SendForm("form-kredyt","request/form_kredyt_send.php","get","get");
}

//send form contact
function sendFormContact()
{
	$("response-form").style.visibility = "visible";
	$("response-form").style.display = "block";      
	$("response-form").innerHTML = "<div id=\"ajax-loading-form\"> </div>";    	
	mint.fx.Fade($("response-form"), 90, 20, 500);  
	
    var req = mint.Request();
               
    req.OnSuccess = function() {
        $("response-form").innerHTML = this.responseText;
    }
               
    req.SendForm("form-contact","request/form_contact_send.php","get","get");
}

//send form contact advisor
function sendFormContactAdvisor()
{
	$("response-form").style.visibility = "visible";
	$("response-form").style.display = "block";      
	$("response-form").innerHTML = "<div id=\"ajax-loading-form\"> </div>";    	
	mint.fx.Fade($("response-form"), 90, 20, 500);  
	
    var req = mint.Request();
               
    req.OnSuccess = function() {
        $("response-form").innerHTML = this.responseText;
    }
               
    req.SendForm("frmContactAdvisor","request/form_contact_advisor_send.php","get","get");
}