﻿/*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//
//		팝업창
//
//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
// 2010.09.06 태풍 '말로' 제주지역 택배 지연안내
OpenPopUp("cookie20100906", "popUp20100906", "/POPUP/2010.09.06/popup.html", 410, 0, 322, 428);
// 2010.07.28 it1401, it1402 신상품 안내
//OpenPopUp("cookie20100728", "popUp20100728", "/POPUP/2010.07.28/popup.html", 410, 0, 400, 550);
// 2010.07.26 하계휴가
//OpenPopUp("cookie20100726", "popUp20100726", "/POPUP/2010.07.26/popup.html", 0, 0, 330, 400);

// 2010.07.03 부기보드안내
OpenPopUp("cookie20100703", "popUp20100703", "/POPUP/2010.07.03/popup.html", 0, 0, 400, 630);
// 2010.04.06 무이자 할부안내
//OpenPopUp("cookie20100406", "popUp02","/POPUP/2010.04.06/popup.html", 352, 0, 340, 400);

// 2010.04.05 제품할인안내
//OpenPopUp("cookie20100405", "popUp01","/POPUP/2010.04.05/popup.html", 0, 0, 323, 357);

// 2010.02.18 서버증축
//OpenPopUp("cookie20100218", "popUp01","/POPUP/2010.02.18/popup.html", 0, 0, 323, 357);
// 2010.02.04 설날 공지
//OpenPopUp("cookie20100204", "popUp02","/POPUP/2010.02.04/popup.html", 352, 0, 400, 525);

// 2010.01.01 무이지 할부
//OpenPopUp("cookie20010104", "popUp01","/POPUP/2010.01.04/popup.html", 0, 0, 342, 393);

// 2009.09.24 추석
//OpenPopUp("cookie20090924", "popUp01","/POPUP/2009.09.24/popup.html", 0, 0, 320, 360);

// 2009.07.27 하계휴가
//OpenPopUp("cookie20090727", "popUp01","/POPUP/2009.07.27/popup.html", 0, 0, 320, 360);

// 2009.04.15 EZ 디지탈 계측기
//OpenPopUp("cookieOpenPopUp01", "popUp01","/POPUP/2009.04.15/popup.html", 0, 0, 400, 565);

// 2009년 공지
//OpenPopUp("cookieOpenPopUp01", "popUp01","/POPUP/2009.01.16/popup.html", 0, 0, 400, 525);

// 회사휴무안내(결혼식관련)
//OpenPopUp("cookieOpenPopUp03", "popUp03","/POPUP/2008.12.01/popup.html", 0, 0, 320, 360);

// 무이자 할부 안내
//OpenPopUp("cookieOpenPopUp01", "popUp01","/POPUP/2008.10.28/popup.html", 330, 0, 460, 420);

// 신상품 안내
//OpenPopUp("cookieOpenPopUp02", "popUp02","/POPUP/2008.09.09/popup.html", 0, 0, 320, 360);

// 추석 배송 안내
//OpenPopUp("cookieOpenPopUp01", "popUp01","/POPUP/2008.09.01/popup.html", 330, 0, 320, 360);

// 하계휴가 안내
//OpenPopUp("cookieOpenPopUp01", "popUp01","/POPUP/2008.07.30/popup.html", 0, 0, 320, 360);

// 물류파업으로 제주택배 불가
//OpenPopUp("cookieOpenPopUp01", "popUp01","/POPUP/2008.06.16/popup.html", 0, 0, 320, 360);

//새해공지
//OpenPopUp("cookieOpenPopUp02", "popUp02","/POPUP/2008.01.31/2008.01.31.html", 330, 0, 400, 525);

function SecessionProcess()
{
	alert('탈퇴하시면 이전 모든 자료는 삭제됩니다');
	
	if(confirm("탈퇴 하시겠습니까?"))
		return true;
	else
		return false;
}


/*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//
//		스크립트 시작
//
//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

function StartDocument()
{
	setInterval("Blink()", 750)

	var host = location.href.toLowerCase();
	if (host.indexOf("http://www.ic114.com/ajaxwww/theme/001/default.aspx") != -1 || host.indexOf("http://test.ic114.com/ajaxwww/theme/001/default.aspx") != -1 || host.indexOf("http://localhost/ajaxwww/theme/001/default.aspx") != -1 )
	{
		ChangeHitExcellent()
		
		setInterval("ChangeHitExcellent()", 7000)
		setInterval("ChangePlanRight()", 5000)
		setInterval("ChangeBigEvent()", 5000)
	}
}

window.onload=StartDocument;






/*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//
//		전체 사용 함수들
//
//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

// 깜빡임
function Blink()
{
	var blink=document.all.tags("blink")
	for(var i=0; i<blink.length; i++)
	{
		blink[i].style.visibility=blink[i].style.visibility=="" ? "hidden" : ""
	}
}

function _GetElementById(id){
	return document.getElementById(id);
}

function _GetOpenerElementById(id){
	return opener.document.getElementById(id);
}

function _GetObjectXY(obj, xPoint, yPoint){
	var point = { x: xPoint, y: yPoint };		//현재 마우스에 대한 상대위치 값을 넣어주면 된다
	while (obj){
		point.x += obj.offsetLeft;
		point.y += obj.offsetTop;
		obj = obj.offsetParent;
	}
	return point;
}


/*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//
//		Hit & Hot , Execellent 창 수정
//		ChangeHitHot 
//		1: 0002, 2: 0037, 3: 0053, 4: 0035, 5: 0030
//		ChangeExcellent
//		1: 0003, 2: 0040, 3: 0041, 4: 0042, 5: 0049, 6: 0038
//
//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

function ChangeHitExcellent()
{
	var host = location.href.toLowerCase();
	if (host.indexOf("http://www.ic114.com/ajaxwww/theme/001/default.aspx") != -1 || host.indexOf("http://test.ic114.com/ajaxwww/theme/001/default.aspx") != -1 || host.indexOf("http://localhost/ajaxwww/theme/001/default.aspx") != -1 )
	{
		// data 
		var dataHit = new Array(); 
		dataHit[0] = '0002'; 
		dataHit[1] = '0030'; 
		dataHit[2] = '0035'; 
		dataHit[3] = '0052'; 
		dataHit[4] = '0053'; 
		var arrHit = dataHit.shuffle(); 

		var dataExcellent = new Array(); 
		dataExcellent[0] = '0003'; 
		dataExcellent[1] = '0038'; 
		dataExcellent[2] = '0040'; 
		dataExcellent[3] = '0041'; 
//		dataExcellent[4] = '0042'; 
//		dataExcellent[5] = '0049'; 
		var arrExcellent = dataExcellent.shuffle(); 

		ChangeHitHot(arrHit[0])
		ChangeExcellent(arrExcellent[0])
	
	}
}

//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//
//		SiteBase.master 에 필요한 function
//
//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//***********************************************************************************************************************************************************//

	function GoToOrder(){
		var objPrice = _GetElementById('CartResult06');
		//alert(objPrice.outerHTML);
		if(-1 != objPrice.outerHTML.indexOf(">0.00"))  
		{
			alert('주문할 상품이 없습니다!!');
		}
		else
		{
			location.replace('/AJAXWWW/SITE/MY/00W1.ASPX')
		}
	}

	function ChangeHitHot(divNum){
		//return;
		var div1 = _GetElementById('divHitHot1');
		var div2 = _GetElementById('divHitHot2');
		var div3 = _GetElementById('divHitHot3');
		var div4 = _GetElementById('divHitHot4');
		var div5 = _GetElementById('divHitHot5');

		div1.style.display = 'none';
		div2.style.display = 'none';
		div3.style.display = 'none';
		div4.style.display = 'none';
		div5.style.display = 'none';

		var link1 = _GetElementById('Hit0002');
		var link2 = _GetElementById('Hit0030');
		var link3 = _GetElementById('Hit0035');
		var link4 = _GetElementById('Hit0052');
		var link5 = _GetElementById('Hit0053');

		link1.className = "off";
		link2.className = "off";
		link3.className = "off";
		link4.className = "off";
		link5.className = "off";

		var hitLink = document.getElementById('Hit' + divNum);
		hitLink.className = "on";

/*
		link1.background="/ajaxwww/THEME/001/IMG/Table/HitHot/Off.png"
		link2.background="/ajaxwww/THEME/001/IMG/Table/HitHot/Off.png"
		link3.background="/ajaxwww/THEME/001/IMG/Table/HitHot/Off.png"
		link4.background="/ajaxwww/THEME/001/IMG/Table/HitHot/Off.png"
		link5.background="/ajaxwww/THEME/001/IMG/Table/HitHot/Off.png"
*/
		
		switch(divNum){
			case '0002':
				div1.style.display = 'block';
//				link1.background="/ajaxwww/THEME/001/IMG/Table/HitHot/On.png"
			break;
			case '0030':
				div2.style.display = 'block';
//				link2.background="/ajaxwww/THEME/001/IMG/Table/HitHot/On.png"
			break;
			case '0035':
				div3.style.display = 'block';
//				link3.background="/ajaxwww/THEME/001/IMG/Table/HitHot/On.png"
			break;
			case '0052':
				div4.style.display = 'block';
//				link4.background="/ajaxwww/THEME/001/IMG/Table/HitHot/On.png"
			break;
			case '0053':
				div5.style.display = 'block';
//				link5.background="/ajaxwww/THEME/001/IMG/Table/HitHot/On.png"
			break;
			default:
				div1.style.display = 'block';
//				link1.background="/ajaxwww/THEME/001/IMG/Table/HitHot/On.png"
			break;
		}
	}
	function ChangeExcellent(divNum){
		var div1 = _GetElementById('divExcellent1');
		var div2 = _GetElementById('divExcellent2');
		var div3 = _GetElementById('divExcellent3');
		var div4 = _GetElementById('divExcellent4');
		var div5 = _GetElementById('divExcellent5');
		var div6 = _GetElementById('divExcellent6');
/*
		var link1 = _GetElementById('excellent0003');
		var link2 = _GetElementById('excellent0040');
		var link3 = _GetElementById('excellent0041');
		var link4 = _GetElementById('excellent0042');
		var link5 = _GetElementById('excellent0049');
*/		
		div1.style.display = 'none';
		div2.style.display = 'none';
		div3.style.display = 'none';
		div4.style.display = 'none';
		div5.style.display = 'none';
		div6.style.display = 'none';
		
		var link1 = _GetElementById('Excellent0003');
		var link2 = _GetElementById('Excellent0038');
		var link3 = _GetElementById('Excellent0040');
		var link4 = _GetElementById('Excellent0041');
		var link5 = _GetElementById('Excellent0042');
		var link6 = _GetElementById('Excellent0049');

		link1.className = "off";
		link2.className = "off";
		link3.className = "off";
		link4.className = "off";
		link5.className = "off";
		link6.className = "off";

		var excellentLink = document.getElementById('Excellent' + divNum);
		excellentLink.className = "on";
		
/*
		link1.background="/ajaxwww/THEME/001/IMG/Table/Excellents/Off.png"
		link2.background="/ajaxwww/THEME/001/IMG/Table/Excellents/Off.png"
		link3.background="/ajaxwww/THEME/001/IMG/Table/Excellents/Off.png"
		link4.background="/ajaxwww/THEME/001/IMG/Table/Excellents/Off.png"
		link5.background="/ajaxwww/THEME/001/IMG/Table/Excellents/Off.png"
*/
		switch(divNum){
			case '0003':
				div1.style.display = 'block';	
//				link1.background="/ajaxwww/THEME/001/IMG/Table/Excellents/On.png"
			break;
			case '0038':
				div2.style.display = 'block';
//				link2.background="/ajaxwww/THEME/001/IMG/Table/Excellents/On.png"
			break;
			case '0040':
				div3.style.display = 'block';
//				link3.background="/ajaxwww/THEME/001/IMG/Table/Excellents/On.png"
			break;
			case '0041':
				div4.style.display = 'block';
//				link4.background="/ajaxwww/THEME/001/IMG/Table/Excellents/On.png"
			break;
			case '0042':
				div5.style.display = 'block';
//				link5.background="/ajaxwww/THEME/001/IMG/Table/Excellents/On.png"
			break;
			case '0049':
				div6.style.display = 'block';
//				link5.background="/ajaxwww/THEME/001/IMG/Table/Excellents/On.png"
			break;
			default:
				div1.style.display = 'block';
//				link1.background="/ajaxwww/THEME/001/IMG/Table/Excellents/On.png"
			break;
		}
	}

	function ChangePlanRight(num)
	{
		var host = location.href.toLowerCase();
		
		if (host.indexOf("http://www.ic114.com/ajaxwww/theme/001/default.aspx") != -1 || host.indexOf("http://test.ic114.com/ajaxwww/theme/001/default.aspx") != -1 || host.indexOf("http://localhost/ajaxwww/theme/001/default.aspx") != -1 )
		{
			if(null == num)
			{
				var dataPlanRight = new Array(); 
				dataPlanRight[0] = 1; 
				dataPlanRight[1] = 2; 
				dataPlanRight[2] = 3; 
				var arrPlanRight = dataPlanRight.shuffle(); 
				num = arrPlanRight[0];
			}

			var objImg1 = _GetElementById('PlanRightBottom1');
			var objImg2 = _GetElementById('PlanRightBottom2');
			var objImg3 = _GetElementById('PlanRightBottom3');
			
			switch(num)
			{
				case 1:
					objImg1.style.display = 'block';
					objImg2.style.display = 'none';
					objImg3.style.display = 'none';
				break;
				
				case 2:
					objImg1.style.display = 'none';
					objImg2.style.display = 'block';
					objImg3.style.display = 'none';
				break;
				case 3:
					objImg1.style.display = 'none';
					objImg2.style.display = 'none';
					objImg3.style.display = 'block';
				break;
			}
		}
	}

	function ChangeBigEvent(num)
	{
		var host = location.href.toLowerCase();
		
		if (host.indexOf("http://www.ic114.com/ajaxwww/theme/001/default.aspx") != -1 || host.indexOf("http://test.ic114.com/ajaxwww/theme/001/default.aspx") != -1 || host.indexOf("http://localhost/ajaxwww/theme/001/default.aspx") != -1 )
		{
			if(null == num)
			{
				var dataBigEvent = new Array(); 
				dataBigEvent[0] = 1; 
				dataBigEvent[1] = 2; 
				dataBigEvent[2] = 3; 
				var arrBigEvent = dataBigEvent.shuffle(); 
				num = arrBigEvent[0];
			}

			var objImg1 = _GetElementById('BigEvent1');
			var objImg2 = _GetElementById('BigEvent2');
			var objImg3 = _GetElementById('BigEvent3');
			
			switch(num)
			{
				case 1:
					objImg1.style.display = 'block';
					objImg2.style.display = 'none';
					objImg3.style.display = 'none';
				break;
				
				case 2:
					objImg1.style.display = 'none';
					objImg2.style.display = 'block';
					objImg3.style.display = 'none';
				break;
				case 3:
					objImg1.style.display = 'none';
					objImg2.style.display = 'none';
					objImg3.style.display = 'block';
				break;
			}
		}
	}





