var fileName='flashtable.js';
var teamId=0;
var scriptPath='';
var timeout=1;
function getScriptPath() {
	if (scriptPath != '') {
		return scriptPath;
	}
	else {
		var scripts=document.getElementsByTagName('script');
		for (var i=0; i < scripts.length; i++) {
			var path=scripts[i].src;
			var splitString = path.split(fileName);
			if (splitString.length == 2) {
				scriptPath = splitString[0];
				return scriptPath;
			}
		}
	}
}

function showFlashTable(){
	var param='teamId=' + teamId;
	var httpLocation = getScriptPath();
	var t = new Ajax.Request(httpLocation + 'flashtable.php',{
    		method: 'get',
            onComplete: showTable,
            parameters:param}
            );
    setTimeout('showFlashTable()',timeout);
    timeout=8000;
}

var showTable = function(r)
{
	document.getElementById('flashTable').innerHTML = r.responseText;
	Effect.Grow('flashTableBox', {duration: 0.5}); 
	teamId++;
}