
var bn = navigator.appName;
var vn = navigator.appVersion;

if ((bn!="Microsoft Internet Explorer") || (vn.substring(0,3)!="2.0"))
 {

/************************
mainpage links	
*********/
gi1 = new  Image();
gi1.src = "/_images/tota_mp_nav_01a.gif";
gi2 = new  Image();
gi2.src = "/_images/tota_mp_nav_01b.gif";

tmd1 = new  Image();
tmd1.src = "/_images/tota_mp_nav_02a.gif";
tmd2 = new  Image();
tmd2.src = "/_images/tota_mp_nav_02b.gif";

ts1 = new  Image();
ts1.src = "/_images/tota_mp_nav_03a.gif";
ts2 = new  Image();
ts2.src = "/_images/tota_mp_nav_03b.gif";

news1 = new  Image();
news1.src = "/_images/tota_mp_nav_04a.gif";
news2 = new  Image();
news2.src = "/_images/tota_mp_nav_04b.gif";

cts1 = new  Image();
cts1.src = "/_images/tota_mp_nav_05a.gif";
cts2 = new  Image();
cts2.src = "/_images/tota_mp_nav_05b.gif";

mi1 = new  Image();
mi1.src = "/_images/tota_mp_nav_06a.gif";
mi2 = new  Image();
mi2.src = "/_images/tota_mp_nav_06b.gif";

donors1 = new  Image();
donors1.src = "/_images/tota_mp_nav_donors_normal.jpg";
donors2 = new  Image();
donors2.src = "/_images/tota_mp_nav_donors_hover.jpg";

chapters1 = new  Image();
chapters1.src = "/_images/tota_mp_nav_chapters_normal.jpg";
chapters2 = new  Image();
chapters2.src = "/_images/tota_mp_nav_chapters_hover.jpg";


mp1 = new  Image();
mp1.src = "/_images/tota_mp_navbottom_home_a.gif";
mp2 = new  Image();
mp2.src = "/_images/tota_mp_navbottom_home_b.jpg";


						
			
	}
function hiLite(name, source)
{
	var bn = navigator.appName;
	var vn = navigator.appVersion;

	if ((bn!="Microsoft Internet Explorer") || (vn.substring(0,3)!="2.0"))
	{
	    document.images[name].src = eval(source + ".src");
    }
}







//common js functions

function jumpPage(url) {
	if (url != "") location.href=url;
}			


function openWindow(url, winName, specs) {
	//set defaults
	if (winName == "") winName = "win";
	if (specs == "") specs = "width=600,height=400,scrollbars=yes,resizable=yes"
	
	if (url != "") {
		var win = window.open(url, winName, specs);	
		win.focus();
	}
}	


//show/hide a single div
function showHideSingleDiv(divID) {					
	activeDiv = document.getElementById(divID); //get reference to active div
		
	if (activeDiv.style.display == "block")
		activeDiv.style.display = "none";				
	else
		activeDiv.style.display = "block";		
}


//update hidden frame
//assumes an iframe named 'getvalues' exists on page
function getList(url) {			
	if (url != "") {				
		parent.frames['getvalues'].location.href = url;
	}
}


//submit form w/ select list w/ multiple values (select list items hold urls)
function chooseLocation(selectObj) {
	url = selectObj[selectObj.selectedIndex].value
	if (url != "") location.href=url;
}		


//count characters left in a form field
function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit) // if too long...this trims it!
		field.value = field.value.substring(0, maxlimit);
	else // otherwise, update 'characters left' counter
		countfield.value = maxlimit - field.value.length;
}


//strip ms word characters out of form fields
aBad = new Array(8220,8221,8216,8217,8212,8211,8230,183);
aGood = new Array('"','"',"'","'","--","-","...","*");
function fPaste(oTA) {
	sVal = clipboardData.getData("text");
	for (i=0;i<aBad.length;i++)
		sVal = sVal.replace( new RegExp(String.fromCharCode(aBad[i]),"g"),
		
	aGood[i]);
	document.selection.createRange().text = sVal;
	event.returnValue = false;
}


//mark form field w/ error
function raiseErr(item) {
	item.className = "error";
	item.focus();	
}


//clear form field error
function clearErr(item) {
	item.className = "";
}

window.onload = function()
{
    var mn_general = document.getElementById("mn_general");
    
    if(mn_general != null)
    {
        mn_general.onmouseover = function()
        {
            this.className = (this.className != "" ? " " : "") + "ieHover";
            hiLite('gi','gi2');
        }
        mn_general.onmouseout = function()
        {
            this.className = this.className.replace(/ ?ieHover/i, "");
            hiLite('gi','gi1');
        }
    }
    
    var mn_chapters = document.getElementById("mn_chapters");
    
    if(mn_chapters != null)
    {
        mn_chapters.onmouseover = function()
        {
            this.className = (this.className != "" ? " " : "") + "ieHover";
            hiLite('chapters','chapters2');
        }
        mn_chapters.onmouseout = function()
        {
            this.className = this.className.replace(/ ?ieHover/i, "");
            hiLite('chapters','chapters1');
        }
    }
}
