function writeRiceMenuSWF(swfFile,cat,prod)
{
	switch (swfFile){
		
		case 0:
		//alert('LESS THAN FLASH 6.0.65');
		window.location = "../upgrade.aspx";
		break;
		
		case 1:
		//alert('LESS THAN REQUIRED BUT >= 6.0.65');
		var MMPlayerType = (IE == true) ? "ActiveX" : "PlugIn";
		var MMredirectURL = window.location;
		document.title = document.title.slice(0, 47) + " - Flash Player Installation";
		var MMdoctitle = document.title;
		
		var objtag = "";
		objtag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="645" height="200" id="ricemenuflash" style="position:absolute; top:-90px;left:15px;">\n';
		objtag += '<param name="allowScriptAccess" value="always" />\n';
		objtag += '<param name="movie" value="../expressInstall.swf" />';
		objtag += '<param name="quality" value="high" />\n';
		objtag += '<param name="FlashVars" value="MMredirectURL='+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+'">';
		objtag += '<param name="bgcolor" value="#e4881b" />';
		objtag += '<embed src="../expressInstall.swf" flashvars="MMredirectURL='+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+'" width="645" height="200" name="ricemenuflash" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" menu="false" />';
		objtag += '</object>\n';
		
		document.getElementById('prod_detail_menu').innerHTML = objtag;
		break;
		
		case 2:
		//alert('SUCCESS!');
		var objtag = "";
		objtag += '<object style="position:absolute; top:-170px;left:0;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="300">';
		objtag += '<param name="movie" value="../swf/rice/productline_pagetop.swf" />';
		objtag += '<param name="flashVars" value="xmlPath=/xml/&rootPath=/swf/rice/&categoryid='+ cat +'&productid='+ prod +'" />';
		objtag += '<param name="quality" value="high" />';
		objtag += '<param name="wmode" value="transparent" />';
		objtag += '<embed src="../swf/rice/productline_pagetop.swf" wmode="transparent" flashVars="xmlPath=/xml/&rootPath=/swf/rice/&categoryid='+ cat +'&productid='+ prod +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="300"></embed>';
		objtag += '</object>';
		
		document.getElementById('prod_detail_menu').innerHTML = objtag;
		
		break;
		
		case 3:
		//alert('SUCCESS!');
		document.write('<object style="position:absolute; top:-170px;left:0;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="300">');
		document.write('<param name="movie" value="../swf/rice/productline_pagetop.swf" />');
		document.write('<param name="flashVars" value="xmlPath=/xml/&rootPath=/swf/rice/&categoryid='+ cat +'&productid='+ prod +'" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="wmode" value="transparent" />');
		document.write('<embed src="../swf/rice/productline_pagetop.swf" wmode="transparent" flashVars="xmlPath=/xml/&rootPath=/swf/rice/&categoryid='+ cat +'&productid='+ prod +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="300"></embed>');
		document.write('</object>');
		break;
		
		default:
		break;
	}
	
	
}
