number=1

function QuestionNumber()
{
	parseInt(number)
	document.write("<b>"+number+".</b>")
	number+=1
}


//DETERMINE NUMBER OF LEVELS CURRENT PAGE IS
//FROM THE ROOT DIRECTORY
function GetDirectoryLevel(root)
{

//GET THE CALLING PAGES FULL ADDRESS
var addressString=location.href
var counter=0
var character=0
var start=0

//LOCATE THE ROOT, PRINT ERROR IF NOT FOUND

if((start=addressString.indexOf(root))==-1)
  {
    if((start=addressString.indexOf(root.toUpperCase()))==-1)
      {
      document.write("Error Message:  ")
      document.write("Root cannot be found")
      return -1
      }
 }

//START AT THE ROOT, LOCATE ALL FORWARD SLASHES IN THE STRING
for(var temp=start; temp<addressString.length; ++temp)
 {
   character=addressString.charAt(temp)
   if(character=='/')
 	++counter
 } 

//SUBTRACT 1 BECAUSE THE LAST FORWARD SLASH IS AN INDICATOR TO
//WHERE THE LAST ELEMENT IN THE ADDRESS IS LOCATED AND NOT A 
//MOVE TO ANOTHER DIRECTORY.
--counter

//RETURN THE NUMBER OF LEVELS BACK TO CALLER.
return counter

}


function modified()
{
 	
	var update=new Date(document.lastModified)
 	var themonth=update.getMonth()+1
	var thedate=update.getDate()
 	var theyear=update.getYear()

   if(navigator.appName=="Netscape")
	{
	parseInt("theyear")
	theyear=theyear+2006
	}
	document.write("<font face=arial size=2 color=black><b><center>")
	document.write("Updated on: " + themonth + "/" + thedate + "/" + theyear + "</center></b></font>")
	document.write("</center></b></font>")
}



function setStatusBar(message)
{
    window.status=message;return true
}

function breakFrame(theaddr)
{
  if(top!=self)
   top.location=theaddr

}



function showInfo(txt) 
{

// 'info' class is specified for formatting in style sheet above
// where 'td.info' necessary or Netscape will ignore it
var info = '<TABLE WIDTH="560" CELLPADDING="4" BORDER="0"><TR><TD class="info" VALIGN="top">' + txt  + '</TD></TR></TABLE>'

// checking for objects (layers and all)  
// instead of formal browser detection 
	if (document.layers) {
		document.info.document.write(info)
		document.info.document.close()
	}
	
	if (document.all) {
  	document.all.info.innerHTML = info
  }
}

/*
FUNCTION NAME:UseSelectToChangePageByValue
PURPOSE: To allow a 'select' list menu to advance to a seperate html page provided
         for my the options value or retrieve that value.
PRE COND: Caller must have set up a 'select' html option box where the                     values of each option is a web page address. Caller must 
          also send the following parameters.
	  
          formName: Name of the form the 'select' box is contained in.
	  optionName: Name of the 'select' list box.
	  numberOptions: Total number of items in the select list.
          sendToLocation: set to true or false, where
		true: forwards you to the page address assigned in the                       value of the field selected.
		false: does not forward you; however, returns the value as a string. 

POST COND: If sendToLocation True, sent you to the page referenced by the selected                                  		           options value.otherwise, returned value of selected option.
         
RETURN : sendToLocation = true, nothing, otherwise string.
*/

function UseSelectToChangePageByValue(formName,optionName,numberOptions,sendToLocation)
{
  
 var string;
 var totalOptionNumber = parseInt(numberOptions);
 if(navigator.appName=="Netscape")
 {
    for(i=0; i < totalOptionNumber; ++i)
    {
      if(eval("document." + formName + "." + optionName + ".options[i].selected"))
          string = eval("document." + formName + "." + optionName + ".options[i].value");
    }
 
 }

 if(navigator.appVersion.indexOf("MSIE") != -1)
   string = eval("document.all." + formName + "." + optionName + ".value");
  
 if(sendToLocation)
   location.href = string;
 else
   return string;

}

/*
FUNCTION NAME: CreateFramePage
PURPOSE: To allow the creation of a page that contains two frames.
PRE COND: Caller must provide the following parameters.
          frameOrientation: 1 = will set up the frame as two rows.
                            0 = will set up the frame as two columns.
          dimension1: The height of the first frame as an integer (percent) between 1-100.
          dimension2: The height of the second frame as an integer(percent) between 1-100.
                     dimension1 + dimension2 = 100%
          page1: The page's address (string) that will appear in frame1.
          page2: The page's address (string) that will appear in frame2.
          borderWidth: The width (integer) of the frame's border. 
          pageTitle: The text (string) you wish to appear in the page's title bar.

POST COND: Wrote a frame page containing two frames with pages from the address page1 and page2.
RETURN :NONE
*/

function CreateFramePage(frameOrientation, dimension1, dimension2, page1, page2, borderWidth, pageTitle)
{
   var frameType   

   if(frameOrientation == '1' || frameOrientation == null)
       frameType = "ROWS"
   else
       frameType = "COLS"     
  
   document.write("<HTML><HEAD><TITLE>" + pageTitle + "</TITLE></HEAD>\n");   
   document.write("<FRAMESET " + frameType + "=\"" + dimension1 + "%," + dimension2 + "%\">");
   document.write("<FRAME NAME=\"firstFrame\" SRC=\"" + page1 + "\" SCROLLING=\"no\" BORDER=" +borderWidth+">");
   document.write("<FRAME NAME=\"secondFrame\" SRC=\"" + page2 + "\" SCROLLING=\"no\" BORDER=" +borderWidth+">");
   document.write("</FRAMESET></HTML>");

}