function checkemail() {
	message = ""						/* message buffer */
	t1 = 0								/* error found */
	email = getById('email')			/* input email value */
	result = validemail(email)			/* check email address */
	reply = result 
	$status = issuealert(reply)
	return $status
}

function ck1(oldvalue,newvalue,ref,a1) {
	if ( oldvalue != newvalue) {
		document.getElementById(ref).disabled = false
		document.getElementById(a1).style.fontWeight = 'bold'
	} else {
		document.getElementById(ref).disabled = true
		document.getElementById(a1).style.fontWeight = 'normal'
	}
}

function isTerms() {
	var a = 'terms'
	if (document.getElementById(a).checked) {
		message = ""						/* message buffer */
		t1 = 0								/* error found */
		email = getById('email')				/* input email value */
		result = validemail(email)				/* check email address */
		reply = result 
		$status = issuealert(reply)
	} else {
		reply = "\n* Please confirm your acceptance of the terms and conditions.\n"
		$status = issuealert(reply) 
	} 
	return $status
}

function refresh(oldvalue,newvalue) {
	if (oldvalue != document.getElementById(newvalue).value) {
		alert("Please use 'Refresh' option when changing the Email address.")  ;
		return false
	}
	return true
}

function validinput(myForm) { 
	reply = ""									/* message buffer */
	t1 = 0										/* error flag */
	if (myForm.contact_spam.value != transpam ) {					/* validate */
		result = ( "\n * Enter the validation code")
		t1 = 1 
	}
	reply += result 
	email = getById('email')					/* input email value */
	result = validemail(email)					/* check email address */
	reply += result
	
	result = ""
	if (getById('comments')=="" ) {				/* message area is null */
		result = ( "\n * Enter your request in the message area ")
		myForm.contact_comments.focus()
		myForm.contact_comments.select()
	}  
	reply += result

	result = ""
	if (getById('from') =="" ) {				/* sender area is null */
		result = ( "\n * Enter your name")
		myForm.contact_from.focus()
		myForm.contact_from.select()
	}  
	reply += result
	return issuealert(reply)
}