
function GnxFlashActivate ( strFlashUrl , n4Witdh , n4Height , strWmode , strId , strClassName , strFlashvar ) {
	
	if (n4Witdh != 0) {
		objSize_attribute = " width='"+ n4Witdh +"' height='"+ n4Height +"'";
	} else {
		objSize_attribute = "";
	}
	
	if (strId != 0) {
		objId_attribute = " id='" + strId + "'";
		objId_IE_attribute = " id='" + strId + "'";
	} else {
		objId_attribute = "";
		objId_IE_attribute = "";
	}

	if (strClassName != 0) {
		className_attribute = " class='" + strClassName + "'";
	} else {
		className_attribute = "";
	}
	
	if (strWmode != 0) {
		wmode_param = "<param name='wmode' value='" + strWmode + "' />";
		wmode_attribute = " wmode='" + strWmode + "'";
	} else {
		wmode_param = "";
		wmode_attribute = "";
	}

	if (strFlashvar != 0) {
		Flashvar_param = "<param name='flashvars' value='" + strFlashvar + "' />";
		Flashvar_attribute = " Flashvars='" + strFlashvar + "'";
	} else {
		Flashvar_param = "";
		Flashvar_attribute = "";
	}
	document.writeln( "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' " + objSize_attribute + objId_IE_attribute + className_attribute + ">" );
    document.writeln( "<param name='allowFullScreen' value='true' />" );
	document.writeln( "<param name='movie' value='"+ strFlashUrl +"' />" );
	document.writeln( "<param name='quality' value='high' />" );

	
	document.writeln( "<param name='allowScriptAccess' value='always' />" );
	document.writeln( wmode_param );
	document.writeln( Flashvar_param );
	document.writeln( "<!-- Hixie method -->" );
	document.writeln( "<!--[if !IE]> <-->" );
	document.writeln( "<object type='application/x-shockwave-flash' data='"+ strFlashUrl +"'" + Flashvar_attribute + objSize_attribute + objId_attribute + wmode_attribute + className_attribute + "></object>" );
	document.writeln( "<!--> <![endif]-->" );
	document.writeln( "</object>" );


}



function GnxMovieActivate ( strMovieUrl , n4Width , n4Height , strId , n4AutoStart , n4ShowControls ) {
	
	if (n4Width != 0) {
		if (n4ShowControls == 0) {
			Realn4Height = n4Height;	
		} else {
			Realn4Height = n4Height + 45;
		}
		objSize_attribute = " width='"+ n4Width +"' height='"+ Realn4Height +"'";
	} else {
		objSize_attribute = "";
	}

	if (strId != 0) {
		objId_attribute = " id='" + strId + "'";
		objId_IE_attribute = " id='" + strId + "IE'";
	} else {
		objId_attribute = "";
		objId_IE_attribute = "";
	}

	
	if (n4ShowControls == 0) {
		ShowControls_param = "<param name='showcontrols' value='false' />";
		ShowControls_attribute = " showcontrols='0'";
	} else if (n4ShowControls == 1){
		ShowControls_param = "<param name='showcontrols' value='true' />";
		ShowControls_attribute = " showcontrols='1'";
	}


	if (n4AutoStart == 0) {
		AutoStart_param = "<param name='autostart' value='false' />";
		AutoStart_attribute = " autostart='0'";
	} else if (n4AutoStart == 1){
		AutoStart_param = "<param name='autostart' value='true' />";
		AutoStart_attribute = " autostart='1'";
	}
	document.writeln( "<object classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'" + objId_IE_attribute + objSize_attribute +">");
        document.writeln( "     <param name='allowFullScreen' value='true' />" );
	document.writeln( "	<param name='AudioStream' value='-1' />");
	document.writeln( "	<param name='AutoSize' value='false' />");
	document.writeln( "	<param name='AnimationAtStart' value='true' />");
	document.writeln( "	<param name='AllowChangeDisplaySize' value='true' />");
	document.writeln( "	<param name='BufferingTime' value='5' />");
	document.writeln( "	<param name='Enabled' value='true' />");
	document.writeln( "	<param name='EnableContextMenu' value='true' />");
	document.writeln( "	<param name='EnableTracker' value='true' />");
	document.writeln( "	<param name='PlayCount' value='1' />");
	document.writeln( "	<param name='Rate' value='1' />");

	document.writeln( "	<param name='ShowCaptioning' value='false' /> <!-- Forward,Rewind -->");
	document.writeln( "	<param name='ShowAudioControls' value='true' /> <!-- Forward,Rewind -->");
	document.writeln( "	<param name='ShowDisplay' value='false' /> <!-- Forward,Rewind -->");
	document.writeln( "	<param name='ShowPositionControls' value='true' /> <!-- Forward,Rewind -->");
	document.writeln( "	<param name='ShowStatusBar' value='false' /> <!-- Forward,Rewind -->");
	document.writeln( "	<param name='ShowTracker' value='true' /> <!-- Forward,Rewind -->");
	
	document.writeln( "	<param name='Mute' value='false' />");
	document.writeln( AutoStart_param );
	document.writeln( ShowControls_param );
	document.writeln( "	<param name='FileName' value='" + strMovieUrl + "'>");

	document.writeln( "	<!-- Hixie method -->");
	document.writeln( "	<!--[if !IE]> <-->");
	document.writeln( "		<object type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' data='" + strMovieUrl + "' " + objSize_attribute + objId_attribute + AutoStart_attribute + ShowControls_attribute + ">");
	document.writeln( "	<!--> <![endif]-->");

	document.writeln( "</object>");

}





	//onload="DrawImage(this,80,80,0)" 图片自适应
	function DrawImage(ImgD,intLargeImgWidth,intLargeImgHeight,intAltFlag)
	{
		var image = new Image();
		image.src = ImgD.src;

		if (image.width > 0 && image.height > 0)
		{
			flag = true;
			if (image.width/image.height >= intLargeImgWidth/intLargeImgHeight)
			{
				if (image.width > intLargeImgWidth)
				{  
					ImgD.width = intLargeImgWidth;
					ImgD.height = (image.height * intLargeImgWidth)/image.width;
				} 
				else
				{
					ImgD.width = image.width;  
					ImgD.height = image.height;
				}

				if (intAlfFlag = 0 )
				{
					ImgD.alt = "Actual size:" + image.width + "×" + image.height + ",点击查看原始图";
				}
			}
			else
			{
				if (image.height > intLargeImgHeight)
				{  
					ImgD.height = intLargeImgHeight;
					ImgD.width = (image.width * intLargeImgHeight)/image.height;     
				}
				else
				{
					ImgD.width = image.width;  
					ImgD.height = image.height;
				}
				
				if (intAltFlag = 0 )
				{
					ImgD.alt = "Actual size:" + image.width + "×" + image.height+ ",点击查看原始图";
				}
			}
		}
	}







function open_newpage(theURL,winName) {
	var leftx=(screen.width-530)/2;
	var topy=50;
	window.open(theURL,winName,'top='+ topy +',left='+ leftx +',toolbar=no,scrollbars=yes,width=530,height=560'); 
}





