//Open a new window 
var NewWindow
function button1_onclick() {

NewWindow=
window.open("","Result","status")
if (NewWindow != null){
	var endcom ="//-->"
	var NewContent = "<html><head><title>SubWindow</title>"
	NewContent+="<!-- SCRIPT LANGUAGE=JavaScript>if (window.focus){self.focus()}"+endcom+"<//SCRIPT>"
	NewContent+="</HEAD><Body><H1 onload='if (window.focus){self.focus()}'>This window is new.</H1>"
	NewContent+="</Body></HTML>"
	NewWindow.document.write(NewContent)
	NewWindow.document.close()
	NewWindow.Focus()
	}
}
//function openNewFrame(URL1)
//URL1 is the URL to open in the Main frame
function openNewFrame(URL1) {
if (document.layers){
	//NewWindow=window.open(URL1,"Result","status")
	NewWindow=window.open("","Result","resizable=yes,scrollbars=no,width=625,height=420")
	var NewContent = "<html><head><title>" + URL1 + "</title>"
	NewContent+="<frameset rows='64,*'><Frame src='10.htm' name='Header'> "
	NewContent+="<Frame name='Main' src='"
	NewContent+=URL1
	NewContent+= "'>"
	NewContent+="<Noframes><Body><H3>Your browser does not support frames.</H3>"
	NewContent+="</Body></Noframes></frameset></HTML>"
	
	
	var HeaderContent=	"<html><head><title>SubWindow</title>"
	HeaderContent+="<Body><H3><A href='"
	HeaderContent+=window.document.location 
	HeaderContent+="'target= 'parent' onclick='parent.close()'>Return to ARRS 99 Exhibit: "
	HeaderContent+=window.document.title + "</A></H3></Body></HTML>"
	NewWindow.document.write(NewContent)
	NewWindow.frames[0].document.open()
	NewWindow.frames[0].document.write(HeaderContent)
	NewWindow.frames[0].document.close()
	NewWindow.document.close()
	NewWindow.focus()
	NewWindow.opener.close 

};
if (document.all) 
{

	if (NewWindow !=null) 
	{
		NewWindow.close()
		NewWindow=
		window.open("","Result","status")
	};

	NewWindow=
	window.open("","Result","resizable=yes,scrollbars=no,width=625,height=420")
	if (NewWindow != null)
	{
	var NewContent = "<html><head><title>" + URL1 + "</title>"
	NewContent+="<frameset rows='64,*'><Frame name='Header'> "
	NewContent+="<Frame name='Main' src='"
	NewContent+=URL1
	NewContent+= "'>"
	NewContent+="<Noframes><Body><H3>Your browser does not support frames.</H3>"
	NewContent+="</Body></Noframes></frameset></HTML>"
	
	
	var HeaderContent=	"<html><head><title>SubWindow</title>"
	HeaderContent+="<Body><H3><A href='"
	HeaderContent+=window.document.location 
	HeaderContent+="'target= 'parent' onclick='parent.close()'>Return to ARRS 99 Exhibit: "
	HeaderContent+=window.document.title + "</A></H3></Body></HTML>"
	NewWindow.document.write(NewContent)
	NewWindow.Header.document.write(HeaderContent)
	NewWindow.Header.document.close()
	NewWindow.document.close()
	NewWindow.opener.close 
	//NewWindow.focus 
	};
};
	
if (!(document.all) && !(document.layers))
	{window.location=URL1}

};

function popUp(pPage,width) {
if ((document.all) || (document.layers))
	{

	window.onError =null;
 	var fullURL = document.location;
 	var textURL = fullURL.toString();
 	var URLlen = textURL.length;
 	var lenMinusPage = textURL.lastIndexOf("/");
	var status="'resizable=yes,scrollbars=no,height=400, width=" +width +"'"
 	lenMinusPage += 1;
 	var fullPath = textURL.substring(0,lenMinusPage);
	
 	popUpWin = window.open(pPage,'popWin',status);
 	
 	window.popUpWin.focus();
 	}
else
{window.location=pPage}
};
