// JScript source code
function isValidEmail(str) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(str)){
		return true;
	}
	else {
		return false;
	}
}

function callform(){
	var ftxt = '';

	if (document.callbackform.Name.value==''||document.callbackform.Name.value=='Name'){
		ftxt += '\n- Please enter your Name.';
	}
	
	if (document.callbackform.Company.value==''||document.callbackform.Company.value=='Company'){
		ftxt += '\n- Please enter your Company.';
	}
	
	if (document.callbackform.Telephone.value==''||document.callbackform.Telephone.value=='Telephone number'){
		ftxt += '\n- Please enter your Telephone Number.';
	}
	
	if (ftxt!==''){
		alert('One or more errors were found while submitting this form. The errors found are displayed below.\n' + ftxt + '\n\nPlease correct the above errors and try again.');
		return false;
	}
	else {
		return true;
	}
}

function clearText(field){
    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;
}
