function renderFlash(src, width, height, features) {
	document.writeln('<embed src="' + src + '" quality="high" width="' + width + 
					 '" height="' + height + '" align="middle" allowscriptaccess="sameDomain" ' +
					 'type="application/x-shockwave-flash" ' + features + 
					 'pluginspage="http://www.macromedia.com/go/getflashplayer" />');
}
function launchImage(url, width, height, title) {
	if (url != "")
		window.open(url, "preview_image", "width=" + (width + 50) + ", height=" + (height + 50) + ", location=0, menubar=0, resizable=0, scrollbars, status=0, titlebar=1, toolbar=0");
	return false;
}
function launchCam(url, width, height, title) {
	if (url != "")
		window.open(url, "preview_image1", "width=" + (width + 50) + ", height=" + (height + 50) + ", location=0, menubar=0, resizable=0, scrollbars, status=0, titlebar=1, toolbar=0");
	return false;
}

function launchSponsors() {
	var sponsors = "sponsors.aspx";
	Modalbox.show(sponsors, {title: 'Sponsors', width: 550, height: 550});
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function renderFeed(src, width, height) {
	document.writeln('<embed src="' + src + '" width="' + width + 
					 '" height="' + height + '" align="middle" ' +
					 'type="video/x-ms-asf" ' + '" ShowPositionControls="false" ' + 
					 '" ShowTracker="false" ');
}

function submitForm(id) {
	document.getElementById(id).submit();
	return false;
}

function jar() {
	alert("Mac Testing");
}

var userAgent = window.navigator.userAgent
var isIE = (window.navigator.userAgent.indexOf("MSIE") != -1);
var isFirefox = (window.navigator.userAgent.indexOf("Firefox") != -1);
var isIE6 = (parseFloat(userAgent.substring(userAgent.indexOf("MSIE ") + 5)) <= 6);
var isSafari = (navigator.userAgent.indexOf("Safari") > 0);

function writePngImage(url, width, height, alt) {
	if (!isIE6)
		document.write("<img alt=\"" + alt + "\" src=\"" + url + "\" style=\"width: " + width + "px; height: " + height + "px;\">");
	else
		document.write("<img alt=\"" + alt + "\" src=\"spacer.png\" style=\"width: " + width + "px; height: " + height + 
			"px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + url + "', sizingMethod=scale);\">");
}

function BrowserInfo() {
	var agent = window.navigator.userAgent;
	if (agent.indexOf("MSIE") != -1) {
			var start = agent.indexOf("MSIE");
			this.name = "MSIE";
			this.version = parseFloat(agent.substring(start + 5, agent.indexOf(";", start)));
	} else if (agent.indexOf("Firefox") != -1) {
			var start = agent.indexOf("Firefox");
			this.name = "Firefox";
			this.version = agent.substring(start + 8, agent.length);
			var firstDec = this.version.indexOf(".") + 1;
			while (this.version.indexOf(".", firstDec) != -1)
				this.version = this.version.substring(0, firstDec) + this.version.substring(firstDec).replace(".", "");
			this.version = parseFloat(this.version);
	} else {
			this.name = "Unknown";
			this.version = 0;
	}
}

var info = new BrowserInfo();
var isIE6 = (info.name == "MSIE" && info.version < 7);


if (info.name == "MSIE" && info.version < 7)
	document.writeln('<link href="stylesIE6.css" rel="stylesheet" type="text/css" />');
else
	document.writeln('<link href="stylesDynamic.css" rel="stylesheet" type="text/css" />');

