<!--

var sendit;

//=================================================================================================================================
// µ¥ÀÌÅ¸ Àü¼ÛÁß ¸Þ¼¼Áö
//=================================================================================================================================
function connecting(){
	alert("µ¥ÀÌÅ¸¸¦ Àü¼ÛÁß ÀÔ´Ï´Ù. Àá½Ã¸¸ ±â´Ù·Á ÁÖ¼¼¿ä");
}

//show, hide ·¹ÀÌ¾î
function showLayer(LayerNM) {
	document.getElementById(LayerNM).style.display='block';
}
function hideLayer(LayerNM) {
	document.getElementById(LayerNM).style.display='none';
}


//È£ÃâÇÒ¶§(ÅÇÀÌ¸§,ÅÇ°¹¼ö,ÇöÀçÅÇ)
function tab(tab_name,max,tab_num) {
	for( i = 1; i <= max; i++){
		if (i == tab_num) { document.getElementById(tab_name+i).style.display = 'block'; }
		else { document.getElementById(tab_name+i).style.display = 'none'; }
	}
}

// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ 
// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö, À©µµ¿ì¸ðµå) 
function GetMPlayer(x,y,fn) {
	EmbedStr = "<OBJECT id='MPlayer' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' width='" + x + "' height='" + y + "' TYPE='application/x-oleobject' VIEWASTEXT >";
	if(fn)
		EmbedStr += "<param name='FileName' value='" + fn + "'>";
	EmbedStr += "<param name='ShowControls' value='0'>";
	EmbedStr += "<param name='autoStart' value='true'>";
	EmbedStr += "<param name='windowlessVideo' value='false'>";
	EmbedStr += "<param name='uiMode' value='none'>";
	EmbedStr += "<param name='volume' value='100'>";
	EmbedStr += "<param name='stretchToFit' value='true'>";
	EmbedStr += "<param name='autoRewind' value='false'>";
	EmbedStr += "<param name='transparentAtStart' value='true'>";
	EmbedStr += "<param name='enableContextMenu' value='false'>";
	EmbedStr += "</OBJECT>";
	document.write(EmbedStr);
	return;
}

function GetFlash(url,x,y,fn) { 
var EmbedStr;
	EmbedStr = "<object id='" + fn + "' name='" + fn + "' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + x + "' height='" + y + "'>";
	EmbedStr += "<param name='allowScriptAccess' value='always' />";
	EmbedStr += "<param name='movie' value='" + url + "' />";
	EmbedStr += "<param name='quality' value='high' />";
	EmbedStr += "<param name='bgcolor' value='#ffffff' />";
	EmbedStr += "<param name='menu' value='false' />";
	EmbedStr += "<param name='wmode' value='transparent' />";
	EmbedStr += "<param name='allowFullScreen' value='true' />";
	EmbedStr += "<param name='accessScript' value='always' />";

	EmbedStr += "<embed id='" + fn + "' name='" + fn + "' src='" + url + "' quality='high' menu='false' accessScript='always' wmode='transparent' bgcolor='#ffffff' width='" + x + "' height='" + y + "' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
	EmbedStr += "</object>";
	
	document.write(EmbedStr);
	return;
}

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+"' name='"+id+"' align='middle'>"+ 
	"<param name='allowScriptAccess' value='always' />"+ 
	"<param name='allowFullScreen' value='true' />"+
	"<param name='movie' value='"+url+"' />"+ 
	"<param name='FlashVars' value='"+vars+"' />"+ 
	"<param name='wmode' value='"+win+"' />"+ 
	"<param name='menu' value='false' />"+
	"<param name='scaleMode' value='noScale' />"+
	"<param name='showMenu' value='false' />"+
	"<param name='align' value='CT' />"+ 
	"<param name='quality' value='high' />"+ 
	"<param name='bgcolor' value='"+bg+"' />"+ 
	"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' id='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+ 
	"</object>"; 
	document.write(flashStr); 
} 

