<!--// Hide Javascript

//file anchsleftsmall.js
//amended 03/02/01

function GoTo(box) {
  if ((-1 < box.selectedIndex) && (box.options[box.selectedIndex].value != 
  'nogo')) {
    val = box.options[box.selectedIndex].value;
    if (val.lastIndexOf(',') != -1) {
      window.open ((val.substring(0,val.lastIndexOf(","))), 
      (val.substring((val.lastIndexOf(",")+1) , val.length)));
      } else {
      window.open (val,'main');
      }
    }
    return true;
  }
 
function loadWelcome() {
  window.open("anchshomesmall.html","main");
  return true;
}

function SelectGame(gameno) {
  var gameno
  dummy=parent.main.info.setgame(gameno)
}

var rotationindex=1;
function rotatepage(){
  rotationindex = 1 - rotationindex;
  if(rotationindex==0){
    parent.main.board.location='anchsboardrotsmall.html';
    parent.main.info.incgame();
    parent.main.info.decgame();
  }
  if(rotationindex==1){
    parent.main.board.location='anchsboardsmall.html';
    parent.main.info.incgame();
    parent.main.info.decgame();
  }
}

function getKey(keyStroke){
  if(document.all){
    eventChooser = event.keyCode;
    which = String.fromCharCode(eventChooser).toLowerCase();
  }
  else{
    if(document.getElementById){
      eventChooser = keyStroke.which;
      which = String.fromCharCode(eventChooser).toLowerCase();
    }
    if(document.layers){
      eventChooser = keyStroke.which;
      which = String.fromCharCode(eventChooser).toLowerCase();
    }
  }
  if (which=='o') rotatepage();
  if (which=='0') rotatepage();
  if (which=='5') rotatepage();
  if (eventChooser==27) rotatepage();
  if (which=='h') {
    window.open('anchshelp.html', 'helpWindow',
          'status=1, scrollbars=1, width=700, height=400, resizable=1, left=50, top=50'
          ); 
    return false;
  }
  if (which=='/') {
    window.open('anchshelp.html', 'helpWindow',
          'status=1, scrollbars=1, width=700, height=400, resizable=1, left=50, top=50'
          ); 
    return false;
  }
  if (which=='?') {
    window.open('anchshelp.html', 'helpWindow',
          'status=1, scrollbars=1, width=700, height=400, resizable=1, left=50, top=50'
          ); 
    return false;
  }
  if (which=='f') parent.main.moves.incmove();
  if (which=='b') parent.main.moves.decmove();
  if (which=='.') parent.main.moves.incmove();
  if (which==',') parent.main.moves.decmove();
  if (which=='6') parent.main.moves.incmove();
  if (which=='4') parent.main.moves.decmove();
  if (which=='n') parent.main.info.incgame();
  if (which=='p') parent.main.info.decgame();
  if (which=='u') parent.main.info.incgame();
  if (which=='d') parent.main.info.decgame();
  if (which=='}') parent.main.info.incgame();
  if (which=='{') parent.main.info.decgame();
  if (which==']') parent.main.info.incgame();
  if (which=='[') parent.main.info.decgame();
  if (which=='8') parent.main.info.incgame();
  if (which=='2') parent.main.info.decgame();
  if (which=='9') parent.main.info.incgame();
  if (which=='3') parent.main.info.decgame();
  if (which=='r'){
    parent.main.info.incgame();
    parent.main.info.decgame();
  }
  if (which=='s'){
    parent.main.info.incgame();
    parent.main.info.decgame();
  }
  if (which=='>'){
    parent.main.moves.incmove();
    parent.main.moves.incmove();
    parent.main.moves.incmove();
    parent.main.moves.incmove();
  }
  if (which=='<'){
    parent.main.moves.decmove();
    parent.main.moves.decmove();
    parent.main.moves.decmove();
    parent.main.moves.decmove();
  }
  if (which=='}'){
    parent.main.info.incgame();
    parent.main.info.incgame();
    parent.main.info.incgame();
    parent.main.info.incgame();
  }
  if (which=='{'){
    parent.main.info.decgame();
    parent.main.info.decgame();
    parent.main.info.decgame();
    parent.main.info.decgame();
  }
}
document.onkeypress=getKey;

// (c) Copyright Ian James Douglas MacGregor and Ian Ross MacGregor, 2001, 2002, 2003.
// All rights reserved.
// This website (including its constituent html, javascript and image files), may not be 
// copied, printed out, or ammended in any way, without the written permission of the 
// copyright holders.

// End hiding -->
