if (document.images) {
btn1on = new Image(); // Active images
btn1on.src = "images/button_on.gif";
btn2on = new Image();
btn2on.src = "images/button_on.gif";
btn3on = new Image();
btn3on.src = "images/button_on.gif";
btn4on = new Image();
btn4on.src = "images/button_on.gif";
photo1on = new Image();
photo1on.src = "images/t3_photo1_on.jpg";
photo2on = new Image();
photo2on.src = "images/t3_photo2_on.jpg";

btn1off = new Image(); // Inactive images
btn1off.src = "images/button_off.gif";
btn2off = new Image();
btn2off.src = "images/button_off.gif";
btn3off = new Image();
btn3off.src = "images/button_off.gif";
btn4off = new Image();
btn4off.src = "images/button_off.gif";
photo1off = new Image();
photo1off.src = "images/t3_photo1_off.jpg";
photo2off = new Image();
photo2off.src = "images/t3_photo2_off.jpg";
}

function RollOn(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "on.src");
	}
}

function RollOff(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "off.src");
	}
}

function hdrSwitch(x) {
	if(x.className=='m5_hdr_bar_off'){
		x.className='m5_hdr_bar_on_alt'
	}
}

function hdrSwitchBack(x) {
	if(x.className=='m5_hdr_bar_on_alt'){
		x.className='m5_hdr_bar_off'
	}
}

function hdrSwitch2(x) {
	if(x.className=='m11_hdr_bar_off'){
		x.className='m11_hdr_bar_on_alt'
	}
}

function hdrSwitchBack2(x) {
	if(x.className=='m11_hdr_bar_on_alt'){
		x.className='m11_hdr_bar_off'
	}
}

function show(tn,tnid) {
	document.getElementById(tn).className="topnav_on";
	document.getElementById(tnid).style.display="block";
}
function hide(tn,tnid) {
	document.getElementById(tn).className="topnav_off";
	document.getElementById(tnid).style.display="none";
}
function show2(tn,tnid) {
	//document.getElementById(tn).className="topnav_on";
	document.getElementById(tnid).style.display="block";
}
function hide2(tn,tnid) {
	//document.getElementById(tn).className="topnav_off";
	document.getElementById(tnid).style.display="none";
}
function Toggle(x,y) {
	ToggleClose(x);
	ChangeHdrStyles(y);
	//obj=document.getElementById(x);
	//visible=(obj.style.display!="none");
	//if (visible) {
		//obj.style.display="none";
	//} else {
		//obj.style.display="block";
	//}
}
function ToggleClose(x) {
	document.getElementById('m5a').className="m5_body_off";
	document.getElementById('m5b').className="m5_body_off";
	document.getElementById('m5c').className="m5_body_off";
	document.getElementById('m5d').className="m5_body_off";
	document.getElementById('m5e').className="m5_body_off";
	document.getElementById('m5f').className="m5_body_off";
	document.getElementById('m5g').className="m5_body_off";
	document.getElementById(x).className="m5_body_on";
}
function ChangeHdrStyles(y) {
	document.getElementById('m5ahdr').className="m5_hdr_bar_off";
	document.getElementById('m5bhdr').className="m5_hdr_bar_off";
	document.getElementById('m5chdr').className="m5_hdr_bar_off";
	document.getElementById('m5dhdr').className="m5_hdr_bar_off";
	document.getElementById('m5ehdr').className="m5_hdr_bar_off";
	document.getElementById('m5fhdr').className="m5_hdr_bar_off";
	document.getElementById('m5ghdr').className="m5_hdr_bar_off";
	document.getElementById(y).className="m5_hdr_bar_on";
}
function Toggle2(x,y) {
	ToggleClose2(x);
	ChangeHdrStyles2(y);
	//obj=document.getElementById(x);
	//visible=(obj.style.display!="none");
	//if (visible) {
		//obj.style.display="none";
	//} else {
		//obj.style.display="block";
	//}
}
function ToggleClose2(x) {
	document.getElementById('m11a').className="m11_body_off";
	document.getElementById('m11b').className="m11_body_off";
	document.getElementById('m11c').className="m11_body_off";
	document.getElementById('m11d').className="m11_body_off";
	document.getElementById('m11e').className="m11_body_off";
	document.getElementById('m11f').className="m11_body_off";
	document.getElementById('m11g').className="m11_body_off";
	document.getElementById(x).className="m11_body_on";
}
function ChangeHdrStyles2(y) {
	document.getElementById('m11ahdr').className="m11_hdr_bar_off";
	document.getElementById('m11bhdr').className="m11_hdr_bar_off";
	document.getElementById('m11chdr').className="m11_hdr_bar_off";
	document.getElementById('m11dhdr').className="m11_hdr_bar_off";
	document.getElementById('m11ehdr').className="m11_hdr_bar_off";
	document.getElementById('m11fhdr').className="m11_hdr_bar_off";
	document.getElementById('m11ghdr').className="m11_hdr_bar_off";
	document.getElementById(y).className="m11_hdr_bar_on";
}