// replaces above addToFavorites function in new site

function bookmarksite(){
 var url = window.location.href;
 var title = document.getElementById("sbsTitle").innerHTML;
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

/* ======================================================================
FUNCTION:	GetCalendarDay

INPUT: 		none.

RETURN:		the day of the week as a string

DESC:			The method returns the day of the week, e.g. "Monday". This is
				intended to be used as a method of a Date object.

USAGE:		today = new Date();
				document.write(today.getCalendarDay());

PLATFORMS:	Netscape Navigator 3.01 and higher,
			  	Microsoft Internet Explorer 3.02 and higher,
			  	Netscape Enterprise Server 3.0,
			  	Microsoft IIS/ASP 3.0.
====================================================================== */
// Make GetCalendarDay a method of all Date objects
Date.prototype.getCalendarDay = GetCalendarDay;
function GetCalendarDay() {
	var n = this.getDay();
	var dow = new Array(7);

	dow[0] = "Sunday";
	dow[1] = "Monday";
	dow[2] = "Tuesday";
	dow[3] = "Wednesday";
	dow[4] = "Thursday";
	dow[5] = "Friday";
	dow[6] = "Saturday";

	return dow[n];
} // end GetCalendarDay

// begin drop down list flip script

function gothere() {
var list = document.frmJump.jump
location = list.options[list.selectedIndex].value
}


// toggle page contents


// preload images
imgHide = new Image();
imgHide.src = "/images/icons/triDown.gif";
imgShow = new Image();
imgShow.src = "/images/icons/triUp.gif";

// function for image rollovers
function rollover() {
 if (document.images)
 {
   
  var imgDoSwap = document.imgSwap;
     if (imgDoSwap.src == imgHide.src)
        {
        document.imgSwap.src = imgShow.src;
        }
     else
        {
        document.imgSwap.src = imgHide.src;    
        }
  }
}

function toggle(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}

}


function toggleLayer(obj){

 if (document.getElementById)
    {
    // Standards-Based Browsers
    var style2 = document.getElementById(obj).style;
    style2.display = style2.display ? "":"inline";
    rollover();
    }
 
 else if (document.all)
    {
    // old msie versions 
    var style2 = document.all[obj].style;
    style2.display = style2.display ? "":"inline";
    rollover();
    }
    
 else if (document.layers)
    {
    // nn4 versions
    var style2 = document.layers[obj].style;
    style2.display = style2.display? "":"inline";
    rollover();
    }

}


// end toggle

// add to favorites script

 function addToFavorites() {
   if ((navigator.appVersion.indexOf("MSIE") > 0)
    && (parseInt(navigator.appVersion) >= 4)) {
    var sText = "<SPAN STYLE='color:blue;cursor:hand;font-size:8pt;font-family:verdana,arial,sans-serif;font-weight:400'";
    sText += "onclick='window.external.AddFavorite(location.href,";
    sText += "document.title);'><img src='/images/add_to_favorites_check.gif' width='11' height='10' alt='Add Page To Favorites' hspace='2' vspace='0'><u>Add To Favorites</u> </SPAN>";
    document.write(sText);
   }
 }

