function openWindow(file){

var xpos = parseInt((screen.width/2)- 200);
var ypos = parseInt((screen.height/2)- 275); 

var newWindow = window.open(file,'','width=400,height=600,titlebar=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes'); 

newWindow.focus();
newWindow.moveTo(xpos,ypos); 
} 

function openWindowScroll(file,width,height){

var xpos = parseInt(((screen.width - width) /2));
var ypos = parseInt(((screen.height - height)/2)); 

var newWindow = window.open(file,'','width=' + width + ',height=' + height +',titlebar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes'); 

newWindow.focus();
newWindow.moveTo(xpos,ypos); 
} 


function DoGlossary(Item){
var xpos = parseInt(screen.width - 300);
//Move and resize main window
window.moveTo(0,0);
window.width = screen.width - 300;
window.height = screen.height;

var newWindow = window.open('course_new_help.asp?item='+Item,'CourseHelp','width=290,height=400,titlebar=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes'); 

newWindow.focus();
newWindow.moveTo(xpos,0); 
} 

function printSpecial()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		
		html += '\n</HE' + 'AD>\n<BODY>\n';
		
		var printReadyElem = document.getElementById("printReady");
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Could not find the printReady section in the HTML");
			return;
		}
			
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}

