function zvacsi(image)
{
	var URL = "index_obsah_vnutri_obrazok.php?podstranka=obrazok&url_obrazka=" + image;
	window.open(URL,'','toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,copyhistory=no,height=600px,width=800px');
}

function upozornit_znameho(id)
{
	var URL = "index_obsah_vnutri_upozornit_znameho.php?podstranka=upozornit_znameho&id_knihy=" + id;
	window.open(URL,'','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,height=520px,width=550px');
}

function fakturacna_adresa()
{
	var input = document.getElementById("index_obsah_vnutri_kosik_formular").meno_fakturacna;
		if(input.disabled == true) input.disabled = false; else input.disabled = true;
	input =  document.getElementById("index_obsah_vnutri_kosik_formular").ulica_fakturacna;
		if(input.disabled == true) input.disabled = false; else input.disabled = true;
	input =  document.getElementById("index_obsah_vnutri_kosik_formular").obec_fakturacna;
		if(input.disabled == true) input.disabled = false; else input.disabled = true;
	input =  document.getElementById("index_obsah_vnutri_kosik_formular").psc_fakturacna;
		if(input.disabled == true) input.disabled = false; else input.disabled = true;
	input =  document.getElementById("index_obsah_vnutri_kosik_formular").krajina_fakturacna;
		if(input.disabled == true) input.disabled = false; else input.disabled = true;	
}

function skoc_na_vysledky()
{
	window.location = "#index_obsah_vnutri_vysledky";
}

function velkost_okna()
{
	var intWidth;
	var intHeight;
	intWidth = document.getElementById('foto').width;
	intHeight = document.getElementById('foto').height;
	if(intWidth > 800 && intHeight > 600)
	{
		window.resizeTo(800,600);
	}
	else
	{
		window.resizeTo(intWidth+10,intHeight+45);		
	}
}

function kosik_skontrolovat_udaje()
{
	if (document.getElementById('index_obsah_vnutri_kosik_formular').meno.value.length == 0 ||
		document.getElementById('index_obsah_vnutri_kosik_formular').email.value.length == 0 ||
		document.getElementById('index_obsah_vnutri_kosik_formular').ulica.value.length == 0 ||
		document.getElementById('index_obsah_vnutri_kosik_formular').obec.value.length == 0)
		{
			alert("Vypl\u0148te, prosím, položky Meno, Email, Ulica a Obec");
			return false;
		}
		else
		{
			return true;
		}
}

function kosik_zvyraznit_vyber()
{
	//var tr = document.getElementsByTagName("span");
	if(document.getElementById("sposob_dorucenia_posta").checked == true)
	{
		document.getElementById("posta").style.backgroundColor = "#e0e0e0";
		document.getElementById("osobny_odber").style.backgroundColor = "#e9ebeb";
		document.getElementById("kurier").style.backgroundColor = "#e9ebeb";
	}
	if(document.getElementById("sposob_dorucenia_osobny_odber").checked == true)
	{
		document.getElementById("posta").style.backgroundColor = "#e9ebeb";
		document.getElementById("osobny_odber").style.backgroundColor = "#e0e0e0";
		document.getElementById("kurier").style.backgroundColor = "#e9ebeb";
	}
	if(document.getElementById("sposob_dorucenia_kurier").checked == true)
	{
		document.getElementById("posta").style.backgroundColor = "#e9ebeb";
		document.getElementById("osobny_odber").style.backgroundColor = "#e9ebeb";
		document.getElementById("kurier").style.backgroundColor = "#e0e0e0";		
	}
}
