
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function makeValidDate() {
  year = document.theForm.selYear.options[ document.theForm.selYear.selectedIndex ].value;
  month = document.theForm.selMonth.options[ document.theForm.selMonth.selectedIndex ].value;
  day = document.theForm.selDay.options[ document.theForm.selDay.selectedIndex ].value;
  maxDay = 31;
  if ( month == 4 || month == 6 || month == 9 || month == 11 ) {
    maxDay = 30;
  } else if ( month == 2 ) {
    if ( year%100 != 0 && year%4 == 0 ) {
      maxDay = 29;
    } else {
      maxDay = 28;
    }
  }
  document.theForm.selDay.selectedIndex = Math.min(day, maxDay)-1;
}
var monthLength = new Array(31,28,31,30,31,30,31,31,30,31,30,31);

    function checkDate(){

      var day = parseInt(document.theForm.selDay.options[ document.theForm.selDay.selectedIndex ].value);
      var month = parseInt(document.theForm.selMonth.options[ document.theForm.selMonth.selectedIndex ].value);
      var year = parseInt(document.theForm.selYear.options[ document.theForm.selYear.selectedIndex ].value);

      if (!day || !month || !year)
      return false;

      if (year/4 == parseInt(year/4))
      monthLength[1] = 29;

      if (day > monthLength[month-1])
      return false;

      monthLength[1] = 28;

      var now = new Date();
      now = now.getTime(); //NN3

      var dateToCheck = new Date();
      dateToCheck.setYear(year);
      dateToCheck.setMonth(month-1);
      dateToCheck.setDate(day);
      var checkDate = dateToCheck.getTime();

      var futureDate = (now < checkDate);
      var pastDate = (now > checkDate);

      if(pastDate)
      {
      alert("Please Enter Dates Ahead Of Today\'S Date.  Thank You.");
      }
      else
      {
      document.theForm.Submit.value=1;
      document.theForm.submit();
      }
 }  
 
 function isBrowserSupp() {
// ****************************************************************
// *    Author: Geraldine Healy         Date:   25/08/1998
// *    Description: Checks if browser is Netscape 2.0 since the options 
// *                            array properties don't work with Netscape 2.0x
// ****************************************************************

    // Get the version of the browser
    version =  parseFloat( navigator.appVersion );

    if ( ( version >= 2.0 ) && ( version < 2.1 ) && ( navigator.appName.indexOf( "Netscape" ) != -1 ) ) {
        return false;
    }
    else {
        return true;
    }                  
}


function isLeapYear(yrStr)
{
// ****************************************************************
// *    Author: Geraldine Healy         Date:   25/08/1998
// *    Description:    Checks if Year selected is a leap year
// ****************************************************************
var leapYear=false;
// every fourth year is a leap year
if ((parseInt(yrStr, 10)%4) == 0)
        {
        leapYear=true;
        }
return leapYear;
}

function getDaysInMonth(mthIdx, YrStr)
// ****************************************************************
// *    Author: Geraldine Healy         Date:   25/08/1998
// *    Description:    Retrieves the number of days in a given month
// ****************************************************************
{
//Default number of days in a month is 31
var maxDays=31
// expect Feb. 
if (mthIdx==2) 
        {
        if (isLeapYear(YrStr))
                {
                maxDays=29;
                }
        else 
                {
                maxDays=28;
                }
        }
// All the rest of the months have 30 days
if (mthIdx==4 || mthIdx==6 || mthIdx==9 || mthIdx==11)
        {
        maxDays=30;
        }
return maxDays;
}


function adjustDate(mthIdx, Dt, Yr) 
// ****************************************************************
// *    Author: Geraldine Healy         Date:   25/08/1998
// *    Description:    Adjusts the format of the Date
// ****************************************************************
{
var value=0;            
var numDays=getDaysInMonth(mthIdx, Yr.options[Yr.options.selectedIndex].value);

if (mthIdx==2) 
        {
        if (Dt.options.selectedIndex < numDays)
                {
                return 0;
                }
        else 
                {
                //check for leap year
                Dt.options.selectedIndex=numDays;
                if (numDays==29)
                        {
                        return 99;
                        }
                else 
                        {
                        return 1;
                        }
                }
        }
if (Dt.options.selectedIndex < numDays)
        {
        value=0;
        }
else 
        {
        if (Dt.options.selectedIndex > numDays)
                {
                Dt.options.selectedIndex;
                value=3;
                }
        else 
                {
                //index is 31 or 30
                value=2;
                }
        }
return value;
}



