/* Programmed by Inetworks.cz - tvorba internetových aplikací na míru  */
/* http://www.inetworks.cz | info@inetworks.cz */
/* (c) 2007 All rights reserved. */

function controlA(form)
{
  if (form.mail.value == "") {
    alert( "Zadejte prosím Váš e-mail." );
    form.mail.focus();
    return false ;
  }
  if (form.mail.value != "")
  {	
  		var hodnota=form.mail.value;
		var regular=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
		if (!(regular.test(hodnota)))
		{
			alert("Zkontrolujte prosím správnost Vaši e-mailové adresy.");
			form.mail.focus();
			return false;
		}
	}
	return true ;
}

function controlB(form)
{
  if (form.suma.value == "") {
    alert( "Zadejte prosím částku." );
    form.suma.focus();
    return false ;
  }
  return true ;
}

function controlC(form)
{
  if (form.jmeno.value == "") {
    alert( "Zadejte prosím Vaše jméno." );
    form.jmeno.focus();
    return false ;
  }
  if (form.msg.value == "") {
    alert( "Zadejte prosím text Vašeho dotazu." );
    form.msg.focus();
    return false ;
  }
  if (form.mail.value == "")
  {	
  	var hodnota=form.mail.value;
		var regular=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
		if (!(regular.test(hodnota)))
		{
			alert("Zkontrolujte prosím správnost Vaši e-mailové adresy.");
			form.mail.focus();
			return false;
		}
	}
  return true ;
}

function setCurrentPic(pic_name)
{
  current_pic = pic_name;
}

function bigPic(current_pic)
{
  current_pic = 'http://www.euroexchange.cz/img/photos/big/'+current_pic;
  l = (window.screen.availWidth-660)/2;
  t = (window.screen.availHeight-500)/2; 
  okno = window.open(current_pic,'obrazek','width=660,height=500,top='+t+',left='+l+',resizable=yes,toolbar=no,location=no,scrollbars=yes');
  okno.focus();
}

function bigPicB(current_picB)
{
  current_picB = 'http://www.euroexchange.cz/img/photos/big/'+current_picB;
  l = (window.screen.availWidth-660)/2;
  t = (window.screen.availHeight-500)/2; 
  oknoB = window.open(current_picB,'obrazek','width=660,height=500,top='+t+',left='+l+',resizable=yes,toolbar=no,location=no,scrollbars=yes');
  oknoB.focus();
}

function bigPicC(current_picC)
{
  current_picC = 'http://www.euroexchange.cz/img/photos/big/'+current_picC;
  l = (window.screen.availWidth-660)/2;
  t = (window.screen.availHeight-500)/2; 
  oknoC = window.open(current_picC,'obrazek','width=660,height=500,top='+t+',left='+l+',resizable=yes,toolbar=no,location=no,scrollbars=yes');
  oknoC.focus();
}

function bigPicF(current_picF)
{
  current_picF = 'http://www.euroexchange.cz/img/photos/big/'+current_picF;
  l = (window.screen.availWidth-660)/2;
  t = (window.screen.availHeight-500)/2; 
  oknoF = window.open(current_picF,'obrazek','width=660,height=500,top='+t+',left='+l+',resizable=yes,toolbar=no,location=no,scrollbars=yes');
  oknoF.focus();
}

function bigPicG(current_picG)
{
  current_picG = 'http://www.euroexchange.cz/img/photos/big/'+current_picG;
  l = (window.screen.availWidth-660)/2;
  t = (window.screen.availHeight-500)/2; 
  oknoG = window.open(current_picG,'obrazek','width=660,height=500,top='+t+',left='+l+',resizable=yes,toolbar=no,location=no,scrollbars=yes');
  oknoG.focus();
}

function bigPicH(current_picH)
{
  current_picH = 'http://www.euroexchange.cz/img/photos/big/'+current_picH;
  l = (window.screen.availWidth-660)/2;
  t = (window.screen.availHeight-500)/2; 
  oknoH = window.open(current_picH,'obrazek','width=660,height=500,top='+t+',left='+l+',resizable=yes,toolbar=no,location=no,scrollbars=yes');
  oknoH.focus();
}

function pic(pic_name, width, height, alt)
{						
	current_pic = pic_name;
	var photo_mid = GID('photo_mid');
	
  cesta = 'img/photos/mid/'+pic_name;
	
  photo_mid.width = width;
	photo_mid.alt = alt;
	photo_mid.title = alt;
	photo_mid.height = height;
  photo_mid.src = cesta;
	
  return;
}

function picB(pic_name, width, height, alt)
{						
	current_picB = pic_name;
	
	var photo_mid = GID('photo_mid_b');
	
  cesta = 'img/photos/mid/'+pic_name;
	
  photo_mid.width = width;
	photo_mid.alt = alt;
	photo_mid.title = alt;
	photo_mid.height = height;
  photo_mid.src = cesta;
	
  return;
}

function picC(pic_name, width, height, alt)
{						
	current_picC = pic_name;
	
	var photo_mid = GID('photo_mid_c');
	
  cesta = 'img/photos/mid/'+pic_name;
	
  photo_mid.width = width;
	photo_mid.alt = alt;
	photo_mid.title = alt;
	photo_mid.height = height;
  photo_mid.src = cesta;
	
  return;
}

function picF(pic_name, width, height, alt)
{						
	current_picF = pic_name;
	
	var photo_mid = GID('photo_mid_f');
	
  cesta = 'img/photos/mid/'+pic_name;
	
  photo_mid.width = width;
	photo_mid.alt = alt;
	photo_mid.title = alt;
	photo_mid.height = height;
  photo_mid.src = cesta;
	
  return;
}
function picG(pic_name, width, height, alt)
{						
	current_picG = pic_name;
	
	var photo_mid = GID('photo_mid_g');
	
  cesta = 'img/photos/mid/'+pic_name;
	
  photo_mid.width = width;
	photo_mid.alt = alt;
	photo_mid.title = alt;
	photo_mid.height = height;
  photo_mid.src = cesta;
	
  return;
}
function picH(pic_name, width, height, alt)
{						
	current_picH = pic_name;
	
	var photo_mid = GID('photo_mid_h');
	
  cesta = 'img/photos/mid/'+pic_name;
	
  photo_mid.width = width;
	photo_mid.alt = alt;
	photo_mid.title = alt;
	photo_mid.height = height;
  photo_mid.src = cesta;
	
  return;
}

function GID(nazev)
{
  return document.getElementById(nazev);
}
