function onlyDigit(el) 
	{
		el.value = el.value.replace(/\D/g,'');
	}
function WinOp(url, W,  H , winTitle){
	var Detail = 'width='+ W + ',height='+ H +',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes'
	window.open(url, winTitle, Detail );
}
function WinOps(url, W,  H , winTitle){
	var Detail = 'width='+ W + ',height='+ H +',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes'
	window.open(url, winTitle, Detail );
}


function chkBox(bool,el) { // ÀüÃ¼¼±ÅÃ/ÇØÁ¦ 
    var obj = document.getElementsByName(el); 
    for (var i=0; i<obj.length; i++) obj[i].checked = bool; 
} 
function revBox(el) { // ÀüÃ¼¹ÝÀü 
    var obj = document.getElementsByName(el); 
    for (var i=0; i<obj.length; i++) obj[i].checked = !obj[i].checked; 
} 

function image_auto_resize(this_s,width,height){ 
 var ta_image = new Image(); 
 ta_image.src = this_s.src; 
  if(!width){this_s.removeAttribute('width'); 
  this_s.style.width='auto';} 
  else if(width < ta_image.width){ 
  this_s.width = width; 
  }else{ 
  this_s.width = ta_image.width; 
  } 
  if(!height){this_s.removeAttribute('height'); 
  this_s.style.height='auto';} 
  else if(height < ta_image.height){ 
  this_s.height = height; 
  }else{ 
  this_s.height = ta_image.height; 
  } 
} 

function image_auto_resize_inarea(this_s,width,height,view){ 

 if(!view){view=true;} 
 if(!this_s){return;} 
 if(this_s.nodeType!=1){return;} 
 for(var i=0,m=this_s.childNodes.length;i<m;i++){ 
  var ta = this_s.childNodes[i]; 
  
  if(ta.nodeName=='IMG'){ 
  //ta.style.border='1px solid #000000';  
  image_auto_resize(ta,width,height); 

  if(view){ 
    if(!ta.title){ta.title=ta.src;} 
    if(!ta.onclick){ 
    ta.style.cursor='pointer'; 
    ta.onclick=function(){zone_image_view(this);} 
    } 
    if(!ta.onload) 
    ta.onload=function(){image_auto_resize(this,width,height);} 
    if(!ta.onmouseover)  
    ta.onmouseover=function(){image_auto_resize(this,width,height);} 
  } 
  } 
  if(ta.childNodes.length>0){ 
  image_auto_resize_inarea(ta,width,height); 
  } 
 } 
 return; 

} 

// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î[, º¯¼ö][,¹è°æ»ö][,À©µµ¿ì¸ðµå])
function flashWrite(url,w,h,vars,bg,win){
	
	var id=url.split("/")[url.split("/").length-1].split(".")[0]; //id´Â ÆÄÀÏ¸íÀ¸·Î ¼³Á¤
	if(vars==null) vars='';
	if(bg==null) bg='#FFFFFF';
	if(win==null) win='transparent';


	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr= "	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
		flashStr+="			codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
		flashStr+="			width='"+w+"'";
		flashStr+="			height='"+h+"'";
		flashStr+="			id='"+id+"'";
		flashStr+="			align='middle'>";

		flashStr+="		<param name='allowScriptAccess' value='always' />";
		flashStr+="		<param name='movie' value='"+url+"' />";
		flashStr+="		<param name='FlashVars' value='"+vars+"' />";
		flashStr+="		<param name='wmode' value='"+win+"' />";
		flashStr+="		<param name='menu' value='false' />";
		flashStr+="		<param name='quality' value='high' />";
		flashStr+="		<param name='bgcolor' value='"+bg+"' />";
	
	
		flashStr+="		<embed src='"+url+"'";
		flashStr+="		       flashVars='"+vars+"'";
		flashStr+="		       wmode='"+win+"'";
		flashStr+="		       menu='false'";
		flashStr+="		       quality='high'";
		flashStr+="		       bgcolor='"+bg+"'";
		flashStr+="		       width='"+w+"'";
		flashStr+="		       height='"+h+"'";
		flashStr+="		       name='"+id+"'";
		flashStr+="		       align='middle'";
		flashStr+="		       allowScriptAccess='always'";
		flashStr+="		       type='application/x-shockwave-flash'";
		flashStr+="		       pluginspage='http://www.macromedia.com/go/getflashplayer' />";
		flashStr+=" </object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);
}


