
// png ÀÌ¹ÌÁö
function setPng24(obj) { 
    obj.width=obj.height=1; 
	obj.style.width = obj.width + "px"; 
    obj.style.height = obj.height + "px"; 
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
    obj.src='';  
    return ''; 
} 

// ±âº» ÇÃ·¡½Ã				
function flashObj(URL,SizeX,SizeY,LnkId,Frm,Flag) // quick
{
    document.write('            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
    document.write('                    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('                    width="'+SizeX+'" height="'+SizeY+'"  id="'+LnkId+'" align="middle">');
    document.write('            <param name="movie"     value="'+URL+'" />');
    document.write('            <param name="quality"   value="high" />');
    if ( Flag == null || Flag != 'N' )
    {
        document.write('        <param name="wmode"     value="transparent"/>');
    }
 document.write('   <param name="allowScriptAccess" value="always"/> ');
 document.write('   <param name="base" value="." />');
    document.write('            <embed base="." src="'+URL+'" quality="high" width="'+SizeX+'" height="'+SizeY+'"  align="middle" ');
  if ( Flag == null || Flag != 'N' )
    {
        document.write('         wmode="transparent" ');
    }
    document.write('             type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />');
    document.write('            </embed></object>');
 if ( Frm == 'Y' ) { // form ÅÂ±× µé¾î°¡´Â ÆäÀÌÁö¿¡ Àû¿ë
  eval("window." + LnkId + " = document.forms[0]."+ LnkId +"; ");
 } 
}

function flashObj2(URL,SizeX,SizeY,LnkId,Frm,Flag,vars) // quick
{
	if(vars==null) vars='';
	
    document.write('            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
    document.write('                    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('                    width="'+SizeX+'" height="'+SizeY+'"  id="'+LnkId+'" align="middle">');
    document.write('            <param name="movie"     value="'+URL+'" />');
    document.write('            <param name="quality"   value="high" />');
    document.write('			<param name="FlashVars"		Value="'+vars+'" /> ');
    if ( Flag == null || Flag != 'N' )
    {
        document.write('        <param name="wmode"     value="transparent"/>');
    }
 document.write('   <param name="allowScriptAccess" value="always"/> ');
 document.write('   <param name="base" value="." />');
    document.write('            <embed base="." src="'+URL+'" flashVars="'+vars+'" quality="high" width="'+SizeX+'" height="'+SizeY+'"  align="middle" ');
  if ( Flag == null || Flag != 'N' )
    {
        document.write('         wmode="transparent" ');
    }
    document.write('             type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />');
    document.write('            </embed></object>');
 if ( Frm == 'Y' ) { // form ÅÂ±× µé¾î°¡´Â ÆäÀÌÁö¿¡ Àû¿ë
  eval("window." + LnkId + " = document.forms[0]."+ LnkId +"; ");
 } 
}


//quick_top
function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
	obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	obj.style.position = "absolute";
	obj.style.zIndex= "10";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;

	if (typeof(window.pageYOffset) == "number") {
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return document.documentElement.scrollTop;
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 1000;
		}
	}

	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
			//pos = obj.getTop() + obj.getHeight() / 2 - 15;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 30)
}

//ÆË¾÷¶ç¿ì±â ½ºÅ©·Ñ ¾ø´Â °Å
function popsn(url,trgt,w,h) { 
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=no,resizable=no,copyhistory=no,toolbar=no,status=no'); 
}
//ÆË¾÷¶ç¿ì±â ½ºÅ©·Ñ ÀÖ´Â °Å
function popsy(url,trgt,w,h) { 
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=yes,resizable=no,copyhistory=no,toolbar=no,status=no,left=0,top=0'); 
}


//ÅÇ
function imgOver(imgName) {
	
	if (imgName.getElementsByTagName("img")[0] == null)
	{
		imgName.src = imgName.src.replace(".gif", "_on.gif");
		imgName.src = imgName.src.replace(".jpg", "_on.jpg");
	}else{
		imgName = imgName.getElementsByTagName("img")[0];
		imgName.src = imgName.src.replace(".gif", "_on.gif");
		imgName.src = imgName.src.replace(".jpg", "_on.jpg");
	}
}
function imgOut(imgName) {
	
	if (imgName.getElementsByTagName("img")[0] == null)
	{
		imgName.src = imgName.src.replace("_on.gif", ".gif");
		imgName.src = imgName.src.replace("_on.jpg", ".jpg");
	}else{
		imgName = imgName.getElementsByTagName("img")[0];
		imgName.src = imgName.src.replace("_on.gif", ".gif");
		imgName.src = imgName.src.replace("_on.jpg", ".jpg");
	}
}

function tabOver(tabName){	
	tabName = tabName.className = "on";
}
function tabOut(tabName){
	tabName = tabName.className = "";
}

function layer_events()
{
  if (document.layers) {
    document.layers['gnb_area'].captureEvents(Event.MOUSEOVER|Event.MOUSEOUT|Event.MOUSEUP);
    document.layers['gnb_area'].onmouseout = new Function("this.style.height='115'");
    document.layers['gnb_area'].onmouseover = new Function("this.style.height='260'");
  }
}
link_num = 0;
function link_open(n) {
	for(i = 0; i < document.getElementById("link_table").getElementsByTagName("tr").length; i++){		
		if (document.getElementById("link_table").getElementsByTagName("tr")[i].className == "none")
		{
			link_num = link_num+1;
		}
		
	}
	for(i = 1; i <= link_num; i++){		
		trname = document.getElementById("link"+i)			
		if (i == n)
		{
			if (trname.style.display == "")
			{
				trname.style.display = "block"
			}else{
				trname.style.display = ""
			}
		}		
	}	
}
function select(n) {	
	for(i = 1; i <= 2; i++){		
		select_div = document.getElementById("select"+i);
		if (n == null){
			select_div.style.display = "block"
		}else{
			if (i == n)
			{
				select_div.style.display = "block"
			}else{
				select_div.style.display = "none"
			}
		}
		
	}	
}

// layer tab
function tabChange(value) {
	for (var i=1; i<=5; i++) {
		if (i==value) {
			document.getElementById("tabimg0"+i).src="/images/utility/tab_layer0"+i+"_on.gif";
			document.getElementById("layerTab0"+i).style.display="";
		}
		else {
			document.getElementById("tabimg0"+i).src="/images/utility/tab_layer0"+i+".gif";
			document.getElementById("layerTab0"+i).style.display="none";
		}
	}
}

// faq style list
function faqList(value, total) {
	for (var j=1; j<=total; j++) {
		var ThisNum=document.getElementById("color"+j).children;
		if (j==value) {
			for (var i=0; i<ThisNum.length; i++) {
				document.getElementById("color"+j).children(i).style.color="#ef4130";
				document.getElementById("color"+j).children(i).style.borderBottom="0";
			}
			document.getElementById("view"+j).style.display="";
		}
		else {
			for (var i=0; i<ThisNum.length; i++) {
				document.getElementById("color"+j).children(i).style.color="#68696a";
				if (j==total) {
					document.getElementById("color"+j).children(i).style.borderBottom="0";
				}
				else {
					document.getElementById("color"+j).children(i).style.borderBottom="1px solid #dcdddf";
				}
			}
			document.getElementById("view"+j).style.display="none";
		}
	}
}

// faq
function faqLists(value, total) {
	for (var j=1; j<=total; j++) {
		var ThisNum=document.getElementById("color"+j).children;
		if (j==value) {
			for (var i=0; i<ThisNum.length; i++) {
				document.getElementById("color"+j).children(i).style.color="#2a2b2d";
				document.getElementById("color"+j).children(i).style.borderBottom="0";
			}
			document.getElementById("view"+j).style.display="";
		}
		else {
			for (var i=0; i<ThisNum.length; i++) {
				document.getElementById("color"+j).children(i).style.color="#68696a";
				if (j==total) {
					document.getElementById("color"+j).children(i).style.borderBottom="0";
				}
				else {
					document.getElementById("color"+j).children(i).style.borderBottom="1px solid #dcdddf";
				}
			}
			document.getElementById("view"+j).style.display="none";
		}
	}
}

//¼³¸³¿¬±¸±â°ü
function acompanyOn (value, This) {
	This.style.backgroundColor="#978344";
	document.getElementById("acompany"+value).style.display="";
}
function acompanyOut (value, This) {
	This.style.backgroundColor="";
	document.getElementById("acompany"+value).style.display="none";
}

//Ã£¾Æ¿À½Ã´Â ±æ
function cometo (value) {
	for (var i=1; i<=9; i++) {
		if (i==value) {
			document.getElementById("comebt0"+i).src="/images/university/intro/btn_come0"+i+"_on.gif";
			document.getElementById("come0"+i).style.display="";
		}
		else {
			document.getElementById("comebt0"+i).src="/images/university/intro/btn_come0"+i+".gif";
			document.getElementById("come0"+i).style.display="none";
		}
	}
}
function promotion (n) {
	for (var i=1; i<=2; i++) {
		if (i==n) {
			document.getElementById("num"+i).src="../images/club/0"+i+"_on.gif";
			document.getElementById("con"+i).style.display="block";
		}
		else {
			document.getElementById("num"+i).src="../images/club/0"+i+".gif";
			document.getElementById("con"+i).style.display="none";
		}
	}
}

//Á¶Á÷µµ
function depth (value) {
	for (var i=1; i<=8; i++) {
		if (value==i) {
			document.getElementById("depth0"+i).style.display="";
		}
		else {
			document.getElementById("depth0"+i).style.display="none";
		}
	}
	if (value=="1") {
		document.getElementById("layerPop").style.top="495px";
		document.getElementById("layerPop").style.left="297px";
	}
	else if (value=="2") {
		document.getElementById("layerPop").style.top="575px";
		document.getElementById("layerPop").style.left="297px";
	}
	else if (value=="3") {
		document.getElementById("layerPop").style.top="575px";
		document.getElementById("layerPop").style.left="382px";
	}
	else if (value=="4") {
		document.getElementById("layerPop").style.top="690px";
		document.getElementById("layerPop").style.left="226px";
	}
	else if (value=="5") {
		document.getElementById("layerPop").style.top="690px";
		document.getElementById("layerPop").style.left="336px";
	}
	else if (value=="6") {
		document.getElementById("layerPop").style.top="690px";
		document.getElementById("layerPop").style.left="439px";
	}
	else if (value=="7") {
		document.getElementById("layerPop").style.top="690px";
		document.getElementById("layerPop").style.left="439px";
	}
	else if (value=="8") {
		document.getElementById("layerPop").style.top="690px";
		document.getElementById("layerPop").style.left="439px";
	}
	document.getElementById("layerPop").style.display="";
}

function closePop() {
	document.getElementById("layerPop").style.display="none";
}



function goLinkUrl(code) {  //alert(code); return false;
	//alert(code)	;
	//return;
	//½Ç¼­¹ö
	//var linkUrl="http://www.lexus.co.kr";

	//·ÎÄÃ
	var linkUrl="";
	var tar = "";
	
	if (code == "MAIN"){ //¸ÞÀÎ
		linkUrl += "/main.asp";
		
		//linkUrl += "/mainct200h.asp?code=L0100&pop=y";
		//linkUrl += "/index.asp";
	}else if(
		code == "L0100" || code == "L0101" || code == "L0102" || code == "L0103" || code == "L0104" || code == "L0105" || 
		code == "L0200" || code == "L0201" || code == "L0202" || code == "L0203" || code == "L0204" || code == "L0205" || 
		code == "G0100" || code == "G0101" || code == "G0102" || code == "G0103" || code == "G0104" || code == "G0105" || 
		code == "G0200" || code == "G0201" || code == "G0202" || code == "G0203" || code == "G0204" || code == "G0205" || 
		code == "E0100" || code == "E0101" || code == "E0102" || code == "E0103" || code == "E0104" || code == "E0105" || 
		code == "I0100" || code == "I0101" || code == "I0102" || code == "I0103" || code == "I0104" || code == "I0105" || 
		code == "I0200" || code == "I0201" || code == "I0202" || code == "I0203" || code == "I0204" || code == "I0205" || 
		code == "I0300" || code == "I0301" || code == "I0302" || code == "I0303" || code == "I0304" || code == "I0305" ||
		code == "R0100" || code == "R0101" || code == "R0102" || code == "R0103" || code == "R0104" || code == "R0105" || 
		code == "R0200" || code == "R0201" || code == "R0202" || code == "R0203" || code == "R0204" || code == "R0205" ||
		code == "T0100" || code == "T0101" || code == "T0102" || code == "T0103" || code == "T0104" || code == "T0105" 
		){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";
	}else if(
		code == "SL0100" || code == "SL0101" || code == "SL0102" || code == "SL0103" || code == "SL0104" || code == "SL0105" || 
		code == "SL0200" || code == "SL0201" || code == "SL0202" || code == "SL0203" || code == "SL0204" || code == "SL0205" || 
		code == "SG0100" || code == "SG0101" || code == "SG0102" || code == "SG0103" || code == "SG0104" || code == "SG0105" || 
		code == "SG0200" || code == "SG0201" || code == "SG0202" || code == "SG0203" || code == "SG0204" || code == "SG0205" || 
		code == "SE0100" || code == "SE0101" || code == "SE0102" || code == "SE0103" || code == "SE0104" || code == "SE0105" || 
		code == "SI0100" || code == "SI0101" || code == "SI0102" || code == "SI0103" || code == "SI0104" || code == "SI0105" || 
		code == "SI0200" || code == "SI0201" || code == "SI0202" || code == "SI0203" || code == "SI0204" || code == "SI0205" || 
		code == "SI0300" || code == "SI0301" || code == "SI0302" || code == "SI0303" || code == "SI0304" || code == "SI0305" ||
		code == "SR0100" || code == "SR0101" || code == "SR0102" || code == "SR0103" || code == "SR0104" || code == "SR0105" || 
		code == "SR0200" || code == "SR0201" || code == "SR0202" || code == "SR0203" || code == "SR0204" || code == "SR0205" ||
		code == "ST0100" || code == "ST0101" || code == "ST0102" || code == "ST0103" || code == "ST0104" || code == "ST0105" 
		){			
		var ccode;
		ccode = code.substring(1,6);		
		linkUrl += "/main.asp?code="+ccode+"&pop=n"; 	//2011.11.21	
	}else if(code == "HYBRID"){ 					//ÇÏÀÌºê¸®µå
		linkUrl += "/hybrid/hybrid.asp";	
	}else if(code == "HYBRIDMAIN"){ 				//ÇÏÀÌºê¸®µå ¸ÞÀÎ 11.11.14
		linkUrl += "/hybrid_main.asp";				//2011.11.21
	}else if(code == "DIFFER"){
		window.open('http://difference.lexus.co.kr/flash.asp','','fullscreen,scrollbars')
		return; 
	}else if(code == "DIF000"){ //·º¼­½º ÀÌº¥Æ®
  	alert('ÀÌº¥Æ®°¡ Á¾·áµÇ¾ú½À´Ï´Ù.');
		//var popwin = window.open("/popup/20111012/popup.html","111012","fullscreen,scrollbars");
  	//popwin.focus();		
		//location.href="/event/trylexushybrid/ex_apply_main.asp";
		return; 
	}else if(code == "M0000"){ //Å¬·´
		linkUrl += "/club/club_main.asp";
	}else if(code == "M0101"){
		linkUrl += "/club/owner_main.asp";
	}else if(code == "M0102"){
		linkUrl += "/club/owner_school_list.asp";
	}else if(code == "M0103"){
		linkUrl += "/club/owner_promotion_list.asp?Gb=I";
	}else if(code == "M0104"){
		linkUrl += "/club/owner_newsletter.asp";			
	}else if(code == "M0105"){
		linkUrl += "/club/owner_contact.asp";			
	}else if(code == "M0106" || code == "M0202"){
		popup_new();
		return;
	}else if(code == "M0201"){
		linkUrl += "/club/friend_press_list.asp";			
	}else if(code == "S0101"){  //SERVICE
		linkUrl += "/service/center.asp";	
	}else if(code == "S0102"){
		linkUrl += "/service/program.asp";	
	}else if(code == "S0103"){
		linkUrl += "/service/campaign.asp";	
	}else if(code == "S0104"){
		linkUrl += "/service/parts.asp";	
	}else if(code == "C0101"){  //COMPANY
		linkUrl += "/company/story.asp";	
	}else if(code == "C0102"){
		linkUrl += "/company/press_list.asp";	
	}else if(code == "C0103"){
		//linkUrl += "/company/magazine.asp";			
		//window.open('/lexusmagazine/200911.asp','','fullscreen,scrollbars')
		//e¸Å°ÅÁø** window.open('/lexusmagazine/201004.asp','','fullscreen,scrollbars');
		window.open('/lexusmagazine/201110.asp','','fullscreen,scrollbars');
		return; 
	}else if(code == "C0104"){
		linkUrl += "/company/contribution.asp";	
	}else if(code == "C0105"){
		window.open("/company/recruit_write.asp",'','location=no,directories=no,resizable=no,status=no,toolbar=no,menubar=no,left=100,top=100,width=730,height=430,scrollbars=yes');
		return; 
	}else if(code == "ALLMODEL"){
		document.getElementById('ALLframe').src = '/estimate/allModel.asp';
		document.getElementById('allmodel').style.display = '';
		document.getElementById('estimate').style.display = 'none';
		document.getElementById('brochure').style.display = 'none';			
		return;
	}else if(code == "BROCHURE"){		
		document.getElementById('BRframe').src = '/brochure/brochure.asp';		
		document.getElementById('estimate').style.display = 'none';
		document.getElementById('brochure').style.display = '';
		document.getElementById('allmodel').style.display = 'none';			
		return;
	}else if(code == "ESTIMATE"){  //°ßÀû³»±â		
		//alert("ÇØ´ç °ßÀûÀº ÁØºñ ÁßÀÔ´Ï´Ù.");
		document.getElementById('ESframe').src = '/estimate/estimate_step1.asp';
		document.getElementById('brochure').style.display = 'none';
		document.getElementById('estimate').style.display = '';
		document.getElementById('allmodel').style.display = 'none';
		return;
	}else if(code == "ES0101"){
		document.getElementById('ESframe').src = '/estimate/estimate_step2.asp?modelNo=0';
		document.getElementById('estimate').style.display = '';
		return;
		//linkUrl += "/common/check_Logcount.asp?code="+code;
		//tar = "hidden";
	}else if(code == "ES0102"){
		document.getElementById('ESframe').src = '/estimate/estimate_step2.asp?modelNo=1';
		document.getElementById('estimate').style.display = '';
		return;
		//linkUrl += "/common/check_Logcount.asp?code="+code;
		//tar = "hidden";					
	}else if(code == "ES0103"){
		document.getElementById('ESframe').src = '/estimate/estimate_step2.asp?modelNo=2';
		document.getElementById('estimate').style.display = '';
		return;
		//linkUrl += "/common/check_Logcount.asp?code="+code;
		//tar = "hidden";	
	}else if(code == "ES0104"){
		document.getElementById('ESframe').src = '/estimate/estimate_step2.asp?modelNo=3';
		document.getElementById('estimate').style.display = '';
		return;
		//linkUrl += "/common/check_Logcount.asp?code="+code;
		//tar = "hidden";
	}else if(code == "ES0105"){
		document.getElementById('ESframe').src = '/estimate/estimate_step2.asp?modelNo=4';
		document.getElementById('estimate').style.display = '';
		return;
		//linkUrl += "/common/check_Logcount.asp?code="+code;
		//tar = "hidden";	
	}else if(code == "ES0106"){
		document.getElementById('ESframe').src = '/estimate/estimate_step2.asp?modelNo=6';
		document.getElementById('estimate').style.display = '';
		return;
		//linkUrl += "/common/check_Logcount.asp?code="+code;
		//tar = "hidden";	
	}else if(code == "ES0107"){
		document.getElementById('ESframe').src = '/estimate/estimate_step2.asp?modelNo=5';
		document.getElementById('estimate').style.display = '';
		return;
		//linkUrl += "/common/check_Logcount.asp?code="+code;
		//tar = "hidden";	
	}else if(code == "ES0108"){
		document.getElementById('ESframe').src = '/estimate/estimate_step2.asp?modelNo=11';
		document.getElementById('estimate').style.display = '';
		return;
		//linkUrl += "/common/check_Logcount.asp?code="+code;
		//tar = "hidden";	
	}else if(code == "ES0109"){
		document.getElementById('ESframe').src = '/estimate/estimate_step2.asp?modelNo=7';
		document.getElementById('estimate').style.display = '';
		return;
		//linkUrl += "/common/check_Logcount.asp?code="+code;
		//tar = "hidden";	
	}else if(code == "ES0110"){
		document.getElementById('ESframe').src = '/estimate/estimate_step2.asp?modelNo=8';
		document.getElementById('estimate').style.display = '';
		return;
		//linkUrl += "/common/check_Logcount.asp?code="+code;
		//tar = "hidden";	
	}else if(code == "ES0111"){
		document.getElementById('ESframe').src = '/estimate/estimate_step2.asp?modelNo=12';
		document.getElementById('estimate').style.display = '';
		return;
		//linkUrl += "/common/check_Logcount.asp?code="+code;
		//tar = "hidden";	
	}else if(code == "MAP"){  //»çÀÌÆ®¸Ê
		linkUrl += "/f_menu/sitemap.asp";	
	}else if(code == "AGREE"){  //ÀÌ¿ë¾à°ü
		linkUrl += "/f_menu/legal.asp";	
	}else if(code == "PRIVATE"){  //°³ÀÎÁ¤º¸Ãë±Þ¹æÄ§
		linkUrl += "/f_menu/private.asp";	
	}else if(code == "CONTACT"){  //CONTACT US
		linkUrl += "/f_menu/contact.asp";				
	}else if(code == "GLOBAL"){  //GLOBAL LEXUS
		linkUrl += "/f_menu/global.asp";	
	}else if(code == "D0116"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.hyosunglexus.com");	
	}else if(code == "D0114"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdongil.co.kr/");	
	}else if(code == "D0115"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdongil.co.kr/");	
	}else if(code == "A0101"){ //½Ã½Â½ÅÃ» start
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusprime.co.kr/trial_rides");	
	}else if(code == "A0102"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdnt.com/buying/test_drive.html");
	}else if(code == "A0103"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexuscw.com/lx_purchase/test_drving_apply_01.asp");	
	}else if(code == "A0104"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexuscm.com/Sales/test_drive.asp");	
	}else if(code == "A0105"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexussy.co.kr/sales/sales_drive.php");	
	}else if(code == "A0106"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdongil.co.kr/html/buying/buy2_list.aspx");	
	}else if(code == "A0107"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.hyosunglexus.com");	
	}else if(code == "A0108"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("https://www.lexusym.com/purchase/drive.html?left=4");	
	}else if(code == "A0109"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusjb.com/customer/?kind=3&subKind=2");	
	}else if(code == "A0110"){
		code = "A0101";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusprime.co.kr/trial_rides");	
	}else if(code == "A0111"){
		code = "A0106";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdongil.co.kr/html/buying/buy2_list.aspx");	
	}else if(code == "A0112"){
		code = "A0106";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdongil.co.kr/html/buying/buy2_list.aspx");	
	}else if(code == "A0113"){
		code = "A0107";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.hyosunglexus.com");	
	}else if(code == "A0114"){ // 0710 Ãß°¡
		code = "A0109";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusjb.com/customer/?kind=3&subKind=2");	
	}else if(code == "A0115"){
		code = "A0108";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("https://www.lexusym.com/purchase/drive.html?left=4");	// 0710 
	}	else if(code == "A0201"){ 
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusprime.co.kr/consultants");	
	}else if(code == "A0202"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://lexusdnt.com/buying/sclink.html");	
	}else if(code == "A0203"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexuscw.com/lx_purchase/sc_search.asp");	
	}else if(code == "A0204"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexuscm.com/Sales/salesman.asp");	
	}else if(code == "A0205"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexussy.co.kr");	
	}else if(code == "A0206"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdongil.co.kr/html/buying/buy1.aspx");	
	}else if(code == "A0207"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.hyosunglexus.com");	
	}else if(code == "A0208"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusym.com/lexusym/consultant.html?left=3");	
	}else if(code == "A0209"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusjb.com/purchase/?kind=3");	
	}else if(code == "A0210"){
		code = "A0201";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusprime.co.kr/consultants");	
	}else if(code == "A0211"){
		code = "A0206";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdongil.co.kr/html/buying/buy1.aspx");	
	}else if(code == "A0212"){
		code = "A0206";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdongil.co.kr/html/buying/buy1.aspx");	
	}else if(code == "A0213"){
		code = "A0207";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.hyosunglexus.com");	
	}else if(code == "A0214"){ // 0710 Ãß°¡
		code = "A0109";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusjb.com/purchase/?kind=3");	
	}else if(code == "A0215"){
		code = "A0108";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusym.com/lexusym/consultant.html?left=3");	// 0710 
	}else if(code == "A0301" || code == "D0101"){ 
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusprime.co.kr");	
	}else if(code == "A0302" || code == "D0102"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://lexusdnt.com");	
	}else if(code == "A0303" || code == "D0103"  || code == "D0111" ){
		if(code=='D0111') code='D0103';
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexuscw.com");	
	}else if(code == "A0304" || code == "D0106"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexuscm.com");	
	}else if(code == "A0305" || code == "D0104"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexussy.co.kr");	
	}else if(code == "A0306" || code == "D0108"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdongil.co.kr");	
	}else if(code == "A0307" || code == "D0109"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.hyosunglexus.com");	
	}else if(code == "A0308" || code == "D0105"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusym.com");	
	}else if(code == "A0309" || code == "D0107" || code == "D0112"){
		if(code=='D0112') code='D0107';
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusjb.com");	
	}else if(code == "A0310" || code == "D0110"){
		code = "A0301";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusprime.com");	
	}else if(code == "A0311"){
		code = "A0306";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdongil.co.kr");	
	}else if(code == "A0312"){
		code = "A0306";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusdongil.co.kr");	
	}else if(code == "A0313"){
		code = "A0307";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		//window.open("http://www.lexusny.co.kr");	
		window.open("http://www.hyosunglexus.com");	
	}else if(code == "A0314"){ // 0710 Ãß°¡
		code = "A0109";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusjb.com");	
	}else if(code == "A0315"){
		code = "A0108";
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusym.com");	// 0710 
	}
	// END ½Ã½Â ½ÅÃ»
	// END ½Ã½Â ½ÅÃ»
	else if(code == "D0113"){
		linkUrl += "/common/check_Logcount.asp?code="+code;
		tar = "hidden";			
		window.open("http://www.lexusym.com/");	
	}else if(code == "SS"){
		linkUrl += "/main.asp?code="+code; 		//2011.11.21
	}else if(code == "PSERVICE"){				
		window.open("/popup/20091130/popup.html",'','location=no,directories=no,resizable=no,status=no,toolbar=no,menubar=no,left=100,top=100,width=500,height=500,scrollbars=no');
		return;
	}else if(code == "PLS460"){						
		window.open('http://www.ls460.co.kr/ls460.asp','','fullscreen,scrollbars')
		return;
	}else if(code == "SUB_POP"){						
		window.open("/popup/20100202/popup.html","100202","width=500, height=600, top=0, left=0'");
		return;
	}else if(code == "BANNER_POP"){						
		window.open("/popup/20100506/popup.html","100506","width=500, height=700, top=0, left=0'");
		return;
	}else if(code == "BANNER_DIFFERENCE07"){						
		//window.open("/popup/20100714/popup.html","100714","width=500, height=525, top=0, left=0'");//7¿ùÄ·ÆäÀÎ ¹è³ÊÆË¾÷
		return;
    }else if(code == "BANNER_DIFFERENCE08"){						
		//window.open("/popup/20100804/popup.html","100804","width=500, height=651, top=0, left=0'");//8¿ù ½Ã½ÂÀÌº¥Æ® ÆË¾÷
		return;		
	}else if(code == "BANNER_RECALL"){						
		//window.open("/popup/20100407/popup.html","100407","width=400, height=300, top=0, left=0'");
		//return;
		linkUrl += "/service/campaign.asp"
	}else if(code == "BANNER_DIFFERENCE"){						
		linkUrl += "/difference/difference_main.asp"
	}else if(code == "CSR_AWARD"){						
		linkUrl += "/company/press_view.asp?idx=334"
	}else if(code == "BANNER1"){	// ÇÏ´Ü ¹è³Ê 1					
		linkUrl += "/company/press_view.asp?idx=341"
	}else if(code == "BANNER2"){	// ÇÏ´Ü ¹è³Ê 2					
		window.open('/lexusmagazine/201110.asp','','fullscreen,scrollbars');
		return; 
	}else if(code == "BANNER3"){	// ÇÏ´Ü ¹è³Ê 3					
		linkUrl += "/company/press_view.asp?idx=334"
	}else if(code == "BANNER4"){	// ÇÏ´Ü ¹è³Ê 4	
	  var popParmas = getPopupParams(950, 460);
		var popwin = window.open("/popup/20120102/popup_2.html","120102_2","width="+popParmas.width+",height="+popParmas.height+",top=20,left=10,status='no',scrollbars="+popParmas.scroll);
		popwin.focus();
	  return;
	}else if(code == "BANNER5"){	// ÇÏ´Ü ¹è³Ê 5				
		linkUrl += "/service/campaign.asp"
	}else if(code == "BANNER6"){
		location.href="http://www.lexus.co.kr/service/campaign.asp";
	  //window.open("/popup/20110330/popup.html","110331","width=500, height=460, top=10, left=520,scrollbars=no,status=no");
    return;
	}else if(code == "LOGO"){ //·º¼­½º ·Î°í		
		alert('logo');
		linkUrl += "/main.asp";	
	}else{
		alert('goLinkUrl  : no match ['+code+']');
		return;
	}		
			
//------------------------------------------------------------
// NO MATCH
//------------------------------------------------------------
	
	if(linkUrl=="#") alert("link¾øÀ½  : " + code);
	
	if(tar == "hidden"){	
	/*	
		if(code == "E0100"){
			if( getCookie( "popup20100913_1" ) != "done" ){
				popsn("/popup/20100913/popup_es350.html","ES_POP",500,650);
			}
		}else if(code == "I0100"){
			if( getCookie( "popup20100913_2" ) != "done" ){
				popsn("/popup/20100913/popup_is250.html","IS_POP",500,650);
			}
		}
	*/	
		document.hdf.location.href = linkUrl;
	}else{		
		location.href = linkUrl;
	}

}

function login_pop (n) {
	for (var i=1; i<=2; i++) {
		if (i==n) {
			if (document.getElementById("login_pop"+i).style.display == "none")
			{
				document.getElementById("login_pop"+i).style.display="block";
			}else{
				document.getElementById("login_pop"+i).style.display="none";
			}
			
		}else {			
			document.getElementById("login_pop"+i).style.display="none";
		}
	}
}

// - ÆË¾÷À» º¸¿©ÁÖ°í ±âº» Æ÷Ä¿½º ¼³Á¤
function login_popFoc(n, focusEleId) {
	for (var i=1; i<=2; i++) {
		if (i==n) {
			if (document.getElementById("login_pop"+i).style.display == "none")
			{
				document.getElementById("login_pop"+i).style.display="block";
			}else{
				document.getElementById("login_pop"+i).style.display="none";
			}
			
		}else {			
			document.getElementById("login_pop"+i).style.display="none";
		}
	}
	document.getElementById(focusEleId).focus();
}


function closeBrochure(){	
	parent.document.getElementById('brochure').style.display = 'none';	
	parent.document.getElementById('BRframe').src = '';
}

function closeEstimate(){	
	parent.document.getElementById('estimate').style.display = 'none';	
	parent.document.getElementById('ESframe').src = '';
}

function closeAllModel(){	
	parent.document.getElementById('allmodel').style.display = 'none';	
	parent.document.getElementById('ALLframe').src = '';
}

function menuOn(){
	document.getElementById('gnb').style.height = "400px";	
}

function menuOff(){
	document.getElementById('gnb').style.height = "120px";	
}


con_num = 0;
img_num = 0;
function con_info(n) {	
	id_check = document.getElementById("contents").getElementsByTagName("div");
	for(i = 0; i < id_check.length; i++){		
		if (id_check[i].id.indexOf("tab_con") != -1)
		{			
			con_num = con_num+1;			
		}		
	}	
	a_check = document.getElementById("contents").getElementsByTagName("a");
	for(i = 0; i < a_check.length; i++){		
		if (a_check[i].href.indexOf("javascript:con_info") != -1)
		{			
			img_num = img_num+1;			
			if (a_check[i].href.indexOf("("+n+")") != -1)
			{			
				a_check[i].className = "tab"+img_num+" on";
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace("_on.gif", ".gif");
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace(".gif", "_on.gif");
				a_check[i].onmouseover = "";
				a_check[i].onmouseout = "";
			}else{
				a_check[i].className = "tab"+img_num;
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace("_on.gif", ".gif");
				a_check[i].onmouseover = function()	{imgOver(this)};
				a_check[i].onmouseout = function()	{imgOut(this)};
			}
		}
	}


	for(i = 1; i <= con_num; i++){		
		con_div = document.getElementById("tab_con"+i);		
		if (i == n)		{
			con_div.style.display = "block";
		}else{
			con_div.style.display = "none"
		}
		
	}	
	con_num = 0;
	img_num = 0;
	
	
}

function getCookie(name){
    var prefix = name + "=";
    var cookieStartIndex = document.cookie.indexOf(prefix);
    if (cookieStartIndex == -1)
	    return "";
    var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
	    cookieEndIndex = document.cookie.length;
        return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function goService(){
	location.href = "/service/center.asp";
}



	/*
		// object > embed ÅÂ±×¸¦ ¸¸µçÈÄ 
		// ÇÃ·¹½¬ ¿µ¿ª (id="flashArea")¿¡ innerHTML ÇÑ´Ù.
		// * ÀÌ¶§ ÇÃ·¹½¬ È£Ãâ°æ·Î¿¡ ÄÚµå°ªÀ» ÆÄ¶ó¸ÞÅÍ·Î ³Ñ±ä´Ù.
		// jeonmh [Ãß°¡]
	*/
	function flashObjDiv(URL,SizeX,SizeY,LnkId,Frm,Flag){
    var html = [];
    var i = -1;
    html[++i] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
    html[++i]	= '					codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ';
    html[++i]	= '         width="'+SizeX+'" height="'+SizeY+'"  id="'+LnkId+'" align="middle"> '; 
    html[++i]	= '		<param name="movie"     value="'+URL+'" />';
    html[++i]	= '		<param name="quality"   value="high" />';
    if ( Flag == null || Flag != 'N' ){
        html[++i]	= '<param name="wmode" value="transparent"/>';
    }
 		html[++i]	= '		 <param name="allowScriptAccess" value="always"/>';
 		html[++i]	= '		 <param name="base" value="." />';
 		html[++i]	= '		 <embed base="." src="'+URL+'" quality="high" width="'+SizeX+'" height="'+SizeY+'"  align="middle"';
  	if ( Flag == null || Flag != 'N' ){
      	html[++i]	= '		 										wmode="transparent" ';  
    }
    html[++i]	= '														type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />';		
    html[++i]	= '			</embed>';
    html[++i]	= '			</object>';
    var joinHtml = html.join("");
    document.getElementById("flashArea").innerHTML = joinHtml;
 		if ( Frm == 'Y' ) { // form ÅÂ±× µé¾î°¡´Â ÆäÀÌÁö¿¡ Àû¿ë
  		eval("window." + LnkId + " = document.forms[0]."+ LnkId +"; ");
 		} 
	}
	
	function goCT200h(){
		window.open("http://ct200h.lexus.co.kr/index.jsp?media=LXS02");
	}
	
	/** ºê¶ó¿ìÀú Ã¼Å© */
	function ScriptEngineMinorVersion(){   
		var ieVer = "";                                      
 		if( navigator.appName.indexOf("Microsoft") > -1 ){ //  IE ÀÎÁö ¿ì¼± È®ÀÎ
	       	if( navigator.appVersion.indexOf("MSIE 6") > -1){       
	            ieVer = "IE 6";
	        }else if(navigator.appVersion.indexOf("MSIE 7") > -1){  
	            ieVer = "IE 7";
	        }else if(navigator.appVersion.indexOf("MSIE 8") > -1){ 
	            ieVer = "IE 8";
	        }
	    }else{  // ÀÍ½ºÇÃ·Î·¯°¡ ¾Æ´Ò °æ¿ì
	       ieVer = "IE 8";
	    }
		return ieVer;
  	}
  	
	/** ³¯Â¥ Ã¼Å© */  	
  	function getTodayCheck(){
   		var date  = new Date();
		var year  = date.getYear();
		var month = date.getMonth()+1;
		var day	  = date.getDate();
	
		var today = year+""+month+""+day;	
		return today;
	}
	
	/* »ç¿ëÀÚ ½ºÅ©¸° ³ôÀÌ¿¡ ¸Â°Ô ÆË¾÷ ½ºÅ©·Ñ Àû¿ë */
	function getPopupParams(height, width){
		var screenheight = screen.height-40;
		var popScrollbars = "no";
		
		popHeight = height;
		
		if( height > screenheight ){
			height = screenheight;
			width += 17;
			popScrollbars = "yes";
		}
	
		var popupParams = {
							"height" : height,
							"width"  : width,
							"scroll" : popScrollbars
					};
	
		return popupParams;
	}//end
