			Date.firstDayOfWeek = 1;
			Date.format = 'dd.mm.yyyy';

            
			$(function()
            {
				$('.date-pick').datePicker()
				$('#date1').bind(
					'dpClosed',
					function(e, selectedDates)
					{
						var d = selectedDates[0];
						if (d) {
							d = new Date(d);
							$('#date2').dpSetStartDate(d.addDays(1).asString());
						}
					}
				);
				$('#date2').bind(
					'dpClosed',
					function(e, selectedDates)
					{
						var d = selectedDates[0];
						if (d) {
							d = new Date(d);
							$('#date1').dpSetEndDate(d.addDays(-1).asString());
						}
					}
				);
            });
            
            
            
function count_cena() {
	var field1 = document.getElementById('pocet_1').value;
	alert(field1);
	document.getElementById('celkova_cena').innerHTML = '0';
	}
	
	
function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
	}

function getCity(strURL)
{         
 var req = getXMLHTTP(); // fuction to get xmlhttp object
 if (req)
 {
  req.onreadystatechange = function()
 {
  if (req.readyState == 4) { //data is retrieved from server
   if (req.status == 200) { // which reprents ok status                    
     document.getElementById('citydiv').innerHTML=req.responseText;
  }
  else
  { 
     alert("There was a problem while using XMLHTTP:\n");
  }
  }            
  }        
req.open("GET", strURL, true); //open url using get method
req.send(null);
 }
}

function getLM(strURL)
{         
 var req = getXMLHTTP(); // fuction to get xmlhttp object
 if (req)
 {
  req.onreadystatechange = function()
 {
  if (req.readyState == 4) { //data is retrieved from server
   if (req.status == 200) { // which reprents ok status                    
     document.getElementById('searchdiv').innerHTML=req.responseText;
     document.getElementById('searchdiv2').innerHTML='<input type=hidden name=lastminute value=0>';
     document.getElementById('searchdiv3').innerHTML='<strong><img src="images/h_bull.gif" alt="" />VYBERTE SI VAŠI DOVOLENOU</strong>';
  }
  else
  { 
     alert("There was a problem while using XMLHTTP:\n");
  }
  }            
  }        
req.open("GET", strURL, true); //open url using get method
req.send(null);
 }
}

function getLM2(strURL)
{         
 var req = getXMLHTTP(); // fuction to get xmlhttp object
 if (req)
 {
  req.onreadystatechange = function()
 {
  if (req.readyState == 4) { //data is retrieved from server
   if (req.status == 200) { // which reprents ok status                    
     document.getElementById('searchdiv').innerHTML=req.responseText;
     document.getElementById('searchdiv2').innerHTML='<input type=hidden name=lastminute value=1>';
     document.getElementById('searchdiv3').innerHTML='<strong><img src="images/h_bull.gif" alt="" />Vyhledávání v Last Minute zájezdech</strong>';
  }
  else
  { 
     alert("There was a problem while using XMLHTTP:\n");
  }
  }            
  }        
req.open("GET", strURL, true); //open url using get method
req.send(null);
 }
}

	function Verify() {
	if(document.form.jmeno.value=="") {
		alert("Není vyplneno Vaše jméno.");
		document.form.jmeno.focus();
		return false;
		}
	if(document.form.prijmeni.value=="") {
		alert("Není vyplneno Vaše príjmení.");
		document.form.prijmeni.focus();
		return false;
		}
	if(document.form.telefon.value=="") {
		alert("Není vyplnen Váš telefon.");
		document.form.telefon.focus();
		return false;
		}
	if(document.form.email.value=="") {
		alert("Není vyplnen Váš e-mail.");
		document.form.email.focus();
		return false;
		}
	if(document.form.osob.value=="") {
		alert("Není vyplnen pocet osob.");
		document.form.osob.focus();
		return false;
		}
	}
	
function Verify2() {
	if(document.form.code.value=="") {
		alert("Není vyplněn soutěžní kód!");
		document.form.code.focus();
		return false;
		}
	if(document.form.email.value=="") {
		alert("Není vyplněn Váš e-mail.");
		document.form.email.focus();
		return false;
		}
	}