function parseMonth(mth, inM)
// ****************************************************************
// *    Author: Geraldine Healy         Date:   25/08/1998
// *    Description:    Parses a string and returns a month value
// ****************************************************************
{
var i=1;
var retval =1;
for (i=1;i<=12;i++)
        {
        if (mth == inM.options[i].value)
                {
                retval=i;       
                break;
                }       
        }
        return retval;
}

function parseDay(day, inD)
// ****************************************************************
// *    Author: Geraldine Healy         Date:   25/08/1998
// *    Description:    Parses a string and returns a day value
// ****************************************************************
{
var i=1;
var retval =1;
for (i=1;i<=31;i++)
        {
        if (day == inD.options[i].value)
                {
                retval=i;       
                break;
                }       
        }
return retval;
}

function parseYear(year, inY)
// ****************************************************************
// *    Author: Geraldine Healy         Date:   25/08/1998
// *    Description:    Parses a string and returns a year value
// ****************************************************************
{
var retval=0;
var i=0;
     for (i=0; i<=5; i++)
     {
   
        if (year == inY.options[i].value)
                {
                retval=i;       
                break;
                }       
     }
return retval;
}

//Calendar Section
//calculation functions
function nextMonth(month)
{
if (month==12)
        {
        return 1;
        }
else
        {
        return (month+1);
        }
}


function prevMonth(month) 
{
var prevMonth = (month-1)
if (month==1)
        {
        prevMonth = 12;
        }
return prevMonth
}

function changeYear(direction,month,year)
{
var theYear = year
if (direction=="next")
        {
        if (month == 12)
                {
                theYear = (year+1)
                }
        }
if (direction=="prev")
        {
        if (month == 1)
                {
                theYear = (year-1)
                }
        }
return theYear
}


function createCalendar(month,year,io) 
{
if (!isBrowserSupp())
        {
        alert("Your browser is outdated and does not support this feature")
        return;
        }
if (navigator.appVersion.indexOf("Mac",0) != -1) 
        {
        calendarWindow = window.open("","Calendar","width=165,height=200,resizable=yes,scrollbars=no");
        } 
else 
        {
        calendarWindow = window.open("","Calendar","width=165,height=200,resizable=yes,scrollbars=no");
        }
        var mthIdx = month.options.selectedIndex
        var mthVal = month.options[mthIdx].value
        var yearVal = year.options[year.options.selectedIndex].value
        //call the function to populate the window
        generateCalendar(calendarWindow,mthVal,yearVal,io)
}


