function schedule(objectID, functionCall, iteration)
{
	if (iteration == null)
	{
		iteration = 0;
	}
	
	if (objectID == "window")
	{
		var oldonload = window.onload;
		
		if (typeof window.onload != "function")
		{
			window.onload = functionCall;
		}
		else
		{
			window.onload = function()
			{
				oldonload();
				functionCall();
			}
		}
	}
	else if (document.getElementById(objectID))
	{
		functionCall();
	}
	else if (iteration < 300)
	{
		setTimeout(function(){schedule(objectID, functionCall, iteration + 1)}, 10);
	}
	
	return true;
};

schedule("window", insertSWFs); 

function insertSWFs() 
{
	if(document.getElementById('site').className.match("homepage") && !document.getElementById('site').className.match("international-homepage")) {
		//var so = new SWFObject("/site/swfs/SBIT_home.swf", "sotester", "784", "150", "6", "#ffffff");
		var so = new SWFObject("/site/swfs/leaderboard.swf", "sbithome", "784", "150", "6", "#ffffff");
		//var so = new SWFObject("/site/swfs/SBIT_home.swf", "sbithome", "100%", "150", "6", "#ffffff");
		//so.addParam("wmode", "transparent");
		document.getElementById('banner').style.backgroundImage = "none";
		so.write("banner");
	} else if(document.getElementById('site').className.match("international-homepage")) {
		//var so = new SWFObject("swfs/SBIT_international.swf", "sbitinthome", "784", "150", "6", "#ffffff");
		var so = new SWFObject("/site/swfs/SBIT_international.swf", "sbitinthome", "100%", "150", "6", "#ffffff");
		document.getElementById('banner').style.backgroundImage = "none";
		so.write("banner");
	}
};
