﻿// JavaScript File


function curYear() {
  var now = new Date();
  var curYear = now.getFullYear();
return curYear
}

function newWindow(tipPage) {
	var sw = 300
	var sh = 300
	bookWindow = window.open(tipPage, "photoWin", "fullscreen = no, width="+sw+",height="+sh+", toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes")
	bookWindow.focus()  
}

function closeWindow(){
    if (window.opener  && !window.opener.closed) {
        self.close();
        window.opener.focus();
    } else {
        self.close();
    }
}

function newTutWindow(tutPage) {
	var sw = screen.availWidth -10
	var sh = screen.availHeight -190

	bookWindow = window.open(tutPage, "photoWin", "fullscreen = no, toolbar=yes, menubar=yes,location=yes, width="+sw+",height="+sh+",status=yes,scrollbars=yes,resizable=yes,left=0,top=0")
	bookWindow.focus()  
}


function validateLogin(form){
  blnUPWC=0
   for (i = 0; i < upwArray.length; i++) {
      if (upwArray[i]==form.id.value+"_"+form.pass.value){
        blnUPWC = 1
        break
      }
   }
  if(blnUPWC == 1) {
    window.location = "tutorials.htm"
  } else {
    alert("The username-password combination was invalid. Please try again.")
  }
}
 
