
/************* used by purchase chip *****************/
function initPurchaseAmount(){
   document.purchaseChips.purchaseAmount.focus();
}

function initChipPurchaseNext() {
   document.completeChipPurchase.chipPurchaseNext.focus();
}

/*************** used by chip cashout ****************/

function initCashoutAmount(){
   document.chipCashout.cashoutAmount.focus();
}   

function initConfirmButton(){
  document.completeChipCashout.confirmButton.focus();
}

/************** used to return on chip purchase or cashout complete ***************/
function initReturnButton() {
  document.forms[0].returnButton.focus();
}


/* 

START JS-TO-FLASH FUNCTIONS 

*/

var movieName = "instantplay" ;

function thisMovie(movieName) {
	if (window.document[movieName]) 
	  {
	      return window.document[movieName];
	  }
	  if (navigator.appName.indexOf("Microsoft Internet")==-1)
	  {
	    if (document.embeds && document.embeds[movieName])
	      return document.embeds[movieName]; 
	  }
	  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
	  {
	    return document.getElementById(movieName);
	  }
}


// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
  if (typeof(theMovie) != "undefined") {
    return theMovie.PercentLoaded() == 100;
  } else {
    return false;
  }
}




/*

FLASH-TO-JAVASCRIPT FUNCTIONS 

*/

var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;


// Handle all the FSCommand messages in a Flash movie.
function instantplay_DoFSCommand(command, args) {
	var ipObj = isInternetExplorer ? document.all.instantplay : document.instantplay;

	if (command == "getUrl") {
		setVar() ;
	}

}


// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub instantplay_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call instantplay_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}