//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 (NewWindow !=null) {NewWindow.close()
NewWindow=
window.open("","Result","status")};

NewWindow=
window.open("","Result","status")
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><H1>Your browser does not support frames.</H1>"
	NewContent+="</Body></Noframes></frameset></HTML>"
	
	
	var HeaderContent=	"<html><head><title>SubWindow</title>"
	HeaderContent+="<Body><H1><A href='"
	HeaderContent+=window.document.location 
	HeaderContent+="'target= 'parent' onclick='parent.close()'>Return to InfoRad Exhibit: "
	HeaderContent+=window.document.title + "</A></H1></Body></HTML>"
	NewWindow.document.write(NewContent)
	NewWindow.Header.document.write(HeaderContent)
	NewWindow.Header.document.close()
	NewWindow.document.close()
	NewWindow.opener.close 
	//NewWindow.focus 
	}
	
}


