
function get_objectTop(obj){
	if (obj.offsetParent == document.body) return obj.offsetTop;
	else return obj.offsetTop + get_objectTop(obj.offsetParent);
}

function get_objectLeft(obj){
	if (obj.offsetParent == document.body) return obj.offsetLeft;
	else return obj.offsetLeft + get_objectLeft(obj.offsetParent);
}


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 "";
}

/// ½ºÆ®¸µ °´Ã¼¿¡ ¸Þ¼Òµå Ãß°¡ ///
String.prototype.trim = function(str) {
	str = this != window ? this : str;
	return str.replace(/^\s+/g,'').replace(/\s+$/g,'');
}

/**
 * chg_cart_ea(obj,str)
 *
 * Ä«Æ® ¼ö·® º¯°æÇÏ±â
 *
 * -obj		Ä«µå ¼ö·® ÀÔ·Â¹Ú½º ¾ÆÀÌµð
 * -str		up|dn
 * -idx		ÀÎµ¦½º ¹øÈ£ (»ý·« °¡´É)
 */

function chg_cart_ea(obj,str,idx)
{
	if (obj.length) obj = obj[idx];
	if (isNaN(obj.value)){
		alert ("±¸¸Å¼ö·®Àº ¼ýÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù");
		obj.value=1;
		obj.focus();
	} else {
		if (str=='up') obj.value++;
		else  obj.value--;
		if (obj.value==0) obj.value=1;
	}
}

function buttonX(str,action,width)
{
	if (!width) width	= 100;
	if (action) action	= " onClick=\"" + action + "\"";
	ret = "<button style='width:" + width + ";background-color:transparent;color:transparent;border:0;cursor:default' onfocus=this.blur()" + action + ">";
	ret += "<table width=" + (width-1) + " cellpadding=0 cellspacing=0>";
	ret += "<tr height=22><td><img src='../img/btn_l.gif'></td>";
	ret += "<td width=100% background='../img/btn_bg.gif' align=center style='font:8pt tahoma' nowrap>" + str + "</td>";
	ret += "<td><img src='../img/btn_r.gif'></td></tr></table></button>";
	document.write(ret);
}

/**
 * selectDisabled(oSelect)
 *
 * ¼¿·ºÆ®¹Ú½º¿¡ disabled ¿É¼ÇÃß°¡
 */
function selectDisabled(oSelect){
	var isOptionDisabled = oSelect.options[oSelect.selectedIndex].disabled;
    if (isOptionDisabled){
        oSelect.selectedIndex = oSelect.preSelIndex;
        return false;
    } else oSelect.preSelIndex = oSelect.selectedIndex;
    return true;
}


/** Ãß°¡ ½ºÅ©¸³ **/

function viewSub(obj)
{
	//return;
	var obj = obj.parentNode.getElementsByTagName('td')[1].getElementsByTagName('div')[1];
	obj.style.display = "block";
}

function hiddenSub(obj)
{
	var obj = obj.parentNode.getElementsByTagName('td')[1].getElementsByTagName('div')[1];
	obj.style.display = "none";
}

function execSubLayer()
{
	var obj = document.getElementById('menuLayer');
	for (i=0;i<obj.rows.length;i++){
		if (typeof(obj.rows[i].cells[1].childNodes[0])!="undefined"){
			obj.rows[i].cells[0].onmouseover = function(){ viewSub(this) }
			obj.rows[i].cells[0].onmouseout = function(){ hiddenSub(this) }
			obj.rows[i].cells[1].style.position = "relative";
			obj.rows[i].cells[1].style.verticalAlign = "top";
			if (typeof(obj.rows[i].cells[1].getElementsByTagName('div')[1])!="undefined"){
				obj.rows[i].cells[1].getElementsByTagName('div')[1].onmouseover = function(){ viewSub(this.parentNode.parentNode.parentNode.getElementsByTagName('td')[0]) };
				obj.rows[i].cells[1].getElementsByTagName('div')[1].onmouseout = function(){ hiddenSub(this.parentNode.parentNode.parentNode.getElementsByTagName('td')[0]) };
			}
		}
	}
}

