try {
dojo.require( "radius.utils" );
} catch (e) {
	// -- if an exception is thrown here then ActiveX is disabled --
	window.top.location.href=( "/noscriptsupport.html" );
}

function startFlashPreview(target){
	this.obj = {}
	this.parent = document.getElementById(target);
	this.nav = {};
		this.navVer = navigator.appVersion;
		this.navName = navigator.appName;
	
	this.start = function(){
		try {

			radius.debug( "starting flash movie" );
			this.obj = document.createElement("object");
				this.obj.setAttribute("classid", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000");
				this.obj.setAttribute("codebase", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0");
				this.obj.setAttribute("width", 488);
				this.obj.setAttribute("height", 486);
				this.obj.setAttribute("align", "middle");
	
			this.objParam1 = document.createElement("param");
				this.objParam1.setAttribute("name", "allowScriptAccess");
				this.objParam1.setAttribute("value", "sameDomain");
			this.objParam2 = document.createElement("param");
				this.objParam2.setAttribute("name", "movie");
				this.objParam2.setAttribute("value", "media/preloader.swf?version=RELEASE_0_27&build=200608281106");
			this.objParam3 = document.createElement("param");
				this.objParam3.setAttribute("name", "quality");
				this.objParam3.setAttribute("value", "high");
			this.objParam4 = document.createElement("param");
				this.objParam4.setAttribute("name", "bgcolor");
				this.objParam4.setAttribute("value", "#FFFFFF");
			this.objParam5 = document.createElement("param");
				this.objParam5.setAttribute("name", "wmode");
				this.objParam5.setAttribute("value", "transparent");
	
			this.embedEl = document.createElement("embed");
				this.embedEl.setAttribute("src", "media/preloader.swf?version=RELEASE_0_27&build=200608281106");
				this.embedEl.setAttribute("width", 488);
				this.embedEl.setAttribute("autostart", "true");
				this.embedEl.setAttribute("height", 486);
				this.embedEl.setAttribute("align", "middle");
				this.embedEl.setAttribute("quality", "high");
				this.embedEl.setAttribute("bgcolor", "#FFFFFF");
				this.embedEl.setAttribute("wmode", "transparent");
				this.embedEl.setAttribute("allowscriptaccess", "sameDomain");
				this.embedEl.setAttribute("type", "application/x-shockwave-flash");
				this.embedEl.setAttribute("pluginspage", "http://www.macromedia.com/go/getflashplayer");
	
			this.obj.appendChild(this.objParam1);
			this.obj.appendChild(this.objParam2);
			this.obj.appendChild(this.objParam3);
			this.obj.appendChild(this.objParam4);
			this.obj.appendChild(this.objParam5);
	
			if( dojo.render.html.ie ){
				this.parent.appendChild(this.embedEl);
			}
			else{
				this.parent.appendChild(this.obj);
				this.obj.appendChild(this.embedEl);
			}
		} catch (error) {
			try {
				alert( "caught error " + error );
				radius.handleError(
					"Active X and Flash are required to enjoy the site (change this)", 
					"Unable to load the Flash movie", 
					"swfPreloader.js", 
					new function() {
						window.document.location( "http://www.google.com" );
					});
			}
			catch (error2) {
				alert( "Active X and Flash and Javascript are required" );
				window.document.location( "http://www.google.com" );
			}
		} 
	}
	
	this.kill = function(){
		this.parent.innerHTML = "";
	}
};
flaObj = null;
function startPreview(){
	if ( flaObj == undefined )
	{
		radius.debug( "creating new flash preview" );
		flaObj = new startFlashPreview("mainPageAppsDomId");
		flaObj.start();
	}
}