/*******************************************************************************
Program     : common.js
Description : °ø¿ë ½ºÅ©¸³Æ®
Design By   : 
CreateDate  : 2005.02.03
CopyRight   : Copyright(c)1999-2004 ´ÚÅÍ¾ÆÆÄÆ®(ÁÖ) All Right Reserved.
*******************************************************************************/
// Äá³ª¹° Áöµµ ¼­ºñ½º ½ºÅ©¸³Æ®-1
// - X/Y ÁÂÇ¥°ª
// - Áöµµ Å©±â(w*h)¸¦ º¯¼ö·Î ¹Þ¾Æ¼­ Ã³¸®(±âº»: 714*574)
function congnamulMap_XY(arg1, arg2, arg3, arg4, arg5)
{
  // arg1: XÁÂÇ¥(base64_encoding)
  // arg2: YÁÂÇ¥(base64_encoding)
  // arg3: width
  // arg4: height
  // arg5: display (all: µî·ÏµÈ Áß°³¾÷¼ÒÁ¤º¸ Ç¥Ãâ / none: ÇØ´ç ÁÂÇ¥¸¸ Ç¥Ãâ)

  w = 714;
  h = 574;
  v = "all";
  if (arg3 != null && arg3 != "") w = arg3;
  if (arg4 != null && arg4 != "") h = arg4;
  if (arg5 != null && arg5 != "") v = arg5;

  var _x = (screen.width - w) / 2;
  var _y = (screen.height - h) / 2;

  mapWin = window.open("http://www.drapt.com/map/map.php?v=" + v + "&w=" + w + 
    "&h=" + h + "&map_x=" + arg1 + "&map_y=" + arg2,"",
    "status=yes,scrollbars=no,width="+w+",height="+h+",left="+_x+",top="+_y);
  mapWin.focus();
}

