function generateFlash(menuID,movieName,fileLocation,theWidth,theHeight){
	var tempPrefixx = "";
	
	var aString = document.location.href;
	
	if (aString.indexOf("/admin/") != -1){
		tempPrefixx = "../";
	}
	if (aString.indexOf("/admin/default.aspx") != -1){
		tempPrefixx = "";
	}
	if (aString.indexOf("/admin/adminHome.aspx") != -1){
		tempPrefixx = "";
		
	}
	if (aString.indexOf("/admin/adminhome.aspx") != -1){
		tempPrefixx = ""
		
	}
	
	if ((aString.indexOf("/admin/") != -1) && (aString.lastIndexOf("/admin/") == (aString.length-7)) && (aString.indexOf(".aspx") == -1) ){
	//alert(aString.lastIndexOf("/admin/"));
	//alert(aString.length-7);
		tempPrefixx = "";
	}

	var theFlashOBJString = "";
	theFlashOBJString += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" id="' + movieName +'" width="' + theWidth +'" height="' + theHeight +'">';
	theFlashOBJString += '<param name="wmode" value="transparent">';
	theFlashOBJString += '<param name="menu" value="false">';                    
	theFlashOBJString += '<param name=movie value="' + tempPrefixx + fileLocation + '?selectedMenuItem=' + menuID +'">';
	theFlashOBJString += '<param name=quality value=high>';
	theFlashOBJString += '<param name="AllowScriptAccess" value="Always" />';
	theFlashOBJString += '<param name=play value=true>';
	theFlashOBJString += '<param name=exactfit value=true>';
	theFlashOBJString += '<embed play=true swliveconnect="true" name="' + movieName + '" src="' +  tempPrefixx + fileLocation + '?selectedMenuItem=' + menuID +'" quality=high  width="' + theWidth +'" height="' + theHeight +'" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed ></object >';
	document.write(theFlashOBJString);
}
