/*Create the printer-friendly link*/
var basestring;
docloc = location.href;
if (basestring) { docloc = basestring;} //"basestring" added by WebCT in content module

function popUp(URL) {
	newWindow = window.open(URL,'popup','width=700,height=400,menubar=1,toolbar=1,location=1,status=1,scrollbars=1,resizable=1');
	newWindow.focus();
}

function printwindow() {
	if (window.opener) {
		document.write('<a href="#" onclick="self.close();">Close this window</a>');
	}
	else {
	document.write('<a' + ' href="' + docloc + '" onclick="popUp(this.href);return false;">Open printer-friendly window</a>');
	 }
}


/*Compensate for IE's lack of support for max-width in the style sheet. Set a fixed width if the monitor's screen width exceeds 1000 pixels.*/

function iebrowserwidth() {
//Function diabled in this design
/*ua = navigator.userAgent.toLowerCase();
i = 0;
browser = '';
winsize = screen.width;

	if ((i = ua.indexOf('msie')) != -1) { //indentifies Internet Explorer
		if (winsize > 1000) {
 		document.write ('<style type="text/css" media="screen">#page { width:635px; }</style>');
		}
	}*/
}


/*Add these printable styles to the opened printer-friendly window*/

function printstyles() {
	if (window.opener) {
		document.write('<link rel="stylesheet" href="template_files/printstyles.css" type="text/css">');
	}
}


