function isDiggit(c) {
	var test = "" + c ;   
	if ( test=="0" ||  test=="1" ||  test=="2" ||  test=="3" ||  test=="4" ||  test=="5" ||  test=="6" ||  test=="7" ||  test=="8" ||  test=="9") return true;
	return false; 
}

function hasPermittedLetters(s) {
	var sn=s.length;
	for (var k=0;k<sn;k++) 
	  if(!isDiggit(s.substring(k,k+1))) return false;
	return true;
}

function validEmail(s) {
	  if (s.length < 5) return false;
	  if (s.indexOf('@',1) == -1) return false;
	  if (s.indexOf('.',0) == -1) return false;
	  var pozp = s.indexOf('.',0);
	  var l = s.length -1;
	  if ( l == pozp ) return false;
	  if ( (l-1) == pozp ) return false;
	  return true;
}  

function reloadImage()
{
	// Create a new Date object
	theDate = new Date();

	// Refresh the image src to the image_car.asp "image", with the time on the end to force a refresh
	document["ver_code"].src = "image_ver.asp?" + theDate.getTime();
}

function v() {
	if (!document.f.Name.value) {
	  window.alert("Your name must be filled in!");
	  document.f.Name.select();
	  document.f.Name.focus(); return false; } 
	
	if (!document.f.Email.value) {
	  window.alert("Please fill in the e-mail address!");
	  document.f.Email.select();
	  document.f.Email.focus(); return false; 
	}
	else {
		if(!validEmail(document.f.Email.value)) {
		  window.alert("Please fill in the e-mail with a valid address!");
		  document.f.Email.select();
		  document.f.Email.focus(); return false; 
		}
	}
	  
	return true;
}