// flashWrite
function flashWrite(url,w,h,id,bg,vars,win){
	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' 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='wmode' value='transparent' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src='"+url+"' FlashVars='"+vars+"' wmode='transparent' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always'  allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	document.write(flashStr);

}

//GHscript.js * gilhyun@naver.com * /
function getStyle(elementID, propertyName){var element = document.getElementById(elementID);if (element.currentStyle){var propertyValue = element.currentStyle[propertyName];}else if (window.getComputedStyle){var computedStyle = document.defaultView.getComputedStyle(element,null);var propertyValue = computedStyle.getPropertyValue(propertyName);}return propertyValue;}



var min = 320;      // 레이어 top 초기 값 (레이어 top 값과 일치시킴)
var max = 0;
var moving_speed = 10  // 속도(낮을 수록 빠름)
var moving_amount = 10  // 움직임 (낮을 수록 부드러움)
var action_time = 500   // 반응시간 (*/1000 초 후에 반응)
function left_move_init() {
    itm = document.getElementById("quickmenu");
    itm.set_pos = function(y){itm.style.top=y+"px";};
    itm.y = min;
    itm.set_pos(itm.y);
    max = document.documentElement.scrollHeight - itm.scrollHeight - min;
    setTimeout(left_move_func, moving_amount);
}
function left_move_func() {
    itm = document.getElementById("quickmenu");
    tmp = document.documentElement.scrollTop + min;
    itm.y += Math.floor((tmp-itm.y)/moving_speed);
    if( itm.y>max ) itm.y = max;
    if( itm.y<min ) itm.y = min;
    itm.set_pos(itm.y);
    setTimeout(left_move_func, moving_amount);
}


String.prototype.ltrim = function() {
    var re = /\s*((\S+\s*)*)/;
    return this.replace(re, "$1");
   }
 
   String.prototype.rtrim = function() {
    var re = /((\s*\S+)*)\s*/;
    return this.replace(re, "$1");
   }
 
   String.prototype.trim = function() {
    return this.ltrim().rtrim();
   }

function onlyNumber(){
   if((event.keyCode<48)||(event.keyCode>57))
      event.returnValue=false;
}

function email_chk(obj)
{
	if( obj.value.length > 0 )
	{
		var regExp = /[a-z0-9]{2,}@[a-z0-9-]{2,}\.[a-z0-9]{2,}/i;

		if(!regExp.test(obj.value))
		{
				alert('잘못된 e-mail 형식입니다.');
				obj.value = "";
				obj.focus();
				return false;
		}
     }
} 