function flashWrite2(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+"' name='"+id+"' align='middle' onblur='clearFocus2()'>"+ 
	"<param name='allowScriptAccess' value='always' />"+ 
	"<param name='movie' value='"+url+"' />"+ 
	"<param name='FlashVars' value='"+vars+"' />"+ 
	"<param name='wmode' value='"+win+"' />"+ 
	"<param name='menu' value='false' />"+
	"<param name='scaleMode' value='noScale' />"+
	"<param name='showMenu' value='false' />"+
	"<param name='align' value='CT' />"+ 
	"<param name='quality' value='high' />"+ 
	"<param name='bgcolor' value='"+bg+"' />"+ 
	"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' id='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+ 
	"</object>"; 
	document.write(flashStr); 
} 


function showSelectBox(){
	var selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "visible";
	}
}

// ---------------------------------------------------

function hideSelectBox(){
	var selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
		selects[i].style.visibility = "hidden";
	}
}


function goURL(url)
{

	location.href = url;
}


//=================================================================================================================================
// ¸¶¿ì½º À§Ä¡ Á¶Á¤
//=================================================================================================================================

function getMousePosition(ev, returntype)
{
	ev = ev || window.event;

	if (ev.pageX || ev.pageY){
		if (returntype == "LEFT")
			return ev.pageX;
		else if (returntype == "TOP")
			return ev.pageY;
		else{
			alert('getMousePosition-ÀÎÀÚ°ª ÀÔ·Â ¿À·ù : returntype - ' + returntype); return;
		}
	}
	
	if (returntype == "LEFT"){

		if (window.innerWidth)
			return ev.clientX + window.pageXOffset - document.body.clientLeft + 10;
		else if (document.documentElement && document.documentElement.clientWidth)
			return ev.clientX + document.documentElement.scrollLeft - document.body.clientLeft + 10;
		else if(document.body.clientWidth)
			return ev.clientX + document.body.scrollLeft - document.body.clientLeft + 10;
			
	}else if (returntype == "TOP"){

		if (window.innerWidth)
			return ev.clientY + window.pageYOffset - document.body.clientTop;
		else if (document.documentElement && document.documentElement.clientWidth)
			return ev.clientY + document.documentElement.scrollTop - document.body.clientTop;
		else if(document.body.clientWidth)
			return ev.clientY + document.body.scrollTop - document.body.clientTop;
			

	}else{
		alert('getMousePosition-ÀÎÀÚ°ª ÀÔ·Â ¿À·ù : returntype - ' + returntype);
	}
}

//=================================================================================================================================
// Lay Display Ã³¸® Ã¼Å©
//=================================================================================================================================

function infoView(obj){
	obj.style.display = "";
}

function infoHidden(obj){
	obj.style.display = "none";
}

function infoshow(obj){
	if(obj.style.display == 'none')
		obj.style.display = "";
	else
		obj.style.display = "none";
}

//=================================================================================================================================
// ¿¡µðÅÍ ÀÔ·Â°ª Ã¼Å©
//=================================================================================================================================
function editCheck(obj)
{
	var oEditor;
	oEditor = FCKeditorAPI.GetInstance(obj) ;
	var div = document.createElement("DIV");
	div.innerHTML = oEditor.GetXHTML();
	checkstr = div.innerHTML.toString();
	checkstr = checkstr.replace("&nbsp;", " ");
	if(isNull( div.innerHTML ) || checkstr.trim() == "")
	{
		return false;
		div.innerHTML = "";
	}
	else
		return true;
}

function isNull( s ) 
{
	if( s == null ) return true; 
	var result = s.replace(/(^\s*)|(\s*$)/g, ""); 
	if(result == "<BR>") result = "";
	if( result )
		return false; 
	else 
		return true; 
}

//=================================================================================================================================
// ÇÊµå°ªÀ¸·Î ¼ýÀÚ¸¸ ÀÔ·Â¹Þ±â
// Number Key Only
//=================================================================================================================================
function NKO(obj) {
	if($F(obj))
	{
		if(!$F(obj).isNum())
		{
			alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´É ÇÕ´Ï´Ù.");
			$(obj).value = "";
			$(obj).focus();
			return false;
		}
	}
}

