//javascript


function submitForm(n)
{ 
  document.form1.SELECTED.value=n
  document.form1.submit();
}



function checkForm() // not in use?
{ 
  if (document.feedback.comments.value=="") {return false}
  return true     
}



function preload(turn)  //pre-load pictures depending what turn it is - part not in use?
{
  if (turn>=1 && turn<=10) {
  var preload=new Image()
  var riceImg="images/rice"+(turn*10)+".gif"
  preload.src=riceImg}


  if (turn==1) {
  var preload1=new Image()
  preload1.src="images/contentSecondBackground2.gif"
  var preload2=new Image()
  preload2.src="images/bowl.jpg"}
  var preloadFlag="1"
  document.form1.INFO.value+=preloadFlag


  if (turn==11) {
  var preload3=new Image()
  preload3.src="images/iconsHundred.gif"
  var preload4=new Image()
  preload4.src="images/iconsThousand.gif"}
}
	


function enlargePicture(newTop,newLeft)
{
  origTop=document.getElementById("pictureDisplay").style.top
  origLeft=document.getElementById("pictureDisplay").style.left
  origHeight=document.images.pictureImg.height
  origWidth=document.images.pictureImg.width
	
  document.getElementById("pictureDisplay").style.top=newTop+"px" 
  document.getElementById("pictureDisplay").style.left=newLeft+"px" 
  
  if (origHeight/origWidth>461/880) {
    document.images.pictureImg.style.height="461px"  /* this + next line should be same number */	
    document.images.pictureImg.style.width=(origWidth*(461/origHeight))+"px"
  } else {
    document.images.pictureImg.style.width="880px"  /* this + next line should be same number */	
    document.images.pictureImg.style.height=(origHeight*(880/origWidth))+"px"
  }
}



function revertPicture(page)
{
  document.images.pictureImg.style.height=origHeight+"px"
  document.images.pictureImg.style.width=origWidth+"px"

  document.getElementById("pictureDisplay").style.top=origTop 
  document.getElementById("pictureDisplay").style.left=origLeft
}



function fixWebTV() //ch background on WebTV to make easier to read
{
  if (navigator.appName.indexOf("WebTV") != -1) { 
    if (document.body){
      document.body.style.backgroundImage = "url()";
      document.body.style.backgroundColor = "#cbd48e";
    }
  }
}