function _ID(obj){return document.getElementById(obj)}
function popup_zipcode(form)
{
window.open("../proc/popup_zipcode.php?form="+form,"","width=400,height=500");
}
/**
* chkForm(form)
*
* ÀԷ¹ڽºÀÇ null À¯¹« üũ¿Í ÆÐÅÏ Ã¼Å©
*
* @Usage
0){
reschk = 1;
}
if (currEl.getAttribute("option")!=null && currEl.value.length>0){
if (!chkPatten(currEl,currEl.getAttribute("option"),currEl.getAttribute("msgO"))) return false;
}
if (currEl.getAttribute("minlength")!=null){
if (!chkLength(currEl,currEl.getAttribute("minlength"))) return false;
}
}
if (form.password2){
if (form.password.value!=form.password2.value){
alert("Password does not matc.");
form.password.value = "";
form.password2.value = "";
return false;
}
}
if (reschk && !chkResno(form)) return false;
if (form.chkSpamKey) form.chkSpamKey.value = 1;
if (document.getElementById('avoidDbl')) document.getElementById('avoidDbl').innerHTML = "--- µ¥ÀÌŸ ÀÔ·ÂÁßÀÔ´Ï´Ù ---";
return true;
}
function chkLength(field,len)
{
text = field.value;
if (text.trim().length
* chk
*/
function chkBox(El,mode)
{
if (!El) return;
if (typeof(El)!="object") El = document.getElementsByName(El);
for (i=0;i
* del
*/
function isChked(El,msg)
{
if (!El) return;
if (typeof(El)!="object") El = document.getElementsByName(El);
if (El) for (i=0;i0){
num_len = num_len - co;
if (num_len<0){
co = num_len + co;
num_len = 0;
}
temp = ","+x.substr(num_len,co)+temp;
}
return temp.substr(1);
}
function uncomma(x)
{
var reg = /(,)*/g;
x = parseInt(String(x).replace(reg,""));
return (isNaN(x)) ? 0 : x;
}
/**
* tab(El)
*
* textarea ÀÔ·Â ¹Ú½º¿¡¼ tabŰ·Î °ø¹é ¶ç¿ì±â ±â´É Ãß°¡
*
* @Usage
*/
function tab(El)
{
if ((document.all)&&(event.keyCode==9)){
El.selection = document.selection.createRange();
document.all[El.name].selection.text = String.fromCharCode(9)
document.all[El.name].focus();
return false;
}
}
function enter()
{
if (event.keyCode == 13){
if (event.shiftKey == false){
var sel = document.selection.createRange();
sel.pasteHTML('
');
event.cancelBubble = true;
event.returnValue = false;
sel.select();
return false;
} else {
return event.keyCode = 13;
}
}
}
/**
* miniResize(obj)
*
* À̹ÌÁö Å×À̺í Å©±â¿¡ ¸ÂÃß¾î¼ ¸®»çÀÌÁî
*/
function miniResize(obj)
{
fix_w = obj.clientWidth;
var imgs = obj.getElementsByTagName("img");
for (i=0;i");
if (imgs[i].width > fix_w){
imgs[i].width = fix_w;
imgs[i].style.cursor = "pointer";
imgs[i].title = "view original size";
imgs[i].onclick = popupImg;
}
}
}
function miniSelfResize(contents,obj)
{
fix_w = contents.clientWidth;
if (obj.width > fix_w){
obj.width = fix_w;
obj.title = "popup original size Image";
} else obj.title = "popup original Image";
obj.style.cursor = "pointer";
obj.onclick = popupImg;
}
function popupImg(src)
{
if (typeof(src) != 'string') src = this.src;
window.open('../board/viewImg.php?src='+escape(src),'','width=1,height=1');
}
/**
* ¹®ÀÚ¿ Byte üũ (ÇÑ±Û 2byte)
*/
function chkByte(str)
{
var length = 0;
for(var i = 0; i < str.length; i++)
{
if(escape(str.charAt(i)).length >= 4)
length += 2;
else
if(escape(str.charAt(i)) != "%0D")
length++;
}
return length;
}
/**
* ¹®ÀÚ¿ ÀÚ¸£±â (ÇÑ±Û 2byte)
*/
function strCut(str, max_length)
{
var str, msg;
var length = 0;
var tmp;
var count = 0;
length = str.length;
for (var i = 0; i < length; i++){
tmp = str.charAt(i);
if(escape(tmp).length > 4) count += 2;
else if(escape(tmp) != "%0D") count++;
if(count > max_length) break;
}
return str.substring(0, i);
}
/**
* etc..
*/
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 mv_focus(field,num,target)
{
len = field.value.length;
if (len==num && event.keyCode!=8) target.focus();
}
function onlynumber()
{
if ( window.event == null ) return;
var e = event.keyCode;
if (e>=48 && e<=57) return;
if (e>=96 && e<=105) return;
if ( e==8 || e==9 || e==13 || e==37 || e==39) return; // tab, back, ¡ç,¡æ
event.returnValue = false;
}
function explode(divstr,str)
{
var temp = str;
var i;
temp = temp + divstr;
i = -1;
while(1){
i++;
this.length = i + 1;
this[i] = temp.substring(0, temp.indexOf( divstr ) );
temp = temp.substring(temp.indexOf( divstr ) + 1, temp.length);
if (temp=="") break;
}
}
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 Ä«µå ¼ö·® ÀԷ¹ڽº ID
* -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 = "";
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\
\
\
\
\
\
\
\
');
}
/*** ½ºÅ©·Ñ¸µ(°¡·Î) ***/
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 + 10;
if(yMenuTo 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 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 = "";
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.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 += ' (Jaesin can cheonghal tax bill.)';
_ID('taxapply').style.display = 'block';
}
}
else {
_ID('taxstep3').title = req.getResponseHeader("Status");
_ID('taxstep3').innerHTML += ' - ·ÎµùÁß¿¡·¯';
}
}
if (typeof(Ajax) == 'undefined') return;
if (_ID('taxstep3') && !_ID('loadMsg') ){
msgDiv = _ID('taxstep3').appendChild( document.createElement('span') );
msgDiv.id = 'loadMsg';
msgDiv.innerHTML = ' - Loading data. One moment, please.';
}
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 targetElement = '';
var nowElem = '';
var MaxZindex = 10;
//ºä¾îâ À̵¿!!
function nowElemOnFn(thisElem,thisID){
nowElem = thisElem;
targetElement = document.getElementById(thisID);
targetElement.style.zIndex = MaxZindex;
MaxZindex = eval(MaxZindex) + eval(1);
}
function Start_move(e){
var event = e || window.event;
if( appname == "M" ){
//Àͽº
var evTagName = "BODY";
var evElement = event.srcElement;
}else{
//Àͽº ¿Ü
var evTagName = "HTML";
var evElement = event.target;
}
while( evElement.id != nowElem && evElement.tagName != evTagName ){
evElement = evElement.parentNode;
}
if ( evElement.id == nowElem && nowElem != '' ){
Move_x = event.clientX;
Move_y = event.clientY;
now_mx = parseInt(targetElement.style.left);
now_my = parseInt(targetElement.style.top);
Move_goType = true;
document.onmousemove = Moveing;
}
}
function Moveing(e){
var event = e || window.event;
if (!Move_goType) return false;
targetElement.style.left = ( now_mx + event.clientX ) - Move_x;
targetElement.style.top = ( now_my + event.clientY ) - Move_y;
return false;
}
function int_n(cnt){
if( isNaN(parseInt(cnt)) == true ) var re_cnt = 0;
else var re_cnt = parseInt(cnt);
return re_cnt;
}
document.onmousedown = Start_move;
document.onmouseup = Function("Move_goType = false");
/*** À̵¿·¹ÀÌ¾î °ü·Ã : end ***/