var ie, ns4, moz, opera, macMoz = false;
var browsername = "Netscape";
var ua = window.navigator.userAgent;
var version = navigator.appVersion;
var range = "";
var styleObj = "";
//alert(ua)
/* which browser */
if (ua.indexOf("MSIE") >= 0)  { browsername = "Microsoft" }
/* Which version number */
if (ua.indexOf("/4.") > 0) 		{ version = 4 }
if (ua.indexOf("/5.") > 0) 		{ version = 5 }
if (ua.indexOf("MSIE 5.") > 0)  { version = 5 }
if (ua.indexOf("Opera 6.") > 0)  { opera = true; }

/* Put it all together */
if (browsername == "Microsoft") { ie  = true; }
if (browsername == "Netscape"  && version == 4) { ns4  = true; }
if (browsername == "Netscape"  && version == 5) { moz = true; }
if (ua.indexOf("Opera 6.") > 0)  { opera = true; ie = false;}

//if (ua.indexOf("Moz") > -1 && ua.indexOf("Macintosh") > -1 && ua.indexOf("Safari") == -1)  { 
//	macMoz = true; 
//	moz = false; 
//	window.location.href='/alumni/clubs/clubsites/portal/invalidBrowser.cfm'
//}


if (ie) {
	document.write("<link rel='stylesheet' href='/alumni/clubs/clubsites/portal/css/css_ie.css'>");
	range = "all.";
	styleObj = ".style";
}
else if (ns4) {
	window.location.href='/alumni/clubs/clubsites/invalidBrowser.cfm?club=invalidBrowser'
}


else if (moz) {
	document.write("<link rel='stylesheet' href='/alumni/clubs/clubsites/portal/css/css_ie.css'>");	
	range = "getElementById('";
	styleObj = "').style";
}else{
	document.write("<link rel='stylesheet' href='/alumni/clubs/clubsites/portal/css/css_ie.css'>");
	range = "all.";
	styleObj = ".style";
}

events_off_image= new Image();
events_on_image= new Image();
events_off_text = new Image();
events_on_text = new Image();
membership_off_image= new Image();
membership_on_image= new Image();
membership_off_text = new Image();
membership_on_text = new Image();
myProfile_off_image= new Image();
myProfile_on_image= new Image();
myProfile_off_text = new Image();
myProfile_on_text = new Image();
spacer = new Image();
events_off_image.src='/alumni/clubs/clubsites/portal/i/appMenuImages/events_off_image.gif'
events_on_image.src='/alumni/clubs/clubsites/portal/i/appMenuImages/events_on_image.gif'
events_off_text.src ='/alumni/clubs/clubsites/portal/i/appMenuImages/events_off_text.gif'
events_on_text.src ='/alumni/clubs/clubsites/portal/i/appMenuImages/events_on_text.gif'
membership_off_image.src='/alumni/clubs/clubsites/portal/i/appMenuImages/membership_off_image.gif'
membership_on_image.src='/alumni/clubs/clubsites/portal/i/appMenuImages/membership_on_image.gif'
membership_off_text.src ='/alumni/clubs/clubsites/portal/i/appMenuImages/membership_off_text.gif'
membership_on_text.src = '/alumni/clubs/clubsites/portal/i/appMenuImages/membership_on_text.gif'
myProfile_off_image.src= '/alumni/clubs/clubsites/portal/i/appMenuImages/myProfile_off_image.gif'
myProfile_on_image.src= '/alumni/clubs/clubsites/portal/i/appMenuImages/myProfile_on_image.gif'
myProfile_off_text.src = '/alumni/clubs/clubsites/portal/i/appMenuImages/myProfile_off_text.gif'
myProfile_on_text.src = '/alumni/clubs/clubsites/portal/i/appMenuImages/myProfile_on_text.gif'
spacer.src='/i/vis.gif';

function toggleOn(img){
	strText = new String() ;
	strText=img.src;
	objstr=strText.substring(strText.lastIndexOf('/')+1,strText.lastIndexOf('_off'))
	img.src=eval(objstr+'_on_image.src');
	textObj=eval(objstr+'_text_obj')
	textObj.src=eval(objstr+'_on_text.src');
}
function toggleOff(img){
	strText = new String() ;
	strText=img.src;
	objstr=strText.substring(strText.lastIndexOf('/')+1,strText.lastIndexOf('_on'))
	img.src=eval(objstr+'_off_image.src')
	textObj=eval(objstr+'_text_obj')
	textObj.src=eval(objstr+'_off_text.src');
}

function toggleMenuOn(img){
	strText = new String() ;
	strText=img.src;
	objstr=strText.substring(strText.lastIndexOf('/')+1,strText.lastIndexOf('_off'));
	img.src=eval(objstr+'_on.src');
}
function toggleMenuOff(img){
	strText = new String() ;
	strText=img.src;
	objstr=strText.substring(strText.lastIndexOf('/')+1,strText.lastIndexOf('_on'))
	img.src=eval(objstr+'_off.src')

}