function execLayer( parent_layer, sun_layer )
{
	var parent_obj = document.getElementById( parent_layer );
	var sun_obj = document.getElementById( sun_layer );
	parent_obj.onmouseover = function(){ sun_obj.style.display = "block"; }
	parent_obj.onmouseout = function(){ sun_obj.style.display = "none"; }
	sun_obj.onmouseover = function(){ sun_obj.style.display = "block"; }
	sun_obj.onmouseout = function(){ sun_obj.style.display = "none"; }
}

function viewSubTop(obj)
{
	var obj = obj.childNodes[2].childNodes[0];
	obj.style.display = "block";
}

function hiddenSubTop(obj)
{
	var obj = obj.childNodes[2].childNodes[0];
	obj.style.display = "none";
}

function execSubLayerTop()
{
	var obj = document.getElementById('menuLayer');
	for(var i=0;i<obj.rows[0].cells.length;i++){
		if (typeof(obj.rows[0].cells[i].childNodes[2])!="undefined"){
			obj.rows[0].cells[i].onmouseover = function(){ viewSubTop(this) }
			obj.rows[0].cells[i].onmouseout = function(){ hiddenSubTop(this) }
		}
	}
}

function popup(src,width,height)
{
	window.open(src,'','width='+width+',height='+height+',scrollbars=1');
}

/*** ÇÒÀÎ¾× °è»ê ***/
function getDcprice(price,dc,po)
{
	if(!po)po=100;
	if (!dc) return 0;
	var ret = (dc.match(/%$/g)) ? price * parseInt(dc.substr(0,dc.length-1)) / 100 : parseInt(dc);
	return parseInt(ret / po) * po;
}

/*** ÇÃ·¡½Ã Ãâ·Â ***/
function embed(src,width,height,vars)
{
	var codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0";
	var pluginspage = "http://www.macromedia.com/go/getflashplayer";

	if(document.location.protocol=="https:"){
		codebase = codebase.replace(/http:/, "https:");
		pluginspage = pluginspage.replace(/http:/, "https:");
	}

	document.write('\
	<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+codebase+'" WIDTH="'+width+'" HEIGHT="'+height+'">\
	<PARAM NAME=movie VALUE="'+src+'">\
	<PARAM NAME=quality VALUE=high>\
	<PARAM NAME=wmode VALUE=transparent>\
	<PARAM NAME=bgcolor VALUE=#FFFFFF>\
	<param name=flashvars value="' + vars + '">\
	<EMBED src="'+src+'" quality=high bgcolor=#FFFFFF WIDTH="'+width+'" HEIGHT="'+height+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="'+pluginspage+'" flashvars="' + vars + '"></EMBED>\
	</OBJECT>\
	');
}

/*** ½ºÅ©·Ñ¸µ(°¡·Î) ***/
if ( typeof( scrollingX ) == 'undefined' ){

	var scrollingX = function( objnm, elenm ){

		if ( objnm == '' ) return;
		if ( elenm == '' ) return;
		this.obj = objnm;
		this.ele = eval( "window.frames." + elenm );

		this.time = 20; // ÀÌµ¿½Ã°£
		this.drX = 1; // ÀÌµ¿°£°Ý
		this.scrollX = 0;
		this.is_move = 1;
		this.ele.scrollTo( 1, 0 );
	}

	scrollingX.prototype.stop = function(){ this.is_move = 0; }
	scrollingX.prototype.start = function(){ this.is_move = 1; }

	scrollingX.prototype.initScroll = function()
	{
		this.p_bound = this.ele.document.body.scrollWidth - this.ele.document.body.offsetWidth;
		this.p_moveRight = Math.floor( this.ele.document.body.scrollWidth / 2 );
		this.p_moveLeft = this.p_bound - this.p_moveRight;

		setInterval( this.obj + '.goScrolling()', this.time );
	}

	scrollingX.prototype.goMove = function( idx )
	{
		if ( idx == 0 ) this.drX = -Math.abs( this.drX );
		else this.drX = +Math.abs( this.drX );

		var pos = this.scrollX + idx;
		this.ele.scrollTo( pos, 0 );
	}

	scrollingX.prototype.goScrolling = function()
	{
		if ( !this.is_move ) return;
		this.scrollX = this.ele.document.body.scrollLeft + this.drX; // window.status = this.scrollX;
		if ( this.drX < 0 && this.scrollX < 1 ) this.scrollX = this.p_moveRight;
		if ( this.drX > 0 && this.scrollX > this.p_bound ) this.scrollX = this.p_moveLeft;
		this.ele.scrollTo( this.scrollX, 0 );
	}
}

