function nahled(aaa, wi, he) {
prewiev = window.open('',aaa,'toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,width='+ wi +',height='+ he +',left=0,top=0');
prewiev.document.open();
prewiev.document.write("<html><head>");
prewiev.document.write("<title>"+aaa+"</title></head>");
prewiev.document.write("<body bgcolor=#ffffff />");
prewiev.document.write("<a href=javascript:onClick=window.close()><img src="+aaa+" border='0' alt='Kliknutím obrázek zavřete' /></a>");
prewiev.document.write("</body></html>");
prewiev.document.close();
}

var path = "pic/vw/";

if (document.images) {
     polo= new Image ();
     polo.src= "pic/vw/polo.jpg";
     
     golf= new Image ();
     golf.src= "pic/vw/golf.jpg";
     
     beetle= new Image ();
     beetle.src= "pic/vw/beetle.jpg";
     
     bora= new Image ();
     bora.src= "pic/vw/bora.jpg";
     
     touran= new Image ();
     touran.src= "pic/vw/touran.jpg";
     
     passat= new Image ();
     passat.src= "pic/vw/passat.jpg";
     
     sharan= new Image ();
     sharan.src= "pic/vw/sharan.jpg";
     
     touareg= new Image ();
     touareg.src= "pic/vw/touareg.jpg";
     
     phaeton= new Image ();
     phaeton.src= "pic/vw/phaeton.jpg";
     
     multivan= new Image ();
     multivan.src= "pic/vw/multivan.jpg";
     
     california= new Image ();
     california.src= "pic/vw/california.jpg";
     
     caddy= new Image ();
     caddy.src= "pic/vw/caddy.jpg";
     
     transporter= new Image ();
     transporter.src= "pic/vw/transporter.jpg";
     
     lt= new Image ();
     lt.src= "pic/vw/lt.jpg";

      
}

function PushOn(image_name) {
        if (document.images) {
         document.images.stred.src = path+image_name+".jpg";
 }
}

re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,4}$/;

function kontrola_servis() {
	 if (document.termin.jmeno.value== ""){
		alert("Prosím, vložte jméno.");
    document.termin.jmeno.focus();
    document.termin.jmeno.select();
		return false;
		}	
		if (document.termin.prijmeni.value== ""){
		alert("Prosím, vložte příjmení.");
    document.termin.prijmeni.focus();
    document.termin.prijmeni.select();
		return false;
		}	
		if (document.termin.tel.value== ""){
		alert("Prosím, vložte telefon.");
    document.termin.tel.focus();
    document.termin.tel.select();
		return false;
		}	
		
 if (document.termin.email.value==""){
			alert("Prosím, vložte svůj e-mail.");
    	document.termin.email.focus();
    	document.termin.email.select();
			return false;
			}
//	Kontrola e-mailu
	if ( document.termin.email.value !="" ) {
		if (re.test(document.termin.email.value) == 0) {
			alert ("E-mailová adresa není správná.");
			document.termin.email.focus();
			document.termin.email.select();
			return false;
		}
	 }
}

function kontrola_dotazy() {
	 if (document.uprav.textik.value== ""){
		alert("Prosím, vložte text.");
    document.uprav.textik.focus();
    document.uprav.textik.select();
		return false;
		}	
		
 if (document.uprav.email.value==""){
			alert("Prosím, vložte svůj e-mail.");
    	document.uprav.email.focus();
    	document.uprav.email.select();
			return false;
			}
//	Kontrola e-mailu
	if ( document.uprav.email.value !="" ) {
		if (re.test(document.uprav.email.value) == 0) {
			alert ("E-mailová adresa není správná.");
			document.uprav.email.focus();
			document.uprav.email.select();
			return false;
		}
	 }
}


function kontrolaziv() {
	if (document.uprav.mamzajemo.value==""){
		alert("Prosím, vložte pozici, o kterou máte zájem.");
    document.uprav.mamzajemo.focus();
    document.uprav.mamzajemo.select();
		return false;
		}
	if (document.uprav.jmeno.value==""){
		alert("Prosím, vložte jméno.");
    document.uprav.jmeno.focus();
    document.uprav.jmeno.select();
		return false;
		}
	if (document.uprav.prijmeni.value==""){
		alert("Prosím, vložte příjmení.");
    document.uprav.prijmeni.focus();
    document.uprav.prijmeni.select();
		return false;
		}
	if (document.uprav.kontaktniadresa.value==""){
		alert("Prosím, vložte adresu.");
    document.uprav.kontaktniadresa.focus();
    document.uprav.kontaktniadresa.select();
		return false;
		}
	if (document.uprav.datumnarozeni.value==""){
		alert("Prosím, vložte datum narození.");
    document.uprav.datumnarozeni.focus();
    document.uprav.datumnarozeni.select();
		return false;
		}
	if (document.uprav.telefon.value==""){
		alert("Prosím, vložte telefon.");
    document.uprav.telefon.focus();
    document.uprav.telefon.select();
		return false;
		}
 if (document.uprav.email.value==""){
			alert("Prosím, vložte e-mail.");
    	document.uprav.email.focus();
    	document.uprav.email.select();
			return false;
			}
			
	if ( document.uprav.email.value !="" ) {
		if (re.test(document.uprav.email.value) == 0) {
			alert ("E-mailová adresa není správná.");
			document.uprav.email.focus();
			document.uprav.email.select();
			return false;
		}
	 }

}

