// Show-hide (piem. autobusa sarakstam)
function show(Num){
	if (document.all){
		//IE;
		if (document.all[("div_" + Num)].className == "show_div") {
			document.all[("div_" + Num)].className = "hide_div";
		} else {
			document.all[("div_" + Num)].className = "show_div";
		}
		return true;
	}
	if (document.getElementById){
		//Mozilla;
		if (document.getElementById(("div_" + Num)).className == "show_div") {
			document.getElementById(("div_" + Num)).className = "hide_div";
		} else {
			document.getElementById(("div_" + Num)).className = "show_div";
		}
		return true;
	}
	return true;
};

// Galerija
function photo(Num){

	if (document.all){
		//IE;
		for (i=1;i<=16;i++) {
			if (document.all[("pic_" + i)] != null) {
				if (document.all[("pic_" + i)].className == "show_div") {
					document.all[("pic_" + i)].className = "hide_div";
				};
			};
		};

		if (document.all[("pic_" + Num)] != null) {
			document.all[("pic_" + Num)].className = "show_div";
		}
		return true;
	}
	if (document.getElementById){
		//Mozilla;
		for (i=1;i<=16;i++) {
			if (document.getElementById("pic_" + i) != null) {
				if (document.getElementById("pic_" + i).className == "show_div") {
					document.getElementById("pic_" + i).className = "hide_div";
				};
			};
		};
		
		if (document.getElementById("pic_" + Num) != null) {
			document.getElementById("pic_" + Num).className = "show_div";
		}
		return true;
	}
	return true;
};

// Autobusa saraksts
function plus(){
var i=0
	if (document.all){
		//IE;
		for (i=1;i<=8;i++) {
			if (document.all[("win_" + i)].className == "hide_div") {
				document.all[("win_" + i)].className = "show_div";
				return true
			}
		}
		alert("Ir sasniegts pasažieru limits (max 8)!")

		return true;
	}
	if (document.getElementById){
		//Mozilla;
		
		for (i=1;i<=8;i++) {
			if (document.getElementById(("win_" + i)).className == "hide_div") {
				document.getElementById(("win_" + i)).className = "show_div";
				return true
			}
		}
		alert("Ir sasniegts pasažieru limits (max 8)!")

		return true;
	}
	return true;
};
