	function checkSub(kat, ids, idp, named) {
		var poleIdSub = ids.split(";");
		var poleIdPar = idp.split(";");
		var poleName = named.split(";");

		i = 0;
		j = 0;

		document.formular.subkategorie.options.length = 0;
		document.formular.subkategorie.options[0] = new Option('--- zvolte ---', 0, true, false);
		document.getElementById('sub').style.display='none';

		for(i=0;i<poleIdPar.length;i++){
			if (poleIdPar[i] == kat) {
				j++;
				document.formular.subkategorie.options[j] = new Option(poleName[i], poleIdSub[i], false, false);
				document.getElementById('sub').style.display='block';
			}
		}
	}

	function print_detail(id_polozky, language) {
		w = 700;
		h = 600;
		meta_h = 40;

		wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
		wleft = Math.round((screen.width - w) / 2);
			
		info = window.open('http://localhost/print.php?DetID=' + id_polozky + '&lang=' + language, '', 'width=' + w + ', height=' + h + ',resizable=no,scrollbars=1,status=0,top=' + wtop + ',left=' + wleft);
	}


        function centred_window_scroll(theURL,w,h) {
			meta_h = 40;

			wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
			wleft = Math.round((screen.width - w) / 2);
			
			info = window.open(theURL, '', 'width=' + (w + 20) + ', height=' + (h + meta_h + 10) + ',resizable=no,scrollbars=1,status=0,top=' + wtop + ',left=' + wleft);
		}

        function centred_window_noscroll(theURL,w,h) {
			meta_h = 40;

			wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
			wleft = Math.round((screen.width - w) / 2);
			
			info = window.open(theURL, '', 'width=' + (w + 20) + ', height=' + (h + meta_h + 10) + ',resizable=no,scrollbars=0,status=0,top=' + wtop + ',left=' + wleft);
		}


		function large_picture(nam, file, w, h) {

			meta_h = 50;

			wtop = Math.round((screen.height - h - meta_h) / 2) - meta_h;
			wleft = Math.round((screen.width - w) / 2);
	
			pic = window.open('', '', 'width=' + (w + 20) + ', height=' + (h + meta_h + 10) + ',resizable=yes,top=' + wtop + ',left=' + wleft);
			pic.document.open();
			pic.document.writeln('\
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\
			"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\
		\
		<html>\
		<head>\
		<title>' + nam + '</title />\
		<BASE href="<?php echo $base ?>"> \
		<style type="text/css">\
		BODY { margin: 0px; background: white; }\
		</style>\
		</head>\
		<body>\
		<center>\
		<table align="center">\
		<tr height="6">\
			<td></td>\
		</tr>\
		</table>\
		<a href="javascript:window.close();" title="Kliknutím na obrázek okno zavřete"><img src="' + file + '" width="' + w + '" height="' + h + '" style="border-color: #484848;" alt="Kliknutím na obrázek okno zavřete" border="1"/></a>\
		</center>\
		<table align="center">\
		<tr>\
			<td style="text-align: center; font-family: Tahoma; font-size: 11px"><br>' + nam +'</td>\
		</tr>\
		</table>\
		</body>\
		</html>\
		');
			pic.document.close();
		}


function checkType(typ) {

	for(i=1;i<=4;i++) {
		document.getElementById('sel' + i).style.visibility='hidden';
		document.getElementById('sel' + i).style.display='none';
	}

	if (typ == '1' || typ=='6') {
		document.getElementById('sel1').style.visibility='visible';
		document.getElementById('sel1').style.display='block';
	}

	if (typ == '2' || typ=='3' || typ=='4') {
		document.getElementById('sel2').style.visibility='visible';
		document.getElementById('sel2').style.display='block';
	}

	if (typ == '5') {
		document.getElementById('sel3').style.visibility='visible';
		document.getElementById('sel3').style.display='block';
	}

	if (typ == '7') {
		document.getElementById('sel4').style.visibility='visible';
		document.getElementById('sel4').style.display='block';
	}
}


function hideElements(number, moved)  
{
//alert(moved);
	if (number == 1) {
		document.getElementById('info').style.display='none';
		document.getElementById('info2').style.display='none';
		document.getElementById('goodsBox').style.visibility='hidden';
		document.getElementById('clickBox').style.display='none';
		document.getElementById('menu').style.visibility='hidden';
		document.getElementById('menu2').style.backgroundImage='none';
	}
	else {
		document.getElementById('info').style.display='block';
		document.getElementById('info2').style.display='block';
		document.getElementById('goodsBox').style.visibility='visible';
		document.getElementById('clickBox').style.display='block';
		document.getElementById('menu').style.visibility='visible';
		document.getElementById('menu2').style.backgroundImage="url('images/arrow_menu.png')";
	}

}

function showPrice(number) {
	if (number == 0) {
		document.getElementById('price-buy').style.display='block';
		document.getElementById('price-buy2').style.display='none';
	}
	else {
		document.getElementById('price-buy').style.display='none';
		document.getElementById('price-buy2').style.display='block';
	}
}

function bookmark() {
title = "STREETSHOP.cz - prodej kolobot, oblečení a příslušenství značky HEELYS";
url = "http://www.streetshop.cz/";
if (window.sidebar) {
// Mozilla

//alert("You are using FireFox!");
window.sidebar.addPanel(title, url,"");
//alert("Script from mistonline.in");

} else if( window.external ) {
// IE Favorite
//alert("You are using IE");
window.external.AddFavorite( url, title);

//alert("Script from mistonline.in");
}
else if(window.opera && window.print) {
// Opera

return true;

//alert("Script from mistonline.in");
}
}