//-- ===================================================================-->
//-- Page Content Standard Functions            						-->
//-- ===================================================================-->

//-- ===================================================================-->
//-- EVENT CALENDAR LINE ITEM FORMAT ------------------------------------->
function CalendarItem( Date, Time, Description, Location, Link )
{
	var Label = noSpaces( Date );
	document.writeln('<tr>');
	document.writeln('<td>&nbsp;</td>');
	document.writeln('<td valign="top" nowrap><font face="Arial Narrow, Helvetica, Comic Sans MS" size="+2" color="maroon"><b>'+ Date +'</b></font></td>');
	document.writeln('<td valign="top" nowrap><font face="Arial Narrow, Helvetica" size="-1">'+ Time +'</font></td>');
 	document.writeln('<td valign="top"><font face="Arial Narrow, Helvetica"><b>');
	if( Link != "" )
		document.writeln('<a href="javascript: OpenSub( &quot;'+ Link +'&quot;,&quot;CalendarEvent&quot; )">');
	document.writeln( Description +'</b></font>');
	if( Link != "" )
		document.writeln('<img src="images/ico_next_2.gif" width=16 height=15 border=0 alt="Detailed Info"></a>');
	if( Location != "" )
	document.writeln('<br><font face="Arial Narrow, Helvetica" size="-1">'+ Location );
	document.writeln('</font></td>');
	document.writeln('</tr>');
}

//-- LEADERSHIP POSITION LINE ITEM FORMAT -------------------------------->
function PositionItem( Desc1, Desc2, Desc3, Link )
{
	var Label = noSpaces( Desc2 );
	document.writeln('<tr>');
	document.writeln('<td width="10"></td>');
	document.writeln('<td valign="bottom" nowrap><font face="Arial, Helvetica" size="-1"><b>&#149;</b> '+ Desc1 +'</font></td>');
	document.writeln('<td valign="bottom" nowrap><font face="Arial, Helvetica, Comic Sans MS"><b>');
	if( Link != "" )
		document.writeln('<a href="javascript: OpenSub( &quot;'+ Link +'&quot;,&quot;'+ Label +'&quot; )">');
	document.writeln( Desc2 );
	if( Link != "" )
		document.writeln('</a>');
	document.writeln('</b></font></td>');
	document.writeln('<td valign="bottom" nowrap><font face="Arial, Helvetica, Comic Sans MS">'+ Desc3 +'</font></td>');
	document.writeln('</tr>');
}

//-- A BULLET LINE ITEM FORMAT ------------------------------------------>
function BulletItem( Desc1, Desc2, Link )
{
	var Label = noSpaces( Desc1 );
	document.writeln('<tr>');
	document.writeln('<td width="10"></td>');
	document.writeln('<td colspan="2" valign="bottom" nowrap><font face="Arial, Helvetica, Comic Sans MS"><b>&#149;</b> <b>');
	if( Link != "" )
		document.writeln('<a href="javascript: OpenSub( &quot;'+ Link +'&quot;,&quot;ListItem&quot; )">');
	document.writeln( Desc1 );
	if( Link != "" )
		document.writeln('</a>');
	document.writeln('</b></font></td>');
	document.writeln('<td valign="bottom" nowrap><font face="Arial, Helvetica" size="-1">'+ Desc2 +'</font></td>');
	document.writeln('</tr>');
}

//-- EXTERNAL REPLACE BULLET ------------------------------------------>
function BulletItemE( Desc1, Desc2, Link )
{
	var Label = noSpaces( Desc1 );
	document.writeln('<tr>');
	document.writeln('<td width="10"></td>');
	document.writeln('<td colspan="2" valign="top" nowrap><font face="Arial, Helvetica, Comic Sans MS"><b>&#149;</b> <b>');
	if( Link != "" )
		document.writeln('<a href="'+ Link +'" target="_top">');
	document.writeln( Desc1 );
	if( Link != "" )
		document.writeln('</a>');
	document.writeln('</b></font></td>');
	document.writeln('<td valign="top"><font face="Arial, Helvetica" size="-1">'+ Desc2 +'</font></td>');
	document.writeln('</tr>');
}

//-- ===================================================================-->
//-- APAGE TITLE FORMAT -------------------------------------------------->
function PageTitle( Title )
{
	document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="5">');
	document.writeln('<tr bgcolor="darkblue" valign="top">');
	document.writeln('<td colspan="4" align="center" valign="top">');
	document.writeln('<font face="Arial Black, Helvetica" size="+2" color="White"><b>'+ Title +'</b></font>');
	document.writeln('</td>');
	document.writeln('</tr>');
}

