//This is the Javascript file for the Berkeley Free Clinic

// this will preload the following images



//The choosePic script displays a random image listed in the Array

	myPix1 = new Array("images/clinicpic1.gif","images/clinicpic2.gif","images/clinicpic3.gif", "images/clinicpic4.gif","images/clinicpic5.gif","images/clinicpic6.gif","images/clinicpic7.gif","images/clinicpic8.gif","images/clinicpic9.gif","images/clinicpic10.gif","images/clinicpic11.gif","images/clinicpic12.gif","images/clinicpic13.gif","images/clinicpic14.gif", "images/clinicpic15.gif","images/clinicpic16.gif","images/clinicpic17.gif","images/clinicpic18.gif","images/clinicpic19.gif","images/clinicpic20.gif","images/clinicpic21.gif","images/clinicpic22.gif","images/clinicpic23.gif")

	function choosePix() {
		if (document.images) {
			randomNum = Math.floor((Math.random() * myPix1.length))
			document.myPicture1.src = myPix1[randomNum]
		}
	}

// ----------------------------- BEGIN login form validation ----------------------///
function validForm(passForm) {

			if (passForm.passwd1.value == "") {

				alert("You must enter a password")

				passForm.passwd1.focus()

				return false

			}

			if (passForm.passwd1.value != "12345") {

				alert("Entered password was not valid")

				passForm.passwd1.focus()

				passForm.passwd1.select()

				return false

			}

			return true

		}
// -------------------------- END login form validation ---------------------------///
///---------------------------- display date ------------------------- ///



function dater(){
var now   = new Date();
var font  = "Arial";
var fsize = "2";
var color  = "white";
var month = "";
var year  = "";
var ampm = "am";
var minu = now.getMinutes();
var itiskevinsfault = "";
var date  = now.getDate();
var hour = now.getHours();

if (hour > 12) { 
hour = hour-12;
ampm = "pm";
}

if (minu < 10) {
itiskevinsfault = "0";
}

if (now.getMonth() == 0) month = "January"
if (now.getMonth() == 1) month = "February"
if (now.getMonth() == 2) month = "March"
if (now.getMonth() == 3) month = "April"
if (now.getMonth() == 4) month = "May"
if (now.getMonth() == 5) month = "June"
if (now.getMonth() == 6) month = "July"
if (now.getMonth() == 7) month = "August"
if (now.getMonth() == 8) month = "September"
if (now.getMonth() == 9) month = "October"
if (now.getMonth() == 10) month = "November"
if (now.getMonth() == 11) month = "December"
year = now.getYear();
if (year < 1000) year += 1900;
ilovethemonkey = ('<font class="dateamonkey" size="' + fsize + '"face="' + font + '"color ="' + color+'">' + month + " " + date + ", " + year);
return ilovethemonkey;
}

///--- if you want to add time of day add this -----     + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + hour + ":" + itiskevinsfault + minu + ampm -----after the + year-------///
///---------------------------- display date ------------------------- ///