<!-- //


 $(function(){  
	     // loop though each link  
	     $("a.acctitle").each(function(){  
	         // add an event on click  
	         $(this).click(function(){  
	             // hide all div's with accContent class  
	             $(".accContent").each(function(){  
	                 $(this).hide("slow");  
	             });  
	   
	             // the main point of this script - Fetch ref attribute of  
	             // title link and display the hidden div with that id  
	             $("#"+$(this).attr("ref")).show("slow");  
	                 return;  
	               });  
	     });  
			
			
			 
			
		         $("a.hide_k").click(function () {	
 
                    $(".accContent").each(function(){  
	                       $(this).hide("slow");  
	                  }); 

                });
	
	
         
			
	 });  





  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1786722-22']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();


	
	


  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-19957675-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();


	
	
	
	
	
	function isEmailAddr(email) 
	{
		var result = false;
		var theStr = new String(email);
		var index = theStr.indexOf('@');
		if (index > 0)
		{
			var pindex = theStr.indexOf('.',index);
			if ((pindex > index+1) && (theStr.length > pindex+1))
	        result = true;
		}
		return result;
	}

	function wypisz()
	{
		if (document.nlregform.email.value == '')
		{
			alert('Proszę podać email');
			document.nlregform.email.focus();
			return;
		}

		if (!isEmailAddr(document.nlregform.email.value))
		{
			alert('Proszę podać prawidłowy adres email');
			document.nlregform.adres_email.focus();
			return;
		}
		
		document.nlregform.action = 'index.php';
		document.nlregform.subname.name = 'action';
		document.nlregform.whattodo.value = 'usun';
		document.nlregform.submit();
	}

	
	
		function sprawdzlogin()
	{
		if (document.log.login.value == '')
		{
			alert('Proszę podać login');
			document.log.login.focus();
			return;
		}
  
  if (document.log.haslo.value == '')	
		{
			alert('Proszę podać haslo');
			document.log.login.focus();
			return;
		}
		
		document.log.action = 'system/index.php';
		document.log.submit();
	}
	
	
	
	function zapisz()
	{
		if (document.nlregform.email.value == '')
		{
			alert('Proszę podać adres email');
			document.nlregform.email.focus();
			return;
		}
		if (!isEmailAddr(document.nlregform.email.value))
		{
			alert('Proszę podać prawidłowy email');
			document.nlregform.adres_email.focus();
			return;
		}
		
		document.nlregform.action = 'index.php';
		document.nlregform.subname.name = 'action';
		document.nlregform.whattodo.value = 'zapisz';
		document.nlregform.submit();
	}
	
	
	function sprawdzPole(pole,komunikat){
  pole=document.getElementById(pole).value;
  if(!pole || pole=='' || pole==undefined)
    return komunikat;
  else
    return '';
}

function checkFormZapytanieOgolne(){


var komunikat='';

  komunikat+=sprawdzPole('login',"- Podaj login\n");
  komunikat+=sprawdzPole('haslo',"- Podaj haslo\n");

  

  if(komunikat!=''){
    alert("Wypełnij wymagane pola:\n\n"+komunikat);
    return false;
  }
  else{
    return true;
  }
}
	
	
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		menu_n_01_over = newImage("images/menu_n_01-over.gif");
		menu_n_03_over = newImage("images/menu_n_03-over.gif");
		menu_n_05_over = newImage("images/menu_n_05-over.gif");
		menu_n_07_over = newImage("images/menu_n_07-over.gif");
		menu_n_09_over = newImage("images/menu_n_09-over.gif");
		menu_n_11_over = newImage("images/menu_n_11-over.gif");
		menu_n_13_over = newImage("images/menu_n_13-over.gif");
		preloadFlag = true;
	}
}

	
	
	
	
	
	
	
	

function PokazPrzedstawicieli(id)
{
$('#przedstawiciele').empty();

	jQuery.get("przedstawiciele.php?lang=pl", { id: id },
		function(data)
		{
		   	$('#przedstawiciele').empty();
		        $('#przedstawiciele').html(data);
  		}
	);
	
 
  //	jQuery('#przedstawiciele').show();
 
 //jQuery('#mapka').hide();
	 
	
}


function PokazMapke()
{

 	jQuery('#przedstawiciele').hide();	
 jQuery('#mapka').show();
	 
	
}


 



// -->
