function MakeFlash(Url,Width,Height){                 
  document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + Width + "\" height=\"" + Height + "\">"); 
  document.writeln("<param name=\"movie\" value=\"" + Url + "\">"); 
  document.writeln("<param name=\"quality\" value=\"high\" />");     
  document.writeln("<param name=\"wmode\" value=\"transparent\">"); 
  document.writeln("<param name=\"allowScriptAccess\" value=\"always\">"); 
  document.writeln("<embed src=\"" + Url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + Width + "\"  height=\"" + Height + "\">"); 
  document.writeln("</object>");     
} 


function MakeVOD(Url,Width,Height){
	var htmlCode = '<object name="MediaPlayer1" id="MediaPlayer1" width="' + Width + '"  height="' + Height + '"\n';
	htmlCode += ' classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" VIEWASTEXT codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" \n';
	htmlCode += '  standby="loading windows media player components..."\n';
	htmlCode += '  type="application/x-oleobject">\n';
	htmlCode += ' <param name="filename" value="' + Url + '">\n';
	htmlCode += ' <param name="CurrentPosition" value="true">\n';
	htmlCode += ' <param name="SetCurrentEntry" value="true">\n';
	htmlCode += ' <param name="ClickToPlay" value="true">\n';
	htmlCode += ' <param name="AutoSize" value="true">\n';
	htmlCode += ' <param name="AutoResize" value="true">\n';
	htmlCode += ' <param name="AutoStart" value="true">\n';
	htmlCode += ' <param name="showcontrols" value="true">\n';
	htmlCode += ' <param name="ShowAudioControls" value="false">\n';	
	htmlCode += ' <param name="ShowDisplay" value="false">\n';	
	htmlCode += ' <param name="ShowTracker" value="true">\n';
	htmlCode += ' <param name="showstatusbar" value="true">\n';
	htmlCode += ' <param name="enablecontextmenu" value="false">\n';
	htmlCode += ' <param name="ShowPositionControls" value="1">\n';
	htmlCode += ' <param name="DisplayBackColor" value="0">\n';
	htmlCode += ' <param name="SendOpenStateChangeEvents" value="0">\n';
	htmlCode += ' <param name="SendPlayStateChangeEvents" value="0">\n';
	htmlCode += ' <param name="ShowCaptioning" value="0">\n';
	htmlCode += ' <param name="transparentatstart" value="true">\n';
	htmlCode += ' <param name="transparentonstop" value="true">\n';
	htmlCode += ' <param name="AutoRewind" value="0">\n';
	htmlCode += ' <embed type="application/x-mplayer2" name="mplay1"  width="' + Width + '"  height="' + Height + '"></embed> \n';
	htmlCode += ' </object>\n';
	//alert(htmlCode);
	document.write(htmlCode);
}
function image_auto_resize(this_s,max_width,max_height)
{ 
		
    var ta_image = new Image(); 
    ta_image.src = this_s.src; 

		var dst_width; 
 		var dst_height; 
 		var img_width; 
 		var img_height; 
    
	  img_width = parseInt(ta_image.width); 
	  img_height = parseInt(ta_image.height); 
	  
    this_s.width = img_width; 
    this_s.height = img_height; 
	  
	  if(img_width == 0 || img_height == 0){ 
	  div_s.style.display = ''; 
	  return false; 
	  }
	  
		// °¡·ÎºñÀ² ¿ì¼±À¸·Î ½ÃÀÛ 
		if(img_width > max_width || img_height > max_height) { 
	  
			dst_height = max_height; 
			dst_width = Math.ceil((max_height / img_height) * img_width); 	    	
			
			
		    // °¡·Î±âÁØÀ¸·Î ¸®»çÀÌÁî 
	  
		
		    // ¼¼·Î°¡ max_height ¸¦ ¹þ¾î³µÀ» ¶§ 
		    if(dst_width > max_width) { 
		    	dst_width = max_width; 
		    	dst_height = Math.ceil((max_width / dst_width) * dst_height); 	  		
		    } 
		
		    this_s.width = dst_width; 
		    this_s.height = dst_height; 
		} 
		// °¡·ÎºñÀ² ¿ì¼±À¸·Î ³¡ 
} 