/*** ½ºÅ©·Ñ¸µ(¼¼·Î) ***/
if ( typeof( scrollingY ) == 'undefined' ){

	var scrollingY = function( objnm, elenm ){

		if ( objnm == '' ) return;
		if ( elenm == '' ) return;
		this.obj = objnm;
		this.ele = eval( "window.frames." + elenm );

		this.time = 20; // ÀÌµ¿½Ã°£
		this.drY = 1; // ÀÌµ¿°£°Ý
		this.scrollY = 0;
		this.is_move = 1;
		this.ele.scrollTo( 0, 1 );
	}

	scrollingY.prototype.stop = function(){ this.is_move = 0; }
	scrollingY.prototype.start = function(){ this.is_move = 1; }

	scrollingY.prototype.initScroll = function()
	{
		this.p_bound = this.ele.document.body.scrollHeight - this.ele.document.body.offsetHeight;
		this.p_moveBot = Math.floor( this.ele.document.body.scrollHeight / 2 );
		this.p_moveTop = this.p_bound - this.p_moveBot;

		setInterval( this.obj + '.goScrolling()', this.time );
	}

	scrollingY.prototype.goMove = function( idx )
	{
		if ( idx == 0 ) this.drY = -Math.abs( this.drY );
		else this.drY = +Math.abs( this.drY );

		var pos = this.scrollY + idx;
		this.ele.scrollTo( 0, pos );
	}

	scrollingY.prototype.goScrolling = function()
	{
		if ( !this.is_move ) return;
		this.scrollY = this.ele.document.body.scrollTop + this.drY; // window.status = this.scrollY;
		if ( this.drY < 0 && this.scrollY < 1 ) this.scrollY = this.p_moveBot;
		if ( this.drY > 0 && this.scrollY > this.p_bound ) this.scrollY = this.p_moveTop;
		this.ele.scrollTo( 0, this.scrollY );
	}
}

/*** Cookie »ý¼º ***/
function setCookie( name, value, expires, path, domain, secure ){

	var curCookie = name + "=" + escape( value ) +
		( ( expires ) ? "; expires=" + expires.toGMTString() : "" ) +
		( ( path ) ? "; path=" + path : "" ) +
		( ( domain ) ? "; domain=" + domain : "" ) +
		( ( secure ) ? "; secure" : "" );

	document.cookie = curCookie;
}

/*** Cookie Á¦°Å ***/
function clearCookie( name ){

    var today = new Date();
    var expire_date = new Date(today.getTime() - 60*60*24*1000);
    document.cookie = name + "= " + "; expires=" + expire_date.toGMTString();
}

/*** Cookie Ã¼Å© ***/
function getCookie( name ){

	var dc = document.cookie;

	var prefix = name + "="

	var begin = dc.indexOf("; " + prefix);

	if ( begin == -1 ){

		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	}
	else begin += 2

	var end = document.cookie.indexOf(";", begin);

	if (end == -1) end = dc.length;

	return unescape(dc.substring(begin + prefix.length, end));
}

