﻿
    function jsInclude(url)
    {
      document.write('<scr' + 'ipt type="text/javascript" src="' + url + '"></scr' + 'ipt>');
    }
    function cssInclude(url)
    {
      document.write('<link href="' + url + '" type="text/css" rel="stylesheet"></link>');
    }

	// skrypty strony
    
    
	// skrypty modułów
    function validateForm()        {           
 if (!$("#Imie").val())             
{                
alert("Podaj Imię");                 
$("#Imie").focus();                 
return false;             
}                         

if (!$("#Email").val())
{                
alert("Podaj adres E-mail");                 
$("#Email").focus();                 
return false;             
}             

                    
return true;        
}    


	// skrypty moduł&#243;w
    function MM_openBrWindow(theURL,winName,features) {
var v = validateForm();
if (v) {
    var vOK = "Formularz został przesłany";		
    document.getElementById("loader").style.visibility = "visible";

    var adr;
    adr = theURL+'?Imie='+document.getElementById("Imie").value+'&Email='+document.getElementById("Email").value+'&Jaka_wrozba='+document.getElementById("JakaWrozba").options[document.getElementById("JakaWrozba").selectedIndex].value+'&Pytanie='+document.forms.pytanie_formF.Pytanie.value+'&$SendTitle=Zapytanie ze strony www.lauramei.pl&$SendOK=E-mail zostal wyslany&$SendBAD=Blad wyslania&$SendEmail=lauramei@interia.pl&$Weryfikacja=';
    //alert(adr);
    
    $.ajax({
        url: adr,
        type: 'GET',
        dataType: 'html',
        timeout: 20000,
        error: function(){
            document.getElementById("loader").style.visibility = "hidden";
            alert('Blad wysłania formularza. Prosze spr&#243;bowac za chwilę.');
        },
        success: function(msg){
           document.getElementById("loader").style.visibility = "hidden";
            alert(vOK);
            }
        });  
	}     

return false;    
}





$().ready(function() {  
$("#Zapytanie-ze-strony").val(document.URL);
});

$().ready(function() {  
$("#MaszPytanie").click(function() {
     $("#pytanie_formF").toggle(750);
});
});

