// JavaScript Document

/**
 * Returns the file.html string 
 */
function getHtml(){
	var url = document.URL
	var name = url.substring(url.lastIndexOf('/')+1 , url.length);
	return name;
}

/**
 * Opens a popup window with a specified width and height
 */
function popup(url, width, height) {
	// Determine center
	var centerX = (window.screen.availWidth/2)-(width/2);
	var centerY= (window.screen.availHeight/2)-(height/2);
	// Create parameters
	var position = 'top='+centerY+',left='+centerX+',';
	var size = 'width='+width+',height='+height;
	// Add arguments (for mac)
	var arguments = ',menubars=0,toolbar=0,scrollbars=0'
	// Build new window
	var newwindow=window.open(url,'name',position+size+arguments);
	if (window.focus) {newwindow.focus()}

}
