//<!-- functionwrite dynamic stylesheets -->
function detection() {
	this.ver=navigator.appVersion;
	this.agent=navigator.userAgent;

	HM_DOM=document.getElementById?true:false;
	HM_NS6=(HM_DOM && parseInt(this.ver) >= 5) ?true:false;
	HM_NS4=(document.layers && !HM_DOM)?true:false;
	HM_IE6=(this.ver.indexOf("MSIE 6")>-1 && HM_DOM)?true:false;
	HM_IE5=(this.ver.indexOf("MSIE 5")>-1 && HM_DOM)?true:false;
	HM_IE4=(document.all && !HM_DOM)?true:false;
	HM_IE=(HM_IE4||HM_IE5||HM_IE6);

//	  Write out which stylesheet to use according to detection
//	 If the browser is Internet Explorer 4,5,6
 
//	  THE BELOW PATHS MAY NEED TO BE CHANGED TO REFLECT PATH ON COLD FUSION BOX!!!

	if (HM_IE) {
	document.write('<link rel=\"stylesheet\" type=\"text/css\"	href=\"/site_design/_typography.css\">');
		//		 If the browser is Netscape 6
		} else if (HM_NS6) {
		document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"/site_design/_typography_n6.css\">');
		//		 If the browser is Netscape 4
		} else if (HM_NS4) {
		document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"/site_design/_typography_n4.css\">');
		document.write('<link rel=\"stylesheet\" type=\"text/css\"	href=\"/site_design/_color_layout.css\">');
	//	 For all other cases use the Internet Explorer styles
	} else {
	document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"/site_design/_typography.css\">');
	}
}

detection();


//<!-- build image arrays for complete preloading in IE-->
if (!document.images) {
} else {

}


//<!-- function for rolling over images -->
function EV_Rollover(daImage, daSrc){
  var objStr,obj;
  
  if(document.images){
	
	if (typeof(daImage) == 'string') {
	 objStr = 'document.' + daImage;
	 obj = eval(objStr);
	 obj.src = daSrc;
	} else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
	 daImage.src = daSrc;
	}
  }
}




//<!-- function for wrapping all onLoad functions into one -->
function bodyLoader() {
	var cname = "";
}

//<!-- function for opening a new window -->
function newWin (url,name,params) {
	 newwindow = window.open(url,name,params);
}

function getCookie(name)
{
      var cname = name + "=";
      var dc = document.cookie;             
      if (dc.length > 0) 
      {              
           begin = dc.indexOf(cname);
            if (begin != -1) 
            {           
                  begin += cname.length;       
                  end = dc.indexOf(";", begin);
                  if (end == -1) end = dc.length;
                  return unescape(dc.substring(begin, end));
            } 
      }
      return null;
}

 

function setCookie(name, value) 
{
      var now = new Date();

      var then = new Date(now.getTime() + 31536000000);  // (1 year = 60 * 60 * 24 * 356 * 1000 millisecond)

      document.cookie = name + "=" + escape(value) + "; expires=" + then.toGMTString() + "; path=/";
}
 
function getInfo(form) 
{

      form.info.value = "Browser Information: " + navigator.userAgent;

}

function getValue(element) 

{

      var value = getCookie(element.name);

      if (value != null) element.value = value;

}

function setValue(element) 

{

      setCookie(element.name, element.value);

}

