// http://crm.maeil.com/common/javascript/ezgencontrol.js ¿¡¼­ ¿Å±ä ¼Ò½º 
function WriteEZgenElement(element_id)
{
	document.write(element_id.innerHTML);
}

//--------------------------------------------------------------------------------------------------
// ±Ý¾×À» ³ªÅ¸³»´Â ¼ýÀÚ¿­¿¡ 3ÀÚ¸® ´ÜÀ§·Î ','¸¦ »ðÀÔÇÏ´Â ÇÔ¼ö
//--------------------------------------------------------------------------------------------------
function add_comma(obj) {
	var str =  String(obj.value);
    var x = 0;
    if (str.length < 1) {
        return "";
    } else {
        var tm = "";
        var ck = "";
        if (str.substring(0, 1) == "-") {
            tm = str.substring(1, str.length);
            ck = "Y";
        } else {
            tm = str;
            ck = "N";
        }
        var st = "";
        var cm = ",";
        for (var i = tm.length, j = 0; i > 0; i--, j++) {
            if ((j % 3) == 2) {
                if (tm.length == j + 1) st = tm.substring(i - 1, i) + st;
                else st = cm + tm.substring(i - 1, i) + st;
            } else {
                st = tm.substring(i - 1, i) + st;
            }
        }
        if (ck == "Y") st = "-" + st;
        return st;
    }
}

/*
* // 2005-04-11 10:22¿ÀÀü ÄíÅ°°ü·Ã 
*/

function getCookieVal (offset) 
{
    var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1)
    endstr = document.cookie.length;
    return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) 
{
    var arg = name + "=";
	var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;
    while (i < clen) 
    {
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg)
        return getCookieVal (j);
        i = document.cookie.indexOf(" ", i) + 1;
        if (i == 0) 
        break; 
    }
    return "";
}

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

/*
* // 2005-03-20 2:03¿ÀÈÄ »óÇ° & »óÇ° ÀÌ¹ÌÁö Å¬¸¯½Ã 
*/
function go_detail(item_id){
	location.href= "/shop/ProductDetail.jsp?item_id="+item_id ;
}

function go_bookdetail(item_id){
	location.href= "/bookshop/shop/ProductDetail.jsp?item_id="+item_id ;
}

function go_bookdetail_new(item_id){
	url = "/bookshop/shop/ProductDetail.jsp?item_id="+item_id ;
	window.open(url,'_blank');
}

function go_detail_new(item_id){
	url = "/shop/ProductDetail.jsp?item_id="+item_id ;
	window.open(url,'_blank');
}
/*
* // 2006-07-27 »óÇ° & »óÇ° ÀÌ¹ÌÁö Å¬¸¯½Ã ³Ý½º·ç ·Î±×ºÐ¼®À» À§ÇÑ ÆÄ¶ó¹ÌÅÍ°ªÀ» ¹ÞÀ» ¼ö ÀÖ´Â º¯¼ö Ãß°¡
*/
function go_detail_param(item_id,param){
	location.href= "/shop/ProductDetail.jsp?item_id="+item_id+"&"+param ;
}
function ImgLarge(item_id){
	var url = "/shop/PopBImgShow.jsp";
	var param = "?item_id="+item_id;
	window.open(url+param, 'Window', 'width=800,height=645,resizable=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=auto');
}


/*
* ÀÌÇÏ IFRAMEÀÇ Å©±â¸¦ ÀÚµ¿À¸·Î Á¶ÀýÇØÁØ´Ù.
*/

var iframeids=["tab"] ;
/*
* // iframe ¿¡ »ç¿ëÇÒ ID ¸¦ ÁöÁ¤ ÇØ ÁÖ¼¼¿ä
*/
var iframehide="yes";

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight; 
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent)
currentfr.attachEvent("onload", readjustIframe)
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
<!--// ÀÌÇÏ IFRAMEÀÇ Å©±â¸¦ ÀÚµ¿À¸·Î Á¶ÀýÇØÁØ´Ù. //-->

function go_page(page){
    document.myform.action = page;
    document.myform.target = "_self";
    document.myform.submit();
}