function onlyNumber(obj) {
	// obj : ÇÊµå¸í (ex. document.form.title)
	var checkOK = "0123456789";
	var checkStr = obj;
	var allValid = true;
	var decPoints = 0;
	var allNum = "";
	for (i = 0;  i < checkStr.length;  i++){
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
		break;
		if (j == checkOK.length){
			allValid = false;
			break;
		}
		allNum += ch;
	}
	if (!allValid){
		return false;
	} else {
		return true;
	}
}

//=================================================================================================================================
// Æ÷ÅÍ½º ÀÚµ¿ ÀÌµ¿
//=================================================================================================================================

function focusMove(obj,len,nxtObj)
{
	if(obj.value.length >= len)
		$(nxtObj).focus();
}

function emailChg(obj)
{
	if(obj.value)
	{
		$("email2").value = obj.value;
		$("email3").value = obj.value;
		$("email2").disabled = true;
	}
	else
	{
		$("email3").value = "";
		$("email2").value = "";
		$("email2").disabled = false;
		$("email2").focus();
	}
}

function keyCheck()
{
	if(!$F("keyword"))
	{
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä");
		$("keyword").focus();
		return false;
	}
}

//=================================================================================================================================
// ÅØ½ºÆ®ÀÇ ¹ÙÀÌÆ®¼ö ÀÚµ¿Ã¼Å©
//=================================================================================================================================
function byte_check(obj,length_limit){
	var length = calculate_msglen(obj.value);
	if (length > length_limit) {
		alert("ÃÖ´ë " + length_limit + "ÀÚ ÀÌ¹Ç·Î ÃÊ°úµÈ ±ÛÀÚ¼ö´Â ÀÚµ¿À¸·Î »èÁ¦µË´Ï´Ù.");
		obj.value = obj.value.replace(/\r\n$/, "");
		obj.value = assert_msglen(obj.value, length_limit);
		if($("viewcount"))
			$("viewcount").update(calculate_msglen(obj.value));

		obj.focus();
	}
}

function calculate_msglen(message){
	var nbytes = 0;
	for (i=0; i<message.length; i++) {
		var ch = message.charAt(i);
		if(escape(ch).length > 4) {
			nbytes += 2;
		} else if (ch == '\n') {
			if (message.charAt(i-1) != '\r') {
				nbytes += 1;
			}
		} else if (ch == '<' || ch == '>') {
			nbytes += 4;
		} else {
			nbytes += 1;
		}
	}
	if($("viewcount"))
		$("viewcount").update(nbytes);
	return nbytes;
}

function assert_msglen(message, maximum){
	var inc = 0;
	var nbytes = 0;
	var msg = "";
	var msglen = message.length;

	for (i=0; i<msglen; i++) {
		var ch = message.charAt(i);
		if (escape(ch).length > 4) {
			inc = 2;
		} else if (ch == '\n') {
			if (message.charAt(i-1) != '\r') {
				inc = 1;
			}
		} else if (ch == '<' || ch == '>') {
			inc = 4;
		} else {
			inc = 1;
		}
		if ((nbytes + inc) > maximum) {
			break;
		}
		nbytes += inc;
		msg += ch;
	}
	return msg;
}



function checkSpace( str )
{
     if(str.search(/\s/) != -1){
     	return true;
     } else {
        return false;
     }
}


function SetCookie( name, value, expiredays ){
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

//¸ÞÀÎ¿¡

function GetCookie( name ){
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length ){
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
			endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
		break;
	}
	return "";
}

//=================================================================================================================================
// iFrame ÄÁÅÙÃ÷ ³ôÀÌ ±¸ÇÏ±â, ¸®»çÀÌÁî
//=================================================================================================================================
function IframeResize(id){
	var ifrm = $(id);
	var the_height = ifrm.contentWindow.document.body.scrollHeight;
	if(the_height < 1)
		time_id = window.setTimeout("IframeResize('"+id+"')",10);
	ifrm.height = the_height+25;
}

function soFrameSize(id){
    var ifrm = $(id);
    var the_height = ifrm.contentWindow.document.body.scrollHeight;
	if(the_height < 1)
		time_id = window.setTimeout("soFrameSize('"+id+"')",10);
    ifrm.height = the_height+35;
	if(ifrm.height < 500)
		ifrm.height = 500;
}



