<!-- generic popup
function popup(what,width,height) {
msgWindow=window.open(what,"NameofWindow","resizable=yes,toolbar=no,left=10,top=25,screenX=10,screenY=25,directories=no,status=no,scrollbars=yes,location=no,menubar=no,width=" + width + ",height=" + height)
        if (((navigator.appName=="Netscape") && ((navigator.appVersion).charAt(0) > 2))) {
                msgWindow.focus()
        }
}

//**
//* Adjusts the link on the upper frame to correspond to the content in the lower
//* frame, when the back button on the browser is used
//*
//*/
function adjustLinkNumber()
{
	//Get the current link number in the content frame. Pulls link number from filename.
    var content_URL = document.URL;
	var file_name = content_URL.substring (content_URL.lastIndexOf("/") + 1, content_URL.length);
	var content_linknumber = file_name.substring(0,3);
	
	var old_const_link = 0;
	var text_link = 0;
	
	if (top.document.set_load == 1) {
		//Get the link number highlighted in the constitution text frame
		for (var i = 0; i < top.constitution_text_frame.document.links.length; i++) 
		{
			if (top.constitution_text_frame.document.links[i].id == "onstate")
			{
				text_link =  top.constitution_text_frame.document.links[i].href;
				old_const_link = i;
				break;
			}
		}
		var linknumber = text_link.substring(text_link.lastIndexOf(",") + 2 , text_link.length - 2);
	
		//If the link numbers do not match, set the highlighted link number to offstate
		// and highlight the correct link number 
		if (content_linknumber != linknumber)
		{
			top.constitution_text_frame.document.links[old_const_link].id = "";
			
			for (var i = 0; i < top.constitution_text_frame.document.links.length; i++) 
			{
				link_URL = top.constitution_text_frame.document.links[i].href;
				var cur_linknumber = link_URL.substring(link_URL.lastIndexOf(",") + 2 , link_URL.length - 2);
				if ( cur_linknumber == content_linknumber )
				{
					top.constitution_text_frame.document.links[i].id = "onstate";
					//top.constitution_text_frame.location.hash = content_linknumber;
					break;
				}
			}
		}//end compare link numbers
	}
}

// -->