// Äá³ª¹° Áöµµ ¼­ºñ½º ½ºÅ©¸³Æ®-2
// - ÁÖ¼Ò Á¤º¸ ÀÌ¿ëÇÏ¿© Ç¥Ãâ
function congnamulMap_ADDR(no)
{
  /*
  // arg1: ½Ã
  // arg2: ±¸
  // arg3: µ¿
  // arg4: ¹øÁö
  // arg5: ¼³¸í
  // arg6: width
  // arg7: height
  // arg8: display (all: µî·ÏµÈ Áß°³¾÷¼ÒÁ¤º¸ Ç¥Ãâ / none: ÇØ´ç ÁÂÇ¥¸¸ Ç¥Ãâ)

  w = 725;
  h = 574;
  v = "all";
  if (arg6 != null && arg6 != "") w = arg6;
  if (arg7 != null && arg7 != "") h = arg7;
  if (arg8 != null && arg8 != "") v = arg8;

  var _x = (screen.width - w) / 2;
  var _y = (screen.height - h) / 2;

  arg5 = arg5.replace(/˜Þ/g,"¼¥");
  mapWin = window.open("http://www.drapt.com/map/map_woori.php?v=" + v + "&w=" + w + 
    "&h=" + h + "&si=" + arg1 + "&gu=" + arg2 + "&dong=" + arg3 + 
    "&bunji=" + arg4 + "&desc=" + arg5,"",
    "status=yes,scrollbars=no,width="+w+",height="+h+",left="+_x+",top="+_y);
  mapWin.focus();
  */
  var PopLink = window.open("http://www.drapt.com/map_api/MapBrowser.htm?no="+no, "PopLink", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, top=0 left=0, width=750, height=592");
  PopLink.focus();  

}

// Äá³ª¹° Áöµµ ¼­ºñ½º ½ºÅ©¸³Æ®-3
// - Áß°³¾÷¼ÒNO¸¦ ÀÌ¿ëÇÏ¿© Ç¥Ãâ
function congnamulMap_NO(arg1, arg2, arg3, arg4)
{
  // arg1: Áß°³¾÷¼ÒNO
  // arg2: width
  // arg3: height
  // arg4: display (all: µî·ÏµÈ Áß°³¾÷¼ÒÁ¤º¸ Ç¥Ãâ / none: ÇØ´ç ÁÂÇ¥¸¸ Ç¥Ãâ)

  w = 714;
  h = 574;
  v = "all";
  if (arg2 != null && arg2 != "") w = arg3;
  if (arg3 != null && arg3 != "") h = arg4;
  if (arg4 != null && arg4 != "") v = arg5;

  var _x = (screen.width - w) / 2;
  var _y = (screen.height - h) / 2;

  mapWin = window.open("http://211.43.211.71/map/map.php?v=" + v + "&w=" + w + 
    "&h=" + h + "&agency_no=" + arg1,"",
    "status=yes,scrollbars=no,width="+w+",height="+h+",left="+_x+",top="+_y);
  mapWin.focus();
}

// Äá³ª¹° Áöµµ ¼­ºñ½º ½ºÅ©¸³Æ®-4
// - ÁÖ¼Ò Á¤º¸ ÀÌ¿ëÇÏ¿© Ç¥Ãâ(¿øÅ¬¸¯¿ë)
function congnamulMap_ONECLICK(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
{
  // arg1: ½Ã
  // arg2: ±¸
  // arg3: µ¿
  // arg4: ¹øÁö
  // arg5: ¼³¸í
  // arg6: width
  // arg7: height
  // arg8: display (all: µî·ÏµÈ Áß°³¾÷¼ÒÁ¤º¸ Ç¥Ãâ / none: ÇØ´ç ÁÂÇ¥¸¸ Ç¥Ãâ)

  w = "100%";
  h = "100%";
  v = "all";
  if (arg6 != null && arg6 != "") w = arg6;
  if (arg7 != null && arg7 != "") h = arg7;
  if (arg8 != null && arg8 != "") v = arg8;

  var _x = (screen.width - w) / 2;
  var _y = (screen.height - h) / 2;

  arg5 = arg5.replace(/˜Þ/g,"¼¥");
  parent.mainFrame.window.location="http://www.drapt.com/map/map.php?v=" + v + "&w=" + w + 
    "&h=" + h + "&si=" + arg1 + "&gu=" + arg2 + "&dong=" + arg3 + 
    "&bunji=" + arg4 + "&desc=" + arg5;
}

/* Áß°³¾÷¼Ò »ó¼¼Á¤º¸  */
function store_popupWin(no) {
  var width=580;
  var height=552;
  var posx=0;
  var posy=0;
  posx = (screen.width-width)/2-1;
  posy = (screen.height-height)/2-1;
  position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx;
  var openWindow = window.open("/sise3/process/agn_info_popup.php?serial="+no,"sto_popupWin", position);
}

/* ÇÁ¸®¹Ì¾ö »çÁø ¼­ºñ½º ÆË¾÷ - ÃÊ±âÈ­¸é, ½Ã¼¼, e¸Å¹°, ÆÐ¹Ð¸®Áß°³¾÷¼Ò, ´ÜÁöµ¿È£È¸ */
function photo_popupWin(no,sto_no) {
  var width=900;
  var height=680;
  var posx=0;
  var posy=0;
  posx = (screen.width-width)/2-1;
  posy = (screen.height-height)/2-1;
  position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx;
  var openWindow = window.open("/maemul_new/pic_info/html/main.htm?serial="+no+"&sto_serial="+sto_no,"sto_popupWin", position);
}

/* »ï¼ºSDS Áöµµ¼­ºñ½º */
function mapOpen(jiyeok,gu,dong,bunji,ho,itemname) {				
  source = "drapt";
              
  // str = "http://www.sdsgis.co.kr/drapt/map/search.asp?jiyeok="+jiyeok+"&gu="+gu+"&dong="+dong+"&bunji="+bunji+"&ho="+ho+"&source="+source+"&itemname="+itemname;
  str = "http://www.drapt.com/map/map.php?w=714&h=574&si="+jiyeok+"&gu="+gu+"&dong="+dong+"&bunji="+bunji+"-"+ho+"&desc="+itemname;
      
  w=870, h=651;
  ww=880, hh=700;

  l=(screen.availWidth/2)-(ww/2);
  t=(screen.availHeight/2)-(hh/2);
  window.open(str,"drapt","top="+t+",left="+l+",width="+w+",height="+h+",status=yes,resizable=no,toolbars=no,location=no,scrollbars=no");
}	

/* ¿ì¸®¾ÆÆÄÆ®ÀÌ¾ß±â, Open°Ô½ÃÆÇ, ¾ÆÆÄÆ® ºñ±³ÇÏ±â */
function WinOpen(url)
{
  NewsDetail = window.open(url, "NewsDetail_Tmp", "width=620,height=650,left=0,top=0,scrollbars=1");
  NewsDetail.focus();
}	

/* Áö½ÄÝ£·Î±× */
function profileOpen(arg1)
{
    w = 765;
    h = 560;

    var _x = (screen.width - w) / 2;
    var _y = (screen.height - h) / 2;

    // reportWin = window.open("http://blog.drapt.com/" + arg1,"profile","location=yes,toolbar=yes,width=800,height=600,resizable=yes,scrollbars=yes,left=0,top=0");
    reportWin = window.open("http://blog.drapt.com/" + arg1,"profile","");
    reportWin.focus();
	 //self.location.replace = 'http://blog.drapt.com/'+arg1+''; 
}

/* »çÁøº¸±â */
function Zoom_Img(img){
  var width  = 800;
  var height = 600;
  
  var posx=0;
  var posy=0;
  
  posx = (screen.width-width)/2-1;
  posy = (screen.height-height)/2-1;
  position = "width="+width+",height="+height+",scrollbars=1,top="+posy+",left="+posx;
  
  //PV1 = window.open("/sise/html/comp_img_pv.php?img=" + img, "PV_Tmp1", position);
  PV1 = window.open("http://211.43.211.71/common/image_preview.php?img=" + img, "PV_Tmp1", position);
  PV1.focus();
}

/* »çÁøº¸±â ÇÑ°³Ãß°¡*/
function Zoom_Img2(img){
  var width  = 800;
  var height = 600;
  
  var posx=0;
  var posy=0;
  
  posx = (screen.width-width)/2-1;
  posy = (screen.height-height)/2-1;
  position = "width="+width+",height="+height+",scrollbars=1,top="+posy+",left="+posx;
  
  PV1 = window.open("http://www.drapt.com/sise/html/comp_img_pv2.php?img=" + img, "PV_Tmp1", position);
  PV1.focus();
}

/* »çÁøº¸±â ÇÑ°³Ãß°¡*/
/* Æò¸éµµ »çÀÌÁî Á¤º¸ Ç¥±â */
function Zoom_Img3(img,no,size,size_mm){
  var width  = 800;
  var height = 600;
  
  var posx=0;
  var posy=0;
  
  posx = (screen.width-width)/2-1;
  posy = (screen.height-height)/2-1;

  position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx;
  if(IEV && IE_Ver() <= 7.0) {
    if (IE_Ver() <= 6.0) {
      position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx;
    }
    else {
      position = "width="+width+",height="+(height+30)+",scrollbars=no,top="+posy+",left="+posx;
    }
  }
    
  //PV1 = window.open("/sise/html/comp_img_pv.php?img=" + img, "PV_Tmp1", position);
  PV1 = window.open("http://www.drapt.com/common/image_preview3.php?img=" + img+"&no="+no+"&size="+size+"&size_mm="+size_mm, "PV_Tmp1", position);
  PV1.focus();
}

/* ¿øÅ¬¸¯¼­ºñ½º ´ÜÁöÁ¤º¸ È£Ãâ */
function danji_popupWin(no){
  wo=window.open('/sise/html_view/detail_frame.htm?no='+no+'','danji','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=960,height=768,left=0,top=0');
  wo.focus();
}
/* ÆË¾÷±¤°íÀÇ ÆË¾÷*/
function MM_openBrWindow_win(url,thename,things){
  wo=window.open(url,thename,things);
  wo.focus();
}

/* ¿øÅ¬¸¯¼­ºñ½º ÆòÇüÁ¤º¸ È£Ãâ */
function danji_popupWin2(no,size){
  wo=window.open('/sise/html_view/detail_frame.htm?no='+no+'&size='+size+'','danji','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=960,height=768,left=0,top=0');
  wo.focus();
}

/* ¿øÅ¬¸¯¼­ºñ½º ÆòÇüÁ¤º¸ È£Ãâ */
function danji_popupWin77(no){
  wo=window.open('/sise/html_view/detail_frame.htm?blue_img=yes&no='+no+'','danji','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=960,height=768,left=0,top=0');
  wo.focus();
}

/* ¿øÅ¬¸¯¼­ºñ½º ´ÜÁöÁ¤º¸ È£Ãâ½Ã Á¶È¸¼ö Áõ°¡Á¦ÇÑ */
function danji_popupWin3(no){
  wo=window.open('/sise/html_view/detail_frame.htm?no='+no+'&noclick=Y','danji','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=960,height=768,left=0,top=0');
  wo.focus();
}	
/* ¿øÅ¬¸¯¼­ºñ½º ÆòÇüÁ¤º¸ È£Ãâ½Ã Á¶È¸¼ö Áõ°¡Á¦ÇÑ */
function danji_popupWin4(no,size){
  wo=window.open('/sise/html_view/detail_frame.htm?no='+no+'&size='+size+'&noclick=Y','danji','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=960,height=768,left=0,top=0');
  wo.focus();
}

/* ÃßÃµ¸Å¹° - /sise/js/common.js ¿¡ Á¸ÀçÇÔ
function danji_popupWin5(info_uid,no){
  wo=window.open('/sise/html_view/detail_frame.htm?no='+info_uid+'&menu=06','notice','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=960,height=768,left=0,top=0');
  wo.focus();
}
*/

/* °ø¹é Ã¼Å© ÆÐÅÏ °Ë»ç */
function Blank(input) {
  if(!input) { 
    return false;
  } else {
    var count = 0;
    if(input.length > 0) {
      for(i=0;i<input.length;i++) {
        if(input.charAt(i) == " ") count++;
      }

      if(count == input.length) return false;
    }
  }
  return true;
}

/* ½Ã¼¼ - ¾ÆÆÄÆ® ÁýÁßÁ¤º¸ */
function resize_comm_1(img) {
  if(img.width > 552) img.width = 552;
}

/* ´ÜÁöµ¿È£È¸ Ä¿¹ö½ºÅä¸® */
function resize_dan(img) {
  if(img.width > 575) img.width = 575;
}

/* Ä«Æä Ä¿¹ö½ºÅä¸® */
function resize_cafe(img) {
  if(img.width > 578) img.width = 578;
}

function resize_new(img,width) {
  if(img.width > width) img.width = width;
}	

function resize(img) {
  if (img.width > 500) {
    img.width = 500;
  }
}

function resize_comm(img) {
  // alert(img.width);
  if(img.width > 530) img.width = 530;
}

function resizeImage578(img)
{
  if(img.width > 578) img.width = 578;
}

function resizeImage550(img)
{
  if(img.width > 550) img.width = 550;
}

function myConfigWin()
{
  var _x = document.body.clientWidth/2 - 300;
  var _y = document.body.clientHeight/2 - 180;

  myConfigTmp = window.open("/know/myknow/index.htm","","status=yes,width=770,height=560,left="+_x+",top="+_y);
  myConfigTmp.focus();
}

function popUP(mypage, myname, w, h, scroll, titlebar)
{
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
  win = window.open(mypage, myname, winprops)
  if (parseInt(navigator.appVersion) >= 4) {
    win.window.focus();
  }
}	

function mem_error() {
  location.href="/login/index.htm?page_name=login";
}

function admin_mail(mail) {
  window.open('/index/process/web_mail.php?tmp_mails='+mail,'','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=510,height=475');
}

function cadal_popup(no) {
  window.open('/e_cal/index.htm?serial='+no,'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top=0,left=0,width='+screen.width+',height='+screen.height);
}

/* ±¤°í ½ºÅ©·Ñ¸µ ½ÃÀÛ */
function move(){
  if(TopImageISpan.style.pixelTop>0&&TopImageISpan.style.pixelTop<=num){  
    TopImageISpan.style.pixelTop=0;
    setTimeout("move()",scrollspeed);
    setTimeout("move2()",scrollspeed);
    return  
  }  
  if(TopImageISpan.style.pixelTop>=TopImageISpan.offsetHeight*-1){  
    TopImageISpan.style.pixelTop-=num
    setTimeout("move()",waitingtime)
  } else {
    TopImageISpan.style.pixelTop	= TopImagesHeight; 
    TopImageISpan.innerHTML			= TopImages[iTop];
    if(iTop==TopImages.length-1) iTop=0  
    else iTop++  
  }  
}  

function move2(){
  if (TopImageIISpan.style.pixelTop>0&&TopImageIISpan.style.pixelTop<=num){  
    TopImageIISpan.style.pixelTop=0  
    setTimeout("move2()",scrollspeed)  
    setTimeout("move()",scrollspeed)  
    return  
  }  
  if (TopImageIISpan.style.pixelTop>=TopImageIISpan.offsetHeight*-1){  
    TopImageIISpan.style.pixelTop-=num  
    setTimeout("move2()",waitingtime)  
  }  
  else{  
    TopImageIISpan.style.pixelTop=TopImagesHeight  
    TopImageIISpan.innerHTML=TopImages[iTop]  
    if (iTop==TopImages.length-1)  
      iTop=0  
    else  
      iTop++  
    }  
}

function TopImageScroll(){  
  move();
  TopImageISpan.style.top				= TopImagesHeight;
  TopImageISpan.style.visibility	= 'visible';
}

function move_1(){
  if(TopImageISpan2.style.pixelTop>0&&TopImageISpan2.style.pixelTop<=num2){  
    TopImageISpan2.style.pixelTop=0;
    setTimeout("move_1()",scrollspeed2);
    setTimeout("move2_1()",scrollspeed2);
    return  
  }  
  if(TopImageISpan2.style.pixelTop>=TopImageISpan2.offsetHeight*-1){  
    TopImageISpan2.style.pixelTop-=num2
    setTimeout("move_1()",waitingtime2)
  } else {
    TopImageISpan2.style.pixelTop	= TopImagesHeight2; 
    TopImageISpan2.innerHTML			= TopImages1[iTop2];
    if(iTop2==TopImages1.length-1) iTop2=0  
    else iTop2++  
  }  
}  

function move2_1(){
  if (TopImageIISpan2.style.pixelTop>0&&TopImageIISpan2.style.pixelTop<=num2){  
    TopImageIISpan2.style.pixelTop=0  
    setTimeout("move2_1()",scrollspeed2)  
    setTimeout("move_1()",scrollspeed2)  
    return  
  }  
  if (TopImageIISpan2.style.pixelTop>=TopImageIISpan2.offsetHeight*-1){  
    TopImageIISpan2.style.pixelTop-=num2  
    setTimeout("move2_1()",waitingtime2)  
  }  
  else{  
    TopImageIISpan2.style.pixelTop=TopImagesHeight2  
    TopImageIISpan2.innerHTML=TopImages1[iTop2]  
    if (iTop2==TopImages1.length-1)  
      iTop2=0  
    else  
      iTop2++  
    }  
}

function TopImageScroll_sec(){  
  move_1();
  TopImageISpan2.style.top				= TopImagesHeight2;
  TopImageISpan2.style.visibility	= 'visible';
}

function StopScroll(){
  num = 0
}

function ResumeScroll(){
  num = 1
}

function StopScroll2(){
  num2 = 0
}

function ResumeScroll2(){
  num2 = 1
}

//¼³¸í ·¹ÀÌ¾î
function preview(content) {
  var obj = document.all["id_preview"];

  // check content
  if(content == "") {
    obj.innerHTML = "";
    return;
  }

  var text = "";
  text =  "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
  text += "	<tr>";
  text += "   <td align='center' bgcolor='#FFFFE1' style='word-break:break-all; padding:5px;'><font color='#000000'>" + content + "</font></td>";
  text += "	</tr>";
  text += "</table>";

  obj.innerHTML = text;
  move_preview(40,20);
  obj.style.visibility = "visible";
}

function preview2(content,bgcol) {
  var obj = document.all["id_preview"];

  // check content
  if(content == "") {
    obj.innerHTML = "";
    return;
  }

  var text = "";
  text =  "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
  text += "	<tr>";
  text += "   <td align='center' bgcolor='"+bgcol+"' style='word-break:break-all; padding-top: 3px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px;'><font color='#000000'>" + content + "</font></td>";
  text += "	</tr>";
  text += "</table>";

  obj.innerHTML = text;
  move_preview(5,5);
  obj.style.visibility = "visible";
}

function move_preview(width,height) {
  var obj = document.all["id_preview"];

  if(obj.innerHTML != "") {
    obj.style.posLeft = event.x - width + document.body.scrollLeft;
    obj.style.posTop = event.y + height + document.body.scrollTop;
  }
}

function hide_preview() {
  document.all["id_preview"].style.visibility = "hidden";
}

/* ÇÑ±Û/¿µ¹®/¼ýÀÚ Ã¼Å©ÇÏ±â */
function Hangle_English(input) {
  var char_ASCII = input.charCodeAt(input.length-1);

  tmp_tuk = new Array();
  tmp_tuk[0]= 65283 ;
  tmp_tuk[1]= 65286 ;
  tmp_tuk[2]= 65290 ;
  tmp_tuk[3]= 65312 ;
  tmp_tuk[4]= 167 ;
  tmp_tuk[5]= 8251 ;
  tmp_tuk[6]= 9734 ;
  tmp_tuk[7]= 9733 ;
  tmp_tuk[8]= 9675 ;
  tmp_tuk[9]= 9679 ;
  tmp_tuk[10]= 9678 ;
  tmp_tuk[11]= 9671 ;
  tmp_tuk[12]= 9670 ;
  tmp_tuk[13]= 9633 ;
  tmp_tuk[14]= 9632 ;
  tmp_tuk[15]= 9651 ;
  tmp_tuk[16]= 9650 ;
  tmp_tuk[17]= 9661 ;
  tmp_tuk[18]= 9660 ;
  tmp_tuk[19]= 8594 ;
  tmp_tuk[20]= 8592 ;
  tmp_tuk[21]= 8593 ;
  tmp_tuk[22]= 8595 ;
  tmp_tuk[23]= 8596 ;
  tmp_tuk[24]= 12307 ;
  tmp_tuk[25]= 9665 ;
  tmp_tuk[26]= 9664 ;
  tmp_tuk[27]= 9655 ;
  tmp_tuk[28]= 9654 ;
  tmp_tuk[29]= 9828 ;
  tmp_tuk[30]= 9824 ;
  tmp_tuk[31]= 9825 ;
  tmp_tuk[32]= 9829 ;
  tmp_tuk[33]= 9831 ;
  tmp_tuk[34]= 9827 ;
  tmp_tuk[35]= 8857 ;
  tmp_tuk[36]= 9672 ;
  tmp_tuk[37]= 9635 ;
  tmp_tuk[38]= 9680 ;
  tmp_tuk[39]= 9681 ;
  tmp_tuk[40]= 9618 ;
  tmp_tuk[41]= 9636 ;
  tmp_tuk[42]= 9637 ;
  tmp_tuk[43]= 9640 ;
  tmp_tuk[44]= 9639 ;
  tmp_tuk[45]= 9638 ;
  tmp_tuk[46]= 9641 ;
  tmp_tuk[47]= 9832 ;
  tmp_tuk[48]= 9743 ;
  tmp_tuk[49]= 9742 ;
  tmp_tuk[50]= 9756 ;
  tmp_tuk[51]= 9758 ;
  tmp_tuk[52]= 8224 ;
  tmp_tuk[53]= 182 ;

  for(a=0;a<tmp_tuk.length;a++) if(char_ASCII == tmp_tuk[a]) return 4;
  
  if(char_ASCII >= 48 && char_ASCII <= 57)																						return 1;	//¼ýÀÚ
  else if((char_ASCII>=65 && char_ASCII<=90) || (char_ASCII>=97 && char_ASCII<=122))	return 2;	//¿µ¾î
  else if ((char_ASCII>=33 && char_ASCII<=47) || (char_ASCII>=58 && char_ASCII<=64) || (char_ASCII>=91 && char_ASCII<=96) || (char_ASCII>=123 && char_ASCII<=126)) return 4; //Æ¯¼ö±âÈ£
  else if ((char_ASCII >= 12592) && (char_ASCII <= 12687))														return 3; //ÇÑ±Û
  else																																								return 0;
}

function gradeGuide()
{
  var w = 517;
  var h = 395;
  var _x = (screen.width - w) / 2;
  var _y = (screen.height - h) / 2;

  tmpWin = window.open("http://www.drapt.com/blog_home/html/pop_rankinfo.htm","",
    "status=yes,scrollbars=no,width="+w+",height="+h+",left="+_x+",top="+_y);
  tmpWin.focus();
}

function changeEmbed(arg1, arg2, arg3)
{
  document.write("<embed src='"+arg1+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+arg2+"' height='"+arg3+"'></embed>");
}

function getXmlHttpRequest() { 
var xmlhttp = false; 
if (window.XMLHttpRequest) { 
    xmlhttp = new XMLHttpRequest(); 
} else { 
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
} 
  return xmlhttp; 
} 

function center_w(w){
  
  var _x = Math.floor((screen.availwidth - w) / 2);
  return _x;
}

function center_h(h){
  var _y = Math.floor((screen.availheight - h) / 2);
  return _y;
}

function wooricy_map(A,B){
//arg1 : ´ÜÁöÄÚµå,¶Ç´Â Áß°³¾÷¼Ò ÄÚµå
//arg2 : ±¸ºÐ (1:´ÜÁö ÆË¾÷,2:Áß°³¾÷¼Ò ÆË¾÷)
 //ajax_get_addr(A,B);
 if(B=="2")
 {
   var PopLink = window.open("http://www.drapt.com/map_api/MapBrowser.htm?family_no="+A, "PopLink", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, top=0 left=0, width=750, height=592");
    PopLink.focus();  
 }
 else
 {
    var PopLink = window.open("http://www.drapt.com/map_api/MapBrowser.htm?no="+A, "PopLink", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, top=0 left=0, width=750, height=592");
    PopLink.focus();  
 }
}

function ajax_get_addr(idx,tp){  
  var xmlhttp = getXmlHttpRequest(); 
  var url = "http://mk.drapt.com/map_new/ajax_request.php?idx="+idx+"&tp="+tp;
 // return url;
 xmlhttp.open("Get", url,true);
  xmlhttp.setRequestHeader("Content-Type","text/html; charset=UTF-8"); 
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
           
            if (xmlhttp.status == 200) {

				if(xmlhttp.responseText == "error" ){ 
					alert("'À§Ä¡ º¸±â'¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.!");
					return false;
				}
				vals = xmlhttp.responseText.split("||");
                if(tp == 1 || tp == '1'){
                  
				  if(vals[7] == 1){
				   w =958;
                   h =592;
                   _w = center_w(w);
                   _h = center_h(h);
				  wmap = window.open('http://www.drapt.com/map_new/map_view.php?mt=1&w='+w+'&h='+h+'&x='+vals[0]+'&y='+vals[1]+'&aptname='+vals[2]+'&Si='+vals[3]+'&Gu='+vals[4]+'&Dong='+vals[5]+'&idx='+vals[6],'woori_map','width='+w+',height='+h+',top='+_h+',left='+_w+',scrollingbars=no');
                  wmap.focus();
				  }else if(vals[5] == 2){
                   w =725;
                   h =592;
                   _w = center_w(w);
                   _h = center_h(h); 
                  wmap = window.open('http://www.drapt.com/map_new/map_view.php?mt=2&w='+w+'&h='+h+'&Si='+vals[0]+'&Gu='+vals[1]+'&Dong='+vals[2]+'&Bunji='+vals[3]+'&name='+vals[4],'woori_map','width='+w+',height='+h+',top='+_h+',left='+_w+',scrollingbars=no');
                  wmap.focus();
                  }
                }else if(tp==2 || tp =='2'){
                   if(vals[4] == 1){
				   w = 725;
                   h = 574;
                   _w2 = center_w(w);
                   _h2 = center_h(h);
				   
				  wmap = window.open('http://www.drapt.com/map_new/map_view.php?mt=3&w='+w+'&h='+h+'&oneclick=yes&x='+vals[0]+'&y='+vals[1]+'&aptname='+vals[2]+'&Flag=2&idx='+vals[3],'woori_map','width='+w+',height='+h+',top='+_h2+',left='+_w2+',scrollingbars=no');
                  wmap.focus();
				   }else if(vals[5] == 2){
                   w = 725;
                   h = 574;
                   _w2 = center_w(w);
                   _h2 = center_h(h);
				   wmap = window.open('http://www.drapt.com/map_new/map_view.php?mt=2&w='+w+'&h='+h+'&Si='+vals[0]+'&Gu='+vals[1]+'&Dong='+vals[2]+'&Bunji='+vals[3]+'&name='+vals[4],
				   'woori_map','width='+w+',height='+h+',top='+_h2+',left='+_w2+',scrollingbars=no');
                   wmap.focus();
				   }
                }else if(tp == 3 || tp == '3'){
                  
				  if(vals[7] == 1){
				    w =725;
                   h =592;
                   _w = center_w(w);
                   _h = center_h(h);
				  wmap = window.open('http://www.drapt.com/map_new/map_view.php?mt=3&w='+w+'&h='+h+'&x='+vals[0]+'&y='+vals[1]+'&aptname='+vals[2]+'&Flag=1&oneclick=yes&idx='+vals[6],'woori_map','width='+w+',height='+h+',top='+_h+',left='+_w+',scrollingbars=no');
				  wmap.focus();
				  }else if(vals[5] == 2){
                   w =725;
                   h =592;
                   _w = center_w(w);
                   _h = center_h(h); 
                  wmap = window.open('http://www.drapt.com/map_new/map_view.php?mt=2&w='+w+'&h='+h+'&Si='+vals[0]+'&Gu='+vals[1]+'&Dong='+vals[2]+'&Bunji='+vals[3]+'&name='+vals[4],'woori_map','width='+w+',height='+h+',top='+_h+',left='+_w+',scrollingbars=no');
                  wmap.focus();
                  }
                
				}else{
                 alert('¸Ê ºÒ·¯¿À±â¿¡ ¿Ã¹Ù¸£Áö ¸øÇÑ ÆÄ¶ó¹ÌÅÍÀÔ´Ï´Ù.');
			     }
            }
        }else{
           //alert('¸ÊÀ» °¡Á®¿À´Â ÁßÀÔ´Ï´Ù....');
		       //ajax_get_addr(idx,tp);
        }
    }
  xmlhttp.send(null); 
  return false;
}

var IEV = document.all ? true:false;
function IE_Ver()
{
  if(navigator.appName.match(/Explorer/i)) {
    return navigator.appVersion.match(/MSIE \d+.\d+/)[0].split(" ")[1];
  }
  else return 0;
}
