/*Basic Script file for mathematical documents.*/
/*You may modify and redistribute this file*/

var newWindow, htmlElement, headerText;

headerText = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'><html><head><title>Document Element</title><meta name='Author' content='Kyle Siegrist' /><meta name='Keywords' content='HTML, CSS, DOM, mathematical documents' /><meta name='Description' content='This article discusses the structure of web-based mathematical documents.' /><link rel='icon' href='../MAA.png' type='image/png' /><link rel='shortcut icon' href='../MAA.png' type='image/png' /><link rel='stylesheet' href='styles.css' type='text/css' /><script src='scripts.js' type='text/javascript'></script></head>";

function openWindow(address, windowName, w, h){	
	newWindow = window.open(address,windowName,"toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=2,resizable=1,width=1000,height=1000,top=20,left=20");
	newWindow.resizeTo(w,h);
	newWindow.focus();
}

function openWindowMenubar(address, windowName, w, h){	
	newWindow = window.open(address,windowName,"toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=2,resizable=1,width=1000,height=1000,top=20,left=20");
	newWindow.resizeTo(w,h);
	newWindow.focus();
}
function openWindowToolbar(address, windowName, w, h){	
	newWindow = window.open(address,windowName,"toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=2,resizable=1,width=1000,height=1000,top=20,left=20");
	newWindow.resizeTo(w,h);
	newWindow.focus();
}

function openWindowFlash(address, windowName){	
	newWindow = window.open(address,windowName,"toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=2,resizable=1,width=790,height=570,top=50,left=100");
	newWindow.focus();
}

function displayElement(idName, windowName, w, h){
	htmlElement = document.getElementById(idName).innerHTML;
	newWindow = window.open('',windowName,"toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=2,resizable=1,width=300,height=200,top=20,left=20");
	newWindow.resizeTo(w,h);
	newWindow.document.write(headerText + htmlElement + "</body></html>");
	newWindow.document.close();
	newWindow.focus();
}	