function go_page2(page, cm_target){
	document.myform.action = page;
	document.myform.target = cm_target;
	document.myform.submit();
}
<!--// µµ¸ÞÀÎÀ» ÀÏÄ¡ ½ÃÅ²´Ù //-->
//document.domain="urii.com";

/*
* // ÇöÀç ½Ã°£À» urlµÚ¿¡ ºÙ¿© ÀÌµ¿ÇÒ °æ¿ì »ç¿ë.
*/
function getTemp()
{
	var now = new Date();
	var hours = now.getHours();
	var minutes = now.getMinutes();
	var seconds = now.getSeconds();
	return stemp = hours+minutes+seconds;
}

/*
* //¹®ÀÚ¿­ÀÇ Áß°£¿¡ »ðÀÔµÈ °ø¹éÀ» Àç°ÅÇÑ´Ù.
*/
function removeSpace(org_src)
{
    var src="";
    for( i=0; i<org_src.length; i++)
    {
        if( org_src.charAt(i) != ' ')
            src += org_src.charAt(i);
    }
    return src;
}


/*
* ¹®ÀÚ¿­ÀÇ ¾çÂÊ(¿ÞÂÊ, ¿À¸¥ÂÊ) °ø¹éÀ» Á¦°Å ÇÔ¼ö 
*/


function trim(src) 
{ 
    var search = 0 

    while ( src.charAt(search) == " ") 
        search = search + 1 

    src = src.substring(search, (src.length)) 

    search = src.length - 1 

    while (src.charAt(search) ==" ") 
        search = search - 1 

	return src.substring(0, search + 1)         
} 
/*
* //¹®ÀÚ¿­À» º¯È¯ÇÑ´Ù.
*/
function replace(str, from, to)
{
    var index;
    var pstr;
    var str1;
    var str2;
    if((index = str.indexOf(from)) >= 0) {
   	str1 = str.substr(0, index);
   	str2 = str.substr(index+(from.length), str.length);
   	pstr = str1;
   	pstr += to;
		if(str2 && str2.length >= from.length) {
	   pstr += replace(str2, from, to);
	 	}
	 	return pstr;
    }else{
    	return str;
    }
}

// get string byte size

function getTextByte(str)
{
    var wch, x, uch = "";
    var szLength = 0;

    for ( x = 0; x < str.length; x ++ )
    {
        wch = str.charCodeAt( x );
        if ( !( wch && 0xFF80 ) )
        {
            szLength ++;
        }
        else if ( !( wch & 0xF000 ) )
        {
            szLength ++;
        }
        else 
        {  
            szLength += 2;
        }
    }
    return szLength;
}

/*
* //¹®ÀÚ¿­ÀÇ ±æÀÌ¸¦ °è»ê. ÇÑ±ÛÀÎ °æ¿ì 2±ÛÀÚ·Î °è»ê.
*/
 function getLength(string) 
 { 
     var ch; 
     var length = 0; 
     if( string == "") return 0; 
     browserName = navigator.appName; 
     browserVer = navigator.appVersion.indexOf("5."); 
     if (browserName == "Netscape") 
         return string.length; 
     else 
     { 
         for ( k = 0; k < string.length; k++ ) 
         { 
             ch = string.charAt(k); 
             if ( ch >= '¤¡' && ch <= 'ÆR' ) 
                 length += 2; 
             else if ( ch > 128) 
                 length += 2; 
             else 
                 length++; 
         } 
         return length; 
     } 
}

/* ÀÔ·ÂµÈ °ªÀÌ ¼Ò¹®ÀÚÀÎ °æ¿ì ÀÌ°Å³ª '_'ÀÎ °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÑ´Ù. */      

function isSmallAlphabet(obj) {                                             
    var str = obj;             
	var tmp_b = true;
    
	if(str.length == 0)                                                
        return false;                                                  

	for(var i=0; i < str.length; i++) {                                
        if( ('a' > str.charAt(i) || str.charAt(i) > 'z')  )  {
			
			tmp_b = false;
		}
		if ( str.charAt(i) == '_' )
		{
			tmp_b = true;
		} 
		if (!tmp_b)
		{
			return false;
		}			
    }                                                                  
    return true;                                                       
}

