function print(id)
      {
	var w=650;
	var h=690;
      var winleft = (screen.width - w) / 2;
	var wintop = (screen.height - h) / 2;
	
      var ogo=null;
      ogo=window.open("print.php?id="+id+"","Eden","left="+winleft+",top="+wintop+",width="+w+",height="+h+",scrollbars=1, resizable=1");


      ogo.focus();
       }
       
function view(){
  document.getElementById("dane").style.display='';
  document.getElementById("but").style.display='none';
}

function check(theForm)
{
  if (theForm.firma.value == "")
  {
   theForm.firma.style.background='#D62222';
   theForm.firma.focus();
   return (false);
  } else{
    theForm.firma.style.background='';
  }

  if (theForm.ulica.value == "")
  {
   theForm.ulica.style.background='#D62222';
   theForm.ulica.focus();
   return (false);
  } else{
    theForm.ulica.style.background='';
  }

  if (theForm.kod.value=="")
  {
    theForm.kod.style.background='#D62222';
    theForm.kod.focus();
    theForm.kod.value='';
   return (false);
  } else{
    theForm.kod.style.background='';
  }
  
  if (isNaN(theForm.kod.value)==true)
  {
    theForm.kod.style.background='#D62222';
    theForm.kod.focus();
    theForm.kod.value='';
   return (false);
  } else{
    theForm.kod.style.background='';
  }
  

  
  if (theForm.miasto.value == "")
  {
   theForm.miasto.style.background='#D62222';
   theForm.miasto.focus();
   return (false);
  } else{
    theForm.miasto.style.background='';
  }
  
   if (theForm.osoba_kontakt.value == "")
  {
   theForm.osoba_kontakt.style.background='#D62222';
   theForm.osoba_kontakt.focus();
   return (false);
  } else{
    theForm.osoba_kontakt.style.background='';
  }

  if (theForm.telefon.value=="")
  {
    theForm.telefon.style.background='#D62222';
    theForm.telefon.focus();
    theForm.telefon.value='';
   return (false);
  } else{
    theForm.telefon.style.background='';
  }
  
  if (isNaN(theForm.telefon.value)==true)
  {
    theForm.telefon.style.background='#D62222';
    theForm.telefon.focus();
    theForm.telefon.value='';
   return (false);
  } else{
    theForm.telefon.style.background='';
  }

  if (theForm.email.value == "")
  {
   theForm.email.style.background='#D62222';
   theForm.email.focus();
   return (false);
  } else{
    theForm.email.style.background='';
  }

   if(theForm.email.value != "")
   {
	
	   if (!email_validate(theForm.email.value))
	  {
	    alert("Veuillez Entrer une adresse e-mail valide.");
   		 theForm.email.focus();
		 return (false);
	  }
    }

   if (theForm.zgoda.checked == false)
     {
     alert("Cochez la case j’ai lu le règlement");
     return (false);
     }

  /*if (theForm.przetwarzanie.checked == false)
     {
     alert("Sélectionnez J accepte que mes données personnelles soient traitées strictement par l administrateur des");
     return (false);
     }  */
  	
	
  return (true);
}

function email_validate(src)
{
  var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
  return regex.test(src);
}

	function OnLoad(id) {
				var img = new Image();
				img.src = "gfx/order_over.gif";
				
				var tabs = mint.gui.CreateTabWidget("tabsContent");

				tabs.fading = true;
				tabs.activeClass = "active";
				tabs.hoverClass = "hover";
			
			      if(id==1)
			      {
		            tabs.AddItem("tab1", "tab1", "text", "fontaine_hod.php");
				tabs.AddItem("tab2", "tab2", "text", "fontaine_pou.php");
				tabs.AddItem("tab3", "tab3", "text", "cafe.php");
				tabs.AddItem("tab4", "tab4", "text", "accessoires.php");
				}else if(id==2){
				tabs.AddItem("tab2", "tab2", "text", "fontaine_pou.php");
				tabs.AddItem("tab1", "tab1", "text", "fontaine_hod.php");
				tabs.AddItem("tab3", "tab3", "text", "cafe.php");
				tabs.AddItem("tab4", "tab4", "text", "accessoires.php");
				}else if(id==3){
				tabs.AddItem("tab3", "tab3", "text", "cafe.php");
				tabs.AddItem("tab1", "tab1", "text", "fontaine_hod.php");
				tabs.AddItem("tab2", "tab2", "text", "fontaine_pou.php");
				tabs.AddItem("tab4", "tab4", "text", "accessoires.php");
				}else if(id==4){
				tabs.AddItem("tab4", "tab4", "text", "accessoires.php");
			      tabs.AddItem("tab1", "tab1", "text", "fontaine_hod.php");
				tabs.AddItem("tab2", "tab2", "text", "fontaine_pou.php");
				tabs.AddItem("tab3", "tab3", "text", "cafe.php");
				}
				
				mint.fx.Round("tabsContentOuter", "all", "small", true);
			}
			


