/* Date-n-Data.js  output: |Date|Time|OS: os|Browser: browser|Color Depth: ##-bit|     */
/*                 last update: 07-July-2004 by Prof. Michael P. Harris                */
/*    files used:  ./images/sep.gif  ./images/1px.gif                                  */

var days=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday')
var months=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')
var peXt=""

function cinit() {
peXt=(navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) ? "op": (navigator.userAgent.indexOf("Konqueror")!=-1 && document.getElementById) ? "ko" : (document.all) ? "ie" : (document.layers) ? "nn" : (!document.all && document.getElementById) ? "mo" : "";

if (peXt!="") {
   if (peXt!="op") setTimes(); }
}

function setTimes() {
if (navigator.userAgent.indexOf('IRIX') != -1)
     var OpSys = "Irix";
else if ((navigator.userAgent.indexOf('Win')!= -1)&&(navigator.userAgent.indexOf('95')!= -1))
     var OpSys = "Windows 95"; 
else if ((navigator.userAgent.indexOf('Win')!= -1)&&(navigator.userAgent.indexOf('98')!= -1))
     var OpSys = "Windows 98"; 
else if ((navigator.userAgent.indexOf('Win')!= -1)&&(navigator.userAgent.indexOf('5.1')!= -1))
     var OpSys = "Windows XP";
else if ((navigator.userAgent.indexOf('Win')!= -1)&&(navigator.userAgent.indexOf('NT')!= -1))
     var OpSys = "Windows NT";
else if (navigator.userAgent.indexOf('Mac')!= -1) var OpSys = "Macintosh";
     else var OpSys = "Other";

bversion=navigator.appVersion.split("[");
if (peXt=="op") {
   bversion=navigator.appVersion.split("(");
   bversion[1]="Opera "+bversion[0]; }
info=navigator.appVersion.split(";");
if (peXt=="mo") {
   nnbrws = navigator.userAgent.split(";");
   if (nnbrws[4]) {
      if (nnbrws[4].match("Netscape")) {
         nnbrws = nnbrws[4].split("Netscape");
         info[1]= "Netscape"+nnbrws[1]; }
      else {
         nnbrws = nnbrws[4].split(")");
         info[1]= "Mozilla"+nnbrws[0]; } } }

spc='&nbsp;&nbsp;<IMG SRC="./images/sep.gif" WIDTH=2 HEIGHT=16 BORDER=0 ALIGN="ABSBOTTOM"';
if (peXt=="op") {
       spc=spc+' style="position:relative;top:3px">&nbsp;&nbsp;'; }
else { spc=spc+'>&nbsp;&nbsp;'; }

var time=new Date();
day=days[time.getDay()];
nday=time.getDate();
month=months[time.getMonth()];
year=eval(time.getYear());
if (year<1900) year=1900+eval(year);
var Hours;
var Mins;
var Time;
Hours=time.getHours();
if (Hours>=12) Time=" P.M."; else Time=" A.M.";
if (Hours>12) Hours-=12;
if (Hours==0) Hours=12;
Mins=time.getMinutes();
if (Mins<10) Mins="0"+Mins;

if (peXt=="mo" || peXt=="op") tim1=document.getElementById("tim1");
if (peXt=="nn")               tim1=document.layers['ntim1'];
if (peXt=="ie" || peXt=="mo") {
   tim1.innerHTML='<IMG SRC="./images/1px.gif" WIDTH=1 HEIGHT=1 BORDER=0 ALIGN="ABSBOTTOM" VSPACE=10><IMG SRC="./images/sep.gif" WIDTH=2 HEIGHT=16 BORDER=0 ALIGN="ABSBOTTOM">&nbsp;&nbsp;InfoBAR&nbsp;'+spc+day+',&nbsp;'+nday+'-'+month+'-'+year+spc+Hours+':'+Mins+Time+spc+'OS:&nbsp;'+OpSys+spc+peXt+spc+'Browser:&nbsp;'+info[1]+spc+'Color Depth:&nbsp;'+screen.colorDepth+'-bit'+spc; } 
else { if (peXt=="nn") {
          tim1.document.write('<Span class="time">InfoBAR&nbsp;'+spc+day+',&nbsp;'+nday+'-'+month+'-'+year+spc+Hours+':'+Mins+Time+spc+'OS:&nbsp;'+OpSys+spc+peXt+spc+'Browser:&nbsp;'+navigator.appName+'&nbsp;'+bversion[0]+spc+'Color Depth:&nbsp;'+screen.pixelDepth+'-bit'+spc+'</Span>'); }
       else { 
          tim1.document.write('<Span class="time" style="position:relative;top:2px">InfoBAR&nbsp;'+spc+day+',&nbsp;'+nday+'-'+month+'-'+year+spc+Hours+':'+Mins+Time+spc+'OS:&nbsp;'+OpSys+spc+peXt+spc+'Browser:&nbsp;'+navigator.appName+'&nbsp;'+bversion[0]+spc+'Color Depth:&nbsp;'+screen.pixelDepth+'-bit'+spc+'</Span>'); }
       tim1.document.close(); }
}

function policy() {
polwin=window.open('http://www.delmar.edu/Courses/bgsound/SWF/MSLicense.swf','polwin','top=100,left=140,status=0,resizable=1,width=500,height=500'); 
}