/*** Cookie ÄÁÆ®·Ñ ***/
function controlCookie( name, elemnt ){

	if ( elemnt.checked ){

	    var today = new Date()
	    var expire_date = new Date(today.getTime() + 60*60*6*1000)

		setCookie( name=name, value='true', expires=expire_date, path='/' );
		if (_ID(name) == null) setTimeout( "self.close()" );
		else setTimeout( "_ID('" + name + "').style.display='none'" );
	}
	else clearCookie( name );

	return
}

/*-------------------------------------
ÀÚ¹Ù½ºÅ©¸³Æ® µ¿Àû ·Îµù
-------------------------------------*/
function exec_script(src)
{
	var scriptEl = document.createElement("script");
	scriptEl.src = src;
	_ID('dynamic').appendChild(scriptEl);
}

/*-------------------------------------
½ºÅ©·Ñ ¹è³Ê
-------------------------------------*/
var bodyHeight = scrollobjHeight = 0;

function scrollBanner()
{
	if ( document.all ) window.attachEvent("onload", initSlide); // IE °æ¿ì
	else window.addEventListener("load", initSlide, false); // FF(¸ðÁú¶ó) °æ¿ì
}

function initSlide()
{
	var scroll = document.getElementById('scroll');
	var scrollTop = get_objectTop(document.getElementById('pos_scroll'));
	scroll.style.top = document.body.scrollTop + scrollTop;
	bodyHeight = document.body.scrollHeight;
	scrollobjHeight = scroll.clientHeight;
	movingSlide();
}

function movingSlide()
{
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
	var scroll = document.getElementById('scroll');
	var scrollTop = get_objectTop(document.getElementById('pos_scroll'));

	yMenuFrom  = parseInt (scroll.style.top, 10);
	yMenuTo    = document.body.scrollTop + 30;
	if(yMenuTo<scrollTop) yMenuTo = scrollTop;
	timeoutNextCheck = 500;
	if (yMenuFrom != yMenuTo) {
		yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 10);
		if (yMenuTo < yMenuFrom) yOffset = -yOffset;
		scroll.style.top = parseInt (scroll.style.top, 10) + yOffset;
		//scroll.style.left = parseInt (scroll.style.left, 10) - 100;
		timeoutNextCheck = 10;
	}
	if (scroll.style.pixelTop > bodyHeight - scrollobjHeight) scroll.style.top = bodyHeight - scrollobjHeight;

	setTimeout ("movingSlide()", timeoutNextCheck);
}

// Ãß°¡ ½ºÅ©·Ñº£³Ê
function rScrollBanner(mid,pid)
{

	if ( document.all ){
		window.attachEvent("onload", rInitSlide(mid,pid)); // IE °æ¿ì

	}else window.addEventListener("load", rInitSlide(mid,pid), false); // FF(¸ðÁú¶ó) °æ¿ì



}

function rInitSlide(mid,pid)
{

	var scroll = document.getElementById(mid);
	var scrollTop = get_objectTop(document.getElementById(pid));
	scroll.style.top = document.body.scrollTop + scrollTop;
	bodyHeight = document.body.scrollHeight;
	scrollobjHeight = scroll.clientHeight;
	rMovingSlide(mid,pid);
}

function rMovingSlide(mid,pid)
{
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
	var scroll = document.getElementById(mid);
	var scrollTop = get_objectTop(document.getElementById(pid));

	yMenuFrom  = parseInt (scroll.style.top, 10);
	yMenuTo    = document.body.scrollTop + 10;
	if(yMenuTo<scrollTop) yMenuTo = scrollTop;
	timeoutNextCheck = 500;
	if (yMenuFrom != yMenuTo) {
		yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 10);
		if (yMenuTo < yMenuFrom) yOffset = -yOffset;
		scroll.style.top = parseInt (scroll.style.top, 10) + yOffset;
		timeoutNextCheck = 10;
	}
	if (scroll.style.pixelTop > bodyHeight - scrollobjHeight) scroll.style.top = bodyHeight - scrollobjHeight;

	setTimeout ("rMovingSlide('"+mid+"','"+pid+"')", timeoutNextCheck);
}

