function detectScreen(size,typ,toRet)
{
	switch (typ)
	{
		
		case "screen":
		break;
		
		case "viewport":
		break;
		
	
	}
	
	var toReturn = ""
	switch (toRet){
		case "x":
		break;
		case "y":
		break;
	}
	
	return (toReturn)
}	


function detectFlash(ver)
{
	
		var flashversion = 8;
		var myflashversion =0;
		var vNumber 
		var MM_contentVersion = flashversion;
		
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

		if ( plugin ) {

					var words = navigator.plugins["Shockwave Flash"].description.split(" ");
					for (var i = 0; i < words.length; ++i)
					{
					if (isNaN(parseInt(words[i])))
					continue;
					var MM_PluginVersion = words[i]; 
					}
					vNumber = MM_PluginVersion;
					var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
			
			}
			else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {

				try
				{
					var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash")
					vNumber =  parseInt(flash.GetVariable("$version").split(",")[0].split(" ")[1]);
					
				}
				catch(e)
				{
					vNumber=0;
				}
			
				if (vNumber >=MM_contentVersion){
					MM_FlashCanPlay=true
				}

				
				
			}


		return ( MM_FlashCanPlay )

}

function writeFlash(toWrite,failed,dtct,ver)
{
	var returnVal = ""
	if (dtct)
	{
		if (detectFlash(ver)) {
			//document.write(toWrite);
			returnVal = toWrite
		}else{
			//document.write(failed);
			returnVal = failed
		}
	}else{
		//document.write(toWrite);
		returnVal = toWrite
	}
	return returnVal
}
function writeFlash2(swf){		
	
	var newflash = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="100%" id="DaisyHouse" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="../data/flashimages/' + swf + '" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="../data/flashimages/' + swf + '" quality="high" bgcolor="#ffffff" width="100%" height="100%" name="DaisyHouse" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'	
	var _html = writeFlash(newflash,'<div id="noflash"><a href="http://www.adobe.com/go/getflashplayer"><img src="data/htmlimages/noflash.jpg" alt="download flash now" border="0" /></a></div>',true,7);	
	var theDiv = document.getElementById("mainnavimage")
	theDiv.innerHTML = _html
}


