/**
 * @author ryan.hefner
 */
function wiiDetect() {
	var so = new SWFObject("swf/site.swf", "warioshakeit", "100%", "598", "0", "#1d0120");
	so.addParam("allowScriptAccess", "sameDomain");
		
	if (navigator.platform == "Nintendo Wii") {
		// window.location = "wii/index.html";
		so.addVariable( "wiiBrowser", "true" );
		so.setAttribute( "scale", "exactFit" );
		so.setAttribute( "width", 800 );
		so.setAttribute( "height", 497 );
		document.getElementById( "flashcontent" ).style.width = '800px';
		document.getElementById( "flashcontent" ).style.height = '497px';
	}
	else {
		so.useExpressInstall('swf/expressinstall.swf');
		so.setAttribute( "scale", "noscale" );
		so.addVariable( "wiiBrowser", "false" );
	}
	
	so.addVariable( "language", "en" );
	so.write("flashcontent");
}

if (typeof addEvent == 'undefined') {
	
	function addEvent(obj, evType, fn) {
		
		if (obj.addEventListener) {
			obj.addEventListener(evType, fn, true);
			return true;
		}
		else if (obj.attachEvent) {
			var r = obj.attachEvent("on"+evType, fn);
			return r;
		}
		else {
			return false;
		}
	}
	
}

addEvent(window, 'load', wiiDetect);