function gdscroll(gap)
{
	var gdscroll = document.getElementById('gdscroll');
	gdscroll.scrollTop += gap;
}

function eScroll()
{
	/*********************************
	 * eScroll ( eNamoo scroll script )
	 * by mirrh
	 * 2006.07.16
	 ********************************/

	var thisObj = this;
	this.timeObj = null;

	/*** ¼³Á¤º¯¼ö ***/
	this.mode = "top";				// ½ºÅ©·Ñ ¹æÇâ (top|left)
	this.width = "100%";			// ¶óÀÎ´ç °¡·Î°ª (pixel)
	this.height = 20;				// ¶óÀÎ´ç ³ôÀÌ°ª (pixel)
	this.line = 1;					// Ãâ·Â ¶óÀÎ¼ö
	this.delay = 150;				// ½ºÅ©·ÑÈÄ µô·¹ÀÌ ½Ã°£
	this.speed = 1;					// ½ºÅ©·Ñ ¼Óµµ (ÀÛÀ»¼ö·Ï ºü¸§)
	this.id = 'obj_eScroll';		// °´Ã¼ id (Å¬·¡½º ´ÙÁß »ç¿ë½Ã id ´Ù¸£°Ô ÁöÁ¤ ¿ä¸Á)
	this.contents = new Array();	// Ãâ·Â ³»¿ë (¹è¿­·Î ³»¿ë ÁöÁ¤ ¿ä¸Á)
	this.align = "left";			// ³»¿ë aligne
	this.valign = "middle";			// ³»¿ë valigne

	/*** ³»Àåº¯¼ö ***/
	this.gap = 0;
	this.direction = 1;

	this.add = add;
	this.exec = exec;
	this.start = start;
	this.stop = stop;
	this.scroll = scroll;
	this.direct = direct;
	this.go = go;

	function add(str)
	{
		this.contents[this.contents.length] = str;
	}

	function exec()
	{
		this.basis = (this.mode == "left") ? this.width : this.height;
		var outWidth = this.width * ((this.mode == "left") ? this.line : 1);
		var outHeight = this.height * ((this.mode == "top") ? this.line : 1);

		var outline = "<div id=" + this.id + " style='overflow:hidden;width:" + outWidth + ";height:" + outHeight + "'><table></table></div>";
		document.write(outline);
		this.obj = document.getElementById(this.id);

		var tb = this.obj.appendChild(document.createElement("table"));
		var tbody = tb.appendChild(document.createElement("tbody"));
		tb.cellPadding = 0 ;
		tb.cellSpacing = 0 ;
		tb.onmouseover = function(){thisObj.stop()};
		tb.onmouseout = function(){thisObj.start()};

		if (this.mode=="left") var tr = tbody.appendChild(document.createElement("tr"));
		for (var k=0; k < this.contents.length; k++){
			if (this.mode=="top") var tr = tbody.appendChild(document.createElement("tr"));
			var td = tr.appendChild(document.createElement("td"));
			td.noWrap = true;
			td.style.width = this.width;
			td.style.height = this.height;
			td.style.textAlign = this.align;
			td.style.verticalAlign = this.valign;
			td.innerHTML = this.contents[k];
		}

		var len = (this.contents.length<this.line) ? this.contents.length : this.line;
		for (i=0;i<len;i++){
			if (this.mode=="top") var tr = tbody.appendChild(document.createElement("tr"));
			td = tr.appendChild(document.createElement("td"));
			td.noWrap = true;
			td.style.width = this.width;
			td.style.height = this.height;
			td.style.textAlign = this.align;
			td.style.verticalAlign = this.valign;
			td.innerHTML = this.contents[i];
		}

		this.obj.parent = this;
		this.tpoint = this.basis * this.contents.length;
		this.start();
	}

	function scroll()
	{
		var out = (this.mode=="left") ? this.obj.scrollLeft : this.obj.scrollTop;
		if (out%this.basis==0){
			this.gap++;
			if (this.gap>=this.delay) this.gap = 0;
		}
		if (!this.gap){
			var ret = (out==this.tpoint) ? this.direction : out + this.direction;
			if (ret<0) ret = this.tpoint + ret;
			if (this.mode=="left") this.obj.scrollLeft = ret;
			else this.obj.scrollTop = ret;
		}
	}

	function start()
	{
		this.timeObj = window.setInterval("(document.getElementById('" + this.id + "')).parent.scroll()",this.speed);
	}

	function stop()
	{
		clearTimeout(this.timeObj);
	}

	function direct(d)
	{
		this.direction = d;
	}

	function go()
	{
		this.stop();
		var out = (this.mode=="left") ? this.obj.scrollLeft : this.obj.scrollTop;
		var ret = (parseInt(out / this.basis) + this.direction) * this.basis;
		if (ret<0) ret = this.tpoint + ret;
		if (ret>this.tpoint) ret = this.basis;
		if (this.mode=="left") this.obj.scrollLeft = ret;
		else this.obj.scrollTop = ret;
	}

}