//=================================================================================================================================
// ÀÌ¹ÌÁö Resize
//=================================================================================================================================

function imgResize(obj,maxWidth)
{
	var w = obj.width;
	var h = obj.height;
	if (w<=0) {
	alert (w);
		window.setTimeout("imgResize('" + obj + "'," + maxWidth + ")",100);
	}
	else 
	{
		if (w > maxWidth)
			obj.width = maxWidth;
	}
}

//=================================================================================================================================
// ·Î±×ÀÎ Ã¼Å©
//=================================================================================================================================

function loginCheck()
{
	if(!confirm("·Î±×ÀÎ ÈÄ ÀÌ¿ë °¡´ÉÇÕ´Ï´Ù\n\n·Î±×ÀÎ ÆäÀÌÁö·Î ÀÌµ¿ ÇÏ½Ã°Ú½À´Ï±î?"))
		return false;
	document.footerLoginForm.submit();
}

function FormChecker(f)
{

	var fu = new FormUtil(f);
	if(!fu.success())
		return false;
	else
		return true;
}


function allcheck()
{
	if(document.all.chkbox)
	{
		if(document.all.chkbox.length)
		{
			for(i=0;i<document.all.chkbox.length;i++)
			{
				document.all.chkbox[i].checked = document.all.allchk.checked;
			}
		}
		else
		{
			document.all.chkbox.checked = document.all.allchk.checked;
		}
	}
}


function sCheck(f)
{
	if(!f.keyword.value || f.keyword.value.trim() == "")
	{
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä!");
		f.keyword.value = "";
		f.keyword.focus();
		return false;
	}
	return true;
}

function ajaxLoad(ele)
{
	$(ele).startWaiting();
}


function ajaxLoadEnd(ele,n)
{
	$(ele).stopWaiting();
}


function shopCheckOK(a,b)
{
	document.frm.rgn_nm.value = a;
	document.frm.mainuse_rgnno.value = b;
	hs.close();
}

function filedel(ele)
{
	$(ele).value = "";
	$(ele + "Info").update ("");
	$(ele + "but").show();
}


//µ¿¿µ»ó ÇÃ·¹ÀÌ ·¹ÀÌ¾î
function toggleSlow() {    
    if (isSlow) {
        closeSlow();        
    } else {
        openSlow();
    }                
}    


var isSlow = false;
function openSlow() {
    isSlow = true;    
    document.getElementById("Slow_Layer").style.display = "";   
    
}  

function closeSlow() { 
    isSlow = false;
    document.getElementById("Slow_Layer").style.display = "none";    
}  

function playSlow(rate,img) {
    closeSlow();
    WMPlay.stop();
    playRate(rate);
	if(img) $("spdimg").src = img;
}    

function playRate(rate) {     
    WMPlay.rate=rate;
    WMPlay.play();    
}



function toggleLinkCopy() {
    if (isLinkCopy) {
        closeLinkCopy();        
    } else {
        openLinkCopy();
    }                
}  

//=================================================================================================================================
// ÆË¾÷ °¡¿îµ¥ ¶ç¿ì±â
//=================================================================================================================================
	var win = null;
	function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings);
	win.focus();
	} 

//=================================================================================================================================
// Ajax Layer ¶ç¿ì±â
//=================================================================================================================================
	var MiniTagActive = false;
	function viewAjaxLayer(targetObjId, responsePage, param, ajaxlr, ev)
	{
		pars = param;
		if(responsePage == "/include/MiniNameTag.asp" || responsePage == "/include/MiniNameTag_Friend.asp" || responsePage == "/include/MiniNameTagGLT.asp")
			MiniTagActive = true;
		new Ajax.Updater(
			targetObjId,
			responsePage,
			{
				parameters : pars
			}
		);
		
		targetObj = $(targetObjId)
		targetObj.style.display = "none";
		
		if (ajaxlr == 'right') {
			targetObj.style.top = getMousePosition(ev, "TOP") - 30;
			targetObj.style.left = getMousePosition(ev, "LEFT") - 420;
		} else {
			targetObj.style.top = getMousePosition(ev, "TOP") - 30;
			targetObj.style.left = getMousePosition(ev, "LEFT") + 10;
		}

		targetObj.style.display = "block";
		targetObj.style.zIndex = 100;
	
	}

	function miniTagCheck()
	{
		if(MiniTagActive)
		{
			if($("AjaxLayer"))
				$("AjaxLayer").update("");
		}
	}
