var all_fitshow = 0;

function hide() { 
var div = new Array("Adult","Youth");
var state = 'none'; 

for (var e = 0; e < div.length; e++)
         {
		 
         var mylayer_ref1 = div[e];
if (document.all) { //IS IE 4 or 5 (or 6 beta) 
eval( "document.all." + mylayer_ref1 + ".style.display = state"); 
} 
if (document.layers) { //IS NETSCAPE 4 or below 
document.layers[mylayer_ref1].display = state; 
} 
if (document.getElementById &&!document.all) { 
hza1 = document.getElementById(mylayer_ref1); 
hza1.style.display = state;       
}
}
}

function show(mylayer_ref2) { 
var state = 'block'; 
if (document.all) { //IS IE 4 or 5 (or 6 beta) 
eval( "document.all." + mylayer_ref2 + ".style.display = state"); 
} 
if (document.layers) { //IS NETSCAPE 4 or below 
document.layers[mylayer_ref2].display = state; 
} 
if (document.getElementById && !document.all) { 
hza1 = document.getElementById(mylayer_ref2); 
hza1.style.display = state;
//document.getElementById(mylayer_ref2).style.display = state;
} 
//alert('Leaving show '+mylayer_ref2);
}

function ReDo(i) {
//document.Myform.reset();
document.Myform.type[i].checked = true;
document.Myform.workshop1.value = "not selected 1";
document.Myform.workshop2.value = "not selected 2";
document.Myform.workshop3.value = "not selected 3";
document.Myform.funtent.checked = false;
document.Myform.fitshow.checked = false;
document.Myform.p_contest.checked = false; Poster();
document.Myform.s_contest.checked = false; Speech();
document.Myform.pow_contest.checked = false; PowerPoint();
}

function NextReg() {
		 confirm( "Please use this button to register one person and then to continue with another registration.  This button will maintain some of your input.  Please confirm or cancel this request."); }

function Reg() {
	     alert( "Please submit a new form for every person wishing to attend the 2007 Goat Field Day."); }

function banner1() {
	     alert( "Note that there will be special activities for youth of all ages at the Goat Field Day. \n\nIn the morning, there will be a Fitting & Showing workshop for older youth and an 4-H Fun Tent for younger children. \n\nIn the afternoon, there will be a continuation of the morning workshops.\n\nTo register for the Fitting & Showing workshop or 4-H Fun Tent, check the appriopriate box.\n\nOf course, youth are welcomed in any of the afternoon workshops."); }


function Check_Fit() {
if (all_fitshow) {return;}
for (var i=1; i <=3; i++ )  {eval("var temp = document.Myform.workshop"+i+".value");
if (temp =="Fitting and Showing for Youth and Adults") {
    var answer = confirm("For the Fitting and Showing for Youth and Adults workshop, we suggest that you attend this worshop for the entire afternoon.  Would like like to do this?  Click \"OK\" and you will be automatically registered in the Fitting and Showing for Youth and Adults workshop for the 1:30, 2:30 and 3:30 pm workshops.\n\nThis will be done automatically for you.\n\nIf you want to choose Fitting and Showing for Youth and Adults for one workshop and have other choices for the other workshops, select \"Cancel\".")
if (answer) {document.Myform.workshop1.value = temp; document.Myform.workshop2.value = temp; document.Myform.workshop3.value = temp;}
all_fitshow = 1; return;}
}}

function ShowSame () {
if (document.Myform.workshop1.value == document.Myform.workshop2.value ||  document.Myform.workshop1.value == document.Myform.workshop3.value ||  document.Myform.workshop2.value == document.Myform.workshop3.value) { alert("You have chosen the same workshops for 1:30, 2:30 or 3:30 pm.\n\nIs this what you want to do?\n\nYou are encouraged to choose three different afternoon workshops.")}
}

function checkMissing()
 { if (document.Myform.FirstName.value == "" || document.Myform.LastName.value == "" || document.Myform.City.value == "" || document.Myform.State.value == "" ) { 
   str = "The following fields are required to complete\n the 2007 Goat Field Day registration:\n\n"   
   for (i = 0; i < Myform.length; i++)
        if (Myform.elements[i].value == "") {str += "\t" + Myform.elements[i].name + "\n"  }
		 alert(str)}
		 
}

function Poster() {
if (document.Myform.p_contest.checked) {document.Myform.poster.value = "Poster";}
else {document.Myform.poster.value = "no";}
}
function Speech() {
if (document.Myform.s_contest.checked) {document.Myform.speech.value = "Speech";}
else {document.Myform.speech.value = "no";}
}
function PowerPoint() {
if (document.Myform.pow_contest.checked) {document.Myform.powerpoint.value = "PowerPoint";}
else {document.Myform.powerpoint.value = "no";}
}


