// Begin Javascript to set font size 
ns4 = document.layers; 

if (!ns4) { 
	if (WM_readCookie('siteStyle') == 'small') { 
    	changeStyles('smaller'); 
    } 
	else if (WM_readCookie('siteStyle') == 'large') { 
    	changeStyles('larger'); 
    }
	else {
  		changeStyles('default');
	} 
} 

function changeStyles(size) { 
  var defaultSheet; 
  var newSheet; 
  if (ns4) { 
	alert ("Sorry, but NS4 does not allow us to change styles."); 
    return false; 
  } 
	else if (size == 'larger')
	{ 
		defaultSheet = document.getElementById('defaultCSS');
		if(defaultSheet)
		{
		    defaultSheet.disabled = true; 
		    defaultSheet = document.getElementById('smallCSS'); 
		    defaultSheet.disabled = true;
    	
		    newSheet = document.getElementById('largeCSS'); 
		    newSheet.disabled = false;
		    WM_setCookie('siteStyle','large',17520, '/');
		}
	}
  else if (size == 'smaller') 
  {
		defaultSheet = document.getElementById('defaultCSS'); 
		if(defaultSheet)
		{
		    defaultSheet.disabled = true; 
		    defaultSheet = document.getElementById('largeCSS'); 
		    defaultSheet.disabled = true;
    	
		    newSheet = document.getElementById('smallCSS'); 
		    newSheet.disabled = false; 
		    WM_setCookie('siteStyle','small',17520, '/');
		}
  }
  else 
  {
		defaultSheet = document.getElementById('largeCSS'); 
		if(defaultSheet)
		{
    		defaultSheet.disabled = true; 
	    	defaultSheet = document.getElementById('smallCSS'); 
    		defaultSheet.disabled = true;
	
    		newSheet = document.getElementById('defaultCSS'); 
    		newSheet.disabled = false; 
    		WM_setCookie('siteStyle','default',17520, '/');
   		}
  }
  return true; 
}
// End Javascript to set font size 

// Begin code to write and read cookie for font size 
// The cookie is used to store the user's font size preference - if the user's browser does not 
//   allow cookies then the user will have to reset their preference on each page.  No error message
//   will be displayed if the browser does not allow cookies 
var WM_acceptsCookies = false;
if(document.cookie == '') {
    document.cookie = 'WM_acceptsCookies=yes'; // Try to set a cookie.
    if(document.cookie.indexOf('WM_acceptsCookies=yes') != -1) {
	WM_acceptsCookies = true; 
    }// If it succeeds, set variable
} else { // there was already a cookie
  WM_acceptsCookies = true;
}

function WM_setCookie (name, value, hours, path, domain, secure) {
    if (WM_acceptsCookies) { // Don't waste your time if the browser doesn't accept cookies.
	var not_NN2 = (navigator && navigator.appName 
		       && (navigator.appName == 'Netscape') 
		       && navigator.appVersion 
		       && (parseInt(navigator.appVersion) == 2))?false:true;

	if(hours && not_NN2) { // NN2 cannot handle Dates, so skip this part
	    if ( (typeof(hours) == 'string') && Date.parse(hours) ) { // already a Date string
		var numHours = hours;
	    } else if (typeof(hours) == 'number') { // calculate Date from number of hours
		var numHours = (new Date((new Date()).getTime() + hours*3600000)).toGMTString();
	    }
	}
	document.cookie = name + '=' + escape(value) + ((numHours)?(';expires=' + numHours):'') + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') + ((secure && (secure == true))?'; secure':''); // Set the cookie, adding any parameters that were specified.
    }
} // WM_setCookie

function WM_readCookie(name) {
    if(document.cookie == '') { // there's no cookie, so go no further
	return false; 
    } else { // there is a cookie
	var firstChar, lastChar;
	var theBigCookie = document.cookie;
	firstChar = theBigCookie.indexOf(name);	// find the start of 'name'
	var NN2Hack = firstChar + name.length;
	if((firstChar != -1) && (theBigCookie.charAt(NN2Hack) == '=')) { // if you found the cookie
	    firstChar += name.length + 1; 
	    lastChar = theBigCookie.indexOf(';', firstChar); // Find the end of the value string (i.e. the next ';').
	    if(lastChar == -1) lastChar = theBigCookie.length;
	    return unescape(theBigCookie.substring(firstChar, lastChar));
	} else { // If there was no cookie of that name, return false.
	    return false;
	}
    }	
} // WM_readCookie

function WM_killCookie(name, path, domain) {
  var theValue = WM_readCookie(name); // We need the value to kill the cookie
  if(theValue) {
      document.cookie = name + '=' + theValue + '; expires=Fri, 13-Apr-1970 00:00:00 GMT' + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:''); // set an already-expired cookie
  }
} // WM_killCookie
// End code to write and read cookie for font size  

// Dreamweaver generated code for rollovers.  Used for horizontal navbar  
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

// End - Dreamweaver generated code for rollovers.  Used for horizontal navbar 

// Begin code to open new window for EMail A Friend feature 
function wopen(url, name, w, h)
{
w += 32;
h += 96;
 var win = window.open(url,
  name, 
  'width=' + w + ', height=' + h + ', ' +
  'location=no, menubar=no, ' +
  'status=no, toolbar=no, scrollbars=no, resizable=no');
 win.resizeTo(w, h);
 win.focus();
}
// End code to open new window for EMail A Friend feature 

// rotating images begin 
var accoladecount = 10 ;
var billboardcount = 5;
var randomnumber = Math.random() ;
var rand1 = Math.round( (accoladecount-1) * randomnumber) + 1 ;
var rand2 = Math.round( (billboardcount-1) * randomnumber) + 1 ;
accolades = new Array
accolades[1] = "images/accolades1.jpg"
accolades[2] = "images/accolades2.jpg"
accolades[3] = "images/accolades3.jpg"
accolades[4] = "images/accolades4.jpg"
accolades[5] = "images/accolades5.jpg"
accolades[6] = "images/accolades6.jpg"
accolades[7] = "images/accolades7.jpg"
accolades[8] = "images/accolades8.jpg"
accolades[9] = "images/accolades9.jpg"
accolades[10] = "images/accolades10.jpg"
var accolade = accolades[rand1];
billboards = new Array
billboards[1] = "images/billboard1.jpg"
billboards[2] = "images/billboard2.jpg"
billboards[3] = "images/billboard3.jpg"
billboards[4] = "images/billboard4.jpg"
billboards[5] = "images/billboard5.jpg"
var billboard = billboards[rand2];
// rotating images end 

// Begin code to allow css dropdown to work in IE5 and IE6
startList = function() {
// This is only needed for IE browser ver. 5 & 6 
if(!/MSIE (5|6)/.test(navigator.userAgent)) return;
// Opera 8 spoofs as IE6 so check for Opera too
if(/Opera/.test(navigator.userAgent)) return;
if (document.all&&document.getElementById) {
	navRoot = document.getElementById("nav");
	for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
				this.className=" over";

				}
  			node.onmouseout=function() {
  			this.className=this.className.replace(" over", "");
   			}
   		}
  	}
 }
}
if (window.attachEvent) window.attachEvent("onload", startList);
// End code to allow css dropdown to work in IE5 and IE6