/*** onLoad ÀÌº¥Æ®¿¡ ÇÔ¼ö ÇÒ´ç ***/
function addOnloadEvent(fnc)
{
	if ( typeof window.addEventListener != "undefined" )
		window.addEventListener( "load", fnc, false );
	else if ( typeof window.attachEvent != "undefined" ) {
		window.attachEvent( "onload", fnc );
	}
	else {
		if ( window.onload != null ) {
			var oldOnload = window.onload;
			window.onload = function ( e ) {
				oldOnload( e );
				window[fnc]();
			};
		}
		else window.onload = fnc;
	}
}

function order_print(ordno)
{
	var ordertax = window.open("../mypage/popup_ordertax.php?ordno=" + ordno,"ordertax","width=750,height=600,scrollbars=yes");
	ordertax.focus();
}

/*** ¿ÞÂÊ ½ºÅ©·Ñ¹è³Ê close!(µå·¡±×&µå·Ó Àå¹Ù±¸´Ï¿ë) ***/
function divClose(thisID,tplSkin){

	if( thisID == 'cart_botID' ){ var in_botArray = new Array('moveCartID','cart_topbarID','cart_botbarID','cart_totalpID'); }
	if( thisID == 'wish_botID' ){ var in_botArray = new Array('wishlist_ID','wish_topbarID','wish_botbarID'); }

	var ch_Type = thisID.split('_');

	var TypeDisplayID = new Array();

	for( c=0; c < in_botArray.length; c++ ){

			TypeDisplayID[c] = document.getElementById(in_botArray[c]);

			if( TypeDisplayID[c].style.display == "block" ){
				if( thisID == 'cart_botID' ) cart_divCloseYn = 'y';
				if( thisID == 'wish_botID' ) wish_divCloseYn = 'y';
				TypeDisplayID[c].style.display = 'none';
				if( c == 0 ){
					TypeDisplayID[c].height = '0';
					document.getElementById(thisID).src = '../skin/'+tplSkin+'/img/common/scroll_'+ch_Type[0]+'_on.gif';
				}
			}else{
				if( thisID == 'cart_botID' ) cart_divCloseYn = 'n';
				if( thisID == 'wish_botID' ) wish_divCloseYn = 'n';
				TypeDisplayID[c].style.display = 'block';
				if( c == 0 ) document.getElementById(thisID).src = '../skin/'+tplSkin+'/img/common/scroll_'+ch_Type[0]+'_off.gif';
			}
	}
	left_scroll_Text();
	initSlide(); //½ºÅ©·Ñ ³ôÀÌ°ª ´Ù½Ã °è»êÇÏ±â!!
}

function popupEgg(asMallId, asOrderId){
	//Ã¢À» È­¸éÀÇ Áß¾Ó¿¡ À§Ä¡
	iXPos = (window.screen.width - 700) / 2;
	iYPos = (window.screen.height - 600) / 2;
	var egg = window.open("https://gateway.usafe.co.kr/esafe/InsuranceView.asp?mall_id="+asMallId + "&order_id=" + asOrderId, "egg", "width=700, height=600, scrollbars=yes, left=" + iXPos + ", top=" + iYPos);
	egg.focus();
}

