
<!-- ********************************************** -->	
function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("prodRN").getElementsByTagName("DIV");
		if(el.style.display == "none"){
			for (var i=0; i<ar.length; i++){
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}
function ChangeClass(menu, newClass) { 
	 if (document.getElementById) { 
	 	document.getElementById(menu).className = newClass;
	 } 
} 
//document.onselectstart = new Function("return false");
<!-- ********************************************** -->	

<!-- ********************************************** -->	
// SHOWS LARGE IMAGES
var imgarray = new Array(); //create an image array
imgarray[0] ='';   //first element empty for numerical clarity (ie 1 is first used element, not 0)

var displayed_image = 1;	//keeps track of which image is visible on the document

function add_image(low_src, high_src, alt){  //adds images locations to an array
	i = imgarray.length;  //first element(0) is already empty, so the first usable element will be 1
	imgarray[i] = new Array(3); //build an array with 2 elements for every image.
	imgarray[i][0] = low_src;  //add low-res image
	imgarray[i][1] = high_src;  //add high-res image
	imgarray[i][2] = alt;  //add alt tag
}

function show_image(image_index){ //change the displayed image:  imput which image you want to see
	document.images['image'].src = imgarray[image_index][0]; //change the src value in the document
	document.images['image'].alt = imgarray[image_index][2]; //change the alt tag value in the document 
	displayed_image = image_index;
}

function show_full_image(width, height, top, left){  //shows high-res version of the image in a new window
	
	arguments = "height=" +height +",width=" +width +",left=" +left +",top=" +top +",screenX=" +left +",screenY=" +top +",directories=no,fullscreen=no,location=no,menubar=no,toolbar=no,resizable=yes";

window.open(imgarray[displayed_image][1],"popup_image",arguments);
	}
<!-- ********************************************** -->	
	
	
<!-- ********************************************** -->	
// SITE EXIT MESSAGE	
	function exitMsg(name, url)
{
  message=window.open();
  message.document.writeln("<!DOCTYPE HTML PUBLIC '-//IETF//Dtd HTML//EN'>");
  message.document.writeln("<html><head><title>Exit Message</title>");
  message.document.writeln("<SCRIPT>function goAway() {window.location.href='" + url +"'} </SCRIPT>");
  message.document.writeln("<!-- ******** External Stylesheet for all pages ********-->");    
  message.document.writeln("<link rel='Stylesheet' href='/style/CBW.css' type='text/css'>");
  message.document.writeln("</head>");
  message.document.writeln("<body class='popup'>");
  message.document.writeln("<CENTER><H1><font face='arial, sans serif'>Are you sure you want to leave the <i>DTIRP Website</i>?</font></H1></CENTER>");
  message.document.writeln("<P><font face='arial, sans serif'>You are about to leave the <i>DTIRP Website</i> and go to  <b>" + name + "</b>.");
  message.document.writeln("<P>The appearance of this hyperlink does not constitute an endorsement by the Defense Treaty Inspection Readiness Program (DTIRP) of this Web site or the information, products, or services contained therein, nor does the DTIRP exercise any editorial control over the information you may find at this Web site. These links are provided consistent with the stated purpose of this Department of Defense (DoD) Web site.</font>");
  message.document.writeln("<CENTER><FORM>")
  message.document.writeln("<INPUT TYPE='button' NAME='stay' VALUE='Stay'");
  message.document.writeln("onClick='window.close()'>");
  message.document.writeln("<INPUT TYPE='button' NAME='leave' VALUE='Leave'");
  message.document.writeln("onClick='goAway()'>");
  message.document.writeln("</FORM></CENTER>");
  message.document.writeln("<center></center>");
  message.document.writeln("</body></html>");
  message.document.close();
}
<!-- ********************************************** -->	
	
<!-- ********************************************** -->	
//POP UP 	
function openwin(location, width, height, top, left, scroll){

var arguments;
var scrollbar;

if(!width) width = 300
if(width == "scroll"){
   scrollbar = "scrollbars";
   width = 300;
   }
   
if(!height) height = 300
if(height == "scroll"){
   scrollbar = "scrollbars";
   height = 300;
   }
   
if(!top) top = 200
if(top == "scroll"){
   scrollbar = "scrollbars";
   top = 200;
   }

if(!left) left = 200
if(left == "scroll"){
   scrollbar = "scrollbars";
   left = 200;
   }
   
if(scroll) scrollbar = "scrollbars"

arguments = "height=" +height +",width=" +width +",left=" +left +",top=" +top +",screenX=" +left +",screenY=" +top +",directories=no,fullscreen=no,location=no,menubar=no,toolbar=no,resizable=yes," +scrollbar;

window.open(location,"popup",arguments);
}
	