function writeDate() 
{
		d = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
		m = new Array("January","February","March","April","May","June","July","August","September","October","November","December");

		today = new Date();
		day = today.getDate();
		year = today.getYear();

		if (year < 2000)
		year = year + 1900;

		end = "th";
		if (day==1 || day==21 || day==31) end="st";
		if (day==2 || day==22) end="nd";
		if (day==3 || day==23) end="rd";
		day+=end;

		document.write(" ");
		document.write(d[today.getDay()]+" "+m[today.getMonth()]+" ");
		document.write(day+" " + year);
		document.write(" ");
		}

function email(who)
{
	document.write("<a href='mailto:"+who+"@asthma-relieftips.com'>");
	document.write(who);
	document.write("@");
	document.write("asthma-relieftips");
	document.write(".com");
	document.write("</a>");
}


 			function validName(realname) {

			if (realname == "") {						// cannot be empty
			return false
				}
			
			return true
		}
		function validEmail(email) {
			invalidChars = " /:,;"
	
			if (email == "") {						// cannot be empty
				return false
			}
			for (i=0; i<invalidChars.length; i++) {	// does it contain any invalid characters?
				badChar = invalidChars.charAt(i)
				if (email.indexOf(badChar,0) > -1) {
					return false
				}
			}
			atPos = email.indexOf("@",1)			// there must be one "@" symbol
			if (atPos == -1) {
				return false
			}
			if (email.indexOf("@",atPos+1) != -1) {	// and only one "@" symbol
				return false
			}
			periodPos = email.indexOf(".",atPos)
			if (periodPos == -1) {					// and at least one "." after the "@"
				return false
			}
			if (periodPos+3 > email.length)	{		// must be at least 2 characters after the "."
				return false
			}
			return true
		}
		
			function submitIt(Form) {

					// check to see if they have entered a name
			if (!validName(Form.realname.value)) {
				alert("Please enter your Full Name")
				Form.realname.focus()
				Form.realname.select()
				return false
				}
				// check to see if the email's valid
			if (!validEmail(Form.email.value)) {
				alert("Invalid email address")
				Form.email.focus()
				Form.email.select()
				return false
				
			}
	
	
			// If we made it to here, everything's valid, so return true
			return true
		}
		