<!--

function OveritFormular(theField) {
	if ((theField.jmeno.value == '') || (theField.prijmeni.value == '') || (theField.telefon.value == '')) {
		alert('Před odesláním je nutné vyplnit jméno, příjmení a telefon!')
		if (theField.telefon.value == '')
			theField.telefon.focus()
		if (theField.prijmeni.value == '')
			theField.prijmeni.focus()
		if (theField.jmeno.value == '')
			theField.jmeno.focus()
		return false
	}  else {
		return true
	}  
}

function VlozitDoKosiku(item) {

	document.formular.produktID.value=item;

	//alert (document.formular.produktID.value);

	document.formular.submit();

}



// kontrola plicek

function zkontroluj(formular)

{

	

	if (formular.mail.value=="")

    {

        alert("E-mail musíte nejprve vyplnit!");

        formular.mail.focus();

        return false;

    }

	else if (window.RegExp)

    {

        re = new RegExp("^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$");

        if (!re.test(formular.mail.value))

        {

            alert("Zadaná adresa není správnou adresou elektronické pošty!");

            formular.mail.focus();

            return false;

        }

    }

    else 

        return true;

}



// otvirani popupu

function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}



function externalLinks() {

	if (!document.getElementsByTagName) return;

	var anchors = document.getElementsByTagName("a");

	for (var i=0; i<anchors.length; i++) {

		var anchor = anchors[i];

		if (anchor.getAttribute("href")) {

			switch (anchor.getAttribute("rel")) {

				case "external":

					anchor.target = "_blank";

					break;

				case "foto-popup":

					anchor.href = "javascript:MM_openBrWindow('" + anchor.href + "','','width=650,height=500');";

					break;

			}

		}

	}

}



function doPopup(url) {

	var o = window.open("about:blank", "popup", "width=250,height=150,fullscreen=0,scrollbars=0,toolbar=0,location=0,directories=0,status=0,menubar=0,copyhistory=0");

	var s = "<html>\n";

	s += "<head>\n";

	s += "<title>Detail</title>\n";

	s += "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1250\" />\n";

	s += "<meta http-equiv=\"Content-language\" content=\"cs\" />\n";

	s += "<meta http-equiv=\"expires\" content=\"-1\" />\n";

	s += "<meta http-equiv=\"pragma\" content=\"no-cache\" />\n";

	s += "<meta http-equiv=\"cache-control\" content=\"private\" />\n";

	s += "<style type=\"text/css\"><!-- @import url(style.css); --></style>\n";

	s += "</head>\n";

	s += "<body style=\"margin:0\">\n";

	s += "<h1 style=\"font-size:20px;font-family:sans-serif;width:250px;z-index:0;position:absolute;text-align:center;line-height:150px;\">Nahrávám obrázek...</h1>\n";

	s += "<a href=\"javascript:self.close();self.opener.focus();\"><img name=\"obrazek\" src=\"" + url + "\" style=\"border:0;z-index:1;position:absolute;\" onload=\"resizeTo(this.width, this.height+30)\" alt=\"Kliknutím zavřete okno\" /></a>\n";

	s += "</body>\n";

	s += "</html>";

	o.document.write(s);

	o.focus();

}



window.onload = externalLinks;

//-->

