function checkthis(form){
  with(form){
   if (name.value == ""){
    alert ("Please, give your name!");
    return false;
    }
   else if (name.value.length<5){
    alert ("The \"Name\" box is too short, minimum 5 character!");
    return false;
    }	
	/**/	
   else if (telephone.value == "" && mobile.value == ""){
    alert ("Please, give your phone or mobile number!");
    return false;
    }
   else if (telephone.value != "" && telephone.value.length<5){
    alert ("The \"Telephone\" box is too short, minimum 5 character!");
    return false;
    }	
   else if (mobile.value != "" && mobile.value.length<5){
    alert ("The \"Mobile\" box is too short, minimum 5 character!");
    return false;
    }			
	/**/			
   else if ( ( mail.value == "" ) || ( mail.value.search("@") == -1 ) || ( mail.value.search("[.*]" ) == -1 ) ){
    alert ("Please make sure the E-mail box is complete and valid.");
    return false;
    }
   else if (pickup.value == ""){
    alert ("Please, give your pick up address!");
    return false;
    }
   else if (pickup.value.length<5){
    alert ("The \"Pick Up Address\" box is too short!");
    return false;
    }			
	/**/					
   else if (dest.value == ""){
    alert ("Please, give your destination!");
    return false;
    }   
   else if (dest.value.length<5){
    alert ("The \"Destination\" box is too short!");
    return false;
    }			
	/**/					
   else if (nop.value == ""){
    alert ("Please, give how many people would to fare!");
    return false;
    } 
   else if (share.value == ""){
    alert ("Would you like to share the vehicle with other passengers?");
    return false;
    } 
   }
  }
  
  function checkthis2(form){
  with(form){
   if (name.value == ""){
    alert ("Please, give your name!");
    return false;
    }
   else if ( ( mail.value == "" ) || ( mail.value.search("@") == -1 ) || ( mail.value.search("[.*]" ) == -1 ) ){
    alert ("Please make sure the E-mail box is complete and valid.");
    return false;
    } 
   if (subj.value == ""){
    alert ("Please, give your message's subject!");
    return false;
    }
   else if (mess.value == ""){
    alert ("Please, write your message into the box!");
    return false;
    }   
   }
  }
  
function szam(mit) {
 adat = mit.value
 vissza=""
 szamok = "1234567890"
 for (i=0; i<mit.value.length; i++)
  if (szamok.indexOf(adat.substring(i,i+1) )>-1)
   vissza+=adat.substring(i,i+1)
   mit.value=vissza
  }
/* ----------------------------------------------- */

  function booking_open(id){
   window.open('admin/book_confirm.php?id=' +id+ '', 'nev', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=720,height=200,top=150,left=250');
  }

  function booking_open_not(id){
   window.open('admin/book_confirm_not.php?id=' +id+ '', 'nev', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=720,height=200,top=150,left=250');
  }
  
  function del_open(id){
   window.open('admin/deluser_popup.php?id=' +id+ '', 'nev', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=720,height=200,top=150,left=250');
  }
  
  function passchange_open(id){
   window.open('admin/passchange.php?id=' +id+ '', 'nev', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,close=no,width=720,height=200,top=150,left=250');
  } 
  
  function pic_open(id, size, size2){
   var hgz;
   window.open('pages/pic.php?id=' +id+ '', 'nev', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,close=no,width='+size+',height='+size2+',top=150,left=250');
  }     
  
  function pic_flash(id, size, size2){
   var hgz;
   window.open('pages/pic_flash.php?id=' +id+ '', 'nev', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,close=no,width='+size+',height='+size2+',top=150,left=250');
  } 
  /***----------------------------------------------------***/
  function checkthis_register(form){
  with(form){
   if (name.value == ""){
    alert ("Please, give the user's name!");
    return false;
    }
   else if (username.value == ""){
    alert ("Please, give the user's loginname!");
    return false;
    }
   else if (username.value.length<5){
    alert ("Username's lenght is minimum 5 character!");
    return false;
    }	   
   else if (identy.value == ""){
    alert ("Please, choose an identy!");
    return false;
    }   
   }
  }
 function checkthis_changepass(form){
  with(form){
   if (oldpass.value == ""){
    alert ("Please, give the old password!");
    return false;
    }
   else if (newpassa.value == ""){
    alert ("Please, give the new password!");
    return false;
    }
   else if (newpassa.value.length<5){
    alert ("Minimum 5 Characters!");
    return false;
    }	
   else if (newpassb.value == ""){
    alert ("Please, give the new password confirmation!");
    return false;
    }	   
   else if (newpassa.value != newpassb.value){
    alert ("The password & the confirmation is not equal!");
    return false;
    }   
   }
  }
 
 var annyi=30;
 function reloader(){ 
	  document.getElementById("szam").innerHTML=annyi;
	  if (annyi==0){ window.location.reload();}
	  annyi--;
	 }
	 
 function checkthis_priceup(form){
  with(form){
   if (place.value == ""){
    alert ("Please, give the place name!");
    return false;
    }
   else if (price.value == ""){
    alert ("Please, give the price of the trip!");
    return false;
    }   
   else if (table.value == ""){
    alert ("Please, choose an area!");
    return false;
    }   
   }
  }
	