/*
* // ¾Ë¹Ùºª°ú ¼ýÀÚÀÎ °æ¿ì¸¸ true
*/
function isAlphaNumeric(checkStr)
{
	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
	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)
		{
			return (false);
			break;
		}
	}
	return (true);
} 



/*
*  ¸ðµÎ ´ë¹®ÀÚÀÎÁö °Ë»ç.
*/
function isUpperCase(checkStr)
{
	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	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)
		{
			return (false);
			break;
		}
	}
	return (true);
} 
/*
*  ¿µ¼Ò¹®ÀÚ¿Í '-' ¸¸À¸·Î »ç¿ëµÈ °ø¹éÀÌ ¾ø´Â ¹®ÀÚ¿­
*/
function isValidCode(checkStr)
{
	var checkOK = "abcdefghijklmnopqrstuvwxyz0123456789_";

	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)
		{
			return (false);
			break;
		}
	}
	return (true);
} 
/*
*  ¼ýÀÚ·Î ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎÁö °Ë»ç.
*/
function isNumeric(value)
{
	var ch, ch2=1;
	
	if( value =="") return false;
	for ( k = 0; k < value.length; k++ )
	{
		ch = value.charAt(k);
		if ( ch < '0' || ch > '9' )
	    {
			return (false);
		}
	}
	return (true);
}

/*
*  ¹®ÀÚ¿­ÀÌ °ø¹é¸¸À¸·Î ÀÌ·ç¾îÁ® ÀÖ´ÂÁö °Ë»ç.
*/
function isValidString(string)
{
	var ch;
	if( string.length== 0 ) return false;
	for ( k = 0; k < string.length; k++ )
	{
		ch = string.charAt(k);
		if ( ch != ' ' )
			return (true);
	}
	return (false);
}

/*
* ¹®ÀÚ¿­ÀÇ ±æÀÌ¸¦ °Ë»ç.
*/
 function isValidLength(string, min, max) 
 { 
	 
	var length = getLength(trim(string));
	
	if ( length < min || length > max)
		return false;

	return true;
}


function isHangul(name) 
{ 
    if(name.length < 1 || name.length > 6) 
    { 
        return false; 
    } 
    for(var i = 0; i < name.length; i++) 
    { 
        var chr = name.substr(i,1); 
        chr = escape(chr); 
        if (chr.charAt(1) == "u") 
        { 
            chr = chr.substr(2, (chr.length - 1)); 
            if((chr < "AC00") || (chr > "D7A3")) 
                return false; 
        } 
        else 
            return false; 
    } 
    return true; 
}
function IsNonChar(src)
{
		var nonChar = '`@#$%&\|<>;"';

		var i ; 
		for ( i=0; i < src.length; i++ )  {
			if( nonChar.indexOf(src.substring(i,i+1)) > 0) {
				
				break ; 
			}
		}
		if ( i != src.length ) {
			return false ; 
		}
		else{
			return true ;
		} 

		return false;
}
/*
*	¸Þ¸ð °øÅë ÆË¾÷
*/
function memoPopup(user_id)
{
	window.open("/memo.popup.screen?p_user_id="+user_id,'memo','width=540,height=480,top=200,left=200,scrollbars=0,status=0,resizable=0');
}
/*
*	¸ÞÀÏ °øÅë ÆË¾÷
*/
function mailPopup(user_id)
{
	window.open("/mail.popup.screen?p_user_id="+user_id,'mail','width=525,height=330,top=200,left=200,scrollbars=0,status=0,resizable=0');
}
/*
*	ÀÏ´ëÀÏ Ã¤ÆÃ °øÅë ÆË¾÷
*/

function chatPopup(user_id) 
{
	if (document.AppManager2)
	{
		AppManager2.Do1On1Chat(user_id);
	}

	//window.open(pupup_url,'chatting','width=540,height=480,top=200,left=200,scrollbars=0,status=0,resizable=0');
}