//=================================================================================================================================
// Ajax Layer ¶ç¿ì±â À§Ä¡ °íÁ¤
//=================================================================================================================================
	function viewAjaxLayer2(targetObjId, responsePage, param, ev)
	{
		pars = param;
		
		new Ajax.Updater(
			targetObjId,
			responsePage,
			{
				parameters : pars
			}
		);
		
		targetObj = $(targetObjId)
	
		targetObj.style.display = "none";
		targetObj.style.top = 70;
		targetObj.style.left = 0;
		targetObj.style.display = "block";
	
	}


///////////// ¿µ¿ªÀÎ¼â
var initBody;

function beforePrint(){ 
	initBody = document.body.innerHTML; 
	document.body.innerHTML = prtContent.innerHTML; 
	} 
function afterPrint(){ 
	document.body.innerHTML = initBody; 
	} 
function printArea() { 
	window.onbeforeprint = beforePrint;  
	window.onafterprint = afterPrint; 
	window.print(); 
	} 


//=================================================================================================================================
// ¹®ÀÚ¿­ ½º¿Ò(º¯È¯) - replace´ë¿ë
//=================================================================================================================================

String.prototype.swapchar = function (str, swapstr) {
	
}




//=================================================================================================================================
// ¸ðµç ¸µÅ©¿¡ ¸µÅ© Å×µÎ¸® ¾ø¾Ö±â
//=================================================================================================================================
function allblur() {
	for (i = 0; i < document.links.length; i++)
		document.links[i].onfocus = document.links[i].blur;
}

//=================================================================================================================================
// ¸¶¿ì½º ¿À¹ö ¸»Ç³¼±
//=================================================================================================================================
function alt( msg, _width, _height ){
    var _style = alt_div.style;
    if( msg != null ){
        alt_div.innerHTML = "<table cellpadding='0' cellspacing='0' border='0'>" +
    "<tr>" +
    "	<td><img src='/images/main/layer01.gif' border='0'></td>" +
    "	<td background='/images/main/layer02.gif'><span class='Ctype_red2'>" + msg + "</span></td>" +
    "	<td><img src='/images/main/layer03.gif' border='0'></td>" +
    "</tr>" +
    "</table>";
		
		
        _style.visibility = "visible";
        if( _width != null ){
            if( alt_div.offsetWidth > _width ){
                _style.width = _width;
            }
        }
        if( _height != null ){
            if( alt_div.offsetHeight > _height ){
                _style.height = _height;
            }
        }
    }else{
        _style.visibility = "hidden";
    }
}

document.write(
    "<div id=alt_div style=\"" +
    "padding:2;" +
    "position:absolute;" +
    "visibility:hidden;" +
    "overflow:hidden;" +
    "z-index:auto;" +
    "width:auto;" +
    "height:auto;" +
    "\"></div>"
);

function get_xy(){

    var _style = alt_div.style;
    var x1 = event.x + document.documentElement.scrollLeft; 
    var y1 = event.y + document.documentElement.scrollTop;
    _style.left = x1 + 10;
    _style.top = y1;

    var _style2 = altCal_div.style;
    var x2 = event.x + document.documentElement.scrollLeft; 
    var y2 = event.y + document.documentElement.scrollTop;
    _style2.left = x2 -670;
    _style2.top = 783;

}

function window::onload(){
	document.onmousemove = get_xy;
}

