var bookmarkurl = location.href;
var bookmarktitle = document.title;

document.write("<a name=domaci></a>");
function domaci() {
document.anchors[0].style.behavior='url(#default#homepage)';
document.anchors[0].setHomePage(bookmarkurl);
}

function fade(image) {
	image.style.filter="alpha(opacity=55)";
	}

function unfade(image) {
	image.style.filter="alpha(opacity=100)";
	}

function checkin(loop) {
od = 1000;
text = document.all['text'].value;
text += " . . . ";
for (i=od+1; i < (od+loop+1); i++) {
	ii = "bazar" + i;
	if(ns4) {
		oo = document.layers[ii].checked;
		on = document.layers[ii].value;
		}
		else if(ie4) {
			oo = document.all[ii].checked;
			on = document.all[ii].value;
			}
		else if(ie5 || ns6) {
			oo = document.getElementById(ii).checked;
			on = document.getElementById(ii).value;
			}
//	alert(i+":"+oo);
	text = text+ "\n "+ ii+":"+oo+"=["+on+"],\n ";
	}
if(ns4) {
	document.layers['text'].value = text;
	}
	else if(ie4) {
		document.all['text'].value = text;
		}
	else if(ie5 || ns6) {
		document.getElementById('text').value = text;
		}
}

function navigset(objekt) {
var navigace = objekt.value;
if (navigace != "") {
	page = "index.php?navigace=" + navigace;
	location.replace(page);
	}
}


function coloron(bunka,crgb0) {
crgb1 = '#ffffff';
if (crgb0 == 1) {
	crgb1 = '#ffffcc';
	}
bunka.style.backgroundColor = crgb1;
}

function coloroff(bunka) {
bunka.style.backgroundColor = "";
}



function obarvi(bunka) {
bunka.style.backgroundColor="#ffeecc";
}

function odbarvi(bunka) {
bunka.style.backgroundColor="";
}

panel2 = 0;
function panel() {
if (panel2 == 0) {
	hideobj("full");
	panel2 = 1;
	} else {
	showobj("full");
	panel2 = 0;
	}
}

function pagestatus(text) {
window.status = text;
}

function validate(formular){
if(formular.odesilatel.value=="@"){
	alert("Musíš vyplnit email.");
	formular.odesilatel.focus();
	return false;
	}
	else{
	return true;
	}
if(formular.text.value==""){
	alert("Musíš vyplnit zprávu.");
	formular.text.focus();
	return false;
	}
	else{
	return true;
	}
}



NS6 = (document.getElementById&&!document.all)
IE = (document.all)
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")

/*
alert("1"+NS6);
alert("2"+IE);
alert("3"+NS);
*/

var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);

volby = 0;
function volbyon() {
if (volby == 0 ) {
	hideobj("rychlaoff");
	showobj("rychlaon");
	volby = 1;
	} else {
	showobj("rychlaoff");
	hideobj("rychlaon");	
	volby = 0;
	}
}

function hideobj(id) {
// Netscape 4
if(ns4) {document.layers[id].display='none';}
	// Explorer 4
	else if(ie4) {document.all[id].style.display='none';}
	// W3C - Explorer 5+ and Netscape 6+
	else if(ie5 || ns6) {document.getElementById(id).style.display='none';}
}

function showobj(id) {
// Netscape 4
if(ns4) {document.layers[id].display='';}
	// Explorer 4
	else if(ie4) {document.all[id].style.display='';}
	// W3C - Explorer 5+ and Netscape 6+
	else if(ie5 || ns6) {document.getElementById(id).style.display='';}
}

var data = "";
function showimg(data) {
//	alert("["+data+"]");
if (data != '') {
	window.open(data, "", "menubar=no, directories=no, toolbar=no, location=yes, status=yes, scrollbars=yes, resizable=yes");
	}
}
