monName = new Array("January","February","March","April","May","June","July","August","September","October","November","December")
   hourName = new Array("12","1","2","3","4","5","6","7","8","9","10","11","12","1","2","3","4","5","6","7","8","9","10","11")
   AmPm = new Array("am","am","am","am","am","am","am","am","am","am","am","am","pm","pm","pm","pm","pm","pm","pm","pm","pm","pm","pm","pm")
    now = new Date

  function zeroFillMinutes(min) {
    if (min > 9) {
       return min
    }
    return ("0" + min)
  }


   function getMonth(val) {
   
      if (val==1) monthName="January"
	  else if (val == 2) monthName="February"
	  else if (val == 3) monthName="March"
	  else if (val == 4) monthName="April"
	  else if (val == 5) monthName="May"
	  else if (val == 6) monthName="June"
	  else if (val == 7) monthName="July"
	  else if (val == 8) monthName="August"
	  else if (val == 9) monthName="September"
	  else if (val == 10) monthName="October"
	  else if (val == 11) monthName="November"
	  else  monthName="December"
	  
	  return monthName
   }
   
   
	today= new Date();
	day = today.getDay();
	date = today.getDate();
	month= today.getMonth();
      year = today.getFullYear();
      
      

	if (day==0) dayName="Sunday"
	else if (day==1) dayName="Monday"
	else if (day==2) dayName="Tuesday"
	else if (day==3) dayName="Wednesday"
	else if (day==4) dayName="Thursday"
	else if (day==5) dayName="Friday"
	else if (day==6) dayName="Saturday"

	if (month == 0) monthName="January"
	else if (month==1) monthName="February"
	else if (month==2) monthName="March"
	else if (month==3) monthName="April"
	else if (month==4) monthName="May"
	else if (month==5) monthName="June"
	else if (month==6) monthName="July"
	else if (month==7) monthName="August"
	else if (month==8) monthName="September"
	else if (month==9) monthName="October"
	else if (month==10) monthName="November"
	else monthName = "December"
     

function MM_swapImage() { //v1.2
  var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData;
  for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {
    objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
        (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
      objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
    obj = eval(objStr);
    if (obj != null) {
      swapArray[j++] = obj;
      swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
      obj.src = MM_swapImage.arguments[i+2];
  } }
  document.MM_swapImgData = swapArray; //used for restore
}


function MM_swapImgRestore() { //v1.2
  if (document.MM_swapImgData != null)
    for (var i=0; i<(document.MM_swapImgData.length-1); i+=2)
      document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];
}

 if (document.all) {
    docObj = "document.all."
    styleObj = ".style"
   }
   else {
    docObj = "document."
    styleObj = ""
   }
  
  
   function popUp(evt,currElem) {
     popUpWin = eval(docObj + currElem + styleObj)
       if (document.all) {
          popUpWin.top = parseInt(evt.y)+2
          popUpWin.left = Math.max(2,parseInt(evt.x)-85)

                 }
       else {
          popUpWin.top = parseInt(evt.pageY)+2
          popUpWin.left = Math.max(2,parseInt(evt.pageX)-85)
       }
       popUpWin.visibility = "visible"
       window.status = ""
   }

   function popDown(currElem) {
      popUpWin = eval(docObj + currElem + styleObj)
      popUpWin.visibility = "hidden"
   }
   
  function logout() {
     if(confirm("You have requested to log out of the LSI Survey. Proceed?"))
        window.location.href="logout.asp";
  }
  
   function super_logout() {
     if(confirm("You have requested to log out of the LSI Survey Super Admin Site. Proceed?"))
        window.location.href="super_logout.asp";
  }

  function leaveExercise() {
     if(confirm("You have chosen to leave the current exercise. Unless it has been printed, the work from this exercise will be lost. Are you sure you want to leave?")) {
      window.location.href="pers_report.asp"
      parent.opener.focus()
      parent.window.close()
     }
  }


   function newMainWnd(content,name){
	leftPos = 0
	if (screen) {
		h = screen.height
		w = screen.width
	}
          newWin = window.open(content,name,'directories=no,status=no,toolbar=no,menubar=no,scrollbars=yes,height='+h+',width='+w+',left=0,top=0')
          newWin.focus()
   }

  
    function newWnd_ExB(content,name) {
      
      if (navigator.appName == "Netscape") {
         leftPos = 0
    	   if (screen) {
		h = screen.height
		w = screen.width
	   }
          newModWin = window.open(content,name,'directories=no,status=no,toolbar=no,menubar=no,scrollbars=yes,height=600,width=800,left=0,top=0')
          newModWin.focus()
      }
      else {
        if (screen){
          h = screen.height
          w = screen.width
          newModWin = window.open(content,name,'directories=no,status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=yes,height='+h+',width='+w+',left=0,top=0,fullscreen=yes')
          newModWin.focus()
        }
        else {
           newModWin = window.open(content,name,'directories=no,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,height=700,width=800,left=0,top=0,fullscreen=yes')
           newModWin.focus()
        }
      }
   }
  
   function exB_popUp(content,name) {
     popup = window.open(content,name,'directories=no,status=no,toolbar=no,dependent=yes,menubar=no,scrollbars=yes,height=600,width=470,left=550')
     popup.focus()
   }

  
   function newHelpWnd(content,name) {
     newWin = window.open(content,name,'directories=no,status=no,toolbar=no,hotkeys=no,menubar=no,scrollbars=yes,height=500,width=400,screenX=0,screenY=0')
     newWin.focus()
   }

  function rptWindow(content,name) {
     rpt = window.open(content,name,'directories=no,status=no,toolbar=no,hotkeys=no,menubar=yes,scrollbars=yes,height=600,width=700,screenX=0,screenY=0')
     rpt.focus()
   }


function statusWnd(content,name) {
     stat = window.open(content,name,'directories=no,status=no,toolbar=no,hotkeys=no,menubar=no,height=75,width=300,screenX=0,screenY=0')
     stat.focus()
   }

   function closeWin() {
      print.close();
   } 

   function timeout() {
      opener.location.href = "part_sign_in.asp"
      window.close();
   }

   function infoWindow(content,name) {
     newWin = window.open(content,name,'directories=no,status=no,toolbar=no,menubar=no,scrollbars=yes,height=600,width=400')
     newWin.focus()
   }

  function detailsWnd(content,name) {
     newWin = window.open(content,name,'directories=no,status=no,toolbar=no,menubar=no,scrollbars=yes,height=300,width=400')
     newWin.focus()
   }
   function circWindow(content,name) {
     newWin = window.open(content,name,'directories=no,status=no,toolbar=no,menubar=no,scrollbars=yes,height=500,width=500')
     newWin.focus()
   }
   
   function updateWindow(content,name) {
     newWin = window.open(content,name,'directories=no,status=no,toolbar=no,menubar=no,scrollbars=yes,height=250,width=400')
     newWin.focus()
   }

   function superWindow(content,name) {
     newWin = window.open(content,name,'directories=no,status=no,toolbar=no,menubar=no,scrollbars=yes,height=500,width=400')
     newWin.focus()
   }

   function superEditWindow(content,name) {
     newWin = window.open(content,name,'directories=no,status=no,toolbar=no,menubar=no,scrollbars=yes,height=500,width=500')
     newWin.focus()
   }

function newWindow(content,name) {
     newWin = window.open(content,name,'directories=no,status=no,toolbar=no,hotkeys=no,menubar=no,scrollbars=yes,height=450,width=310,screenX=0,screenY=0')
     newWin.focus()
   }