//-- ===================================================================-->
//-- APAGE TITLE FORMAT -------------------------------------------------->
function PageTitle1( Title )
{
	document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="5">');
	document.writeln('<tr bgcolor="darkblue" valign="top">');
	document.writeln('<td align="center" valign="center">');
	document.writeln('<a href="javascript: openLast()"><img src="Images/Back.gif" width=54 height=28 border=0></a>');
	document.writeln('</td>');
	document.writeln('<td colspan="3" align="center" valign="center">');
	document.writeln('<font face="Arial Black, Helvetica" size="+2" color="White"><b>'+ Title +'</b></font>');
	document.writeln('</td>');
	document.writeln('</tr>');
}

//-- ===================================================================-->
//-- GO BACK TO THE LAST PAGE -------------------------------------------->
function openLast()
{
	history.back();
}

//-- ===================================================================-->
//-- APAGE TITLE FORMAT -------------------------------------------------->
function PageTitleEnd()
{
	document.writeln('</table>');
}

//-- ===================================================================-->
//-- A PAGE SECTION HEADER FORMAT ---------------------------------------->
function PageSection( Title )
{
	document.writeln('<tr bgcolor="lightgrey">');
	document.writeln('<td colspan="4" width="1000">');
	document.writeln('<font face="Arial, Helvetica, Comic Sans MS" size="+1" color="Darkblue"><b>'+ Title +'</b></font>');
	document.writeln('</td>');
	document.writeln('</tr>');
}

//-- ===================================================================-->
//-- A PAGE FORMAT START (sets up the table format) ---------------------->
function DepartmentStart()
{
	document.writeln('<table width="100%" height="100%" cellspacing="0" valign="top">')
}

//-- ===================================================================-->
//-- A PAGE FORMAT END (closes up the table format) ---------------------->
function DepartmentEnd()
{
	document.writeln('</tr>')
	document.writeln('</table>')
}

//-- ===================================================================-->
//-- Start a freeform entry in the table area ---------------------------->
function OpenStart()
{
	document.writeln('<tr>');
	document.writeln('<td colspan="4">');
	document.writeln('<font face="Comic Sans MS">');
}

//-- ===================================================================-->
//-- End a freeform entry in the table area ------------------------------>
function OpenEnd()
{
	document.writeln('</font>');
	document.writeln('</td>');
	document.writeln('</tr>');
}

function OpenSub( File, Desc )
{
	var FileName = File;
	var WinName  = Desc;
	var Xloc     = 50;
	var Yloc     = 50;
	var WinW     = 700;
	var WinH     = 500;
	window.open( FileName,WinName,'resizable=yes,toolbar=yes,scrollbars=yes,width='+ WinW +',height='+ WinH +',left='+ Xloc +',top='+ Yloc +',status=no,menubar=no' );
} 

//-- ===================================================================-->
//-- Eliminate spaces from a text string and return it ------------------->
function noSpaces( string ) { return string.replace( / /g, '' ); }

//-- ===================================================================-->
//-- CLASS SCHEDULE LINE ITEM FORMAT ------------------------------------->
function ScheduleTitle( Owner )
{
	document.writeln('<table width="100%" border="1" cellspacing="0">');
	document.writeln('<tr bgcolor="lightgrey">');
	document.writeln('<td align="center" nowrap colspan="6">');
	document.writeln('<font face="Arial,Helvetica"><b>Class Schedule for '+ Owner +'</b></font></td>');
	document.writeln('</tr>');
	document.writeln('<tr bgcolor="lightgrey">');
	document.writeln('<td align="center" nowrap>');
	document.writeln('<font size="-1" face="Arial,Helvetica"><b>Time</b></font></td>');
	document.writeln('<td align="center" width="17%">');
	document.writeln('<font size="-1" face="Arial,Helvetica"><b>Mon</b></font></td>');
	document.writeln('<td align="center" width="17%">');
	document.writeln('<font size="-1" face="Arial,Helvetica"><b>Tue</b></font></td>');
	document.writeln('<td align="center" width="17%">');
	document.writeln('<font size="-1" face="Arial,Helvetica"><b>Wed</b></font></td>');
	document.writeln('<td align="center" width="17%">');
	document.writeln('<font size="-1" face="Arial,Helvetica"><b>Thu</b></font></td>');
	document.writeln('<td align="center" width="17%">');
	document.writeln('<font size="-1" face="Arial,Helvetica"><b>Fri</b></font></td>');
	document.writeln('</tr>');
}