//=================================================================================================================================
// ¸¶¿ì½º ¿À¹ö ¸»Ç³¼±2
//=================================================================================================================================
function altCal( msg, _width, _height ){
    var _style = altCal_div.style;
    if( msg != null ){
        altCal_div.innerHTML = "<img src='/images/agent/main/main_calUseCopy.gif' alt=''>";
		
        _style.visibility = "visible";
        if( _width != null ){
            if( altCal_div.offsetWidth > _width ){
                _style.width = _width;
            }
        }
        if( _height != null ){
            if( altCal_div.offsetHeight > _height ){
                _style.height = _height;
            }
        }
    }else{
        _style.visibility = "hidden";
    }
}

document.write(
    "<div id=altCal_div style=\"" +
    "padding:2;" +
    "position:absolute;" +
    "visibility:hidden;" +
    "overflow:hidden;" +
    "z-index:auto;" +
    "width:auto;" +
    "height:auto;" +
    "\"></div>"
);

//=================================================================================================================================
// ¸ÅÀå ¾àµµ ÇÁ¸°Æ®
//=================================================================================================================================

function pop_mainmap() {
	var h = 630;
	var w = 658;
	var mypage = "/agentinfo/pop_main_map.asp";
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable'
	win = window.open(mypage,'pop_main_map',settings);
	win.focus();
}

//=================================================================================================================================
// ¸ÅÀå ¾àµµ º¸±â
//=================================================================================================================================
function pop_map(idx) {
	var h = 655;
	var w = 668;
	var mypage = "/agentinfo/pop_map.asp?board_idx=" + idx;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable'
	win = window.open(mypage,'pop_sub_map',settings);
	win.focus();
}

//=================================================================================================================================
// ¸ÅÀå ¾àµµ ÇÁ¸°Æ®
//=================================================================================================================================

function pop_agentmap(aflag) {
	var h = 630;
	var w = 719;
	var mypage = "/include/pop_agent_map.asp?aflag=" + aflag;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable'
	win = window.open(mypage,'pop_main_map',settings);
	win.focus();
}

//=================================================================================================================================
// ¸ÅÀå ¾àµµ ÇÁ¸°Æ®
//=================================================================================================================================

function pop_agentmap2(aflag) {
	var h = 630;
	var w = 739;
	var mypage = "/include/pop_agent_map.asp?aflag=" + aflag;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable'
	win = window.open(mypage,'pop_main_map',settings);
	win.focus();
}

//=================================================================================================================================
// ¿ìÆí¹øÈ£ Ã£±â
//=================================================================================================================================
function zipcode()
{
	var wl = (screen.width - 483) / 2;
	var wh = (screen.height - 354) / 2;
	win = window.open ("/include/zip_code.asp","zipcode","width=483,height=354,left=" + wl + ",top=" + wh + ", scrollbars=no");
	win.focus();
}

//=================================================================================================================================
// ¿ìÆí¹øÈ£ Ã£±â
//=================================================================================================================================
function comp_zipcode()
{
	var wl = (screen.width - 483) / 2;
	var wh = (screen.height - 354) / 2;
	win = window.open ("/include/zip_code_comp.asp","zipcode","width=483,height=354,left=" + wl + ",top=" + wh + ", scrollbars=no");
	win.focus();
}

//=================================================================================================================================
// ¾ÆÀÌµð À¯È¿¼º °Ë»ç
//=================================================================================================================================
function idCheck(str)
{
	var pars = "mode=IDCHK&userid=" + encodeURIComponent(str);
//	$("IDText").update ("<span class='p_text01 Ctype_orang_n'>(¾ÆÀÌµð Ã¼Å©ÁßÀÔ´Ï´Ù.)</span>");
	var ajax = new Ajax.Updater (
		"IDText",
		"/include/ajaxIDChk.asp",
		{
			parameters : pars
		}
	);

	return false;
}

function enableID(obj) {
	// obj : ÇÊµå¸í (ex. document.form.title)
	var checkOK = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_";
	var checkStr = obj;
	var allValid = true;
	var decPoints = 0;
	var allNum = "";
	for (i = 0;  i < checkStr.length;  i++){
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
		break;
		if (j == checkOK.length){
			allValid = false;
			break;
		}
		allNum += ch;
	}
	if (!allValid){
		return false;
	} else {
		return true;
	}
}

function checkSpace( str )
{
     if(str.search(/\s/) != -1){
     	return true;
     } else {
        return false;
     }
}

