//--------------------------------------------------------------------

// hidden question popups

function activate (field_name)  {



	helpwin = window.open("", "factoid", "resizable=0,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,copyhistory=0,width=640,height=330");

	helpwin.document.open();

	helpwin.document.writeln("<html><head><title>Scenario - You make the call</title>");

//	helpwin.document.writeln("<style>body {background-image: url(/images_int/factoidbanner.jpg');background-repeat: no-repeat;}");     

	helpwin.document.writeln("</style></head><body>");

	

	helpwin.document.writeln(field_name);   

	helpwin.document.close();

	helpwin.focus();

}

		

//--------------------------------------------------------------------	

		

// Function called to determine navigation image shown



function RollOverGeneric (obj) {

	

	var bobj = "b" + obj;



	if (document.layers) {

		temp = document.layers[obj].document.images[bobj];

	} else if (document.all) {

		temp = document.images[bobj];

	}

	

	var imgpath = temp.src.split("/images_int/");

	

	if (temp.src.match('_rol') == '_rol') {

		if (temp.src.match('.gif') == '.gif') {

			temp.src = imgpath[0] + "/images_int/int_" + obj + "_en.gif";

		} else {

			temp.src = imgpath[0] + "/images_int/int_" + obj + "_en.jpg";

		}

	} else {

		if (temp.src.match('.gif') == '.gif') {

			temp.src = imgpath[0] + "/images_int/int_" + obj + "_rol.gif";

		} else {

			temp.src = imgpath[0] + "/images_int/int_" + obj + "_rol.jpg";

		}

	}

}





//--------------------------------------------------------------------

// Submit DR

//

function idr() {

	TempWindow = window.open("",

	"CSC_TCE_iDR",

	"toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,copyhistory=0,width=530,height=345");

	window.document.dr_form.target = "CSC_TCE_iDR";

	window.document.dr_form.page_url.value = document.location.href;

	//alert( document.location.href );

	window.document.dr_form.submit();

	TempWindow.focus();

}







//--------------------------------------------------------------------

// open a new window with the text that was passed in as a parameter

//

function glossaryPopUp( word, definition ) {



	// set up some constants

	// how editable!

	var bgcolor 		= "#8FE1E2";	

	var my_width  		= 640;

	var my_height 		= 150;

	var my_scrollbars  	= 1;

	

	// open the window

	w = window.open(	"", "glossaryWindow", "resizable=1,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=" + my_scrollbars + ",copyhistory=0,width=" + my_width + ",height=" + my_height);

	

	// write to it

	w.document.open();

	w.document.writeln("<html><head><title>Glossary Definition: " + word + "</title>");

	w.document.writeln("<style>body  {background-color: "+ bgcolor + ";}");

	w.document.writeln("       .word {font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: bold;   color: #000000;}");

	w.document.writeln("       .def  {font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: normal; color: #000000;}");

	w.document.writeln("</style></head><body>");

	w.document.writeln("<div class='word'><p>" + word       + "</p></div>");

	w.document.writeln("<div class='def' ><p>" + definition + "</p></div></body></html>");

	w.document.close();

	

	// bring it to the front

	w.focus();

}



//--------------------------------------------------------------------

// open a new window with the text that was passed in as a parameter

//

function smePopUp( word, definition ) {



	// set up some constants

	// how editable!

	var bgcolor 		= "#ffb0b0";	

	var my_width  		= 440;

	var my_height 		= 150;

	var my_scrollbars  	= 1;

	

	// open the window

	w = window.open(	"", "glossaryWindow", "resizable=1,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=" + my_scrollbars + ",copyhistory=0,width=" + my_width + ",height=" + my_height);

	

	// write to it

	w.document.open();

	w.document.writeln("<html><head><title>message to SME: " + word + "</title>");

	w.document.writeln("<style>body  {background-color: "+ bgcolor + ";}");

	w.document.writeln("       .word {font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: bold;   color: #000000;}");

	w.document.writeln("       .def  {font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: normal; color: #000000;}");

	w.document.writeln("</style></head><body>");

	w.document.writeln("<div class='word'><p>" + word       + "</p></div>");

	w.document.writeln("<div class='def' ><p>" + definition + "</p></div></body></html>");

	w.document.close();

	

	// bring it to the front

	w.focus();

}



//--------------------------------------------------------------------

// open a new window with the text that was passed in as a parameter

//

function genericPopUp( word, definition ) {



	// set up some constants

	// how editable!

	var bgcolor 		= "#8FE1E2";	

	var my_width  		= 640;

	var my_height 		= 450;

	var my_scrollbars  	= 1;

	

	// open the window

	w = window.open(	"", "glossaryWindow", "resizable=1,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=" + my_scrollbars + ",copyhistory=0,width=" + my_width + ",height=" + my_height);

	

	// write to it

	w.document.open();

	w.document.writeln("<html><head><title>Term: " + word + "</title>");

	w.document.writeln("<style>body  {background-color: "+ bgcolor + ";}");

	w.document.writeln("       .word {font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: bold;   color: #000000;}");

	w.document.writeln("       .def  {font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: normal; color: #000000;}");

	w.document.writeln("</style></head><body>");

	w.document.writeln("<div class='word'><p>" + word       + "</p></div>");

	w.document.writeln("<div class='def' ><p>" + definition + "</p></div></body></html>");

	w.document.close();

	

	// bring it to the front

	w.focus();

}



