/**
 *
 * @access public
 * @return void
 **/
function on_click(href){
	document.location.href = href;
}
function bij_kosz(form, akcja, p_id, k_id, ilosc){
	sztos = "";
	if (akcja != "") {
		sztos+= '<input type="hidden" id="akcja" name="akcja" value="'+akcja+'" />';
	}
	if (p_id != "") {
		sztos+= '<input type="hidden" id="p_id" name="p_id" value="'+p_id+'" />';
	}
	if (k_id != "") {
		sztos+= '<input type="hidden" id="k_id" name="k_id" value="'+k_id+'" />';
	}
	if (ilosc != "") {
		sztos+= '<input type="hidden" id="ilosc" name="ilosc" value="'+ilosc+'" />';
	}
	if (form != "") {
		document.getElementById('elhidden').innerHTML = sztos;
		document.getElementById(form).submit();
	} else alert("Nieprawidłowy Formularz");
}
function bij_ilosc(target, max_ilosc, koszyk_ilosc){
	zapodano = document.getElementById(target).value;
	if (zapodano > max_ilosc) {
		inlineMsg(target,'Przepraszamy, ale stan magazynowy<br />w tej chwili wynosi '+max_ilosc+' szt.',4);
		document.getElementById(target).value = max_ilosc;
	}
	if (zapodano != '' && !zapodano.match(/^([0-9/w]+)$/)) {
		inlineMsg(target,'Tylko cyfry...',4);
		document.getElementById(target).value = koszyk_ilosc;
	}
}
function input_switch(obj_name, display_type, bt_type) {
	if (display_type != 'none' && br == 'fuckinIE') {
		display_type = 'block';
	} else display_type = display_type;
	obj=document.getElementById(obj_name);
	if (bt_type == 'cheeck') {
		if (obj.style.display == display_type) {obj.style.display = "none";}
		else {obj.style.display = display_type;}
	}
	if (bt_type == 'radio') {
		obj.style.display = display_type;
	}
}
function auto_switch(obj_name, img_id, lnk_id) {
	obj=document.getElementById(obj_name);
	obj_img = document.getElementById(img_id);
	obj_lnk = document.getElementById(lnk_id);
	if (obj.style.display == "block") {obj.style.display = "none"; obj_img.src = "pliki_graficzne/wiecej.png"; obj_img.alt = "rozwiń..."; obj_lnk.title = "rozwiń...";}
	else {obj.style.display = "block"; obj_img.src = "pliki_graficzne/mniej.png"; obj_img.alt = "zwiń..."; obj_lnk.title = "zwiń...";}
}
function szyjFlash(movie, wdth, hght, bgnd, idName, cel, fVars) {
       obj_setFlash = document.getElementById(cel);
       objTag = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+wdth+'" height="'+hght+'" id="'+idName+'">';
       paramTag = '<param name="movie" value="'+movie+'" />'+(bgnd != ''?'<param name="bgcolor" value="'+bgnd+'" />':'')+'<param name="quality" value="best" /><param name="allowscriptaccess" value="always" /><param name="menu" value="false" /><param name="flashvars" value="'+fVars+'" />'+(bgnd != ''?'<param name="wmode" value="transparent" />':'')+'</object>';
       if (typeof HTMLElement != "undefined") {
              obj = document.createElement("object");
              obj.setAttribute("data", movie);
              obj.setAttribute("type", "application/x-shockwave-flash");
              obj.setAttribute("width", wdth);
              obj.setAttribute("height", hght);
              obj.setAttribute("id", idName);
              par = document.createElement("param");
              par.setAttribute("name", "quality");
              par.setAttribute("value", "best");
              obj.appendChild(par);
              if (bgnd != '') {
	              par = document.createElement("param");
	              par.setAttribute("name", "bgcolor");
	              par.setAttribute("value", bgnd);
	              obj.appendChild(par);
              }
              par = document.createElement("param");
              par.setAttribute("name", "menu");
              par.setAttribute("value", "false");
              obj.appendChild(par);
              if (fVars != "") {
	              par = document.createElement("param");
	              par.setAttribute("name", "FlashVars");
	              par.setAttribute("value", fVars);
				  obj.appendChild(par);
              }
              if (bgnd != '') {
	              par = document.createElement("param");
	              par.setAttribute("name", "WMode");
	              par.setAttribute("value", "Transparent");
	              obj.appendChild(par);
              }
              par = document.createElement("param");
              par.setAttribute("name", "scale");
              par.setAttribute("value", "noborder");
              obj.appendChild(par);
              par = document.createElement("param");
              par.setAttribute("name", "allowscriptaccess");
              par.setAttribute("value", "always");
              obj.appendChild(par);
              par = document.createElement("param");
              par.setAttribute("name", "pluginspage");
              par.setAttribute("value", "http://www.macromedia.com/go/getflashplayer");
              obj.appendChild(par);
              obj_setFlash.appendChild(obj);
       } else {
              obj_setFlash.insertAdjacentHTML('beforeEnd',objTag+paramTag);
       }
}
function mapka() {
	google.load("maps", "2.x");
	function initialize() {
	var map = new google.maps.Map2(document.getElementById("mapa"));
	map.setCenter(new google.maps.LatLng(52.403453,20.924363), 15);
	map.addControl(new GSmallMapControl());
	map.addControl(new GOverviewMapControl());
	var WINDOW_HTML = '<div style="width: 200px; font-size: 14px; font-weight: bold;"><br />ALBATROS<br />ul. ks. Skorupki 28</div>';
	var marker = new GMarker(new GLatLng(52.403453,20.924363));
	map.addOverlay(marker);
	GEvent.addListener(marker, "click", function() {
	marker.openInfoWindowHtml(WINDOW_HTML);
	});
	marker.openInfoWindowHtml(WINDOW_HTML);
	}
	google.setOnLoadCallback(initialize);
}