
function ShowText(id) {
	document.getElementById(id).style.display = 'block';
}

function HideText(id) {
	document.getElementById(id).style.display = 'none';
}





var mylocation="objednavka.php";
var winheight=400
var winsize=200
var x=5

function go(){
win2=window.open("","","scrollbars")
if (!document.layers&&!document.all){
win2.location=mylocation
return
}
win2.resizeTo(100,100)
win2.moveTo(0,0)
go2()
}
function go2(){
if (winheight>=screen.availHeight-3)
x=0
win2.resizeBy(5,x)
winheight+=5
winsize+=5
if (winsize>=screen.width-5){
win2.location=mylocation
winheight=100
winsize=100
x=5
return
}
setTimeout("go2()",50)
}




function validate(formular) {

if (formular.meno.value=="")
{
 alert("Meno musíte vyplniť!");
 formular.meno.focus();
 return false;
}
else if (formular.verif_box.value=="")
{
 alert("Do formulárového políčka odpíšte z obrázku overovací kód!");
 formular.verif_box.focus();
 return false;
}
else if (formular.email.value=="")
{
 alert("Adresu elektronickej pošty musíte vyplniť!");
 formular.email.focus();
 return false;
}
else if (window.RegExp)
{
 re = new RegExp("^[^@]+@[^.]+\..+$");
 if (!re.test(formular.email.value))
 {
  alert("Zadaná adresa nie je správnou adresou elektronickej pošty!");
  formular.email.focus();
  return false;
 }
}
else
return true;
}







/* otvorenie linku v novom okne cez rel="external" */
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") && anchor.getAttribute("rel") == "external nofollow") ||
       (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external"))
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

















