//ÇÃ·¡½Ã

function Swf_View(URL,SizeX,SizeY,LnkId,Frm,Flag)
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('	width="'+SizeX+'" height="'+SizeY+'"  id="'+LnkId+'" align="middle">');
    document.write('	<param name="movie"     value="'+URL+'" />');
    document.write('	<param name="quality"   value="high" />');
    document.write('	<param name="wmode"     value="transparent"/>');
   	document.write('	<param name="allowScriptAccess" value="always"/> ');
	document.write('	<param name="base" value="." />');
    document.write('	<embed base="." src="'+URL+'" quality="high" width="'+SizeX+'" height="'+SizeY+'" align="middle" ');
    document.write('	type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />'   );
    document.write('</embed></object>');

}

function Swf_Resize(URL,SizeX,SizeY,LnkId,Frm,Flag)
{
	e = canResizeFlash();
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('	width="'+SizeX+'" height="'+SizeY+'"  id="'+LnkId+'" align="middle">');
    document.write('	<param name="movie"     value="'+URL+'" />');
    document.write('	<param name="quality"   value="high" />');
    document.write('	<param name="wmode"     value="transparent"/>');
	document.write('<param name="FlashVars" value="allowResize='+e+'" />');
	document.write('	<param name="base" value="." />');
    document.write('	<embed base="." src="'+URL+'" quality="high" width="'+SizeX+'" height="'+SizeY+'" align="middle" ');
    document.write('	type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />'   );
    document.write('</embed></object>');

}
/* 
Methods for resizing the flash stage at runtime.

setFlashWidth(divid, newW)
divid: id of the div containing the flash movie.
newW: new width for flash movie

setFlashHeight(divid, newH)
divid: id of the div containing the flash movie.
newH: new height for flash movie

setFlashSize(divid, newW, newH)
divid: id of the div containing the flash movie.
newW: new width for flash movie
newH: new height for flash movie

canResizeFlash()
returns true if browser supports resizing flash, false if not. 
*/
function setFlashWidth(divid, newW){
	document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";		
}
function setFlashSize(divid, newW, newH){
	setFlashWidth(divid, newW);
	setFlashHeight(divid, newH);
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}
