var newWindow = null;
var lastPage = null;
var lastURL = null ;
var currentPage = null;
var currentURL = null;

/*
 * params: 	contentURL - URL for windows content
 * windowName - name of window to be targeted can only be alphanumeric and underscores (no spaces)
 * titleBarText - text to appear in the browser window title bar
 */
function openWindow2(contentURL, windowName, windowWidth, windowHeight, titleBarText) {
	
	// adjust for ie border
	windowWidth = windowWidth + 25;
	windowHeight = windowHeight + 25;
	
	widthHeight = 'height=' +windowHeight + ',width=' + windowWidth;
	newWindow = window.open(contentURL, windowName, widthHeight);
	//newWindow.document.title = titleBarText;
	newWindow.focus();
}

function openWindow(contentURL, windowName, windowWidth, windowHeight, titleBarText) {
	
	// adjust for ie border
	//windowWidth = windowWidth + 25;
	//windowHeight = windowHeight + 25;
	
	widthHeight = 'height=' +windowHeight + ',width=' + windowWidth;
	newWindow = window.open('', windowName, widthHeight);
	//newWindow.document.title = titleBarText;
	newWindow.document.write('<html><head>');
	newWindow.document.write('<title>' + titleBarText + '</title>');
	newWindow.document.write('</head><body style="margin:0em;">');
	newWindow.document.write('<img src="' + contentURL + '">');
	newWindow.document.write('</body><html>');
	newWindow.focus();
}

function closeWindow() {
	if (newWindow !=null) {
		newWindow.close();
		newWindow = null;
	}
}

function dummyMethod() {
  return;
}

function pageLoad() {
	
	lastPage = currentPage;
	lastPageURL = currentURL;
	
}


function toggleMenu() {
	top.menu.visibile = false;
	// top.menu.location = self.location;
}

// Used to set the title bar in the main window
function setWindowTitle(windowTitle) {
	//top.document.title = windowTitle;
}

// sets the left hand menu in the frame
function loadLeftMenu(menuURL) {
	top.menu.location=menuURL;
}
