//<![CDATA[
String.prototype.trim = function() {
	return this.replace(/(^\s*)|(\s*$)/gi, "");
}

//ÅÇ¸Þ´º

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";
		}
	}
}


//tab
var temp=1;

    function ChangeLayer(n) {
    var LIobj = document.getElementById("TAB_menu").getElementsByTagName("li");
    for(var i = 1; i <= LIobj.length ; i++) {
      img = document.getElementById('image'+i);
      if ( n == i ) {
        img.src = img.src.replace(i+".gif", i+"_on.gif");
      } else {
        img.src = img.src.replace(i+"_on.gif", i+".gif");
      }
    }
  }

  function ClickLayer(n){
  var LIobj = document.getElementById("TAB_menu").getElementsByTagName("li");
    for(var i = 1; i <= 4 ; i++) {
      obj = document.getElementById('tabimage'+i);
      img = document.getElementById('image'+i);
      if ( n == i ) {
        temp = n;
        obj.style.display = "block";
        img.src = img.src.replace(i+".gif", i+"_on.gif");
      } else {
    	  if(obj != null){
	        obj.style.display = "none";
	        img.src = img.src.replace(i+"_on.gif", i+".gif");
    	  }
      }
    }
  }



//·¹ÀÌ¾î ÆË¾÷

function boxOpen(Objid) { 
	var Obj = document.getElementById(Objid); 
	if (Obj.style.display == "none") { 
	Obj.style.display = ""; 
	} else { 
	Obj.style.display = "none"; 
	} 
} 


function boxClose(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('http://www.digitalquick.co.kr/fasoo_new/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('http://www.wrapsody.co.kr/fasoo/wrapsody_effect.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 popBrosure(mdiv, lang, login, Image, email) {
	if (!lang) lang = 'kr';
	var popPage;
	if (login != '') {
		popPage = '/product/brosure.asp';
	}
	else {
		popPage = '/etc/pop_policy.asp';
	}
	winName =  window.open(popPage+'?rpage=brosure&mdiv='+mdiv+'&lang='+lang+'&image='+Image+'&email='+email,'_member','top=50%,left=50%, height=570,width=807,marginwidth=0,marginheight=0,resizable=no,scrollbars=no,toolbar=no,menubar=no,status=no,location=no');
   if(winName) winName.focus();
}

function drmInquiry(mdiv, lang, login, email) {
	if (!lang) lang = 'kr';
	var popPage;
	if (login != '') {
		popPage = '/product/inquiry.asp';
	}
	else {
		popPage = '/etc/pop_policy.asp';
	}
	winName =  window.open(popPage+'?rpage=inquiry&mdiv='+mdiv+'&lang='+lang+'&email='+email,'_member','top=50%,left=50%, height=570,width=807,marginwidth=0,marginheight=0,resizable=no,scrollbars=no,toolbar=no,menubar=no,status=no,location=no');
   if(winName) winName.focus();
}

function popInquiry(){
	winName =  window.open('inquiry_fast.asp','_member','top=50%,left=50%, height=570,width=807,marginwidth=0,marginheight=0,resizable=no,scrollbars=no,toolbar=no,menubar=no,status=no,location=no');
   if(winName) winName.focus();
}

function popInquiry02(){
	winName =  window.open('inquiry_scs.asp','_member','top=50%,left=50%, height=470,width=807,marginwidth=0,marginheight=0,resizable=no,scrollbars=no,toolbar=no,menubar=no,status=no,location=no');
   if(winName) winName.focus();
}


function sfinder(){
	winName =  window.open('/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();
}



//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 = "";
} else { 
Obj.style.display = "none"; 
document.getElementById('openBtn').style.display = "none"
document.getElementById('closeBtn').style.display = ""
	//$(window).scrollTop(0);
	} 
} 

function ToggleDiv2(Objid) 
{ 
var Obj = document.getElementById(Objid); 
if (Obj.style.display == "") { 
Obj.style.display = "none"; 
} else { 
Obj.style.display = ""; 
document.getElementById('openBtn').style.display = ""
document.getElementById('closeBtn').style.display = "none"
	$(window).scrollTop($(document).height());
} 
} 

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 premier(n) { 
 for(var i = 1; i < 4; i++) { 
  obj = document.getElementById('premier'+i); 
    if ( n == i ) { 
    obj.style.display = "block"; 
    } else { 
    obj.style.display = "none"; 
	document.getElementById('premier4').style.display = "none";
    } 
  } 
 } 

//ÀÌ¸ÞÀÏ Çü½Ä Ã¼Å©
function checkMail(email1, email2) {
		var email = email1 + '@' + email2;
		var patten =/^[._a-zA-Z0-9-]+@[._a-zA-Z0-9-]+\.[a-zA-Z]+$/;

		if(!patten.test(email)) {			
			return false;
		}
		return true;
	}


function iframeResize(childHeight){
	if(!document.getElementById("cntFrame")) return false;
	gId = document.getElementById("cntFrame");
	gId.height = 20+childHeight+"px";
}



//]]>
