



function openWindowvybavaclena() {
eforms = window.open("","window",'toolbar=0,location=0,scrollbars=yes,width=530,height=450,resizable=1,left=10,top=10');
eforms.focus()
}



function otevriokno() {
eforms = window.open("","window",'toolbar=0,location=0,scrollbars=yes,width=690,height=570,resizable=1,left=10,top=10');
eforms.focus()
}
function otevrioknodovoz() {
eforms = window.open("","window",'toolbar=0,location=0,scrollbars=yes,width=830,height=570,resizable=1,left=10,top=10');
eforms.focus()
}
function otevrioknovybava() {
eforms = window.open("","window",'toolbar=0,location=0,scrollbars=yes,width=1020,height=700,resizable=1,left=10,top=10');
eforms.focus()
}
function otevrioknofoto() {
eforms = window.open("","window",'toolbar=0,location=0,scrollbars=yes,width=1110,height=800,resizable=1,left=10,top=1');
eforms.focus()
}

function leasing(formular) {
	var povinne = {
		jmeno: "Zadejte prosím  Vaše jméno a příjmení",
		telefon: "Zadejte prosím své telefonní spojení",
		znacka: "Vyplňte značku vozu",
		rok: "Vyplňte rok výroby vozu",
		kupnicena: "Vyplňte kupní cenu vozu",
		akontace: "Vyplňte požadovanou akontaci"
	};
	
	var vyrazy = {
	telefon: [/[0-9]$/, "Telefon udávejte pouze v celých čísel - bez znamének"]
	};
	for (name in povinne)
		if (!formular[name].value) {
			alert(povinne[name]);
			formular[name].focus();
			return false;
		} else if (vyrazy[name] && !vyrazy[name][0].test(formular[name].value)) {
			alert(vyrazy[name][1]);
			formular[name].focus();
			return false;
		}

	return true;
}


function vlozclena(formular) {
	var povinne = {
		cena: "Zadejte cenu vozu"	};
	
	var vyrazy = {
	 	};
	for (name in povinne)
		if (!formular[name].value) {
			alert(povinne[name]);
			formular[name].focus();
			return false;
		} else if (vyrazy[name] && !vyrazy[name][0].test(formular[name].value)) {
			alert(vyrazy[name][1]);
			formular[name].focus();
			return false;
		}

	return true;
}