//-- ===================================================================-->
//-- CLASS SCHEDULE LINE ITEM FORMAT ------------------------------------->
function ScheduleItem( Type, Time, Mon, Tue, Wed, Thu, Fri )
{
	var Format = "Daily";
	var Color1 = "";
	if( Tue == "" && Wed == "" && Thu == "" && Fri == "" ) Format = "Weekly";
	if( Type == "Open" )  Color1 = ' bgcolor="lightyellow"';
	
	document.writeln('<tr>');
	document.writeln('<td align="center" nowrap'+ Color1 +'>');
	document.writeln('<font size="-1" face="Arial,Helvetica">'+ Time +'</font></td>');
	if( Format == "Daily" )
	{
		document.writeln('<td align="center"'+ Color1 +'>');
		document.writeln('<font size="-1" face="Arial,Helvetica">'+ Mon +'</font>');
		document.writeln('</td>');
		document.writeln('<td align="center"'+ Color1 +'>');
		document.writeln('<font size="-1" face="Arial,Helvetica">'+ Tue +'</font>');
		document.writeln('</td>');
		document.writeln('<td align="center"'+ Color1 +'>');
		document.writeln('<font size="-1" face="Arial,Helvetica">'+ Wed +'</font>');
		document.writeln('</td>');
		document.writeln('<td align="center"'+ Color1 +'>');
		document.writeln('<font size="-1" face="Arial,Helvetica">'+ Thu +'</font>');
		document.writeln('</td>');
		document.writeln('<td align="center"'+ Color1 +'>');
		document.writeln('<font size="-1" face="Arial,Helvetica">'+ Fri +'</font>');
		document.writeln('</td>');
	}
	else
	{
		document.writeln('<td valign="top" align="center" colspan="5"'+ Color1 +'>');
		document.writeln('<font size="-1" face="Arial,Helvetica">'+ Mon +'</font>');
		document.writeln('</td>');
	}
	document.writeln('</tr>');
}

//-- ===================================================================-->
//-- CLASS SCHEDULE LINE ITEM FORMAT ------------------------------------->
function ScheduleEnd()
{
	document.writeln('</table>');
}

//-- ===================================================================-->
//-- CLASS SCHEDULE LINE ITEM FORMAT ------------------------------------->
function Handout2Nav( Item )
{
	var Lower  = "";
	var Upper  = "";
	if( Item == 1 ) {            Upper = 2; }
	if( Item == 2 ) { Lower = 1; Upper = 3; }
	if( Item == 3 ) { Lower = 2; Upper = 4; }
	if( Item == 4 ) { Lower = 3; Upper = 5; }
	if( Item == 5 ) { Lower = 4; Upper = 6; }
	if( Item == 6 ) { Lower = 5; Upper = 7; }
	if( Item == 7 ) { Lower = 6; Upper = 8; }
	if( Item == 8 ) { Lower = "7"; }
	
	var LwrLabel = "Handout 2." + Lower;
	var UprLabel = "Handout 2." + Upper;
	
	if( Item == 1 ) { LwrLabel = ""; }
	if( Item == 8 ) { UprLabel = ""; }
	
	document.writeln('<table bgcolor="maroon" width="100%" cellpadding="2" cellspacing="0" border="0">');
	document.writeln('<tr>');
	document.writeln('<th>');
	document.writeln('<table bgcolor="lightgrey" width="100%" cellpadding="2" cellspacing="0" border="0">');
	document.writeln('<tr>');
	document.writeln('<th align="left" width="33%" bgcolor="lightgrey" valign="middle">');
	if( Item > 1 )
		document.writeln('<a href="Course_DsgnProc_0'+ Lower +'.htm"><img src="Images/ico_back_y.gif" width=16 height=20 border=0>');
	document.writeln('<font face="Arial" size="-1"><i>[ '+ LwrLabel +' ]</i></font>');
	if( Item > 1 )
		document.writeln('</a>');
	document.writeln('</th>');
	document.writeln('<th align="center" bgcolor="lightgrey">');
	document.writeln('<a href="Course_DsgnProc.htm">');
	document.writeln('<font face="Arial" size="-1">[Back to Design Process & JSS]</font>');
	document.writeln('</a>');
	document.writeln('</th>');
	document.writeln('<th align="right" width="33%" bgcolor="lightgrey">');
	if( Item < 8 )
		document.writeln('<a href="Course_DsgnProc_0'+ Upper +'.htm">');
	document.writeln('<font face="Arial" size="-1"><i>[ '+ UprLabel +' ]</i></font>');
	if( Item < 8 )
		document.writeln('<img src="Images/ico_next_y.gif" width=16 height=20 border=0></a>');
	document.writeln('</th>');
	document.writeln('</tr>');
	document.writeln('</table>');
	document.writeln('</th>');
	document.writeln('</tr>');
	document.writeln('</table>');
}

