window.addEvent("domready", function() {
	// umiejscowienie grafiki
	/*
	var body_width = window.getWidth();
	var okno_content_width = $("okno_content").getSize().size.x;
	var image_width = $("top_image_left_outside").getSize().size.x;
	
	var leftt = parseInt((body_width - okno_content_width)/2) - image_width;

	if (leftt > 20) {
		$("top_image_left_outside").style.left = leftt + "px";
	}
	*/
	
	// pager
//	if ($("strony")) {
//		var strony = $("strony").innerHTML;
//		
//		strony = strony.replace(/Pierwsza/, "&laquo;");
//		strony = strony.replace(/Poprzednia/, "&lsaquo;");
//		
//		strony = strony.replace(/\[([0-9]+)\]/g, "$1");
//		
//		strony = strony.replace(/Następna/, "&rsaquo;");
//		strony = strony.replace(/Ostatnia/, "&raquo;");
//		
//		$("strony").innerHTML = strony;
//	}
});

function validateContactForm() {
	if (!($("contactSender").value.match(/^([a-zA-Z0-9_\.+-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,6})+$/))) {
		alert("Proszę wpisać poprawny adres e-mail.");
		return false;
	}
	else if ($("contactContent").value.length < 10) {
		alert("Proszę wpisać treść wiadomości.");
		return false;
	}

	return true;
}

function dropdown(obj) {

   if (document.getElementById(obj).style.display=='none' || document.getElementById(obj).style.display=='') {
     document.getElementById(obj).style.display='block';
   }
   else {
     document.getElementById(obj).style.display='none';
   }
}

