if (!ahl_banner_vars) { var ahl_banner_vars = { width:265, height:265, fileURL: "http://www2.jumptv.com/AHL/banner_downloads/2009-09-29/ahl-swf/ahl_buttons_265x265.swf", teamName: "NO-LOADING-SCRIPT" } }

ahl_banner_vars.base_url = new String(window.location.host);

var flashVarIndex = ahl_banner_vars.width +'x'+ ahl_banner_vars.height;

var flashVars = new Array();

if ( !flashVars[flashVarIndex] )
{
	flashVars[flashVarIndex] = 'imageFilename=http%3A%2F%2Fwww2.jumptv.com%2F%2FAHL%2Fbanner_downloads%2F2009-09-29%2Fbanner_images%2Fdefault%2Fahl_default_'+ flashVarIndex +'.jpg';
}

// Begin Team Specific Tailoring

// Rockford IceHogs
if (ahl_banner_vars.teamName == 'Rockford-Ice-Hogs' && flashVarIndex == '175x100') 
{
	ahl_banner_vars.height  = '201px';	
	ahl_banner_vars.width   = '175px';	
	ahl_banner_vars.fileURL = 'http://www2.jumptv.com/AHL/banner_downloads/2009-09-29/ahl-swf/ahl_buttons_175x201.swf';
}

// Toronto Marlies Front Page
if (ahl_banner_vars.teamName == 'Toronto-Marlies' && ahl_banner_vars.width == 233 && ahl_banner_vars.height == 105)
{
	if (window.location.href == 'http://www.torontomarlies.com/' || window.location.href == 'http://torontomarlies.com/')
	{
		ahl_banner_vars.fileURL = "http://www2.jumptv.com/AHL/banner_downloads/2009-09-29/ahl-swf/ahl_buttons_233x105.swf"
	}
}


// Generate and include clickTAG

var clickTAGObj = {
	siteURL:  'http://ahl.neulion.com/team/console.jsp',
	source:   ahl_banner_vars.teamName,
	medium:   'Team-Site',
	content:  'AHL_Opening_Campaign_2009',
	campaign: 'AHLlive_Season_Launch_2009_'+ ahl_banner_vars.teamName,
	ref:      ahl_banner_vars.base_url
}

var i = 0;

for (k in clickTAGObj)
{
	if (i++ > 0)
	{
		clickTAG = clickTAG + (i > 2 ? '&' : '?') +'utm_'+ k + '=' + clickTAGObj[k];
	}
	else 
	{
		clickTAG = clickTAGObj[k];
	}
}

ahl_banner_vars.clickTAG = '?clickTAG='+ escape( clickTAG );
ahl_banner_vars.fileURL  = ahl_banner_vars.fileURL + ahl_banner_vars.clickTAG;

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+ ahl_banner_vars.width +'" height="'+ ahl_banner_vars.height +'" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ ahl_banner_vars.fileURL +'" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="flashvars" value="'+ flashVars[flashVarIndex] +'"/><param name="bgcolor" value="#ffffff" /><embed flashvars="'+ flashVars[flashVarIndex] +'" src="'+ ahl_banner_vars.fileURL +'" wmode="transparent" quality="high" bgcolor="#ffffff" width="'+ ahl_banner_vars.width +'" height="'+ ahl_banner_vars.height +'" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
document.write('<img src="http://www.neulion-labs.com/ahl/embed/pixel.php?ref='+ ahl_banner_vars.base_url +'&href='+ escape(window.location.href) +'&sz='+ ahl_banner_vars.width +'x'+ ahl_banner_vars.height +'" alt="Tracking Pixel" />');