//function to setFocus on a field if it is enabled.
function setFocus(thisForm)
	{
		var num = thisForm.length;	
		for(var i = 0; i<num; i++){
			var field = thisForm.elements[i];			
			var name = field.name;			
			if(name == 'approve' && field.disabled == false){				
				field.focus();
				break;
			}
		}
	}

//function to handle "Need Help?" popup window
function popupWin(url)
	{
	window.open(url,"popUp","toolbar=no,directories=no,location=0,width=480,height=320,resizable=yes,scrollbars=yes,top=20,left=20")
	}

//function to handle "ValueRewards" and "more info" popup window	
function popupWin2(url) 
	{
	window.open(url,"popUp","toolbar=no,directories=no,location=0,width=780,height=600,resizable=yes,scrollbars=yes,top=0,left=0")
	}

//function to handle "Description" popup window	
function popupWin3(url) 
	{
	window.open(url,"popUp","toolbar=no,directories=no,location=0,width=500,height=359,resizable=yes,scrollbars=yes,top=20,left=20")
	}

// Print this window
function printWindow(){
browserVersion = parseInt(navigator.appVersion)
if (browserVersion >= 4) window.print();
}
// END - print window
// Click Through functions
 function goHist(a)
 
{  
 history.go(a);
      // Go back one.

} 
 function goNext(url)
 
{  
 location.href= url;

} 

function writeDate(section)

{

if (section=='date')

// Set the beginning write string.

	var html_str = '<div class="date">';

else

	var html_str = '<div>';

	

// Get today's current date.

var now = new Date();



// Array list of days.

var days = new Array('Sun','Mon','Tue','Wed','Thur','Fri','Sat');



// Array list of months.

var months = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sept','Oct','Nov','Dec');



// Calculate the number of the current day in the week.

var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();



// Calculate four digit year.

function fourdigits(number)	{

	return (number < 1000) ? number + 1900 : number;

								}

// Join it all together

today =  days[now.getDay()] + ", " +

              months[now.getMonth()] + " " +

               date + ", " +

                (fourdigits(now.getYear())) ;

// Complete the write string

html_str+= today

		+ '</div>';

		

// Print out the data.

    document.write(html_str);

}

//Display/Hide information
function toggleDisplay(object)

 {

  if (object.style.display == ""||object.style.display == "inline")

  {

   object.style.display = "none";

  }

  else

  {

   object.style.display= "inline";

  }

 }


// end of javascript file
