<!--
function notEmpty(elem){

  var str = elem.value;

  if(str.length == 0){

    alert("Sorry, you must fill in all required(*) fields correctly.");

    return false;

  }

  else{

    return true;

  }

}

function longerThan3(elem){

  var str = elem.value;

  if(str.length < 3){

    alert("Sorry, the name must be longer than 3 characters.");

    return false;

  }

  else{

    return true;

  }

}


function notEmptyNoAlert(elem){

  var str = elem.value;

  if(str.length == 0){

    //alert("Sorry, you must fill in all required(*) fields correctly.");

    return false;

  }

  else{

    return true;

  }

}

function isValidEmail(str) {
   //alert("Sorry, your email address is incorrect.");
   //return false;
   
   if((str.indexOf(".") < 1) || (str.indexOf("@") <= 1)){

     alert("Sorry, your email address is incorrect.");

     return false;

   }else

       return true;
}

function isEqual(elem1,elem2){

	if(elem1.value!=elem2.value){

	  alert("Sorry, the passwords are not equal.");

	  return false;

	}else

		return true;

}

function isTermsAccepted(elem){

//for (i=0;i<document.tv.station.length;i++){

if (elem[0].checked==false){
	alert("Sorry, you must accept the terms and conditions.");
	return false;

}

return true;

}


function isNumber(elem){

  var str = elem.value;

  if(isNaN(str)){

    alert("Sorry, some fields must be filled in numbers.");

    return false;

  }

  else{

    return true;

  }
}

function isWebsite(elem){

  var str = elem.value;

  if(str.indexOf("http")==-1){

    alert("Sorry, it is not a valid website address.");

    return false;

  }

  else{

    return true;

  }
}

function isDate(mydate){
	var dtCh='-';
	var pos1=mydate.indexOf(dtCh);
	var pos2=mydate.indexOf(dtCh,pos1+1);
	var strYear=mydate.substring(0,pos1);
	var strMonth=mydate.substring(pos1+1,pos2);
	var strDay=mydate.substring(pos2+1);
	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1);
	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1);
	month=parseInt(strMonth);
	day=parseInt(strDay);
	year=parseInt(strYear);		
	//alert(year);
	
	if(isNaN(year)){
		return false;
	}else{
		if(year>3000 || year<2000)
			return false;	
	}

	if(isNaN(month)){
		return false;
	}else{
		if(month>12 || year<1)
			return false;	
	}

	if(isNaN(day)){
		return false;
	}else{
		if(day>31 || year<1)
			return false;	
	}
	
	return true;
	
}

function isValidChar(str) {
   
   if(  (str.indexOf("\\") == -1) && (str.indexOf("/") == -1) && (str.indexOf(":") == -1) && (str.indexOf("*") == -1) && (str.indexOf("?") == -1) && (str.indexOf("\"") == -1) && (str.indexOf("<") == -1) && (str.indexOf(">") == -1) && (str.indexOf("|") == -1) && (str.indexOf("'") == -1)  ){

     return true;

   }else{
       alert("Sorry, could not contain character \\ / : * ? \" < > | '");
       return false;
   
   }
}

//-->