/*
*	ÀÏ¹Ý Ã¤ÆÃ °øÅë ÆË¾÷
*/
function chatLoading()
{
    url = "/chatting.screen";
    window.open(url,"","toolbar=no,width=0,height=0,directories=no,status=no,scrollbars=no,resize=no,menubar=no")
}

/* 
*	 ºí·Î±× °øÅë ÆË¾÷
*/ 
function blogPopup(user_id)
{
	window.open("/blog.family.relate.submit.screen?p_family_id="+user_id,'blog','toolbar=no,width=400,height=200,directories=no,status=no,scrollbars=no,menubar=no');
}

//
var    dayOfMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
/*
* // Áö¿ª ÄÚµå
*/
var 	map_code 	= new Array("¼­¿ï","°æ±â","ÀÎÃµ","´ëÀü","±¤ÁÖ","´ë±¸","ºÎ»ê","¿ï»ê","°­¿ø","ÃæºÏ","Ãæ³²","°æ³²","°æºÏ","Àü³²","ÀüºÏ","Á¦ÁÖ","±âÅ¸");
/*
* // Á÷°Å·¡ÀåÅÍ¿¡¼­ »ç¿ëÇÒ ¹°°Ç ±¸ºÐ 
*/
var	obj_gubun 	= new Array("ÀÓ½ÅÃâ»ê","À°¾Æ¿ëÇ°","¾Æµ¿ÀÇ·ù","µµ¼­","Àå³­°¨","±âÅ¸");
/*
* // Á÷°Å·¡ ÀåÅÍ¿¡¼­ »ç¿ëÇÒ °Å·¡¹æ¹ý ±¸ºÐ 
*/
//var 	gurae_gubun 	= new Array("Á÷°Å·¡","ÅÃ¹è","ÇùÀÇ");
// Å×¸¶˜Þ 

//var 	THEME		= new Array("Àâ¾Æ¶ó ¾ÆÅäÇÇ", "°Ç°­ÇÑ ÀÌÀ¯½Ä", "±×¸²Ã¥ °í¸£±â", "È²±Ýº¯ ¸¸µé±â", "Áñ°Å¿î ÅÂ±³");


var x = 0;
var dest = 0;
var distance = 0;
var step = 0;
var destination = 0;
var index = 0;
var keepgoin=false;
var timerID;
var gubun;
function scrollit() {
	if(keepgoin){
		window.clearTimeout(timerID);
		step = 2;
		//dest = destination;
		dest = index;
		if (x<dest) {
		while (x<dest) {
		step += (step / 2000);
		x += step;
		this.frames.iframe_scroll.scroll(x,0);
		} 
		this.frames.iframe_scroll.scroll(dest,0);
		x = dest;
		}
		
		if (x > dest) {
		while (x>dest) {
		step += (step / 2000);
		if(x >= (0+step)) {
		x -= step; 
		this.frames.iframe_scroll.scroll(x,0);
		}
		else { break; }
		} 
		if(dest >= 0) { this.frames.iframe_scroll.scroll(dest,0); }
		x = dest;
		} 
		if (x<1) {x=1}
		if (x>3000) {x=2500} 
		if(document.myform.roll_flag.value == '1'){
			index = index+2;
		}else{
			index = index-2;
		}
		document.myform.roll_index.value = index;
		timerID = setTimeout("scrollit()", 15);     
/*		
* 		// ¼îÇÎ¸ô ¸ÞÀÎ¿¡¼­ »ç¿ë
*/
		if(gubun == 1){
			if((index % 134) == 0||(index % 134) == 1){
				keepgoin = false;
				setTimeout("recall()", 2000);
			}
			 
			if(index > 399*2){
				document.myform.roll_flag.value = '2';
			}else if(index < 1){
				document.myform.roll_flag.value = '1';
			}
		}else{
			if((index % 160) == 0){
				keepgoin = false;
				setTimeout("recall()", 1000);
			}
			 
			if(index > 2544/2){
				document.myform.roll_flag.value = '2';
			}else if(index < 1){
				document.myform.roll_flag.value = '1';
			}
		}
	}
}
function pre(flag){
	document.myform.roll_flag.value = flag;
}
function recall(){
	if(keepgoin)
		keepgoin = false;
	else
		keepgoin = true;
	scrollit();
}

