function ClearData() {
    document.getElementById('name').value = "";
    document.getElementById('address').value = "";
    document.getElementById('city').value = "";
    document.getElementById('state').value = "";
    document.getElementById('zip').value = "";
    document.getElementById('email').value = "";
}


function WriteToFile() {
  try {
    var fso, file, name, address, city, state, zip, email;
    fso = new ActiveXObject("Scripting.FileSystemObject");
    file = fso.OpenTextFile("ftp://www.thumblicker.com/Info.txt", 8);  //1-read 2-write 8-append
    data = document.getElementById('name').value;
    file.writeline(data);
    data = document.getElementById('address').value;
    file.writeline(data);
    data = document.getElementById('city').value;
    file.writeline(data);
    data = document.getElementById('state').value;
    file.writeline(data);
    data = document.getElementById('zip').value;
    file.writeline(data);
    data = document.getElementById('email').value;
    file.writeline(data);
    file.writeline();
    file.Close();
  }
 catch(err){
   var strErr = 'Error:';
   strErr += '\nNumber:' + err.number;
   strErr += '\nDescription:' + err.description;
   document.write(strErr);
  }
}

function blinker(){
	document.getElementById("btnBlink").style.backgroundColor="red";
	setTimeout("document.getElementById('btnBlink').style.backgroundColor=''", 500);
	setTimeout("blinker()",1500);
}

function startTime()
{
	var today=new Date();
	var h=today.getHours();
	var m=today.getMinutes();
	var s=today.getSeconds();
	var date1=checkMonth(today.getMonth()) + " " + today.getDate() + ", " + today.getFullYear();

	document.getElementById('date').innerHTML=date1;
	// add a zero in front of numbers<10
	m=checkTime(m);
	s=checkTime(s);
	document.getElementById('time').innerHTML=h+":"+m+":"+s;
	t=setTimeout('startTime()',500);
}

function checkMonth(i)
{
	switch (i)
	{
		case 0:
			return "January";
			break;
		case 1:
			return "Feburary";
			break;
		case 2:
			return "March";
			break;
		case 3:
			return "April";
			break;
		case 4:
			return "May";
			break;
		case 5:
			return "June";
			break;
		case 6:
			return "July";
			break;
		case 7:
			return "August";
			break;
		case 8:
			return "September";
			break;
		case 9:
			return "October";
			break;
		case 10:
			return "November";
			break;
		case 11:
			return "December";
			break;
	}
}

function checkTime(i)
{
	if (i<10)
	{
		i="0" + i;
	}
	return i;
}

function ChangePage(num)
{
	switch (num)
	{
		case 0:
			window.location="index.htm";
			break;
		case 1:
			window.location="BoardMembers.html";
			break;			
		case 2:
			window.location="Classes.html";
			break;
		case 3:
			window.location="Newsletters.html";
			break;			
		case 4:
			window.location="ClubNews.html";
			break;
		case 5:
			window.location="PresidentsColumn.html";
			break;			
		case 6:
			window.location="NewMembers.html";
			break;
		case 7:
			window.location="FieldTripReports.html";
			break;			
		case 8:
			window.location="FutureFieldTrip.html";
			break;
		case 9:
			window.location="Certification.html";
			break;			
		case 10:
			window.location="BitOfTrivia.html";
			break;
		case 11:
			window.location="UpcomingShows.html";
			break;			
		case 12:
			window.location="ForSale.html";
			break;
		case 13:
			window.location="EFMLS_Club_Websites.html";
			break;			
		case 14:
			window.location="Pictures.html";
			break;
		case 15:
			window.location="Calendar.html";
			break;			
		case 16:
			window.location="MemberBusinessLinks.html";
			break;
		case 17:
			window.location="AffiliateLinks.html";
			break;			
		case 18:
			window.location="OtherLinks.html";
			break;
		case 19:
			window.location="Info.html";
			break;			
		case 20:
			window.location="PartnersInEducation.html";
			break;			
		case 21:
			window.location="MembershipApplication.html";
			break;			
		case 22:
			window.location="Minerals.html";
			break;			
		case 23:
			window.location="LibraryNews.html";
			break;	
		case 24:
			window.location="RockFest.html";
			break;		
		case 25:
			window.location="RockShow.html";
			break;		
		case 26:
			window.location="FacetingHomePage.html";
			break;		
	}
}


function ChangeFacetingPage(num, pre)
{
	switch (num)
	{
		case 0:
			window.location="../FacetingHomePage.html";
			break;
		case 1:
			if (pre == true)
				window.location="./Faceting/DiagramOfTheMonth.html";
			else
				window.location="DiagramOfTheMonth.html";			
			break;			
		case 2:
			if (pre == true)
				window.location="./Faceting/Links.html";
			else
				window.location="Links.html";
			break;			
		case 3:
			if (pre == true)
				window.location="./Faceting/Laps.html";
			else
				window.location="Laps.html";
			break;
		case 4:
			if (pre == true)
				window.location="./Faceting/News.html";
			else
				window.location="News.html";
			break;			
		case 5:
			if (pre == true)
				window.location="./Faceting/Machines.html";
			else
				window.location="Machines.html";
			break;
		case 6:
			if (pre == true)
				window.location="./Faceting/Tips.html";
			else
				window.location="Tips.html";
			break;
		case 7:
			if (pre == true)
				window.location="./Faceting/Quiz.html";
			else
				window.location="Quiz.html";
			break;
	}
}