//-- ===================================================================-->
//-- INVESTIGATION NAVIGATION BAR    ------------------------------------->
function InvestigationNav( secLabel, secLink )
{
	
	document.writeln('<table bgcolor="maroon" width="100%" cellpadding="2" cellspacing="0" border="0">');
	document.writeln('<tr>');
	document.writeln('<th>');
	document.writeln('<table bgcolor="lightgrey" width="100%" cellpadding="2" cellspacing="0" border="0">');
	document.writeln('<tr>');
	document.writeln('<th align="center" bgcolor="lightgrey">');
	document.writeln('<a href="'+ secLink +'">');
	document.writeln('<font face="Arial" size="-1">[Back to '+ secLabel +' & JSS]</font>');
	document.writeln('</a>');
	document.writeln('</th>');
	document.writeln('</tr>');
	document.writeln('</table>');
	document.writeln('</th>');
	document.writeln('</tr>');
	document.writeln('</table>');
}

//-- ===================================================================-->
//-- GRADING POLICY BULLET LIST FORMAT ----------------------------------->
function signiture()
{
	document.writeln('<hr width="550" align="left">');
	document.writeln('<table width="550" border="0" cellpadding="5" cellspacing="0" bgcolor="pink">');
	document.writeln('<tr>');
	document.writeln('	<td><font size="-1">');
	document.writeln('		Student&#039;s Signature:</font></td>');
	document.writeln('	<td><font size="-1">');
	document.writeln('		<input type="Text" size="30" name="name" width="30" readonly></td>');
	document.writeln('	<td>');
	document.writeln('		<font size="-1">Date: </font>');
	document.writeln('		<select name="Month">');
	document.writeln('		<option value="" selected>...');
	document.writeln('		<option value="">September');
	document.writeln('		<option value="">October');
	document.writeln('		<option value="">November');
	document.writeln('		<option value="">December');
	document.writeln('		<option value="">January');
	document.writeln('		<option value="">February');
	document.writeln('		<option value="">March');
	document.writeln('		<option value="">April');
	document.writeln('		<option value="">May');
	document.writeln('		<option value="">June');
	document.writeln('		<option value="">July');
	document.writeln('		<option value="">August');
	document.writeln('		</select>');
	document.writeln('		<select name="Day">');
	document.writeln('		<option value="" selected>...');
	document.writeln('		<option value="">1');
	document.writeln('		<option value="">2');
	document.writeln('		<option value="">3');
	document.writeln('		<option value="">4');
	document.writeln('		<option value="">5');
	document.writeln('		<option value="">6');
	document.writeln('		<option value="">7');
	document.writeln('		<option value="">8');
	document.writeln('		<option value="">9');
	document.writeln('		<option value="">10');
	document.writeln('		<option value="">11');
	document.writeln('		<option value="">12');
	document.writeln('		<option value="">13');
	document.writeln('		<option value="">14');
	document.writeln('		<option value="">15');
	document.writeln('		<option value="">16');
	document.writeln('		<option value="">17');
	document.writeln('		<option value="">18');
	document.writeln('		<option value="">19');
	document.writeln('		<option value="">20');
	document.writeln('		<option value="">21');
	document.writeln('		<option value="">22');
	document.writeln('		<option value="">23');
	document.writeln('		<option value="">24');
	document.writeln('		<option value="">25');
	document.writeln('		<option value="">26');
	document.writeln('		<option value="">27');
	document.writeln('		<option value="">28');
	document.writeln('		<option value="">29');
	document.writeln('		<option value="">30');
	document.writeln('		<option value="">31');
	document.writeln('		</select>');
	document.writeln('		<select name="Month">');
	document.writeln('		<option value="" selected>2001');
	document.writeln('		<option value="">2002');
	document.writeln('		<option value="">2003');
	document.writeln('		<option value="">2004');
	document.writeln('		</select></td>');
	document.writeln('</tr>');
	document.writeln('<tr>');
	document.writeln('	<td><font size="-1">');
	document.writeln('		Parents Signiture:</font></td>');
	document.writeln('	<td><font size="-1">');
	document.writeln('		<input type="Text" size="30" name="parents" width="30" readonly></td>');
	document.writeln('</tr>');
	document.writeln('</table>');
	document.writeln('<hr width="550" align="left">');
	document.writeln('<font size="-2">');
	document.writeln('<ol compact>');
	document.writeln('	<li>Enter Student Name');
	document.writeln('	<li>Read the syllabus & Contract');
	document.writeln('	<li>Print this form.');
	document.writeln('	<li>Student & Parent sign and date the form.');
	document.writeln('	<li>Turn in the completed form to your teacher.');
	document.writeln('</ol>');
	document.writeln('</font>');
}