/*
* ¹®ÀÚ¿­ÀÇ ±æÀÌ¸¦ °è»ê. ÇÑ±ÛÀÎ °æ¿ì 2±ÛÀÚ·Î °è»ê.
*/
 function getLength(string) 
 { 
     var ch; 
     var length = 0; 
     if( string == "") return 0; 
     browserName = navigator.appName; 
     browserVer = navigator.appVersion.indexOf("5."); 
     if (browserName == "Netscape") 
         return string.length; 
     else 
     { 
         for ( k = 0; k < string.length; k++ ) 
         { 
             ch = string.charAt(k); 
             if ( ch >= '¤¡' && ch <= 'ÆR' ) 
                 length += 2; 
             else if ( ch > 128) 
                 length += 2; 
             else 
                 length++; 
         } 
         return length; 
     } 
}


/*
* ÇÃ·¡½Ã ÀÌ¹ÌÁö
*/
function WriteEZgenElement(element_id)
{
	document.write(element_id.innerHTML);
}

function WriteEZgenFlash(pSwfPath, pWidth, pHeight) {
  var embedStr = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""
    + " codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + pWidth + "\" height=\"" + pHeight + "\">"
    + "  <param name=\"movie\" value=\"" + pSwfPath + "\">"
    + "  <param name=\"quality\" value=\"high\">"
    + "  <param name=\"wmode\" value=\"" + pMode + "\">"
    + "  <embed src=\"" + pSwfPath + "\" wmode=\"" + pSwfPath + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\""
    + " type=\"application/x-shockwave-flash\" width=\"" + pWidth + "\" height=\"" + pHeight + "\">"
    + "  </embed>"
    + "</object>";

	document.write(embedStr);
}

function WriteEZgenFlashMode(pSwfPath, pWidth, pHeight, pMode) {
  var embedStr = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""
    + " codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + pWidth + "\" height=\"" + pHeight + "\">"
    + "  <param name=\"movie\" value=\"" + pSwfPath + "\">"
    + "  <param name=\"quality\" value=\"high\">"
    + "  <param name=\"wmode\" value=\"" + pMode + "\">"
    + "  <embed src=\"" + pSwfPath + "\" wmode=\"" + pSwfPath + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\""
    + " type=\"application/x-shockwave-flash\" width=\"" + pWidth + "\" height=\"" + pHeight + "\">"
    + "  </embed>"
    + "</object>";

	document.write(embedStr);
}

function WingWriteEZgenFlashMode(pSwfPath, pWidth, pHeight, pMode) {
  var embedStr = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""
    + " codebase=\"/common/swflash.cab\" width=\"" + pWidth + "\" height=\"" + pHeight + "\">"
    + "  <param name=\"movie\" value=\"" + pSwfPath + "\">"
    + "  <param name=\"quality\" value=\"high\">"
    + "  <param name=\"wmode\" value=\"" + pMode + "\">"
    + "  <embed src=\"" + pSwfPath + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\""
    + " type=\"application/x-shockwave-flash\" width=\"" + pWidth + "\" height=\"" + pHeight + "\">"
    + "  </embed>"
    + "</object>";

	document.write(embedStr);
}

function WriteEZgenFlashVars(pSwfPath, pWidth, pHeight, pMode, pVars) {
  var embedStr = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""
    + " codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + pWidth + "\" height=\"" + pHeight + "\">"
    + "  <param name=\"movie\" value=\"" + pSwfPath + "\">"
    + "  <param name=\"quality\" value=\"high\">"
    + "  <param name=\"wmode\" value=\"" + pMode + "\">"
	+ "  <param name=\"FlashVars\" value=\"" + pVars + "\">"
    + "  <embed src=\"" + pSwfPath + "\" wmode=\"" + pSwfPath + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\""
    + " type=\"application/x-shockwave-flash\" width=\"" + pWidth + "\" height=\"" + pHeight + "\">"
    + "  </embed>"
    + "</object>";

	document.write(embedStr);
}

