// JavaScript Document
//»óÅÂ Ç¥½ÃÁÙ 

function hidestatus(){
	window.status='È«¼º½Å¹® ÀÎÅÍ³Ý ¼îÇÎ¸ô È«¼ºÀåÅÍ,UCC,Á¤º¸¸¶´ç';
	return true;
}

if (document.layers)
document.captureEvents(Event.mouseover | Event.mouseout | Event.mousedown)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
document.onmousedown=hidestatus

//¿À¸¥ÂÊ ¸¶¿ì½º ±ÝÁö
function click() {
	if ((event.button==2) || (event.button==3)) {
		alert('ÁË¼ÛÇÕ´Ï´Ù. ¿À¸¥ÂÊ ¸¶¿ì½º ±ÝÁöÀÔ´Ï´Ù. - È«¼º½Å¹®');
	}
   // if(event.ctrlKey) { 
     //  alert('CtrlÅ°¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù. - È«¼º½Å¹®'); 
    //}

}
document.onmousedown=click
document.onkeydown=click;

//¸µÅ©ÁÖº¯ Á¡¼± ¾ø¾Ö±â
/*function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring; 


//Á÷Á¢ url ÀÛ¼º½Ã index·Î ÀÌµ¿
var URLString = top.location.href + "/"; 
tURLString = URLString.split("/"); 
iii = tURLString.length > 2 ? (tURLString[3].length > 0 ? false:true) : false 
if(!iii){ 
    document.cookie = "UrlString=" + top.window.location.href + "; path=/;"; 
    top.window.location.href = "http://"+top.window.location.host; 
}
*/
//wingbanner

var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
function CheckUIElements(){
        var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

        if ( bNetscape4plus ) {
                yMenuFrom   = document["divMenu"].top;
                yMenuTo     = top.pageYOffset + 600;
        }
        else if ( bExplorer4plus ) {
                yMenuFrom   = parseInt (divMenu.style.top, 10);
                yMenuTo     = document.body.scrollTop + 600;
        }

        timeoutNextCheck = 500;

        if ( Math.abs (yButtonFrom - (yMenuTo + 0)) < 6 && yButtonTo < yButtonFrom ) {
                setTimeout ("CheckUIElements()", timeoutNextCheck);
                return;
        }

        if ( yButtonFrom != yButtonTo ) {
                yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
                if ( yButtonTo < yButtonFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divLinkButton"].top += yOffset;
                else if ( bExplorer4plus )
                        divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }
        if ( yMenuFrom != yMenuTo ) {
                yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
                if ( yMenuTo < yMenuFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divMenu"].top += yOffset;
                else if ( bExplorer4plus )
                        divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

       // setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function OnLoad()
{
        var y;
        if ( top.frames.length )
        if ( bNetscape4plus ) {
                document["divMenu"].top = top.pageYOffset + 600;
                document["divMenu"].visibility = "visible";
        }
        else if ( bExplorer4plus ) {
                divMenu.style.top = document.body.scrollTop + 600;
                divMenu.style.visibility = "visible";
        }
        CheckUIElements();
        return true;
}


//ÆË¾÷
function Pop_M(mode) {
	 if(mode == "Login"){
        url = "/login/login.html";
		PopName = "·Î±×ÀÎ";
		width = 450;
		height = 228;
	 }else if(mode == "Order"){
        url = "/login/login1.html";
		PopName = "·Î±×ÀÎ";
		width = 450;
		height = 270;
	 }else if(mode == "Inactive"){
        url = "/login/inactivelogin.html";
		PopName = "ÁÖ¹®¹è¼ÛÁ¶È¸";
		width = 450;
		height = 210;
	 }else{
        url = "/login/idpw.html";
		PopName = "¾ÆÀÌµð/ºñ¹Ð¹øÈ£ Ã£±â";
		width = 450;
		height = 298;
	 }
     var window_left = (screen.width-width)/2;
     var window_top = (screen.height-height)/2;
     window.open(url,PopName,'width= '+ width +',height= '+ height +',status=no,top=' + window_top + ',left=' + window_left + '');
}

function Market_win(str) {
        url = "/mall/market/marketview_01.html?m_id="+str;
		PopName = "»óÁ¡¼Ò°³";
		width = 800;
		height = 665;
     var window_left = (screen.width-width)/2;
     var window_top = (screen.height-height)/2;
     window.open(url,PopName,'width= '+ width +',height= '+ height +',status=no,top=' + window_top + ',left=' + window_left + '');
}

function init_orderid(){
	var today = new Date();
	var year  = today.getFullYear();
	var month = today.getMonth() + 1;
	var date  = today.getDate();
	var time  = today.getTime();

	if(parseInt(month) < 10) {
		month = "0" + month;
	}

	var order_idxx = year + "" + month + "" + date + "" + time;

	document.order_info.ordr_idxx.value = order_idxx;
}
