//<![CDATA[


//탭메뉴

function listView(n){
	obj_Btn1	= "tab_data01";
	obj_Btn2	= "tab_data02";
	obj_Btn3	= "tab_data03";
	obj_Btn4= "tab_data04";
	obj_Btn5	= "tab_data05";
	obj_Btn6	= "tab_data06";
	obj_Btn7	= "tab_data07";
	obj_Btn8	= "tab_data08";
	obj_Btn9	= "tab_data09";
	obj_Btn10= "tab_data10";
	for(var i = 1; i < 11; i++) {
		obj_lay = document.getElementById('subTab'+i);
		obj_eduImg = document.getElementById('tab'+i);
		if ( n == i ) {
			obj_lay.style.display = "";
			obj_eduImg.src = "../images/device/" + eval("obj_Btn" + i) + "on.gif";
		} else {
			obj_lay.style.display = "none";
			obj_eduImg.src = "../images/device/" + eval("obj_Btn" + i) + ".gif";
		}
	}
}


//마이페이지 캐시내역 조회

var Stemp=1;

    function SChangeLayer(n) {
    var sLIobj = document.getElementById("allmenu").getElementsByTagName("div");
    for(var i = 1; i <= sLIobj.length ; i++) {
      simg = document.getElementById('view'+i);     
    }
  }

  function SClickLayer(n){
  var sLIobj = document.getElementById("allmenu").getElementsByTagName("div");
    for(var i = 1; i <= sLIobj.length ; i++) {
      sobj = document.getElementById('date'+i);
      if ( n == i ) {
        Stemp = n;
        sobj.style.display = "none";      
      } else {
        sobj.style.display = "block";
      }
    }
  }


//레이어 팝업

function popOpen(Objid) { 
	var Obj = document.getElementById(Objid); 
	if (Obj.style.display == "none") { 
	Obj.style.display = ""; 
	} else { 
	Obj.style.display = "none"; 
	} 
} 


function popClose(Objid) { 
	var Obj = document.getElementById(Objid); 
	if (Obj.style.display == "") { 
	Obj.style.display = "none"; 
	} 
} 



//quick메뉴

QuickMenu = function(element, startPoint, endPoint) {
	var STATICMENU = element;
	var stmnScrollSpeed = 1;
	var stmnTimer;
	
	RefreshStaticMenu = function ()
	{
		var stmnStartPoint = parseInt(STATICMENU.style.top, 10);
		var stmnEndPoint = parseInt(document.documentElement.scrollTop, 10)+endPoint;
		var stmnRefreshTimer = 1;
		
		if ( stmnStartPoint != stmnEndPoint ) {
				stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 17 );
				STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount ) + "px";
				stmnRefreshTimer = stmnScrollSpeed;
		}
		stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
	}
	
	this.InitializeStaticMenu = function ()
	{
			STATICMENU.style.top = startPoint + "px";
			RefreshStaticMenu();
	}
}

// 우편번호 팝업

function popOpen(){
	winName =  window.open('pop_addNum.html','_member','top=20,left=20,height=150,width=430,marginwidth=0,marginheight=0,resizable=no,scrollbars=no,toolbar=no,menubar=no,status=no,location=no');
   if(winName) winName.focus();
}


// 제품 팝업

function popDigital(){
	winName =  window.open('digitalQuick_charge.asp','_member','top=20,left=20,height=700,width=807,marginwidth=0,marginheight=0,resizable=no,scrollbars=yes,toolbar=no,menubar=no,status=no,location=no');
   if(winName) winName.focus();
}

function popWrapsody(){
	winName =  window.open('wrapsody_buy.asp','_member','top=20,left=20,height=700,width=807,marginwidth=0,marginheight=0,resizable=no,scrollbars=yes,toolbar=no,menubar=no,status=no,location=no');
   if(winName) winName.focus();
}

function sfinder(){
	winName =  window.open('/en/product/solutionFinder.asp','_member','top=20,left=40%,height=650,width=880,marginwidth=0,marginheight=0,resizable=no,scrollbars=no,toolbar=no,menubar=no,status=no,location=no');
   if(winName) winName.focus();
}

function popBrochure(mdiv, lang, image){
	winName =  window.open('/en/product/brosure.asp?mdiv='+mdiv+'&lang='+lang+"&image="+image,'_member', 'top=50%,left=50%, height=530,width=807,marginwidth=0,marginheight=0,resizable=no,scrollbars=no,toolbar=no,menubar=no,status=no,location=no');
   if(winName) winName.focus();
}

function popInquiry(mdiv, lang){
	winName =  window.open('/en/product/inquiry.asp?mdiv='+mdiv+'&lang='+lang,'_member','top=50%,left=50%, height=530,width=807,marginwidth=0,marginheight=0,resizable=no,scrollbars=no,toolbar=no,menubar=no,status=no,location=no');
   if(winName) winName.focus();
}

// 팝업 크로스브라우징
function winResize() {
	var Dwidth = parseInt(document.body.scrollWidth);
	var Dheight = parseInt(document.body.scrollHeight);
	var divEl = document.createElement("div");

	divEl.style.position = "absolute";
	divEl.style.left = "0px";
	divEl.style.top = "0px";
	divEl.style.width = "100%";
	divEl.style.height = "100%";

	document.body.appendChild(divEl);
	//document.body.insertBefore(divEl, document.body.firstChild);
	//alert("Dwidth : " + Dwidth + ", divEl.offsetWidth : " + divEl.offsetWidth + ", 
	//Dheight : " + Dheight + ", divEl.offsetHeight : " + divEl.offsetHeight);

	if(navigator.userAgent.indexOf("MSIE") !=-1)
	window.resizeBy(Dwidth-divEl.offsetWidth, Dheight-divEl.offsetHeight + 0);
	else
	window.resizeBy(Dwidth-divEl.offsetWidth, Dheight-divEl.offsetHeight);
	 
	document.body.removeChild(divEl);
	} 

//over tab - imageType
function tabImgChange(id) {
	var tab = document.getElementById(id);
	var tabanchor = tab.getElementsByTagName('a');

	for (i=0; i<tabanchor.length; i++) {		
		if (tabanchor[i].childNodes[0].src.indexOf("_on.gif") != -1) {
			//return false;
		} else {
			tabanchor[i].onmouseover = tabanchor[i].onfocus = function () {				
				if (this.childNodes[0].src.indexOf("_on.gif") != -1) return false;
					this.childNodes[0].src = this.childNodes[0].src.replace('.gif', '_on.gif');
			}
			tabanchor[i].onmouseout = tabanchor[i].onblur = function () {
				this.childNodes[0].src = this.childNodes[0].src.replace('_on.gif', '.gif');
			}
		}
	}
}


function ToggleDiv(Objid) 
{ 
var Obj = document.getElementById(Objid); 
if (Obj.style.display == "none") { 
Obj.style.display = ""; 
	$(window).scrollTop($(document).height());
} else { 
Obj.style.display = "none";

} 
} 

function openBox(Objid) 
	{ 
		var Obj = document.getElementById(Objid); 
		if (Obj.style.display == "none") { 
		Obj.style.display = "";		
	} 
} 

function closeBox(Objid) 
	{ 
		var Obj = document.getElementById(Objid); 
		if (Obj.style.display == "") { 
		Obj.style.display = "none";		
	} 
} 


function iframeResize(childHeight){
	if(!document.getElementById("cntFrame")) return false;
	gId = document.getElementById("cntFrame");
	gId.height = childHeight+"px";
}
//]]>