function msg(msg){
	alert(msg);
}
function confirmFromFlash(msg){
	var con = confirm(msg);
	return con;
}
function resizeFlashHeight(id, h){
	getFlash(id).height=h;
}
function getFlash(id) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[id];
	} else {
		return document[id];
	}
}
function activeXFlash(url, w, h, id, bg, wmode, vars){
	if(id==undefined) id = '';
	if(bg==undefined||bg=='') bg = '#FFFFFF';
	if(wmode==undefined||wmode=='') wmode = 'window';
	if(vars==undefined) vars = '';
	var flashStr=
	'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" width="'+w+'" height="'+h+'" id="'+id+'" align="middle">'+
	'<param name="allowScriptAccess" value="always" />'+
	'<param name="movie" value="'+url+'" />'+
	'<param name="FlashVars" value="'+vars+'" />'+
	'<param name="menu" value="false" />'+
	'<param name="quality" value="high" />'+
	'<param name="bgcolor" value="'+bg+'" />'+
	'<param name="wmode" value="'+wmode+'" />'+
	'<embed src="'+url+'" FlashVars="'+vars+'" menu="false" quality="high" wmode="'+wmode+'" bgcolor="'+bg+'" width="'+w+'" height="'+h+'" name="'+id+'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />'+
	'</object>';
	document.write(flashStr);
}




function openwin(url,winnm,position,width,height,scroll,resize) {
	var settings ='';
	settings +='height='+height+',';
	settings +='width='+width+',';
	if(position == 'center'){
		settings +='left='+(screen.width-width)/2+',';
		settings +='top='+(screen.height-height)/2+',';
	}else{
		settings +='left=0,';
		settings +='top=0,';
	}
	settings +='scrollbars='+scroll+',';
	settings +='resizable='+resize+',';
	settings +='toolbar=no,location=no,directories=no,status=no,menubar=no';	
	win = window.open(url,winnm,settings);
	if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
function checkForm(f){	
	var fLen = f.elements.length;
	for(var i=0; i<fLen; i++){
		fObj = f.elements[i];
		fMsg = fObj.getAttribute("msg");
		if(fMsg&&!fObj.value){
			alert(fMsg+' 입력하세요');
			fObj.focus();
			return false;
		}
	}
	return true;
}
function displayObj(obj){
	var object = document.getElementById(obj);
	if(object.style.display == "none"){
		object.style.display = "block";
	}else{
		object.style.display = "none";
	}
}

function imgResize(scale) {
	var MAX_IMG_WIDTH = Number(scale);
	var elements = document.images;	
	var limit = elements.length;
	for (i=0;i<limit;i++) {		
		var width = elements[i].width;
		var height = elements[i].height;
		if (width > MAX_IMG_WIDTH) {					
			elements[i].width = MAX_IMG_WIDTH;
			elements[i].height = height/(width / MAX_IMG_WIDTH);
		}
	}
}