function kontrolaziv2() {
	if (document.uprav.pozice.value==""){
		alert("Prosím, vložte pozici, o kterou máte zájem.");
    document.uprav.pozice.focus();
    document.uprav.pozice.select();
		return false;
		}
	if (document.uprav.jmeno.value==""){
		alert("Prosím, vložte jméno.");
    document.uprav.jmeno.focus();
    document.uprav.jmeno.select();
		return false;
		}
	if (document.uprav.telefon.value==""){
		alert("Prosím, vložte telefon.");
    document.uprav.telefon.focus();
    document.uprav.telefon.select();
		return false;
		}
 if (document.uprav.email.value==""){
			alert("Prosím, vložte e-mail.");
    	document.uprav.email.focus();
    	document.uprav.email.select();
			return false;
			}
			
	if ( document.uprav.email.value !="" ) {
		if (re.test(document.uprav.email.value) == 0) {
			alert ("E-mailová adresa není správná.");
			document.uprav.email.focus();
			document.uprav.email.select();
			return false;
		}
	 }
}

function kontrolanovinky() {
	if (document.upravnov.jmeno.value==""){
		alert("Prosím, vložte jméno.");
    document.upravnov.jmeno.focus();
    document.upravnov.jmeno.select();
		return false;
		}
 if (document.upravnov.email.value==""){
			alert("Prosím, vložte e-mail.");
    	document.upravnov.email.focus();
    	document.upravnov.email.select();
			return false;
			}
			
	if ( document.upravnov.email.value !="" ) {
		if (re.test(document.upravnov.email.value) == 0) {
			alert ("E-mailová adresa není správná.");
			document.upravnov.email.focus();
			document.upravnov.email.select();
			return false;
		}
	 }
}

function kontrolanovinkyen() {
	if (document.upravnov.jmeno.value==""){
		alert("Please, enter your name.");
    document.upravnov.jmeno.focus();
    document.upravnov.jmeno.select();
		return false;
		}
 if (document.upravnov.email.value==""){
			alert("Please, enter your email.");
    	document.upravnov.email.focus();
    	document.upravnov.email.select();
			return false;
			}
			
	if ( document.upravnov.email.value !="" ) {
		if (re.test(document.upravnov.email.value) == 0) {
			alert ("Email address is not correct.");
			document.upravnov.email.focus();
			document.upravnov.email.select();
			return false;
		}
	 }
}

function kontrolaucebna() {
	if (document.uprav.jmeno.value==""){
		alert("Prosím, vložte jméno.");
    document.uprav.jmeno.focus();
    document.uprav.jmeno.select();
		return false;
		}
 if (document.uprav.email.value==""){
			alert("Prosím, vložte e-mail.");
    	document.uprav.email.focus();
    	document.uprav.email.select();
			return false;
			}
			
	if ( document.uprav.email.value !="" ) {
		if (re.test(document.uprav.email.value) == 0) {
			alert ("E-mailová adresa není správná.");
			document.uprav.email.focus();
			document.uprav.email.select();
			return false;
		}
	 }		
		
	if (document.uprav.telefon.value==""){
		alert("Prosím, vložte telefon.");
    document.uprav.telefon.focus();
    document.uprav.telefon.select();
		return false;
		}
}

function kontrola() {
 if (document.uprav.email.value==""){
			alert("Prosím, vložte svůj e-mail.");
    	document.uprav.email.focus();
    	document.uprav.email.select();
			return false;
			}
//	Kontrola e-mailu
	if ( document.uprav.email.value !="" ) {
		if (re.test(document.uprav.email.value) == 0) {
			alert ("E-mailová adresa není správná.");
			document.uprav.email.focus();
			document.uprav.email.select();
			return false;
		}
	 }
	 if (document.uprav.oborzajmu.value==""){
		alert("Prosím, vložte obor, o který máte zájem.");
    document.uprav.oborzajmu.focus();
    document.uprav.oborzajmu.select();
		return false;
		}
	 if (document.uprav.poznamka.value== ""){
		alert("Prosím, vložte poznámku.");
    document.uprav.poznamka.focus();
    document.uprav.poznamka.select();
		return false;
		}	

}

function kontrolakariera() {
	 if (document.uprav.jmeno.value==""){
		alert("Prosím, vložte své jméno.");
    document.uprav.jmeno.focus();
    document.uprav.jmeno.select();
		return false;
		}
		if (document.uprav.prijmeni.value==""){
		alert("Prosím, vložte své příjmení.");
    document.uprav.prijmeni.focus();
    document.uprav.prijmeni.select();
		return false;
		}
    if (document.uprav.telefon.value==""){
		alert("Prosím, vložte svůj telefon.");
    document.uprav.telefon.focus();
    document.uprav.telefon.select();
		return false;
		}
    if (document.uprav.email.value==""){
			alert("Prosím, vložte svůj e-mail.");
    document.uprav.email.focus();
    document.uprav.email.select();
			return false;
			}
//	Kontrola e-mailu
	if ( document.uprav.email.value !="" ) {
		if (re.test(document.uprav.email.value) == 0) {
			alert ("E-mailová adresa není správná.");
			document.uprav.email.focus();
			document.uprav.email.select();
			return false;
		}
	 }

}

function kontrolasearch() {
	co=document.hledat.co.value;
if (co == "" || co.length < 3){
			alert("Prosím, vložte minimálně 3 znaky");
		  document.hledat.co.focus();
  		document.hledat.co.select();
			return false;
}
}

function nahled3(aaa) {
	prewiev2 = window.open('pic/obrazek.html?'+aaa,'nahledy','toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,width=200,height=100,left=10,top=10');
	prewiev2.window.focus();
}