/*** Taxbill Á¤º¸ Ãâ·Â ***/
function getTaxbill(doc_number, taxapp)
{
	_ID('taxprint').style.display = 'none';
	var print = function(){
		if (_ID('taxstep3') && _ID('loadMsg') ) _ID('loadMsg').style.display = 'none';
		var req = ajax.transport;
		if (req.status == 200){
			var jsonData = eval( '(' + req.responseText + ')' );
			_ID('taxstep3').innerHTML += (jsonData.status_txt != null ? ' - ' + jsonData.status_txt : '');
			if (jsonData.tax_path != null){
				_ID('taxprint').getElementsByTagName('a')[0].href = "javascript:popup('" + jsonData.tax_path + "',750,600);";
				_ID('taxprint').style.display = 'block';
			}
			if (taxapp == 'Y' && (jsonData.status == 'CAN' || jsonData.status == 'ERR' || jsonData.status == 'CCR')){
				_ID('taxstep3').innerHTML += ' <FONT COLOR="EA0095">(¼¼±Ý°è»ê¼­¸¦ Àç½ÅÃ»ÇÒ ¼ö ÀÖ½À´Ï´Ù.)</FONT>';
				_ID('taxapply').style.display = 'block';
			}
		}
		else {
			_ID('taxstep3').title = req.getResponseHeader("Status");
			_ID('taxstep3').innerHTML += '<font class=small color=444444> - ·ÎµùÁß¿¡·¯</font>';
		}
	}
	if (typeof(Ajax) == 'undefined') return;
	if (_ID('taxstep3') && !_ID('loadMsg') ){
		msgDiv = _ID('taxstep3').appendChild( document.createElement('span') );
		msgDiv.id = 'loadMsg';
		msgDiv.innerHTML = '&nbsp;- µ¥ÀÌÅ¸ ·Îµù ÁßÀÔ´Ï´Ù. Àá½Ã¸¸ ±â´Ù·ÁÁÖ¼¼¿ä.';
	}
	var ajax = new Ajax.Request("../mypage/indb.php?mode=getTaxbill&doc_number=" + doc_number + "&dummy=" + new Date().getTime(), { method: "get", onComplete: print });
}

/*** ÀÌµ¿·¹ÀÌ¾î °ü·Ã : start ***/
var appname = navigator.appName.charAt(0);
var move_type = false;
var divpop_id;

 function Start_move(e,thisID){
	 var event = e || window.event;
	 divpop_id = thisID;
	 //ÀÍ½º
	 if( appname == "M" ){
		 target_Element = event.srcElement;
	}else{ //ÀÍ½º¿Ü
		if (event.which !=1){
			return false;
		}
		else{
			move_type = true;
			target_Element = event.target;
		}
	}

	move_type = true;
	Move_x = event.clientX;
	Move_y = event.clientY;
	if( appname == "M" ) target_Element.onmousemove = Moveing;
	else document.onmousemove = Moveing;
 }


 function Moveing(e){
	var event = e || window.event;

	if(move_type == true){
		var Nowx = event.clientX - Move_x;
		var Nowy = event.clientY - Move_y;
		var targetName = document.getElementById(divpop_id);
		targetName.style.left = int_n(targetName.style.left) + Nowx;
		targetName.style.top = int_n(targetName.style.top) + Nowy;
		Move_x = event.clientX;
		Move_y = event.clientY;
		return false;
	}
 }

 function Moveing_stop(){
	move_type =  false;
}

function int_n(cnt){
	if( isNaN(parseInt(cnt)) == true ) var re_cnt = 0;
	else var re_cnt = parseInt(cnt);
	return re_cnt;
}

document.onmouseup = Moveing_stop;
/*** ÀÌµ¿·¹ÀÌ¾î °ü·Ã : end ***/
