

function popup_image(url,width,height,title,webroot_relative,lang)

{
  popuwindow=window.open(webroot_relative+'/pages/fullsize_image.php?img='+url+'&title='+title+'&lang='+lang,'','resizable=1,width='+width+',height='+height+'');

}

function popup_comp_details(id,webroot_relative)

{

  popuwindow=window.open(''+webroot_relative+'/index.php?page_name=comp_details&id='+id+'','','resizable=0,width=400,height=600');

  popuwindow.document.close();

}

//Kontrola správnosti emailové adresy



function check_and_submit_email_form(lang)

{



 //Testování správnosti emailové adresy



 var s = document.email_form.email.value;

 var a = false;

 var res = false;

 if(typeof(RegExp) == 'function')

 {

  var b = new RegExp('abc');

  if(b.test('abc') == true){a = true;}

  }



 if(a == true)

 {

  reg = new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)'+

                   '(\\@)([a-zA-Z0-9\\-\\.]+)'+

                   '(\\.)([a-zA-Z]{2,4})$');

  res = (reg.test(s));

 }

 else

 {

  res = (s.search('@') >= 1 &&

         s.lastIndexOf('.') > s.search('@') &&

         s.lastIndexOf('.') >= s.length-5)

 }





 //Pokud je tvar adresy správně, odešle se formulář ke zpracování



 if (res==true)

 {

  document.email_form.submit();

  if (lang == "cz") {

		document.email_form.send_button.value = 'Odesílá se...';

	}

	if (lang == "en") {

		document.email_form.send_button.value = 'Submitting...';

	}

  document.email_form.send_button.disabled = true;

 }

 else

 {

	if (lang == "cz") {

		window.alert('Neplatná emailová adresa');

	}

	if (lang == "en") {

		window.alert('Invalid email address');

	}

 }

}

function HideInfoMessage()

{

  document.getElementById("info_message").style.visibility = "hidden";

}

//-->
