var click_tourney = (typeof tourney_url == "undefined") ? "" : tourney_url;
var showPods = (typeof show_podcasts == "undefined") ? "true" : show_podcasts;
var station_id = (typeof stationID == "undefined") ? "" : stationID;
var flashHt = (typeof tracker_ht == "undefined") ? 300 : tracker_ht;
var flashWd = (typeof tracker_wd == "undefined") ? 300 : tracker_wd;
var regCode = (typeof region_code == "undefined") ? "" : region_code;
var conference = (typeof confCode == "undefined") ? "" : confCode;
var schooldomain = (typeof domain == "undefined") ? "" : domain;
var gender = (typeof men_women == "undefined") ? "men" : men_women;
var school = (typeof schoolcode == "undefined") ? "cs" : schoolcode;

if (typeof tracker_size != "undefined") {
	flashHt = flashWd = tracker_size;
}
var flashSWF = "http://livestats.www.cstv.com/googlemod1/2008/08_tourney_tracker.swf?1";
//var flashSWF = "08_tourney_tracker.swf"; 
var flashVariables = "regCode="+regCode+"&confCode="+conference+"&domain="+schooldomain+"&station_id="+station_id+"&click_tourney="+click_tourney+"&showPods="+showPods+"&gender="+gender+"&schoolcode="+school+"&"; //full url string - path to swf, passing any vars
var flashWidth = flashHt;
var flashHeight = flashWd;

var flashVersion = 8;
var flashScale = "exactfit";
var flashWmode = "transparent";
var flashBkgCol = "FFFFFF"; //background color - won't matter if swf has a background or wmode is transparent

//document.write(flashSWF);

function tourneyTracker(gtURL) {
	gtWindow = window.open(gtURL, "mbaskblGameTracker", "width=976,height=660,toolbar=no,scrollbars=no");
}

var flashDefault = '<a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"><img src="http://livestats.googlemod.collegesports.com/googlemod1/2008/08_cstv_tourney_tracker_default.gif" width="'+flashWidth+'" height="'+flashHeight+'" border="0" alt="Click here to download the latest version of the Flash plugin to view this content"></a>';

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-2)) == 10 || parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= flashVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
	document.write('<SCR'+'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+flashVersion+'")))\n');
	document.write('</SCR'+'IPT\> \n');
}
if ( plugin ) {
	adFlashCode =' <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
	adFlashCode +=' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+flashVersion+',0,0,0" ';
	adFlashCode +=' ID=cstvad WIDTH='+flashWidth+' HEIGHT='+flashHeight+'>';
	adFlashCode +=' <PARAM NAME=movie VALUE="'+flashSWF+'"> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=scale VALUE='+flashScale+'> <PARAM NAME=salign VALUE=LT> <PARAM NAME=wmode VALUE='+flashWmode+'> <PARAM NAME=bgcolor VALUE=#'+flashBkgCol+'> <PARAM NAME=FlashVars VALUE='+flashVariables+'> <PARAM NAME=AllowScriptAccess VALUE=always> '; 
	adFlashCode +=' <EMBED src="'+flashSWF+'" menu=false quality=high scale='+flashScale+' salign=LT wmode='+flashWmode+' bgcolor=#'+flashBkgCol+' swLiveConnect=FALSE WIDTH='+flashWidth+' HEIGHT='+flashHeight+' FlashVars='+flashVariables;
	adFlashCode +=' AllowScriptAccess=always TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>';
	document.write(adFlashCode);
} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
	document.write(flashDefault);
}

