function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function dropdown(){ 
 if(navigator.appVersion.indexOf("MSIE")==-1){return;}
 var i,k,g,lg,r=/\s*gaychimag/,nn='',c,cs='gaychimag',bv='dropmenu';
 for(i=0;i<10;i++){g=document.getElementById(bv+nn);if(g){
 lg=g.getElementsByTagName("LI");if(lg){for(k=0;k<lg.length;k++){
 lg[k].onmouseover=function(){c=this.className;cl=(c)?c+' '+cs:cs;
 this.className=cl;};lg[k].onmouseout=function(){c=this.className;
 this.className=(c)?c.replace(r,''):'';};}}}nn=i+1;}
}

//
function copyright() {
  var now = new Date();
  var year = now.getFullYear();
  document.write("&copy; " + year);
}

function archiveMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//
function displayDate() {
  var now = new Date();
  var today = now.getDate();
  var month = now.getMonth();
    var monthName = new Array(12)
      monthName[0]="January ";
      monthName[1]="February ";
      monthName[2]="March ";
      monthName[3]="April ";
      monthName[4]="May ";
      monthName[5]="June ";
      monthName[6]="July ";
      monthName[7]="August ";
      monthName[8]="September ";
      monthName[9]="October ";
      monthName[10]="November ";
      monthName[11]="December ";
  var year = now.getFullYear();

  document.write(monthName[month]+today+ ", "+year);
}

//
function Countdown() {
var date = new Date("May 23, 2009");
var description = "Thanks for coming!";
var now = new Date();
var diff = date.getTime() - now.getTime();
var days = Math.floor(diff / (1000 * 60 * 60 * 24));
if (days > 0) {
document.write("<b>");
document.write(days+1 + "</b> days to go!");
}
else if (days == 0) {
document.write("<b>");
document.write(days+1 + "</b> day to go!");
}
else {
document.write(description);
}
}

var submitcount=0;
   function checkSubmit() {
      if (submitcount == 0)
      {
      submitcount++;
      document.Surv.submit();
      }
   }

function wordCounter(field, countfield, maxlimit) {
wordcounter=0;
for (x=0;x<field.value.length;x++) {
      if (field.value.charAt(x) == " " && field.value.charAt(x-1) != " ")  {wordcounter++}  // Counts the spaces while ignoring double spaces, usually one in between each word.
      if (wordcounter > 250) {field.value = field.value.substring(0, x);}
      else {countfield.value = maxlimit - wordcounter;}
      }
   }


function printPage() {
  if (window.print)
    window.print()
  else
    alert("Sorry, your browser doesn't support this feature. To print this page, press CTRL+P (PC users) or CMD+P (Mac users).");
}

// Rollovers
function imgOver(imgName){ 
	document[imgName].src = eval(imgName + "_over.src"); 
}

function imgOff(imgName){ 
	document[imgName].src = eval(imgName + "_off.src"); 
}

travel_off = new Image();
travel_off.src = "images/travel.gif";

travel_over = new Image();
travel_over.src = "images/travel_f2.gif";

faqs_off = new Image();
faqs_off.src = "images/faqs.gif";

faqs_over = new Image();
faqs_over.src = "images/faqs_f2.gif";