function WriteEZgenNetEditor(pNetEditorId, pWebRootPath, pWidth, pHeight) {

  var embedStr = "<OBJECT id=\"" + pNetEditorId + "\" ondataavailable=\"\" classid=\"CLSID:B375275F-4705-4D2C-88C1-A891105B9ABA\""
    + "    CODEBASE=\"" + pWebRootPath + "/cab/NetEditor.cab#version=1,3,0,0\" width=\"" + pWidth + "\" height=\"" + pHeight + "\">"
    + "  <PARAM name=\"sCssFile\" value=\"" + pWebRootPath + "/css/css_0to7.css\">"
    + "  <PARAM name=\"sImgFilter\" value=\"gif|jpg|bmp|art|png|tif|wmf|xbm|pcx|pic|\">"
    + "  <PARAM name=\"sBkColor\" value=\"#efefef\">"
    + "</OBJECT>";

	document.write(embedStr);
}

/*
* Åõ¸íÇÃ·¡½Ã·¹ÀÌ¾î ´Ý±â
*/


function window_close(){
MM_showHideLayers('openmessage','','hide')
}


/* ÀÌ¹ÌÁö ÇÑ¹ø¿¡ ¸µÅ©Å×µÎ¸® ¾ø¾Ö±â ½ÃÀÛ */
function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring; 
/* ÀÌ¹ÌÁö ÇÑ¹ø¿¡ ¸µÅ©Å×µÎ¸® ¾ø¾Ö±â ³¡ */


function loginShop( rtnUrl ){
	document.loginForm.target = "_top";
	document.loginForm.action = "/common/login.jsp";
	if(rtnUrl != "")
		document.loginForm.returnUrl.value = rtnUrl ;
	document.loginForm.submit();
//	top.location.href = '/common/login.jsp?returnUrl='+rtnUrl;
}

function WingloginShop( rtnUrl ){
	document.WingloginForm.target = "_top";
	document.WingloginForm.action = "/common/login.jsp";
	if(rtnUrl != "")
		document.WingloginForm.returnUrl.value = rtnUrl ;
	document.WingloginForm.submit();
//	top.location.href = '/common/login.jsp?returnUrl='+rtnUrl;
}
/*
* ÆË¾÷ ¶ç¿ì±â
*/
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/*
* °øÅë//ºñÇìÀÌºñ¾î¼Ó¼º
*/
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_show() { //v6.0
  var i,p,v,obj,args=MM_show.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='block')?'block':(v=='none')?'none':v; }
    obj.display=v; }
}


/* ÆË¾÷´Ý°í »õÃ¢¸µÅ©¿¬°á */
  function closeNgoeye (urlInfo) {
//    window.opener.location.href = urlInfo;
    self.close();
  }
/* ÆË¾÷´Ý°í »õÃ¢¸µÅ©¿¬°á */
  function closeNgo (urlInfo) {
    window.opener.location.href = urlInfo;
    self.close();
  }


/* ÇÃ·¡½Ã ·¹ÀÌ¾î ÆË¾÷ ´Ý±â */
  function hideLayer() {
    Layer1.style.display="none";
  }


/* ³¯Â¥¸¸ ÀÔ·ÂÇØ¾ßÇÒ ¶§ */
function showDateCalendar(dateField)
{
	var wid = (screen.width)/2 - 560/2 ;
	var hei = (screen.height)/2 - 480/2;
	window.open("/common/calendar/calendarsmall.jsp?type=date&dateField=" + dateField, "Calendar", "width=200,height=250,status=no,resizable=no,top=200,left=200");
}

