<!--
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
//-->


//call to document to preload images
    if (document.images)
    {
      preload_image_object = new Image();
      // set image url Array. Five images, 0 to 4
      image_url = new Array();
      image_url[0] = "images/barn1.gif";
      image_url[1] = "images/barn2.gif";
      image_url[2] = "images/barn3.gif";
      image_url[3] = "images/barn5.gif";
      image_url[4] = "images/winterFarm.gif";
    }
	


if (document.Images)
	{
		var banner1 = new Image;
		var banner2 = new Image;
		var banner3 = new Image;
 
	
		banner1.src="images/winterFarm.gif";
		banner2.src="images/backyard.gif";
	   banner3.src="images/Market2.gif";
 
	}
 
else
	{
		banner1 = "";
		banner2 = "";
		banner3 = "";
		document.adBanner = "";
	}
var adImages = new Array("images/winterFarm.gif", "images/backyard.gif", "images/Market2.gif");
var thisAd = 0;
var imgCt = adImages.length;
function rotate()
	{
	if (document.images)
	{
		thisAd++;
		}
	if (thisAd == imgCt)
	{
		thisAd = 0;
	}
 
	document.adBanner.src=adImages[thisAd]
	setTimeout("rotate()", 3 * 1000)
	}
	

	/*
	storing some code here for main page. delete before turnin.
<li><a href="javascript: void(0);" onclick="myPopup1('about');">
About Us</a></li>
<li><a href="javascript: void(0);" onclick="myPopup2('contact');">
Contact</a></li>
<li><a href="javascript: void(0);" onclick="myPopup3('pictures';">
Pictures</a></li>
<li><a href="javascript: void(0);" onclick="myPopup4('markets');">
Markets</a></li>
<li><a href="javascript: void(0);" onclick="myPopup5('pigheads');">
PigHeads</a></li></ul>

*/
 /*function submitIt(myForm)
 { 
 //when submit button is clicked, function checks if info is valid
  var emailAddress; 
  var userName; 
  //function to vailidate form
  function isChar()
  {
    if(document.myForm.userName.value =="")
    {
    return false;
    }  
   return true;  
   
   //checks that a user name is entered

  if (!isChar(document.myForm.userName.value)) 
  //if user name field is blank, alerts user
   {
    alert("You must enter a user name");
    document.myForm.userName.focus();
    document.myForm.userName.select();
    return false;
    //returns user back to username area
    }
   return true;
   
   //if email address is missing, returns user back to email form area
   if(isChar(document.myForm.userName.value))
   {
   //checking for valid characters in username
    var i=document.myForm.userName.value;
    eval("document.myForm.userName.i");
       
       if(i>=0 || i<9)
       {
        alert("Your user name cannot contain a numeric value.");
        document.myForm.userName.focus();
        document.myForm.userName.select();
        return false;
       }
       return true;
    
 //declare user name and email address
 if(document.myForm.emailAddress.value =="")
 {
  return false;
   }  
   return true;  
   
   //checks that a user name and email address is entered

    //if user name contains a non-alphabetic character, returns alerts and returns user to user name area
         if(isChar(document.myForm.emailAddress.value))
         {
          var i=document.myForm.emailAddress.value;
          eval("document.myForm.emailAddress.i");
       
          if(i!=@ || i!=.)
           {
            alert("You have not entered a valid email address.");
            document.myForm.emailAddress.focus();
            document.myForm.emailAddress.select();
            return false;
           }
         return true;
         
         //if email name does not contain a @ or a dot, returns alerts and returns user to email name area
  }
	} */
//popup window	
var newwindow1;
var newwindow2;
var newwindow3;
var newwindow4;
var newwindow5;
//seperate functions for different popup windows
function myPopup1(KCGreenTalk){
    newwindow1=window.open('http://www.KCGreenTalk.com/','KCGreenTalk', 'scrollbars, toolbar=yes, width=700, height= 600');}
function myPopup2(OTV){
    newwindow2=window.open('http://www.OnTheVineShopping.com/','OTV', 'scrollbars, toolbar=yes, width=700, height= 600');}
function myPopup3(Pantheon){
    newwindow3=window.open('http://www.onthevineshopping.com/','GCFM', 'scrollbars, toolbar=yes, width="", height= ""');} 
function myPopup4(PearlyGate){
    newwindow4=window.open('http://www.pearlygatessoap.com/','PearlyGate', 'scrollbars, toolbar=yes, width=700, height= 600');}
function myPopup5(GrowingGrowers){
    newwindow5=window.open('http://www.growinggrowers.org/','GrowingGrowers', 'scrollbars, toolbar=yes, width=700, height= 600');}
function myPopup6(popup){
    newwindow6=window.open('popup.html','popup', 'toolbar=no, width=400, height= 200');}

//function to close all popup windows. If statements carry through all open popup windows
 function closeWin()
  {
   if(newwindow1.open){
   newwindow=newwindow1.close();
   if(newwindow2.open)
	   newwindow=newwindow2.close();
   if(newwindow3.open)
	   newwindow=newwindow3.close();
   if(newwindow4.open) 
	    newwindow=newwindow4.close();
   if(newwindow4.open) 
	    newwindow=newwindow4.close();
		  if(newwindow5.open) 
	    newwindow=newwindow5.close();
   if(newwindow6.open) 
	    newwindow=newwindow6.close();

	    }
   
  }

  