var position;
var class;
var mess;
var i = 0;

function orient() {
  position = window.orientation;
  mess = document.getElementById('message');
  orientCatch();
}

function checker() {
    switch(position) {
      default:
        verbal = "vert";
        break;
      case -90:
        verbal = "horizon";
        break;
      case 90:
        verbal = "horizon";
        break;    
    }
}

function orientCatch() { 
  if ( position != window.orientation ){
    position = window.orientation;
    checker();
  }
  setTimeout( 'orientCatch()' , 1000);
}

var entryHeight = 170; //I know this from the CSS and didn't want to write the JS to find it har har
var count = 0;

function checkEnter(e){ 
  var characterCode; 
  
  if ( e && e.which ) { //non-IE
    e = e;
    characterCode = e.which; 
  }
  else {
    e = event;
    characterCode = e.keyCode; //IE
  }

  if ( characterCode == 13 ) { 
    count++;
    if ( count > 5 ) {
      entryHeight += 18; // adding another line
      document.getElementById('entry').style.height = entryHeight + 'px';
      return false;
    }
  }
  else{
    return true; 
  }
}