function CheckNum(objTxt){
	var strTemp = objTxt.value.substring(objTxt.value.length - 1, objTxt.value.length );
	if( !regNum.test(strTemp) ){
		objTxt.value = '';
		alert("숫자만입력하세요");
		return false;
	}      
	return true;
}
function CheckEmail(strEmail){
	if( !regEmail.test(strEmail)){
		alert("Email 주소 형식이 틀립니다. [예] yourmail@server.domain");
		return false;
	}      
	return true;
}
//TextBox의 Block지정 보통 onFocus일대 사용 
function TextBoxSelect(obj){
	obj.select();
}
// TextBox의 Focus()
function TextBoxFocus(obj){
	obj.focus();
}
// TextBox의 글내용을 지울때 사용
function TextBoxFocusNClear(strObj){
	var obj = _GetElementById(strObj);
	obj.value = '';
	obj.focus();
}

// 여기서 부터 3자리마다 콤마를 찍어 준다.
function StringFormatMoney(obj){ 
	var txtNumber;
	if (obj =='[object]')  
		txtNumber= obj.value;
	else
		txtNumber= obj;
	txtNumber = String(txtNumber); 
//	if (isNaN(filterNum(txtNumber))){
//		if (obj =='[object]')  
//			obj.value = ""; 
//		return;
//	}
	var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])');
	var arrNumber = txtNumber.split('.'); 
	var result;
	arrNumber[0] += '.';
	do{
		arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2');
	} while (rxSplit.test(arrNumber[0]));
	if (arrNumber.length > 1) 
		result = arrNumber.join(''); 
	else
		result = arrNumber[0].split('.')[0]; 
	if (obj =='[object]') 
		obj.value = result;
	return result; 
}
//,없애기
function StringFormatMoneyClear(str){
    re = /^\$|,/g;
    str = String(str);
    return str.replace(re, "");
} 
function GoTo(strCase){
	switch(strCase){
		case 'BASKET':
			parent.location.href = '/AJAXWWW/SITE/MY/00L0.ASPX'
			break;
		case 'ORDER':
			parent.location.href = '/AJAXWWW/SITE/MY/00W1.ASPX'
			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 ""; 
}

function OpenPopUp(cookieName, nameWindow, url, intLeft, intTop, intWidth, intHeight){
	if (getCookie(cookieName) != "done" ){ 
		var attributes = "toolbar=no, menubar=no, scrollbars=no, resizable=no, status=no, location=no, directories=no, left="+intLeft+", top="+intTop+", width="+intWidth+", height="+intHeight
		open (url, nameWindow, attributes);
	}
}
function OpenPopUpCenter(url, windowName, intWidth, intHeight, etcParam){
    var objNewWin;
    var x = intWidth;
    var y = intHeight;
    try{
        var sy = window.screen.height / 2 - y / 2 - 70;
        if (etcParam == 'fix') {
            etcParam = "toolbar=no; location=no; directories=no; status=yes; menubar=no; scrollbars=yes; resizable=no; help=no; edge=sunken";
            var sy = window.screen.height / 2 - y / 2 - 40;
        }
        
        var sx = window.screen.width  / 2 - x / 2;

        if (sy < 0 ) {
            sy = 0;
        }        

        var sz = "; top=" + sy + "; left=" + sx;

        if (windowName == "newWindow") {
            windowName = new String(Math.round(Math.random() * 100000));
        } 

        var vRetval = window.open(url, windowName, etcParam + "; width=" + x + "px; height=" + y + "px" + sz);
        
        return vRetval;
    }
    catch(ex){
        alert('창 오픈 중 에러발생 [ ' + ex.message + ' ][ ' + ex.name + ' ][ ' + ex.number + ' ][ ' + ex.description + ' ]');
        return 'err';
    }




}
function OpenPopUpScroll(cookieName, nameWindow, url, intLeft, intTop, intWidth, intHeight, scroll){
//	alert(cookieName)
// scroll value == 'yes' or 'no'
	if (getCookie(cookieName) != "done" ){ 
		var attributes = "toolbar=no, menubar=no, scrollbars="+scroll+", resizable=no, status=no, location=no, directories=no, left="+intLeft+", top="+intTop+", width="+intWidth+", height="+intHeight
		open (url, nameWindow, attributes);
	}
}

function OpenPopUpModal(cookieName, nameWindow, url, intLeft, intTop, intWidth, intHeight){
	if (getCookie(cookieName) != "done" ){ 
		var attributes = "toolbar:no; menubar:no; scrollbars:no; resizable:no; location:no; directories:no; scroll:1; help:1; status:0; dialogWidth : " + intWidth + "px; dialogHeight:" + intHeight + "px;";
		alert(attributes);
		window.showModalDialog(url, nameWindow, attributes);
	}
}

function OpenModal(fileName,windowName,theWidth,theHeight, etcParam) {
    var objNewWin;
    var x = theWidth;
    var y = theHeight;
    try{
        
        var sy = window.screen.height / 2 - y / 2 - 70;
        if (etcParam == 'fix') {
            etcParam = "toolbar:no; location:no; directories:no; status:yes; menubar:no; scrollbars:yes; resizable:no; help:no; edge:sunken";
            var sy = window.screen.height / 2 - y / 2 - 40;
        }

        var sx = window.screen.width  / 2 - x / 2;

        if (sy < 0 ) {
            sy = 0;
        }
        
        var sz = "; top=" + sy + "; left=" + sx;

        if (windowName == "newWindow") {
            windowName = new String(Math.round(Math.random() * 100000));
        } 

        var vRetval = window.showModalDialog(fileName, windowName, etcParam + "; dialogWidth:" + x + "px; dialogHeight:" + y + "px" + sz);
        
        return vRetval;
    }
    catch(ex){
        alert('창 오픈 중 에러발생 [ ' + ex.message + ' ][ ' + ex.name + ' ][ ' + ex.number + ' ][ ' + ex.description + ' ]');
        return 'err';
    }
}


//***********************************************************************************************************************************************************//

	function OpenUserSearch(){
		window.open('/UserSearch/Main.aspx','','toolbar=no, location=no, menubar=no, directories=no, status=yes, scrollbars=yes, resizable=yes, top=0, left=0 , width=1024, height=700');
	}


	function preload(){
	//			document.Form1.max.Click();
	//			document.oncontextmenu = ReturnFalse; //오른쪽 마우스 클릭 금지
	}
	
	function ReturnFalse(){
		return false;
	}
	
	function ImgChange(imgObj, imgSrc){
		var obj = _GetElementById(imgObj);
		obj.src = imgSrc;
	}
	
	//매장보기 //
	function RealView(SelectNum) {
		open('/AJAXWWW/SITE/ZZ/00V0.aspx?SelectNum='+SelectNum,'RealView','width=693,height=650,top=50,left=200');
	}

	function fn_google(){
		if(document.all.txt_google.value == ''){
			alert('검색어를 입력하세요');
			document.all.txt_google.focus();
			return;
		}
		else{
//			window.open("http://www.google.co.kr/search?hl=ko&q="+document.all.txt_google.value,"") ;
			window.open("http://www.google.co.kr/search?hl=ko&newwindow=1&q=site%3Awww.ic114.com+"+document.all.txt_google.value,"") ;
			//onload="MM_preloadImages('/COMMON/IMAGES/shop1over_02.gif','/COMMON/IMAGES/shop1over_03.gif','/COMMON/IMAGES/shop1over_04.gif','/COMMON/IMAGES/shop1over_05.gif')"
		}
	}






//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//
//		CM_TOP.ascx 에 필요한 function
//
//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//***********************************************************************************************************************************************************//
	function RedirectSearchPackage(strSearchValue, objCheckBox, objTextBox, objTextPackage){
		var objTxt = _GetElementById(objTextBox);
		var objPackage = _GetElementById(objTextPackage);
		objTxt.value = objPackage.value;
		RedirectPackageList(strSearchValue, objCheckBox, objTextBox)
	}
	function RedirectSearch(strSearchValue, objCheckBox, objTextBox){
		var objChk = _GetElementById(objCheckBox);
		var objTxt = _GetElementById(objTextBox);
		var strPathAndQuery = '/AJAXWWW/SITE/SC/00L0.aspx?sv=';
		if(2 > objTxt.value.length){
			alert("검색어는 2자이상 입력하세요");
			return false;
		}
		if(objChk.checked == true){
			strSearchValue = strSearchValue + '^' + escape(objTxt.value.trim());
		}
		else{
			strSearchValue = escape(objTxt.value.trim());
		}
		strPathAndQuery = strPathAndQuery + strSearchValue.trim();
//		alert(strPathAndQuery)
		location.href(strPathAndQuery);
	}
	
	function RedirectSearchList(strSearchValue){
		var strPathAndQuery = '/AJAXWWW/SITE/SC/00L0.aspx?sv=';
		strPathAndQuery = strPathAndQuery + strSearchValue.trim();
		location.href(strPathAndQuery);
	}

	function RedirectPackageList(strTxt){
		var objTxt = _GetElementById(strTxt);
		var strPathAndQuery = '/AJAXWWW/SITE/SC/10L0.aspx?pv=';
		strPathAndQuery = strPathAndQuery + objTxt.value;
		location.href(strPathAndQuery);
	}

	
	function RedirectSearchCheckKeyCodePackage(strSearchValue, objCheckBox, objTextBox, objTextPackage){
		var tmp	= window.event.keyCode;
		if(tmp == 13){
			var objTxt = _GetElementById(objTextBox);
			var objPackage = _GetElementById(objTextPackage);
			objTxt.value = objPackage.value;
			RedirectSearchCheckKeyCode(strSearchValue, objCheckBox, objTextBox)
		}
	}
	function RedirectSearchCheckKeyCode(strSearchValue, objCheckBox, objTextBox){
		var tmp	= window.event.keyCode;
		if(tmp == 13){
			RedirectSearch(strSearchValue, objCheckBox, objTextBox);
			return false;
		}
		else
			return true;
	}

	function SpanChange(spanObj, imgSrc){
		alert(spanObj.style.backgroundImage)
		spanObj.style.backgroundImage = url(imgSrc);
	}



/*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//
//		카테고리
//
//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
		var TimeOut         = 300;
		var currentLayer    = null;
		var currentitem     = null;

		var currentLayerNum = 0;
		var noClose         = 0;
		var closeTimer      = null;

		// Open Hidden Layer
		function mopen(n)
		{
			ctg1Tab.className = "off";
			ctg2Tab.className = "off";
			ctg3Tab.className = "off";
			ctg4Tab.className = "off";
			ctg5Tab.className = "off";
			ctg6Tab.className = "off";
			ctg7Tab.className = "off";
			ctg8Tab.className = "off";
			ctg9Tab.className = "off";
			
			var l  = document.getElementById("ctg"+n+"List");
			var mm = document.getElementById("ctg"+n+"Tab");
		    mm.className = "on";
		    
			if(l)
			{
				mcancelclosetime();
				l.style.visibility='visible';

				if(currentLayer && (currentLayerNum != n))
					currentLayer.style.visibility='hidden';

				currentLayer = l;
				currentitem = mm;
				currentLayerNum = n;            
			}
			else if(currentLayer)
			{
				currentLayer.style.visibility='hidden';
				currentLayerNum = 0;
				currentitem = null;
				currentLayer = null;
			}
		}

		// Turn On Close Timer
		function mclosetime()
		{
			closeTimer = window.setTimeout(mclose, TimeOut);
		}

		// Cancel Close Timer
		function mcancelclosetime()
		{
			if(closeTimer)
			{
				window.clearTimeout(closeTimer);
				closeTimer = null;
			}
		}

		// Close Showed Layer
		function mclose()
		{
			ctg1Tab.className = "off";
			ctg2Tab.className = "off";
			ctg3Tab.className = "off";
			ctg4Tab.className = "off";
			ctg5Tab.className = "off";
			ctg6Tab.className = "off";
			ctg7Tab.className = "off";
			ctg8Tab.className = "off";
			ctg9Tab.className = "off";
		    
			if(currentLayer && noClose!=1)
			{
				currentLayer.style.visibility='hidden';
				currentLayerNum = 0;
				currentLayer = null;
				currentitem = null;
			}
			else
			{
				noClose = 0;
			}

			currentLayer = null;
			currentitem = null;
		}

		// Close Layer Then Click-out
		document.onclick = mclose; 

/*
function CloseLayer(index)
{
	if( index != 1 )
	{
		ctg1List.style.visibility="hidden";
		ctg1Tab.className = "off";
	}
	if( index != 2 )	{
		ctg2List.style.visibility="hidden";
		ctg2Tab.className = "off";
	}

	if( index != 3 )	{
		ctg3List.style.visibility="hidden";
		ctg3Tab.className = "off";
	}

	if( index != 4 )	{
		ctg4List.style.visibility="hidden";
		ctg4Tab.className = "off";
	}

	if( index != 5 )	{
		ctg5List.style.visibility="hidden";
		ctg5Tab.className = "off";
	}

	if( index != 6 )	{
		ctg6List.style.visibility="hidden";
		ctg6Tab.className = "off";
	}

	if( index != 7 )	{
		ctg7List.style.visibility="hidden";
		ctg7Tab.className = "off";
	}

	if( index != 8 )	{
		ctg8List.style.visibility="hidden";
		ctg8Tab.className = "off";
	}

	if( index != 9 )	{
		ctg9List.style.visibility="hidden";
		ctg9Tab.className = "off";
	}
}

function OpenLayer(index)
{
	if( index == 1 )
	{
		if("" == ctg1List.style.visibility || "hidden" == ctg1List.style.visibility)
		{
			ctg1List.style.visibility="visible";
			ctg1Tab.className = "on";
		}
	}
	if( index == 2 )
	{
		ctg2List.style.visibility="visible";
		ctg2Tab.className = "on";
	}
	if( index == 3 )	{
		ctg3List.style.visibility="visible";
		ctg3Tab.className = "on";
	}

	if( index == 4 )	{
		ctg4List.style.visibility="visible";
		ctg4Tab.className = "on";
	}

	if( index == 5 )	{
		ctg5List.style.visibility="visible";
		ctg5Tab.className = "on";
	}

	if( index == 6 )	{
		ctg6List.style.visibility="visible";
		ctg6Tab.className = "on";
	}

	if( index == 7 )	{
		ctg7List.style.visibility="visible";
		ctg7Tab.className = "on";
	}

	if( index == 8 )	{
		ctg8List.style.visibility="visible";
		ctg8Tab.className = "on";
	}

	if( index == 9 )	{
		ctg9List.style.visibility="visible";
		ctg9Tab.className = "on";
	}
}
*/

/*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//
//		구글 버튼
//
//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

function overThis(obj, act, parameter, tar) {
	obj.parentNode.style.borderColor = '#939393';
	obj.parentNode.parentNode.style.borderColor = '#939393';
	if (obj.parentNode.parentNode.parentNode.className.indexOf('collapse-left') > -1) {
		obj.parentNode.style.borderLeftColor = '#bbbbbb';
	}
	if (!obj.getAttribute('initiated')) {
		obj.onmouseout = function () {
			outThis(obj);
			upThis(obj);
		}
		obj.onmousedown = function () {
			downThis(obj);
		}
		obj.onmouseup = function () {
			upThis(obj);
		}
		obj.onclick = function () {
			clickThis(obj, act, parameter, tar);
		}
		obj.setAttribute('initiated','true');
	}
};

function outThis (obj) {
	obj.parentNode.style.borderColor = '#bbbbbb';
	obj.parentNode.parentNode.style.borderColor = '#bbbbbb';
};

function downThis (obj) {
	getElementsByClassName(obj,'div','goog-imageless-button-top-shadow')[0].style.backgroundColor = '#e3e3e3';
	obj.parentNode.style.backgroundColor = '#f9f9f9';
	obj.focus();
};

function upThis(obj) {
	getElementsByClassName(obj,'div','goog-imageless-button-top-shadow')[0].style.backgroundColor = '#f9f9f9';
	obj.parentNode.style.backgroundColor = '#e3e3e3';
};

function clickThis(obj, act, parameter, tar) {
	if (!act) {
		return;
	}
	else {
		if (typeof(act) == 'function') {
			act(obj, parameter);
		}
		else {
			if (tar) {
				if (tar.toLowerCase() == '_blank') {
					window.open(act);
				} else {
					try {
						eval(tar).location.href = act;
					} catch(e) {window.open(act);}
				}
			} else {
				document.location.href = act;
			}
		}
	}
};

function getElementsByClassName(oElm, strTagName, strClassName){
	var arrElements = (strTagName =="*" && oElm.all)? oElm.all :
	oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	strClassName = strClassName.replace(/\-/g,"\\-");
	var oRegExp = new RegExp("(^|\\s)" + strClassName +"(\\s|$)");
	var oElement;
	for(var i=0; i<arrElements.length; i++){
		oElement = arrElements[i];
		if(oRegExp.test(oElement.className)){
			arrReturnElements.push(oElement);
		}
	}
	return (arrReturnElements)
};
// 필수 함수들 끝

function testFunc(srcObj, parameter) {
	if (parameter) { alert(parameter); }
	else {
		var w = srcObj.offsetWidth;
		alert('테스팅...\n\n버튼 길이는 대략 '+w + 'px');
	}
};



//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//
//		SCROLL MENU 에 필요한 function
//
//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//***********************************************************************************************************************************************************//
/*
var isMSIE		= 0;
var nVersion	= 3;
var isLoaded	= 1;
var menuLoaded	= 1;
var menuTop	=  140;
var scrollTop	=  100;
function ScrollSetup () {
    nVersion = parseInt (navigator.appVersion);
    if (navigator.appName == "Microsoft Internet Explorer")   {
        isMSIE = 1;
        if (navigator.userAgent.indexOf ("MSIE 5") != -1){
            nVersion = 5;
        }
    }  else  {
       isMSIE = 0;
        if (nVersion >= 4) {
            window.captureEvents (Event.MOUSEMOVE);
        }
    }

    if (nVersion >= 4)   {
        AdCornerMove();
    }
}

function AdCornerMove ()   {
    if (isLoaded == 0)   {
        return;
    }
	var totalWidth = 820;
	var margin = 0;
    if (isMSIE) {
        if(document.body.clientWidth > totalWidth) {
			margin = (document.body.clientWidth - (totalWidth))/2;
		}
		else {
			margin = 72;
		}
        MenuQuick.style.pixelLeft = totalWidth + margin;
		MenuQuick.style.display	= "block";
// 고정 leftbanner
//		leftbanner.style.pixelLeft =  margin - 55;
//		leftbanner.style.display = "block";


	}
}
function ScrollTop(){
var a=document.body.scrollTop+scrollTop
	MenuQuick.style.top = a
}
window.onresize = AdCornerMove;
window.onscroll = ScrollTop;
*/


/*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■//
//
//		화면 블럭으로 막기 해지
//
//■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

//var screenBlock = _GetElementById('ScreenBlock');
//screenBlock.style.display = "none";