//--------------------------------------------------------------------

// open a new window with the text that was passed in as a parameter

//

function graphicPopUp( word, definition ) {



	// set up some constants

	// how editable!

	var bgcolor 		= "#FF0000";	

	var my_width  		= 400;

	var my_height 		= 400;

	var my_scrollbars  	= 1;

	

	// open the window

	w = window.open(	"", "graphicWindow", "resizable=1,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=" + my_scrollbars + ",copyhistory=0,width=" + my_width + ",height=" + my_height);

	

	// write to it

	w.document.open();

	w.document.writeln("<html><head><title>Graphic Popup</title>");

	w.document.writeln("<style>body  {background-color: "+ bgcolor + ";}");

	w.document.writeln("       .word {font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: bold;   color: #000000;}");

	w.document.writeln("       .def  {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: normal; color: #000000;}");

	w.document.writeln("</style></head><body>");

	w.document.writeln("<div class='word'><p>" + word       + "</p></div>");

	w.document.writeln("<div class='def' ><p><img src=\"" + definition + "\"></p></div></body></html>");

	w.document.close();

	

	// bring it to the front

	w.focus();

}



//------------------------------Revised open window for 52D10 11 29 rob m

function openCenter2(myurl){

// This is used by the glossary routines    

	

   windowNavi = window.open(myurl,"Ethics","toolbar=no,width=725,height=340,menubar=no,status=no,scrollbars=no,resizable=no");

   windowNavi.moveTo(((screen.width/2)-389),((screen.height/2)-265))

   windowNavi.location = myurl;

   windowNavi.focus();

}



//------------------------------Revised open window for Course map (Big window)

function openCenter3(mapurl){   

   windowMap = window.open(mapurl,"main86","toolbar=no,width=800,height=500,menubar=no,status=yes,scrollbars=yes,resizable=no");

 //  windowMap.moveTo(((screen.width/2)-389),((screen.height/2)-265))

   windowMap.moveTo (0,0)

   windowMap.location = mapurl;

   windowMap.focus();

}



//------------------------------Revised open window for Ethics HELP screen (Big window)

function openCenterhelp(mapurl){   

   windowMap = window.open(mapurl,"Ethicshelp","toolbar=no,width=640,height=575,menubar=no,status=yes,scrollbars=yes,resizable=yes");

   windowMap.moveTo(10,10)

   windowMap.location = mapurl;

   windowMap.focus();

}



function findParent( repeat ) {

	if ( opener && repeat ) {

		opener.showtext( opener.narration );

		window.focus();

		w = window;

	}	

}



function openCourse8by5(mapurl){   

   windowMap = window.open(mapurl,"main85","toolbar=no,width=800,height=570,menubar=no,status=no,scrollbars=yes,resizable=yes");
 //  windowMap.moveTo(((screen.width/2)-389),((screen.height/2)-265))
	setTimeout('windowMap.focus();',1000);
   windowMap.moveTo (0,0);
   windowMap.location = mapurl;
   windowMap.focus();

}



function leaving() {

	alert("Opener is changing: " + w);
	if ( w ) {
		w.setTimeout("findParent(1)", 1000 );
	}
}



//--------------------------------------------------------------------

// open a new window with the text that was passed in as a parameter

//

function showtext( narration ) {



	// set up some constants

	// how editable!

	var bgcolor 		= "#c0cf7b";	
	var my_width  		= 700;
	var my_height 		= 50;
	var my_scrollbars  	= 1;

	

	// open the window

	w = window.open(	"", "showtextWindow", "resizable=0,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=" + my_scrollbars + ",copyhistory=0,width=" + my_width + ",height=" + my_height);

					

	// write to it

	w.document.open();
	w.document.writeln("<html><head><title>Show Text</title>");
	w.document.writeln("<script type=\"text/javascript\">");
	w.document.writeln("function findParent( repeat ) {	if ( opener && repeat ) { opener.showtext( opener.narration ); } }");
	w.document.writeln("</script>");
	w.document.writeln("<style>body  {background-color: "+ bgcolor + ";}");
	w.document.writeln("       .def  {font-family: Arial, Helvetica, sans-serif; font-size: 11pt; font-weight: normal; color: #000000;}");
	w.document.writeln("</style></head><body>");
	w.document.writeln("<div class='def' ><p>" + narration + "</p></div>");
	w.document.writeln("</body></html>");
	w.document.close();

   	w.moveTo(((screen.width/20)+1),((screen.height/2)+200));
   	w.focus();

}