// JavaScript Document


/* *****************************************
Created		06/03/03
Author		Rachael Rodell
Description	Opens 'email to a friend' page	
***************************************** */
function ba_sendPageToFriend() {
	var url='/mailToFriend.asp?pageURL=' + location.href + '&pageTitle=' + document.title; 	
	var features = "width=350px,height=490px,toolbar=no,menubar=no,location=no,center=yes,help=no,status=no,maximize=no,minimize=no,border=thin,scrollbars=no";
	window.open( url, '', features );
}

/* *****************************************
Created		13/03/03	
Author		Glenn Lyons
Description	Opens online module page	
***************************************** */
function ba_openModule(parentID, tabletID){
	//var features = 'fullscreen=yes, scrollbars=yes, resizable=yes';
	//window.open('/modules/' + tabletID + '/1.asp?pID=' + parentID, '', features);
	var features = 'fullscreen=no, scrollbars=yes, resizable=yes';
	window.open('/modules/' + tabletID + '/1.asp', '', features);
}
/* *****************************************
Created		04/06/03	
Author		Glenn Lyons
Description	Opens online module PDF
***************************************** */
function ba_openPDF(url){
	var features = 'fullscreen=no, scrollbars=yes, resizable=yes';
	window.open(escape(url),'',features);
}
/* *****************************************
Created		13/03/03	
Author		Glenn Lyons
Description	Opens popup window
***************************************** */
function ba_openNewWindow(url,windowName,features){
	window.open(url, windowName, features);
}
/* *****************************************
Created		13/03/03	
Author		Glenn Lyons
Description	Prints course details without banner, footer, left/right nav elements, and buttons on course page
***************************************** */
function ba_printCourse(){
	if( document.getElementById("bannerTable") ) 
		document.getElementById("bannerTable").className = "dontPrint";
	if( document.getElementById("locationTable") ) 
		document.getElementById("locationTable").className = "dontPrint";
	if( document.getElementById("leftNavCell") ) 
		document.getElementById("leftNavCell").className = "dontPrint";
	if( document.getElementById("footerTable") ) 
		document.getElementById("footerTable").className = "dontPrint";
	if( document.getElementById("sausageTable") ) 
		document.getElementById("sausageTable").className = "dontPrint";
	if( document.getElementById("bookingTable") ) 
		document.getElementById("bookingTable").className = "dontPrint";
	if( document.getElementById("relatedLearningTable") ) 
		document.getElementById("relatedLearningTable").className = "dontPrint";
	if( document.getElementById("usefulLinksTable") ) 
		document.getElementById("usefulLinksTable").className = "dontPrint";
	if( document.getElementById("formButtons") ) 
		document.getElementById("formButtons").className = "dontPrint";
	window.print();
}