// JavaScript Document
function insertFlash(url, w, h) {
document.write('<object width="'+ w +'" height="'+ h +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 				codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">');
document.write('<param name="movie" value="'+ url +'">');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="quality" value="autohigh">');
document.write('<embed width="'+ w +'" height="'+ h +'" src="'+ url +'" quality="autohigh" wmode="transparent" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Versimode="transparent"></embed>');
document.write('</object>');
}

// JavaScript Document
//<img src="#" width="95" onload="ResizeImage(this, 95, 95);"/>
//Í¼Æ¬°´±ÈÀýËõ·Å 
function ResizeImage(ImgD,FitWidth,FitHeight)
{
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0)
{
if(image.width/image.height>= FitWidth/FitHeight)
{
if(image.width>FitWidth)
{
ImgD.width=FitWidth;
ImgD.height=(image.height*FitWidth)/image.width;
}
else
{
ImgD.width=image.width;
ImgD.height=image.height;
}
}
else
{
if(image.height>FitHeight)
{
ImgD.height=FitHeight;
ImgD.width=(image.width*FitHeight)/image.height;
}
else
{
ImgD.width=image.width;
ImgD.height=image.height;
}
}
}
}

function showmenu(subId,allNum){
	var obj=document.getElementById(subId);
	obj.style.display=obj.style.display=="none"?"block":"none";
	
	for(var i=1;i<=allNum;i++) {
	   var rId = 'submenu_'+i;
	   if(rId == subId) continue;
	   var elseRoot = document.getElementById(rId);
	   if(elseRoot){
	   elseRoot.style.display=="none";}
	}
}
