// JavaScript Document

function renderDate(){
	var today = new Date();
	var months = ['January','February','March','April','May','June','July','August','September','October','November','December'];
	document.write(months[today.getMonth()] + ' ' + today.getDate() + ', ' + today.getFullYear());
	
}

function renderTime(){
	var today = new Date();
	var hours = today.getHours();
	var pm = "p.m.";
	if(hours < 12) pm = "a.m."
	hours = hours % 12;
	if(hours == 0) hours = 12;
	document.write(hours + ':' + today.getMinutes() + ':' + today.getSeconds() + ' ' + pm + ' ');
}

function renderDay(){
	var today = new Date();
	var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
	document.write(days[today.getDay()]);
}

function preview(){
	var email = document.getElementById('eMail');
	var firstName = document.getElementById('fName');
	var lastName = document.getElementById('lName');
	if(email.value != '' && firstName.value != '' && lastName.value != '')
	{
	alert('Hello ' + firstName.value + ' ' + lastName.value + ', your email addresss is: ' + email.value + '.');
	}
	else
	{
	alert('Please properly fill out form.');
	}
}

function ranQuote(){
	var rand_no = Math.floor(10*Math.random())
	var quote = new Array('\"Und die Vögel singen nicht mehr\" - Rammestein','\"Do I look like a cat to you, boy? Am I jumpin\' around all nimbly bimbly from tree to tree?\" - Super Troopers','\"Milk, was a baaad choice!\" - Anchor Man','\"Things are not what they appear to be: nor are they otherwise.\" - Surangama Sutra','\"Sometimes one creates a dynamic impression by saying something, and sometimes one creates as significant an impression by remaining silent.\" - H.H. The 14th Dalai Lama','\"This is your life, and it\'s ending one minute at a time.\" - Fight Club','\"We can\'t stop here! This is bat country!!\" - Fear and Loathing','\"Let\'s go play machete fight. Ain\'t no terrible tragedy\'s gonna happen today!\" - Walk Hard','\"Like my scrotum, here it is in a nutshell\" - The Bloodhound Gang','\"I feel the same way about disco as I do about herpes.\" - Hunter S. Thompson');
	document.write(quote[rand_no]);
	
}