<!-- Begin hiding script from older browsers

// date and time........................................

function initArray() {
for(i=0;i<initArray.arguments.length; i++)
this[i] = initArray.arguments[i];}
var isnMonths=new initArray("January","February","March","April","May","June","July","August","September","October","November","December");
var isnDays= new initArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
today=new Date();
hrs=today.getHours();
min=today.getMinutes();
sec=today.getSeconds();
clckh=""+((hrs>12)?hrs-12:hrs); 
clckm=((min<10)?"0":"")+min;
clcks=((sec<10)?"0":"")+sec;
clck=(hrs>=12)?"p.m.":"a.m.";
var stnr="";
var ns="0123456789";
var a="";


// history window function...................................

function newWindow(){

historyWin = window.open("tour.htm", "tour", "height=255,width=400,scrollbars=no");
historyWin.focus()

}


// news window function.........................................

function newWindow2(page){

leftPos = 0
if (screen) {

leftPos = screen.width-430

}
newsWin = window.open( page,  "info", "height=350,width=415,left="+ leftPos +",top=0,scrollbars=yes");
newsWin.focus()
}


// dropdown list opens in new window...............................


function selectNews(newLoc) {
page=newLoc.options[newLoc.selectedIndex].value

if (page!="")  {

newWindow=window.open( page )

}

  }
  
  
// email this page.......................................................


function emailthis(loc){
location.href="mailto:" + "?body=" + loc;

  }



// history window function................................................

pageArray = new Array("","tour1.htm","tour2.htm","tour3.htm","tour4.htm","tour5.htm","tour6.htm","tour7.htm","tour8.htm")

function setPage(thispage){
parent.content.document.location.href= pageArray[thispage]

    }
    
    
// set cookie for vote.....................................................


function checkVote(v) {

expireDate = new Date()
expireDate.setDate(expireDate.getDate()+1);

   
   voteCt = ""
     
if (document.cookie != ""){
voteCt = document.cookie.split("; ")
}
   for (i=0; i<voteCt.length; i++)  {
 
     if (v == voteCt[i].split("=")[1]) {

          alert('You have already voted. Please try again next week.')
      
                 return false
           
           }
      }
      
   
//document.cookie = "voted="+ v +"; expires="+ expireDate.toGMTString();
  
  

  }
  
  
  
  
  function sendVote(v){
  
  expireDate = new Date()
  expireDate.setDate(expireDate.getDate()+30);

  voteCt = ""
  writecookie = "1"   
  results = "-1"
         
    for (i=0; i<document.poll.a.length; i++) {
    
     if (document.poll.a[i].checked) {     
     results = document.poll.a[i].value
   
     
     }
        }
        
  if (results == -1){
  alert("Please make a selection");
  return false
  }
  
      
//remove all the way to document.cookie if doesn't work

   
if (document.cookie != ""){
voteCt = document.cookie.split("; ")
}
   for (i=0; i<voteCt.length; i++)  {
 
     if (v == voteCt[i].split("=")[1]) {

          alert('You have already voted. Please try again next week.')
      
                 return false
           
           }
      }
      
   
document.cookie = "voted="+ v +"; expires="+ expireDate.toGMTString();

 

      voteWin = window.open(location.href="http://www.carlinvilleonline.net/vote/vote.pl?" + "a=" +results+ "&name=first",  "vote", "height=350,width=500,scrollbars=no");
  voteWin.focus()
        
            }
            
 // end cookie and new window
 


// vote results window..............................................................
 
 function voteResults(page){

    resultsWin = window.open(page, "results", "height=350,width=500,scrollbars=no");
    resultsWin.focus()

     }
     
     
 
 
         
//-->






