// Open image in new window

var newwin;

function launchwin(pic) 
{ 
  self.status="Loading image...";
  newwin = window.open("./pics/"+pic+".jpg","Window","resizable=yes,scrollbars=no,width=500,height=500");
  if(newwin.focus) newwin.focus();
  self.status=self.defaultStatus;
}

// ****************************************************

// Open page in full screen + menubar

function launchfull(page)
{ window.open(page,null,"menubar=yes,scrollbars=yes,status=yes"); }

// ****************************************************

// Open a link in new window

<!-- Hide from old browsers
function openlink(link) 
{ 
  self.status="Loading link...";
  newwin = window.open(link,"Link","resizable=yes,scrollbars=yes,width=800,height=500");
  if(newwin.focus) newwin.focus();
  self.status=self.defaultStatus;
}
// end hiding -->

// ****************************************************

// Getting 'last modified' information

 function FormatDate(nDate) {
   var tDate = 'Invalid Date',
     dDate = new Date(nDate),
     nDays = dDate.getDate()*1,
     tDaySuf = "",
     atDay = new Array('Sunday', 'Monday', 'Tuesday',
                       'Wednesday', 'Thursday', 'Friday',
                       'Saturday'),
     atMonth = new Array('January', 'February', 'March', 'April',
                         'May', 'June', 'July', 'August',
                         'September', 'October', 'November',
                         'December');
   if (dDate != 0) {
     switch (nDays) {
       case  1 : tDaySuf = 'st'; break;
       case 21 : tDaySuf = 'st'; break;
       case 31 : tDaySuf = 'st'; break;
       case  2 : tDaySuf = 'nd'; break;
       case 22 : tDaySuf = 'nd'; break;
       case  3 : tDaySuf = 'rd'; break;
       case 23 : tDaySuf = 'rd'; break;
       default : tDaySuf = 'th';
     }
     tDays = (nDays<10?'0':'') + nDays;
     tDate = '' + atDay[dDate.getDay()] + ',&nbsp;' +
             atMonth[dDate.getMonth()] + '&nbsp;' +
             tDays + tDaySuf + ',&nbsp;' + GetCY(dDate);
   }
   return tDate;
 }

 function GetCY(dDate) {
   var nYear = dDate.getYear();
/*
   !!! This is the important part to notice, as this is what !!!
   !!! gives you a valid 2000 year and not 100/1900/3900/etc !!!
*/
   if (nYear < 1900) nYear+=1900;
   return nYear;
 }

// ****************************************************

// used in f-u-dual

function setup()
{
     document.Superposition.reset();
     document.Superposition.setFunc1("sin(10*pi*x)*(5/(x-10))*step(2.0*t-(x+10))*2.3*sin(0.5*pi*t-0.2*pi*(x*2+10))");
     document.Superposition.setRGB(1,250,0,0);
     document.Superposition.setFunc2("sin(10*pi*x)*(5/(x-10))*step(2.0*t-(30-x))*(2.3)*sin(0.5*pi*(t-10)+0.2*pi*(x*2-10))");
     document.Superposition.setRGB(2,0,0,250);

     document.Superposition.setRGB(3,250,0,250);
     document.Superposition.setCaption(1,"Ingoing Wave");
     document.Superposition.setCaption(2,"Outgoing Wave");
     document.Superposition.setCaption(3,"Standing wave");
     document.Superposition.forward();
}

// ******************************************************