//-- ===================================================================-->
//-- CONTRACT NAME ENTRY ------------------------------------------------->
function studentName()
{
	document.writeln('<table width="550" border="0" cellpadding="5" cellspacing="0" bgcolor="pink">');
	document.writeln('<tr><td>');
	document.writeln('<font size="-1"></font>Student&#039;s Name: </font><input type="Text" size="60" name="name" width="30"><br>');
	document.writeln('</td></tr>');
	document.writeln('</table>');
}

//-- ===================================================================-->
//-- RESULTS PAGE ENTRY  ------------------------------------------------->
function Team( Place, Award, Number, Name, Team01, Team02, Team03 )
{
	SetColor = "lightblue"
	document.writeln('<tr> ')
	if(Place == "1st")
	{ SetColor = "gold" }
	if(Place == "2nd")
	{ SetColor = "silver" }
	if(Place == "3rd")
	{ SetColor = "tan" }
	if(Place == "4th")
	{ SetColor = "lightgreen" }
	if(Place == "DNS")
	{ SetColor = "lightgrey" }
	document.writeln('	<th bgcolor="'+SetColor+'"><font face="Arial Black" size="+1" color="Maroon">'+ Place +'</font> ')
	document.writeln('	<th bgcolor="'+SetColor+'"><font face="Arial" size="-1">'+ Award +'</font> ')
	document.writeln('	<th bgcolor="'+SetColor+'"><font face="Arial" size="-1">'+ Number +'</font> ')
	document.writeln('	<th bgcolor="'+SetColor+'"><font face="Arial" size="-1">'+ Name +'</font> ')
	document.writeln('	<td bgcolor="'+SetColor+'"><font face="Arial" size="-2">'+ Team01 +'<br>'+ Team02 +'<br>'+ Team03 +'</font></td> ')
	document.writeln('</tr> ')
}

//-- ===================================================================-->
//-- RESULTS PAGE ENTRY  ------------------------------------------------->
function Team1( Place, Time, Award, Number, Name, Team01, Team02 )
{
	SetColor = "lightblue"
	document.writeln('<tr> ')
	if(Place == "1")
	{ SetColor = "gold" }
	if(Place == "2")
	{ SetColor = "silver" }
	if(Place == "3")
	{ SetColor = "tan" }
	if(Place == "4")
	{ SetColor = "lightgreen" }
	if(Place == "DNS")
	{ SetColor = "lightgrey" }
	document.writeln('	<th bgcolor="'+SetColor+'"><font face="Arial Black" size="+1" color="Maroon">'+ Place +'</font> ')
	document.writeln('	<th bgcolor="'+SetColor+'"><font face="Arial" size="-1">'+ Time +'</font> ')
	document.writeln('	<th bgcolor="'+SetColor+'"><font face="Arial" size="-1">'+ Award +'</font> ')
	document.writeln('	<th bgcolor="'+SetColor+'"><font face="Arial" size="-1">'+ Number +'</font> ')
	document.writeln('	<th bgcolor="'+SetColor+'"><font face="Arial" size="-1">'+ Name +'</font> ')
	document.writeln('	<td bgcolor="'+SetColor+'"><font face="Arial" size="-2">'+ Team01 +'<br>'+ Team02 +'</font></td> ')
	document.writeln('</tr> ')
}