/**
	 * ³¯Â¥ Æ÷¸Ë Ã¼Å©
	 */
	function date_format(v_object) {
		var v_date = v_object.value;
		var yy = "";
		var mm = "";
		var dd = "";
		var len;

		v_date = delChar(v_object.value, "-");

		len = v_date.length;

		if (len == 8) {
			yy = v_date.substring(0, 4);
			mm = v_date.substring(4, 6);
			dd = v_date.substring(6, 8);

			if(blnOkDate(v_date, "") == false){
				alert("Á¶È¸±â°£ÀÇ ³¯Â¥Çü½ÄÀÌ Æ²·È½À´Ï´Ù.");
				v_object.select();
				return;
			} else {
				v_object.value = return_date;
			}
		}
	}

	/**
	 * ¹®ÀÚ¿­¿¡¼­ Æ¯Á¤¹®ÀÚ Á¦¿ÜÇÏ¿© ¹®ÀÚ¿­ Á¶ÇÕ
	 */
	function delChar(newValue, ch) {
		var len = newValue.length;
		var ret = "";

		for (i=0; i<len; ++i) {
			if (newValue.substring(i,i+1) != ch) {
				ret = ret + newValue.substring(i,i+1);
			}
		}

		return ret;
	}


	/**
	 * ³¯Â¥Çü½ÄÃ¼Å©(¹æ¹ý)
	 **/
	function blnOkDate(astrValue, astrNotNull) {
		var arrDate;
		if (astrValue=='')
		{
			if (astrNotNull == "nn")
				return false;
			else
				return true;
		}else{
			if(astrValue.length == 10) {
				if (astrValue.indexOf("-") != -1){
					arrDate = astrValue.split("-");
				}else{
					return false;
				}

				if (arrDate.length != 3) return false;

				var chkDate = new Date(arrDate[0] + "/" + arrDate[1] + "/" + arrDate[2]);

				if (isNaN(chkDate) == true || (arrDate[1] != chkDate.getMonth() + 1 || arrDate[2] != chkDate.getDate())) {
					return false;
				} else {
					return return_date = astrValue;
				}
			} else if (astrValue.length == 8) {

				var chkDate = new Date(astrValue.substring(0,4) + "/" + astrValue.substring(4,6) + "/" + astrValue.substring(6));

				if (isNaN(chkDate) == true || (astrValue.substring(4,6) != chkDate.getMonth() + 1 || astrValue.substring(6) != chkDate.getDate())) {
					return false;
				} else {
					return return_date = astrValue.substring(0,4) + "-" + astrValue.substring(4,6) + "-" + astrValue.substring(6);
				}
			} else {
				return false;
			}
		}
	}
function isEmpty(field, error_msg)
{
	if(field == null) {
		alert("[isEmpty] There is no such field. Check it."); return true;
	}

	var bEmpty = false;

	var isSelect = (field.type == "select-one");
	var isRadioS = (field.type == "radio"); // single
	var isChkboxS = (field.type == "checkbox"); // single
	var isRadio = (field.length > 1 && field[0].type == "radio"); // greater than 1
	var isChkbox = (field.length > 1 && field[0].type == "checkbox"); // greater than 1

	if(isSelect) {
		if(field.selectedIndex == -1)
			bEmpty = true;
	}
	else if(isRadioS || isChkboxS) {
		bEmpty = !(field.checked);
	}
	else if(isRadio || isChkbox) {
		var bTmp = true;
		for(i = 0; i < field.length; i++) {
			if(field[i].checked == true) {
				bTmp = false;
			}
		}
		if(bTmp) bEmpty = true;
	}
	else if(field.value == "") {
		bEmpty = true;
	}

	if(bEmpty) {
		alert(error_msg);

		if(isRadio) field[0].focus();
		else field.focus();

		if(!isRadio && !isSelect) field.select();

		return true;
	} else {
		return false;
	}
}
function isEmptySelect(field, error_msg)
{
	if(field == null) {
		alert("[isEmpty] There is no such field. Check it."); return true;
	}

	var bEmpty = false;

	var isSelect = (field.type == "select-one");
	var isRadio = (field.length > 1 && field[0].type == "radio"); // greater than 1

	if(isSelect) {
		if(field.selectedIndex < 1)
			bEmpty = true;
	}

	if(bEmpty) {
		alert(error_msg);

		if(!isRadio && !isSelect) field.select();

		return true;
	} else {
		return false;
	}
}