var	filesToLoad		= new Array();
var	currentFile		= 0;
function loadFiles()
{
	if (typeof filesToLoad[currentFile] == 'string')
	{
		$.getScript(SCORE_URL + 'Dev/Includes/Javascripts/' + filesToLoad[currentFile], loadFiles);
		currentFile++;
	}
	else
	{
		execute();
	}
}

$(document).ready(loadFiles);

function execute()
{
	var	offset	= (navigator.userAgent.indexOf("Mac") != -1 || navigator.userAgent.indexOf("Gecko") != -1 || navigator.appName.indexOf("Netscape") != -1) ? 0 : 4;
    window.moveTo(-offset, -offset);
    window.resizeTo(screen.availWidth + (2 * offset), screen.availHeight + (2 * offset));
    
	$('a[rel="external"]').click(externalLink);
	$('select[name=country]').change(countrySwitch);
	if ($('div#phoneProgress').length)
		$.getScript(SCORE_URL + 'Dev/Includes/Javascripts/JQuery.Functions.Progressbar.js', function () {phone()});
}

function countrySwitch()
{
	$('div#country form').submit();
}
function externalLink()
{
    window.open($(this).attr('href'));
    return false;
}