//generates the meat of the calendar
function generateCalendar(target,month,year,io)
// ****************************************************************
// *    Author: Geraldine Healy         Date:   25/08/1998
// *    Description:    generates the contents of the calender window
// **************************************************************** 
{
if (!isBrowserSupp())
        {
        return;
        }       
var monthName = new Array ("January","February","March","April","May","June","July","August","September","October","November","December")

//begin table for calendar
target.document.open()
calendar = "<html><head><title>calendar</title></head>"
calendar +="<link rel=\"stylesheet\" href=\"../styles/style.css\" type=\"text/css\">"
calendar +="<body bgcolor=ffffff link='#000080'>"
calendar +="<table border=0 cellspacing=1 cellpadding=3 width=105 bgcolor=444444>"
calendar +="<tr valign=top>"

//The parseInt function parses the string argument as a signed decimal integer. 
var mthIdx = parseInt(month);
var endday = getDaysInMonth(mthIdx, year)

//month header
calendar +="<td colspan=7 align=center class='JSCalendarTitle'>"
var index = (mthIdx-1)
calendar +="<b><span class='BElarge'>" + monthName[index] + " " + year + "</span></b></td></tr>"
calendar +="</tr>"

//writes in the day of the week labels
calendar +="<tr align=center>"
calendar +="<td width=15 class='JSCalendarWeekend'><span class='BEsmall'>&nbsp;<b>S</b></font></td>"
calendar +="<td width=15 class='JSCalendarWeek'><span class='BEsmall'>&nbsp;<b>M</b></font></td>"
calendar +="<td width=15 class='JSCalendarWeek'><span class='BEsmall'>&nbsp;<b>T</b></font></td>"
calendar +="<td width=15 class='JSCalendarWeek'><span class='BEsmall'>&nbsp;<b>W</b></font></td>"
calendar +="<td width=15 class='JSCalendarWeek'><span class='BEsmall'>&nbsp;<b>T</b></font></td>"
calendar +="<td width=15 class='JSCalendarWeek'><span class='BEsmall'>&nbsp;<b>F</b></font></td>"
calendar +="<td width=15 class='JSCalendarWeekend'><span class='BEsmall'>&nbsp;<b>S</b></font></td>"
calendar +="</tr>"

wholeDate = month + "/01/" + year
thedate = new Date(wholeDate)
firstDay = thedate.getDay()

selectedmonth = mthIdx;
var today = new Date();
var thisyear = today.getYear() + 1900;
selectedyear = year

var lastDay = (endday + firstDay+1)
var lastCalspace = 42

var NoDays = (lastDay - (firstDay + 1))
var TotalDaysFilled = NoDays + firstDay;

calendar +="<tr>"
for (var i = 1; i <= lastCalspace; i++)
        {
		
        if (i <= firstDay)
                {
                // 'empty' boxes prior to first day
                calendar +="<td class='JSCalendarDays'><img src='http://images.webresint.com/images/trans.gif' height=1 width=1></td>"
                }
        if (i > firstDay && i <= TotalDaysFilled)
                {
                // enter date number
                calendar +="<td align=center class='JSCalendarDays'><a href='JavaScript:self.close();opener.closeCalendar"+io+"("+(i-firstDay) + ");' class='calendar'> "+(i-firstDay)+"</a></td>"
				}
		if (i > TotalDaysFilled && i <= lastCalspace) 
				{
				// 'empty' boxes after TotalDaysFilled
				calendar +="<td class='JSCalendarDays'><img src='http://images.webresint.com/images/trans.gif' height=12 width=1></td>"
				}
        //must start new row after each week
        if (i % 7 == 0 &&  i != lastCalspace)
                {
                calendar +="</tr>"
				calendar +="<tr>"
                }
        }
calendar +="</tr>"

//prev month - next month controls table
calendar +="<tr><td colspan=7 align=center class='JSCalendarTitle'>"

//next month and previous month buttons
var goPrevMonth = prevMonth(mthIdx)
var goNextMonth = nextMonth(mthIdx)
var nextYear = changeYear("next",parseInt(month),parseInt(year))
var prevYear = changeYear("prev",parseInt(month),parseInt(year))

if(navigator.userAgent.indexOf('MSIE',0) != -1)
        {
		calendar +="<table cellpadding=0 cellspacing=0 border=0 width=100%>"
        calendar +="<tr><td align=left class='JSCalendarTitle'><a href='javascript:opener.generateCalendar(self,"+goPrevMonth+","+prevYear+",\""+io+"\")' class='calcontrol'>? Prev</a></td>"
        calendar +="<td align=right class='JSCalendarTitle'><a href='javascript:opener.generateCalendar(self,"+goNextMonth+","+nextYear+",\""+io+"\")' class='calcontrol'>Next ?</a></td></tr>"
		calendar +="</table>"
		calendar +="</td></tr>"
		calendar +="</table></body></html>"
        target.document.close()
        }
else
        {
		calendar +="<table cellpadding=0 cellspacing=0 border=0 width=100%>"
        calendar +="<fo"+"rm><tr><td align=left class='JSCalendarTitle'><input type='button' value=' < ' onClick='document.clear();opener.generateCalendar(opener.calendarWindow,\'"+goPrevMonth+"\',\'"+prevYear+"\',\'"+io+"\')'></td>"
        calendar +="<td align=right class='JSCalendarTitle'><input type='button' value=' > '"+"onClick='document.clear();opener.generateCalendar(opener.calendarWindow,"+goNextMonth+","+nextYear+",\""+io+"\")'></td></tr></form>"
		calendar +="</table>"
		calendar +="</td></tr>"
        calendar +="</table></body></html>"
        }
target.document.write(calendar);
target.document.close() 
}

function closeCalendar(day) {
        var yrIdx = parseYear(selectedyear,document.theForm.selYear );

        // Decrement index for day and month, because code assumes 
        // that we have an extra defaultvalue at the start.
        document.theForm.selMonth.options.selectedIndex=selectedmonth-1;
        document.theForm.selYear.options.selectedIndex= yrIdx;
        document.theForm.selDay.options.selectedIndex=parseInt(day)-1;
}
//-->

/*
Combo-Box Viewer script- Created by and © Dynamicdrive.com
Visit http://www.dynamicdrive.com/ for this script and more
This notice MUST stay intact for legal use
*/

if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.dropcontent{display:none;}\n')
document.write('</style>\n')
}

function contractall(){
if (document.getElementById){
var inc=0
while (document.getElementById("dropmsg"+inc)){
document.getElementById("dropmsg"+inc).style.display="none"
inc++
}
}
}

function expandone(){
if (document.getElementById){
var selectedItem=document.dropmsgform.dropmsgoption.selectedIndex
contractall()
document.getElementById("dropmsg"+selectedItem).style.display="block"
}
}

if (window.addEventListener)
window.addEventListener("load", expandone, false)
else if (window.attachEvent)
window.attachEvent("onload", expandone)
