
function on_rollover(id) {
	document.getElementById('rollover').style.backgroundImage = "url(/img/over/"+id+".jpg)";
}
function off_rollover() {
	document.getElementById('rollover').style.backgroundImage = "url(/img/watch_rollover.gif)";
}

function InsertFlash(d,ident,Source,Width,Height)	{
d.write('<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0"" ID='+ident+' WIDTH='+Width+' HEIGHT='+Height+'> ');
d.write(' <PARAM NAME="movie" VALUE="'+Source+'">');
d.write(' <PARAM NAME="play" VALUE="true">');
d.write(' <PARAM NAME="quality" VALUE="best">');
d.write(' <EMBED NAME='+ident+' SRC="'+Source+'" WIDTH='+Width+' HEIGHT='+Height+' PLAY=true SWLIVECONNECT=true QUALITY=best>');
d.write('</OBJECT>');
}

function isFlash(ver) {
return true; // problem se zjistovanim verzi
var state = false;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : false;
if (plugin) {
	state = (parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= ver)? true : false;
}
else if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("MSIE 4") == -1 && navigator.appVersion.indexOf("Macintosh") == -1 && navigator.appVersion.indexOf("68K") == -1) {
	eval('try { var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + ver); state = true; } catch(e) {  }');
}
return state;
}

function zoom(id) {
	if (id=='vystava1' || id=='vystava2' || id=='vystava3')
	{
		window.open('/zoom?id='+id,'zoom','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1,width=700,height=520');
	}
	else window.open('/zoom?id='+id,'zoom','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1,width=400,height=700');
}

function changeBG(number) {
	document.getElementById('homepage-box').style.backgroundImage = 'url(/img/detail/'+number+'.jpg)';
}

function reminky(url) {
	window.open(url,'reminky','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1,width=700,height=520');
}

function checkRegistrace() {
	if (document.getElementById('jmeno').value == '')
	{
		alert("Vyplňte prosím jméno!");
		return false;
	}
	if (document.getElementById('prijmeni').value == '')
	{
		alert("Vyplňte prosím příjmení!");
		return false;
	}
	if (document.getElementById('email').value == '')
	{
		alert("Vyplňte prosím email!");
		return false;
	}
	if (document.getElementById('serial').value == '00')
	{
		alert("Vyplňte prosím sériové číslo!");
		return false;
	}
	if (document.getElementById('misto').value == '')
	{
		alert("Vyplňte prosím místo nákupu!");
		return false;
	}

	return true;
}

function faq_collapse(id) {

	if (document.getElementById("faq_"+id).style.display == "block")
	{
		document.getElementById("faq_"+id).style.display = "none";
		document.getElementById("collapse_"+id).style.background = "url('/img/faq_plus.gif') top left no-repeat";
	}
	else {
		document.getElementById("faq_"+id).style.display = "block";
		document.getElementById("collapse_"+id).style.background = "url('/img/faq_minus.gif') top left no-repeat";
	}
}
