
$(document).ready(function(){$('#qyteti').change(function(){var qyteti=$('select[name=qyteti]');var gjuha=$('input[name=gjuha]');var gj=gjuha.val();var qytetID=qyteti.val();$.ajax({url:"/scriptsphp/zonatqytet.php",type:"GET",data:'gj='+gj+'&qytetID='+qytetID,cache:false,success:function(data){if(data!=''){$('#zonatqytet').html(data);}else{if(gj=="gj1"){alert('Ndodhi nje gabim. Ju lutemi te provoni perseri');}else{alert('Sorry, unexpected error. Please try again later.');}}}});return false;});$('#nrdhoma').change(function(){var nrdhoma=$('select[name=nrdhoma]').val();var gjuha=$('input[name=gjuha]');var gj=gjuha.val();$.ajax({url:"/scriptsphp/nrdhoma.php",type:"GET",data:'gj='+gj+'&nrdhoma='+nrdhoma,cache:false,success:function(data){if(data!=''){$('#dhomat').html(data);}else{if(gj=="gj1"){alert('Ndodhi nje gabim. Ju lutemi te provoni perseri');}else{alert('Sorry, unexpected error. Please try again later.');}}}});return false;});$('#childs1').change(function(){var childs1=$('select[name=childs1]').val();var gjuha=$('input[name=gjuha]');var gj=gjuha.val();$.ajax({url:"/scriptsphp/nrchilds.php",type:"GET",data:'gj='+gj+'&childs='+childs1+'&dhoma=1',cache:false,success:function(data){if(childs1==0)
{$('#childrenage1').html('');}
else
{if(data!=''){$('#childrenage1').html(data);}else{if(gj=="gj1"){alert('Ndodhi nje gabim. Ju lutemi te provoni perseri');}else{alert('Sorry, unexpected error. Please try again later.');}}}}});return false;});$('#childs2').change(function(){var childs1=$('select[name=childs2]').val();var gjuha=$('input[name=gjuha]');var gj=gjuha.val();$.ajax({url:"/scriptsphp/nrchilds.php",type:"GET",data:'gj='+gj+'&childs='+childs1+'&dhoma=2',cache:false,success:function(data){if(childs1==0)
{$('#childrenage2').html('');}
else
{if(data!=''){$('#childrenage2').html(data);}else{if(gj=="gj1"){alert('Ndodhi nje gabim. Ju lutemi te provoni perseri');}else{alert('Sorry, unexpected error. Please try again later.');}}}}});return false;});$('#childs3').change(function(){var childs1=$('select[name=childs3]').val();var gjuha=$('input[name=gjuha]');var gj=gjuha.val();$.ajax({url:"/scriptsphp/nrchilds.php",type:"GET",data:'gj='+gj+'&childs='+childs1+'&dhoma=3',cache:false,success:function(data){if(childs1==0)
{$('#childrenage3').html('');}
else
{if(data!=''){$('#childrenage3').html(data);}else{if(gj=="gj1"){alert('Ndodhi nje gabim. Ju lutemi te provoni perseri');}else{alert('Sorry, unexpected error. Please try again later.');}}}}});return false;});$('#childs4').change(function(){var childs1=$('select[name=childs4]').val();var gjuha=$('input[name=gjuha]');var gj=gjuha.val();$.ajax({url:"/scriptsphp/nrchilds.php",type:"GET",data:'gj='+gj+'&childs='+childs1+'&dhoma=4',cache:false,success:function(data){if(childs1==0)
{$('#childrenage4').html('');}
else
{if(data!=''){$('#childrenage4').html(data);}else{if(gj=="gj1"){alert('Ndodhi nje gabim. Ju lutemi te provoni perseri');}else{alert('Sorry, unexpected error. Please try again later.');}}}}});return false;});$('#childs5').change(function(){var childs1=$('select[name=childs5]').val();var gjuha=$('input[name=gjuha]');var gj=gjuha.val();$.ajax({url:"/scriptsphp/nrchilds.php",type:"GET",data:'gj='+gj+'&childs='+childs1+'&dhoma=5',cache:false,success:function(data){if(childs1==0)
{$('#childrenage5').html('');}
else
{if(data!=''){$('#childrenage5').html(data);}else{if(gj=="gj1"){alert('Ndodhi nje gabim. Ju lutemi te provoni perseri');}else{alert('Sorry, unexpected error. Please try again later.');}}}}});return false;});$('#childs6').change(function(){var childs1=$('select[name=childs6]').val();var gjuha=$('input[name=gjuha]');var gj=gjuha.val();$.ajax({url:"/scriptsphp/nrchilds.php",type:"GET",data:'gj='+gj+'&childs='+childs1+'&dhoma=6',cache:false,success:function(data){if(childs1==0)
{$('#childrenage6').html('');}
else
{if(data!=''){$('#childrenage6').html(data);}else{if(gj=="gj1"){alert('Ndodhi nje gabim. Ju lutemi te provoni perseri');}else{alert('Sorry, unexpected error. Please try again later.');}}}}});return false;});$('#childs7').change(function(){var childs1=$('select[name=childs7]').val();var gjuha=$('input[name=gjuha]');var gj=gjuha.val();$.ajax({url:"/scriptsphp/nrchilds.php",type:"GET",data:'gj='+gj+'&childs='+childs1+'&dhoma=7',cache:false,success:function(data){if(childs1==0)
{$('#childrenage7').html('');}
else
{if(data!=''){$('#childrenage7').html(data);}else{if(gj=="gj1"){alert('Ndodhi nje gabim. Ju lutemi te provoni perseri');}else{alert('Sorry, unexpected error. Please try again later.');}}}}});return false;});$('#childs8').change(function(){var childs1=$('select[name=childs8]').val();var gjuha=$('input[name=gjuha]');var gj=gjuha.val();$.ajax({url:"/scriptsphp/nrchilds.php",type:"GET",data:'gj='+gj+'&childs='+childs1+'&dhoma=8',cache:false,success:function(data){if(childs1==0)
{$('#childrenage8').html('');}
else
{if(data!=''){$('#childrenage8').html(data);}else{if(gj=="gj1"){alert('Ndodhi nje gabim. Ju lutemi te provoni perseri');}else{alert('Sorry, unexpected error. Please try again later.');}}}}});return false;});$('#childs9').change(function(){var childs1=$('select[name=childs9]').val();var gjuha=$('input[name=gjuha]');var gj=gjuha.val();$.ajax({url:"/scriptsphp/nrchilds.php",type:"GET",data:'gj='+gj+'&childs='+childs1+'&dhoma=9',cache:false,success:function(data){if(childs1==0)
{$('#childrenage9').html('');}
else
{if(data!=''){$('#childrenage9').html(data);}else{if(gj=="gj1"){alert('Ndodhi nje gabim. Ju lutemi te provoni perseri');}else{alert('Sorry, unexpected error. Please try again later.');}}}}});return false;});$('#search').click(function(){var qyteti=document.getElementById('qyteti').value;var dtfillimi=$('input[name=dtfillimi]');var dtmbarimi=$('input[name=dtmbarimi]');var gjuha=$('input[name=gjuha]');var gj=gjuha.val();if(dtfillimi.val()==''){dtfillimi.addClass('hightlight');return false;}else{dtfillimi.removeClass('hightlight');}
if(dtmbarimi.val()==''){dtmbarimi.addClass('hightlight');return false;}else{dtmbarimi.removeClass('hightlight');}
if(dtfillimi.val()>=dtmbarimi.val())
{dtfillimi.addClass('hightlight');dtmbarimi.addClass('hightlight');if(gj=="gj1")
{alert('Kujdes! Data e hyrjes nuk duhet te jete me e vogel se data e daljes');}
else
{alert('Caution! Checkin must be smaller than checkout');}
return false;}
else
{dtfillimi.removeClass('hightlight');dtmbarimi.removeClass('hightlight')}
if(qyteti==0){var qytetiPost=$('select[name=qyteti]');qytetiPost.addClass('hightlight');return false;}else{qytetiPost.removeClass('hightlight')};return false;});return false;});
