// clears search's input onfocus
//function clearText(thefield){
//	if (thefield.defaultValue==thefield.value)
//	thefield.value = ""
//} 

// homepage callout panel switcher
//function panelSwitch(currentPanel){
//	$('.callouthome').addClass('hide');
//	$('#panel'+currentPanel).removeClass('hide');
//}

function printPage(){
	if (navigator.userAgent.indexOf("Safari") != -1 )
		alert("Safari does not support this feature, please choose print from the 'File' menu.");
	else
		window.print();
}

 function refreshNav(){
    var secondaryNav = $('#leftSash');
    if(secondaryNav.length > 0){
        var distanceToNav = $(secondaryNav).offset();
        var currentHeight = $(secondaryNav).height();
        var footerPosition = $('#footer').offset();
        var primaryColumn = $('#content').height();
        if(primaryColumn <= currentHeight){
            // if the secondary nav is overlapping the footer
            $('#content').height(currentHeight + 15);
        }
    }
}
  

/**
 *  Function:		openWindow / popupWindow
 *
 *  Version History:	?
 *
 *  Description:	Use this function to open/popup a new window to display a link in.
 *
 *  Special Notes:	none
 *
 *  Syntax:		openWindow(url, w, h)
 *
 *  Parameters:		url: (input) target link
 *			w: (input) width of the popup window in pixels
 *			h: (input) height of the popup window in pixels
 *
 *  Returns:		void
 */

 // function openWindow(url, w, h) {
//    var options  = "width=" + w + ",height=" + h + ",";
//       options += "resizable=yes,scrollbars=yes,status=yes,";
//       options += "menubar=yes,toolbar=yes,location=yes,directories=no";
//    var newWin = window.open(url, 'newWin', options);
//    newWin.focus();
//  }

