
<!--
<!-- 
    /*
    This portion of the script detects the user's browser type and version.  If the 
    browser is IE 3.0x or 4.0+, or Netscape 4.0+, the script writes
    a link tag to load a separate style sheet for each browser.
    You will need to supply the style sheets, and change the path
    and file names as necessary in the link tags.
    */
     var browser=navigator.appName;
     var version=navigator.appVersion
     var ver1=version.substring(0,1)
     var ver2=version.lastIndexOf("MSIE")
     var ver3=version.substring(ver2+5,ver2+6)
    
     function itsNetscape() { // write the link for Netscape 4.0+
      document.write('<LINK REL=StyleSheet HREF="../styles2/nc4.css" TYPE="text/css">')
     }  
     function itsMsie() { // find out which version of IE is in use
      if (browser == "Microsoft Internet Explorer")
      ieVersion()
     }
     function ieVersion(){ // write the link for IE3 or IE4+
      if (ver1 >= 4)
       document.write('<LINK REL=StyleSheet HREF="../styles2/ie4.css" TYPE="text/css">')
      if (ver3 == 3)
       document.write('<LINK REL=StyleSheet HREF="../styles2/ie3.css" TYPE="text/css">')
     }
     if ((browser == "Netscape") && (ver1 >= 4)){ // check to see if the browser is Netscape
      itsNetscape()
     }
     else{ // otherwise assume the browser is IE
      itsMsie()
     }
    /*
    This portion of the script creates the finds the location of the previous, next, and first files
    in a regularly numbered set of HTML files that all reside in the same
    directory.  The files must be named in the form: xxxx000.html, xxxx001.html,
    and so forth, where xxxx can be any consistent string of characters
    of any length.  The extension need not be 'html', so long as it is the
    same for all file.
    One function sets the
    location to the previous file, the other to the next file.
    These functions can be used for Previous and Next page links
    by setting the HREF values in the respective A tags to
    javascript:previousFile() and javascript:nextFile().
    Note that this script should be placed in the HEAD section
    of the file, to insure that the functions are loaded before
    the links that call them.
    */
        var URL = unescape(location.href)   // get current URL in plain ASCII
        var xstart = URL.lastIndexOf("/") + 1
        var xend = URL.length
        var digitOnePlace = URL.lastIndexOf('.') - 2
        var digitTwoPlace = URL.lastIndexOf('.') - 1
        var digitOne = URL.charAt(digitOnePlace)
        var digitTwo = URL.charAt(digitTwoPlace)
        var filePrefix = URL.substring(xstart,digitOnePlace)
        var suffixStart = URL.lastIndexOf('.')
        var fileSuffix = URL.substring(suffixStart,xend)
        var previousFileName = null
        var nextFileName = null
        var firstFileName = null
        
        /* The following lines provide a workaround for the JS
        implementation in Opera 3.0, which treats all elements
        of a string as string values, and therefore cannot
        perform arithmatical operations on them correctly;
        to get around this, I create new variables with number
        values equivalent to the values of digitOne and digitTwo
        */
        var dig1 = null
        var dig2 = null
        dig1 = parseInt(digitOne)
        dig2 = parseInt(digitTwo)

    function previousFile() { // construct the name of the previous file in the set and jump to it

        if (dig2 == 0) {
            dig2 = 9
            dig1--
        }
        else {
            dig2--
        }
        previousFileName = filePrefix + dig1 + dig2 + fileSuffix
        location.href = previousFileName
    }
    
    function nextFile() { // construct the name of the next file in the set and jump to it
    if (dig2 == 9) {
            dig2 = 0
            dig1++
        }
        else {
            dig2++
        }
        nextFileName = filePrefix + dig1 + dig2 + fileSuffix
        location.href = nextFileName
    
    }

    function firstFile() { // construct the name of the first file in the set and jump to it
            dig2 = 0
            dig1 = 0
        firstFileName = filePrefix + dig1 + dig2 + fileSuffix
        location.href = firstFileName
    
    }

//  -->

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 YY_checkform() { //v4.66
//copyright (c)1998,2002 Yaromat.com
  var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;
  for (var i=1; i<args.length;i=i+4){
    if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}
    var myObj = MM_findObj(args[i].replace(/\[\d+\]/ig,""));
    myV=myObj.value;
    if (myObj.type=='text'||myObj.type=='password'||myObj.type=='hidden'){
      if (myReq&&myObj.value.length==0){addErr=true}
      if ((myV.length>0)&&(args[i+2]==1)){ //fromto
        var myMa=args[i+1].split('_');if(isNaN(myV)||myV<myMa[0]/1||myV > myMa[1]/1){addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==2)){
          var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$");if(!rx.test(myV))addErr=true;
      } else if ((myV.length>0)&&(args[i+2]==3)){ // date
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);
        if(myAt){
          var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];
          var myDate=new Date(myY,myM,myD);
          if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};
        }else{addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==4)){ // time
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}
      } else if (myV.length>0&&args[i+2]==5){ // check this 2
            var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,""));
            if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!myObj1.checked){addErr=true}
      } else if (myV.length>0&&args[i+2]==6){ // the same
            var myObj1 = MM_findObj(args[i+1]);
            if(myV!=myObj1.value){addErr=true}
      }
    } else
    if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){
          var myTest = args[i].match(/(.*)\[(\d+)\].*/i);
          var myObj1=(myObj.length>1)?myObj[myTest[2]]:myObj;
      if (args[i+2]==1&&myObj1&&myObj1.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
      if (args[i+2]==2){
        var myDot=false;
        for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}
        if(!myDot){myErr+='* ' +args[i+3]+'\n'}
      }
    } else if (myObj.type=='checkbox'){
      if(args[i+2]==1&&myObj.checked==false){addErr=true}
      if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
    } else if (myObj.type=='select-one'||myObj.type=='select-multiple'){
      if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}
    }else if (myObj.type=='textarea'){
      if(myV.length<args[i+1]){addErr=true}
    }
    if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
  }
  if (myErr!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+myErr)}
  document.MM_returnValue = (myErr=='');
}
//-->

