//var PrevPage = '';
//var CurrentPage = '';
//var NextPage = '';


function ShowGlossary()
{
//alert('The Glossary is not available yet');
newWindow=window.open("glossary.htm","Glossary","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=no,width=779,height=500,left=0,top=0");
if (newWindow.opener == null) {newWindow.opener = window};
}


function ShowHTC()
{
newWindow=window.open("HTC.htm","Howto","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width=614,height=500,left=0,top=0");
if (newWindow.opener == null) {newWindow.opener = window};
}

function ShowHelp()
{
//alert('Help is not available yet');
newWindow=window.open("help.htm","Help","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=no,width=737,height=500,left=0,top=0");
if (newWindow.opener == null) {newWindow.opener = window};
}

function ShowResources()
{
newWindow=window.open("resources.htm","Resources","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width=730,height=500,left=50,top=20");
if (newWindow.opener == null) {newWindow.opener = window};
}

function ShowAccessibility()
{
newWindow=window.open("http://training.USDA.gov/508.html","Accessibility","toolbar=yes,location=yes,directories=no,status=no,scrollbars=yes,menubar=yes,resizable=yes,width=730,height=500,left=50,top=20");
if (newWindow.opener == null) {newWindow.opener = window};
}

function ShowCourseMap()
{
	ok = confirm('Going back to the Course Map closes this window and brings you back to the Course Map.\n\nIf you close this window now, you will not get credit for this lesson/topic. \n\nAre you sure you want to leave?')
	if(ok == true){javascript:top.close();}

}

function ShowCourseMapComplete()
{
	ok = confirm('Going back to the Course Map closes this window and brings you back to the Course Map.\n\nSince you have completed this lesson/topic, it\'s OK, you\'ve already received credit. \n\nAre you sure you want to leave?')
	if(ok == true){javascript:top.close();}

}

function GoNext()
{
if(NextPage == 'done' || NextPage == '')
	{
		//location.href="../index.htm";
	}
else
	{location.href=NextPage;}
}

function GoPrev()
{
if(PrevPage == 'done' || PrevPage == '')
	{
		//location.href="../index.htm";
	}
else
	{location.href=PrevPage;}
}

function OpenFlash(file)
{
vwidth = 370;
vheight = 355;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

newWindow=window.open(file,"Presentation","toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=no,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=20");
if (newWindow.opener == null) {newWindow.opener = window};
}

function OpenFlashBig(file)
{
vwidth = 511;
vheight = 390;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

newWindow=window.open(file,"Presentation","toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=no,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=20");
if (newWindow.opener == null) {newWindow.opener = window};
}


function OpenScript(file)
{
vwidth = 617;
vheight = 500;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

newWindow=window.open(file,"Transcript","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=no,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=20");
if (newWindow.opener == null) {newWindow.opener = window};
}


//this is for sound only flash files
function LoadSoundFile(vSound,vID) 
{
		document.write(
		'<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ' + '\n' +
			'codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" ' + '\n' +
			'width=\"65\" ' + '\n' +
			'height=\"9\"' + '\n' +
			'border=\"0\"' + '\n' +
			'ID=\"' + vID + '\" ' + '\n' +
			'NAME=\"audioMovie\">' + '\n' +
		    '<PARAM NAME=\"FrameNum\" VALUE=\"1\">' + '\n' +
		    '<PARAM NAME=\"quality\" VALUE=\"high\">' + '\n' +
			'<PARAM NAME=\"playing\" VALUE=\"false\">' + '\n' +
		    '<PARAM NAME=\"LOOP\" VALUE=\"false\">' + '\n' +
		    '<PARAM NAME=\"movie\" VALUE=\"' + vSound + '\">' + '\n' +
		    '<embed src=\"' + vSound + '\" ' + '\n' +
			'quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" ' + '\n' +
			'type=\"application/x-shockwave-flash\" ' + '\n' +
			'width=\"65\" ' + '\n' +
			'height=\"9\" ' + '\n' +
			'PLAY=\"false\" ' + '\n' +
			'name=\"' + vID + '\" ' + '\n' +
			'loop=\"false\" ' + '\n' +
			'swliveconnect=\"true\">' + '\n' +
		    '</embed> ' + '\n' +
		  '</object>' + '\n'
				); 
}



function SendMe(url)
{
vwidth = 770;
vheight = 460;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

newSite=window.open(url,"ExternalSite","toolbar=yes,location=yes,directories=no,status=no,scrollbars=yes,menubar=yes,resizable=yes,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=0");

}






function SendMeLocal(file)
{
vwidth = 750;
vheight = 460;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

localSite=window.open(file,"LocalPage","toolbar=yes,location=no,directories=no,status=no,scrollbars=yes,menubar=yes,resizable=yes,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=0");

}


function PopUpSize(howWide,howHigh,what)
{
	
vwidth = howWide;
vheight = howHigh;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

	Hintwin=window.open("","detail","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=50");
	if (Hintwin != null)
	{
		if (Hintwin.opener == null) {FBwin.opener = window};
		Hintwin.document.write('<html><head><title>Detailed Information &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</title>');
		Hintwin.document.write('</head><link rel="stylesheet" href="HTadd.css">');
		Hintwin.document.write('<body bgcolor="white" onload="self.focus()">');
		Hintwin.document.write(what);
		Hintwin.document.write('<p><CENTER><A HREF="javascript:parent.self.close()"><IMG SRC="images/close.gif" WIDTH=60 HEIGHT=29 BORDER=0 ALT="Click here to close this window"></A></CENTER><br>');
		Hintwin.document.write('</body></html>');
		Hintwin.document.close();
	}	
}

