function FlashMovie_DoFSCommand(command, args) {
//  alert(command + " " + args);
  if (command == 'click') {
    switch (args) {
      case 'gaming' : location.href="/onlinegaming.html"; break;
      case 'mobile' : location.href="/mobile.html"; break;
      case 'support' : location.href="/support.html"; break;
      case 'technology' : location.href="/technology.html"; break;
      case 'join' : location.href="/careers.html"; break;
      case 'main' : location.href="/whoweare.html"; break;
      case 'ball' : location.href="/index.html"; break;
      default: window.refresh;
    }
  }
}

function FlashGame_DoFSCommand(command, args) {
  if (command == 'click') {
	var link = '';
	var ext = false;
    switch (args) {
      case 'moreinfo1' : link = 'http://www.brightshare.com/what-we-offer.html'; break;
      case 'moreinfo2' : link = 'http://www.brightshare.com/brands.html'; break;
      case 'allslots' : link = '/brand-as.html'; break;
      case 'alljackpots' : link = '/brand-aj.html'; break;
      case 'firstweb' : link = '/brand-fw.html'; break;
      case 'wildjack' : link = '/brand-wj.html'; break;
      case 'asm' : link = '/brand-asm.html'; break;
      case 'wjm' : link = '/brand-wjm.html'; break;
      case 'moreinfo3' : link = 'http://www.brightshare.com/brand-wjm.html'; break;
      case 'ecogra' : link = 'http://www.ecogra.org/admanager/affiliate.aspx?id=BRIGHTSHARE_AFF'; ext = true; break;
      case 'moreinfo4' : link = 'http://www.brightshare.com/press-release-sept-09-09-eCogra.html'; ext = true; break;
      case 'moreinfo5' : link = 'http://www.casinomeister.com/bestworst2008.php#affiliate'; ext = true; break;
      case 'moreinfo6' : link = 'http://www.brightshare.com/community-testimonials.html'; break;
      case 'link1' : link = 'http://www.onlinecasinoreports.com/'; ext = true; break;
      case 'link2' : link = 'http://www.onlinecasinosuite.com/'; ext = true; break;
    }
    
    if(link) {
      a = null;
      if(ext) a = window.open(link, 'fromflash')
      if (!a) {
      window.location.href = link;
      }
    }
  }
}

function open_login(){
 document.getElementById('loginform').style.display='inline';
 document.getElementById('loginlink').className="selected";
}

function close_login(){
 document.getElementById('loginform').style.display='none';
 document.getElementById('loginlink').className="";
}

function open_lang(){
 document.getElementById('sel_lang').style.display='inline';
 document.getElementById('lang_link').className="selected";
}

function close_lang(){
 document.getElementById('sel_lang').style.display='none';
 document.getElementById('lang_link').className="";
}

$(document).ready(function () {
	$('#edit-username').keypress(function(e){
		if(e.which==13)	{
			document.getElementById('brightshare-login-form').submit();
		}
	});
	$('#edit-password').keypress(function(e){
		if(e.which==13)	{
			document.getElementById('brightshare-login-form').submit();
		}
	});
});

