//================================================================================
// °ø¹é°Ë»ç, Alert Ãâ·Â
//================================================================================	
function blank_check(val,str){	//°ø¹é°Ë»ç, AlertÃ¢ Ãâ·Â
	if(goTrim(val.value) == ""){
		alert(str+" ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		val.value = "";
		val.focus();
		return false;
	}else{
		val.value = goTrim(val.value);
		return true;
	}
}
	
function goTrim(str){
	str = str.replace(/(^\s*|\s*$|\n)/g,"");
	return str;
}

//================================================================================
// ¼ýÀÚ¸¸ ÀÔ·Â
//================================================================================	
function Number_Check(num){	
	num.value = num.value.replace(/[^0-9]/g,'');		
}

//================================================================================
// Æ¯¼ö ¹®ÀÚ »èÁ¦
//================================================================================	
function Key_Check(key){
	key.value = key.value.replace(/[~`!@#$%^&*\\|;\"\'<>]/g,'');
}

//================================================================================
// ÄÞ¸¶Âï±â(PHP:number_format())
//================================================================================	
function number_format(n){ 
    return Number(String(n).replace(/\..*|[^\d]/g,"")).toLocaleString().slice(0,-3); 
}

//================================================================================
// Ä«µå°áÁ¦, °èÁÂÀÌÃ¼½Ã ÀÌ´Ï½Ã½º ¿µ¼öÁõ Ãâ·Â
//================================================================================	
function receipt(no){
	obj = window.open('https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='+no+'&noMethod=1','Rankey_Receipt','width=400,height=710');
	obj.focus();
}

//==================================================================================
// Æ¯Á¤ ¿µ¿ª ÇÁ¸°Æ®
//==================================================================================
var initBody;
var Html;

function beforePrint(){ 
	initBody = document.body.innerHTML; 
	Html = "<table width='750'><tr><td align='center'>"+Print_Area.innerHTML+"</td></tr></table>";	
    document.body.innerHTML = Html; 
} 

function afterPrint(){ 
    document.body.innerHTML = initBody; 
} 

function printArea(){ 
	window.print(); 
} 



function flashObj(src,w,h,id) { 
	html = '';
	//html += '<object type="application/x-shockwave-flash"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 id="'+id+'" width="'+w+'" align="center" height="'+h+'">';  
	//html += '<param name="movie" value="'+src+'" />'; 
	//html += '<param name="quality" value="high" />';
	//html += '<param name="bgcolor" value="#ffffff" />';
	//html += '<param name="wmode" value="transparent" />';		
	//html += '<param name="menu" value="false" />';  
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'"  height="'+h+'" swliveconnect="true" id="'+id+'" name="param" align="center" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"></embed>'; 
	//html += '</object>'; 

	document.write(html);
}

/*
function flashObj(src,w,h,id) { 

  html = '';
  html += '<object type="application/x-shockwave-flash"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 id="'+id+'" width="'+w+'" align="center" height="'+h+'">';  
  html += '<param name="allowScriptAccess" value="alway" />';//fscommandÀû¿ëÇÃ·¡½¬ Ãß°¡ ÆÄ¶ó¹ÌÅÍ°ª
  html += '<param name="movie" value="'+src+'" />'; 
  html += '<param name="quality" value="high" />'; 
  html += '<param name="bgcolor" value="#ffffff" />';
  html += '<param name="wmode" value="transparent" />';		
  html += '<param name="menu" value="false" />';  
  html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'"  height="'+h+'" swliveconnect="true" id="'+id+'" name="param" align="center" allowScriptAccess="alway" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> <\/embed>'; 
  html += '</object>'; 
  
  document.write(html);
}
*/


function flashObj2(src,w,h,id,val) { 
  
  html = '';
  html += '<object type="application/x-shockwave-flash"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 id="'+id+'" width="'+w+'" align="center" height="'+h+'">';  
  html += '<param name="movie" value="'+src+'" />'; 
  html += '<param name="quality" value="high" />'; 
  html += '<param name="flashvars" value="'+val+'" />'; 
  html += '<param name="bgcolor" value="#ffffff" />';
  html += '<param name="wmode" value="transparent" />';		
  html += '<param name="menu" value="false" />';  
  html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'"  height="'+h+'" swliveconnect="true" id="'+id+'" name="param" align="center" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> <\/embed>'; 
  html += '</object>'; 
  
  document.write(html);

}