<!--
	//---------------------------------
	function launchTablet( tabletID, displayIcon, url, launchFilename, available ){
		if( displayIcon == "" ) displayIcon = getTabletProperty( tabletID, "displayIcon" );
		if( available ){
			var winName = "window" + (new Date()).valueOf();

			if( displayIcon == "VIDEO" ){
				launchPlayer( tabletID );
			} else if( displayIcon == "INTERACTIVE" ){
				launchInteractive( tabletID, launchFilename );
			} else if( url.substring(url.length-3, url.length)=="bat" ){
				launchInteractive( tabletID, url );
			} else if( displayIcon == "AUDIO" ){
				launchPlayer( tabletID );
			} else if( displayIcon == "ONLINECOURSE" ){
				launchOnlineCourse( tabletID, url );
			} else if( displayIcon == "ONLINEMODULE" ){
				launchOnlineModule( tabletID, url );
			} else if( displayIcon == "DOCUMENT" ){
				launchDocument( tabletID, url );
			} else if( displayIcon == "COURSE" ){
				launchTIS( tabletID, available );
			} else if( displayIcon == "PEOPLE" ){
				launchTIS( tabletID, available );
			}
		} else {
				alert("Sorry, this item is not available.");
		}
	}
	//---------------------------------
	function launchTIS( tabletID, available, categoryID ){
		// open TIS but do not write log event as the TIS does this itself
		//alert(available);
		var winName = getNewWindowName();
		if( available == "" || available == null ) available = getTabletAvailability( tabletID );
		var features = "scrolling:yes;scrollbars:yes;center:yes;border:thin;help:no;status:no;maximize:no;minimize:no;resizable:yes;";
		var loc = "/tis.asp?zone=" + zone + "&TabletID=" + tabletID + "&available=" + available + "&categoryID=" + categoryID;
		var result = showModalDialog( loc, winName, features );
		//njp20010418 var result = window.open( loc, winName );
	}
	//---------------------------------
	function launchSearchTIS( tabletID, available ){
		// open TIS but do not write log event as the TIS does this itself
		var winName = getNewWindowName();
		if( available == "" || available == null ) available = getTabletAvailability( tabletID );
		var features = "dialogWidth:500px;dialogHeight:450px;scrollbars:no;center:yes;border:thin;help:no;status:no;maximize:no;minimize:no";
		var loc = "/tis.asp?start=0&TabletID=" + tabletID + "&available=" + available;
		var result = showModalDialog( loc, winName, features );
	}
	//---------------------------------
	function launchNotes( tabletID, transcriptURL ){
		// open notes and write event
		var winName = getNewWindowName();
		if( transcriptURL == "" ) transcriptURL = getTabletProperty( tabletID, "transcriptURL" );
		if( transcriptURL != "" ){
			window.open(transcriptURL,winName,"menubar=yes,location=yes,top=10,left=0");
			logEvent( "Transcript opened: " + transcriptURL, tabletID );
		} else {
			logEvent( "Error: Tablet has no transcript", tabletID );
		}
	}
	//---------------------------------
	function launchDocument( tabletID, url ){
		// open document and write log event
		var winName = getNewWindowName();
		if( url == "" ) url = getTabletProperty( tabletID, "url" );
   	var str = "resizable=yes,status=yes,toolbar=yes,menubar=yes,location=yes,height=550,width=790,top=10,left=0"
		window.open(url, winName, str );
		logEvent( "Document opened: " + url, tabletID );
	}

	//---------------------------------
	function launchOnlineCourse( tabletID, url ){
		// open document and write log event
		if( url == "" ) url = getTabletProperty( tabletID, "url" );
		parent.location=url;
		logEvent( "Document opened: " + url, tabletID );
	}


	//---------------------------------
	function launchOnlineModule( tabletID, url ){
		// open document and write log event
		if( url == "" ) url = getTabletProperty( tabletID, "url" );
		// alert(url);
		parent.location=url;
		logEvent( "Document opened: " + url, tabletID );
	}
	//---------------------------------
	function launchPlayer( tabletID ){
		// open player but do not write log event as the player does this itself
		var winName = getNewWindowName();
		var str = "resizable=yes,status=no,toolbar=no,menubar=no,location=no,height=550,width=790,top=10,left=0"
		window.open( "/player.asp?tabletID=" + tabletID, winName, str );
	}
	//---------------------------------
	function launchInteractive( tabletID, launchFilename ){
		if( launchFilename == "" ) launchFilename = getTabletProperty( tabletID, "launchFilename" );
		var testString = launchFilename.toLowerCase();
		if( testString.indexOf(".htm") > 0 || testString.indexOf(".asp") > 0 ){
			var winName = getNewWindowName();
   		var str = "resizable=yes,status=yes,toolbar=yes,menubar=yes,location=yes,height=550,width=790,top=10,left=0"
			window.open(launchFilename, winName, str );
			logEvent( "Interactive package started: " + launchFilename, tabletID );
			
		} 
	}
	//---------------------------------
	function getNewWindowName(){
		return "window" + (new Date()).valueOf();
	}	
	//---------------------------------
	function getTabletAvailability( tabletID ){
		var value = CommunicatorApplet.getURL( "/dataUtils/getTabletAvailability.asp?tabletID=" + tabletID);
		return (value == "1");
	}
	//---------------------------------
	function getTabletProperty( tabletID, propertyName ){
		var value = CommunicatorApplet.getURL( "/dataUtils/getTabletProperty.asp?property=" + propertyName + "&tabletID=" + tabletID);
		return value;
	}
	//---------------------------------
	function translateLaunchFilename( launchFilename ){
		return launchFilename.replace(/\\\\w1mhsapps05\\l2k\$\\Learning/i, getPreferredServer() );
	}
	//---------------------------------
	function fileExists( fname ) {
		var res = CommunicatorApplet.GetURL( "/dataUtils/checkForFile.asp?file=" + fname );
		if ( res=="true" ) 
			return true;
		else
			return false;
	}
	//---------------------------------
	function launchModule( tablet ){
			//if ( confirm("Launching... " + tablet ) ){
				var launchFile = '/modules/' + tablet + '/1.asp';
				if( fileExists( launchFile )){
					if( thisUserName == 'pricen01' ){
						notFullScreen(launchFile)
					} else {
						fullScreen(launchFile)
					}
				} else {
					alert( "Sorry, this module does not appear to be available.");
				}
			//}
	}
	//---------------------------------
	function fullScreen(theURL) {
		window.open(theURL, '', 'fullscreen=yes, scrollbars=auto');
		}
	//---------------------------------
	function notFullScreen(theURL) {
		window.open(theURL, '', 'width=620,height=460,scrollbars=yes');
		}
	//---------------------------------
	function fullScreenNoScroll(theURL) {
		window.open(theURL, '', 'fullscreen=yes, scrollbars=yes');
	}
	//---------------------------------
	function translateURL( url ){
		return url.replace(/\\\\w1mhsapps05\\l2k\$\\Learning/i, getPreferredServer() );
	}
	//---------------------------------
	function makeCode( i, len ){
		var c = "000000000" + i;
		var l = c.length;
		return c.substring( l - len );
	}
	//---------------------------------
	function split( s, d ){
		var tokens = new Array();
		var newidx, oldidx = -1;
		newidx = s.indexOf(d,oldidx);
		while( newidx >= 0 ){ 
			tokens[tokens.length] = s.substring(oldidx,newidx);
			oldidx = newidx+1;
			newidx = s.indexOf(d,oldidx);
		}
		tokens[tokens.length] = s.substring(oldidx);
		return tokens;
	}

	function strip( s ){ while( s.substring(0,1) == " " && s.length > 0 ) s = s.substring(1); return s; }
	function dump( item ){ for( p in item ) alert( p + " - " + p.value ); }

	//---------------------------------

	function openWindow2( url, width, height, top, left, newUrl, specs, newTitle ){
		var str = "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left + ",";
 		 str = str + "toolbar=no,directories=no,channelmode=0,resizable=no,scrollbars=no,status=no";
		 url=url + "?url=" + escape(newUrl) + "&specs=" + specs + "&title=" + newTitle;
		  //changed this to just open a window without the add-on box
		  //had to retain function as hard - coded into database via page mastering
		  //andyb - 23/07/2002
		
		window.open(newUrl);

		return false;
	}

	//---------------------------------
	

function printIt(){		
  if (window.focus) { window.focus(); }
  if (window.print) {  window.print(); } 
  else {
      msg = "Your browser does not support automatic printing\nPlease press ";
      
						if ( is_mac )  { msg += ' APPLE(COMMAND)+P'; }
									else if (is_win) { msg += ' CTRL+P'; }
									else { msg += ' the print button on your browser '; }
      
       alert(msg); 
       }
       
 }
 
	//---------------------------------

// -->