function datedisplay() {
        Today = new Date()
        weekday = Today.getDay()
        day = Today.getDate()
        month = Today.getMonth()+1
        year = Today.getYear()

if (weekday==0) {dow="Sunday"}
if (weekday==1) {dow="Monday"}
if (weekday==2) {dow="Tuesday"}
if (weekday==3) {dow="Wednesday"}
if (weekday==4) {dow="Thursday"}
if (weekday==5) {dow="Friday"}
if (weekday==6) {dow="Saturday"}

if (month==1) {monthstring="Jan"}
if (month==2) {monthstring="Feb"}
if (month==3) {monthstring="Mar"}
if (month==4) {monthstring="Apr"}
if (month==5) {monthstring="May"}
if (month==6) {monthstring="Jun"}
if (month==7) {monthstring="Jul"}
if (month==8) {monthstring="Aug"}
if (month==9) {monthstring="Sep"}
if (month==10) {monthstring="Oct"}
if (month==11) {monthstring="Nov"}
if (month==12) {monthstring="Decr"}

yearstring = year.toString();

document.write (day + " " + monthstring + " " + yearstring)
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_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_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 WA_AddValueToList(ListObj,TextString,ValString,Position)  {
  if (isNaN(parseInt(Position)))   {
    Position = ListObj.options.length;
  }
  else  {
    Position = parseInt(Position);
  }
  if (ListObj.length > Position)  {
  ListObj.options[Position].text=TextString;
  if (ValString != "")  {
    ListObj.options[Position].value = ValString;
  }
    else  {
      ListObj.options[Position].value=TextString;
    }
  }
  else  {
    var LastOption = new Option();
    var OptionPosition = ListObj.options.length;
    ListObj.options[OptionPosition] = LastOption;
    ListObj.options[OptionPosition].text = TextString;
    if (ValString != "")  {
      ListObj.options[OptionPosition].value = ValString;
    }
    else  {
      ListObj.options[OptionPosition].value=TextString;
    }
  }
}

function WA_subAwithBinC(a,b,c)
{

	var i = c.indexOf(a);
	var l = b.length;

	while (i != -1)	{
		c = c.substring(0,i) + b + c.substring(i + a.length,c.length);  //replace all valid a values with b values in the selected string c.
  i += l
		i = c.indexOf(a,i);
	}
	return c;

}

function WA_AddSubToSelected(sublist,targetlist,repeatvalues,leavetop,leavebottom,noseltop,noselbot,topval,toptext)     {
  for (var j=0; j<noseltop; j++)     {
    sublist.options[j].selected = false;
  }
  for (var k=0; k<noselbot; k++)     {
    sublist.options[sublist.options.length-(k+1)].selected = false;
  }
  if (sublist.selectedIndex >= 0)      {
   if (leavebottom)     {
      botrec = new Array(2);
      botrec[0] = targetlist.options[targetlist.options.length-1].value;
      botrec[1] = targetlist.options[targetlist.options.length-1].text;
      targetlist.options[targetlist.options.length-1] = null;
    }
    if (!leavetop && targetlist.options.length > 0)     {
      if (targetlist.options[0].value == topval)     {
        targetlist.options[0] = null;  
      }
    }
    else     {
      if (leavetop && toptext != '')     {
        targetlist.options[0].value = topval;
        targetlist.options[0].text = toptext;
      }
    }
    for (var o=0; o<sublist.options.length; o++)     {
      if (sublist.options[o].selected && o >= noseltop && o < sublist.options.length - noselbot)     {
        theText = sublist.options[o].text;
        theValue = sublist.options[o].value;
        addvalue = true;
        if (!repeatvalues)      {
          for (var p=0; p<targetlist.options.length; p++)     {
            if (theValue == targetlist.options[p].value)      {
              addvalue = false;
            }
          }
        }
        if (addvalue)  WA_AddValueToList(targetlist,theText,theValue,targetlist.options.length);
      }
    }
    if (leavebottom)     {
      WA_AddValueToList(targetlist,botrec[1],botrec[0],targetlist.options.length);
    }
  }
  for (var l=0; l < targetlist.options.length; l++)    {
    targetlist.options[l].selected = false;
  }
}

function WA_RemoveSelectedFromList(theBox,nottoremove,noneselectedoption,noneselectedvalue,noneselectedtext)     {
  var n=0;
  var selectedArray = new Array();
  for (var j=0; j<theBox.options.length; j++)     {
    if (!theBox.options[j].selected || nottoremove.indexOf("|WA|" + theBox.options[j].value + "|WA|") >= 0)     {
      theBox.options[n].value = theBox.options[j].value;
      theBox.options[n].text = theBox.options[j].text;
      n++;
    }
    else {
	    selectedArray[selectedArray.length] = j;
    }
  }
  for (var k=0; k<selectedArray.length; k++)  {
    theBox.options[selectedArray[k]].selected = false;
  }
  m = n;
  while (m<=j)     {
    theBox.options[n] = null;
    m++;
  }
  if (theBox.options.length == noneselectedoption && noneselectedtext != "")     {
    noneselectedvalue = WA_subAwithBinC("|WA|",",",noneselectedvalue);
    noneselectedtext = WA_subAwithBinC("|WA|",",",noneselectedtext);
    WA_AddValueToList(theBox,noneselectedtext,noneselectedvalue,0);
  }
  for (var l=0; l < theBox.options.length; l++)    {
    theBox.options[l].selected = false;
  }
}

function WA_SelectAllInTarget(boxtoselect, valstonotselect)       {
  for (var x=0; x<boxtoselect.options.length; x++)       {
    if (valstonotselect.indexOf("|WA|" + boxtoselect.options[x].value + "|WA|") < 0) {
		boxtoselect.options[x].selected = true;
    }
    else       {
		boxtoselect.options[x].selected = false;
    }
  }
}