function showDefShort(vDef)
{
	
vwidth = 350;
vheight = 300;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

	Hintwin=window.open("","detail","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=50");
	if (Hintwin != null)
	{
		if (Hintwin.opener == null) {FBwin.opener = window};
		Hintwin.document.write('<html><head><title>Detailed Information &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</title>');
		Hintwin.document.write('</head><link rel="stylesheet" href="HTadd.css">');
		Hintwin.document.write('<body bgcolor="white" onload="self.focus()">');
		Hintwin.document.write(vDef);
		Hintwin.document.write('<p><CENTER><A HREF="javascript:parent.self.close()"><IMG SRC="images/close.gif" WIDTH=60 HEIGHT=29 BORDER=0 ALT="Click here to close this window"></A></CENTER><br>');
		Hintwin.document.write('</body></html>');
		Hintwin.document.close();
	}	
}




function ShowExtra(file)
{
	
vwidth = 737;
vheight = 520;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

	Hintwin=window.open(file,"detail","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=50");
}


function showDefLong(vDef)
{
	
vwidth = 617;
vheight = 450;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

	Hintwin=window.open("","detail","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=50");
	if (Hintwin != null)
	{
		if (Hintwin.opener == null) {FBwin.opener = window};
		Hintwin.document.write('<html><head><title>Detailed Information &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</title>');
		Hintwin.document.write('</head><link rel="stylesheet" href="HTadd.css">');
		Hintwin.document.write('<body bgcolor="white" onload="self.focus()" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>');
		Hintwin.document.write('<TABLE WIDTH=600 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC="images/DetailsHeader_01.gif" WIDTH=600 HEIGHT=59 ALT="Details"></TD>	</TR><TR><TD><IMG SRC="images/DetailsHeader_02.gif" WIDTH=403 HEIGHT=38 ALT=""></TD><TD><a href="javascript:self.print()" onMouseOver="document.r1.src=\'images/DetailsHeaderHi_03.gif\';" onMouseOut="document.r1.src=\'images/DetailsHeader_03.gif\';"><IMG SRC="images/DetailsHeader_03.gif" WIDTH="89" HEIGHT="38" ALT="Print" border="0" name="r1"></a></TD><TD><a href="javascript:self.close()" onMouseOver="document.r2.src=\'images/DetailsHeaderHi_04.gif\';" onMouseOut="document.r2.src=\'images/DetailsHeader_04.gif\';"><IMG SRC="images/DetailsHeader_04.gif" WIDTH="108" HEIGHT="38" ALT="Close" name="r2" border="0"></a></TD></TR></TABLE>');
		Hintwin.document.write('<table width="100%" border="0" cellspacing="0" cellpadding="12"><tr bgcolor="#FFFFFF">	<td><p>');
		Hintwin.document.write(vDef);
		Hintwin.document.write('</td></tr></table>');
		Hintwin.document.write('<p><CENTER><A HREF="javascript:parent.self.close()"><IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=1 BORDER=0 ALT="Click here to close this window"></A></CENTER><br>');
		Hintwin.document.write('</body></html>');
		Hintwin.document.close();
	}	
}



function showTrans(vNar)
{
vwidth = 500;
vheight = 420;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

	Hintwin=window.open("","detail","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=50");
	if (Hintwin != null)
	{
		if (Hintwin.opener == null) {FBwin.opener = window};
		Hintwin.document.write('<html><head><title>Text Version of Transcript &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</title>');
		Hintwin.document.write('</head>');
		Hintwin.document.write('<body bgcolor="white">');
		Hintwin.document.write('<font face="arial" size="-1">');		
		Hintwin.document.write(vNar);
		Hintwin.document.write('<p><CENTER><A HREF="javascript:parent.self.close()"><IMG SRC="images/close.gif" WIDTH="60" HEIGHT="29" BORDER="0" ALT="Click here to close this window"></A></CENTER><br>');
		Hintwin.document.write('</font></body></html>');
		Hintwin.document.close();
	}	
}

function doLong(extFile)
{
alert('The link you clicked will open a new browser window.  When you are done viewing the information in that new window, close the window to return to the lesson page.');
	
vwidth = 430;
vheight = 300;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

	descWin=window.open(extFile,"detail","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=50");
}

function doSupp(extFile)
{
alert('The link you clicked will open a new browser window.  When you are done viewing the information in that new window, close the window to return to the lesson page.');
	
vwidth = 600;
vheight = 400;
sWidth = screen.width;
tWidth = (sWidth/2);
hWidth = (vwidth/2);
uWidth = (tWidth-hWidth);

	suppWin=window.open(extFile,"supp","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=yes,resizable=yes,width=" + vwidth + ",height=" + vheight + ",left=" + uWidth + ",top=50");
}

function doFull(extFile)
{
alert('The link you clicked will open a new browser window.  When you are done viewing the information in that new window, close the window to return to the lesson page.');

	fullWin=window.open(extFile,"full","toolbar=yes,location=yes,directories=no,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=50,top=50");
}

