/********************************************************************************************************
	Popup Á¤ÀÇ
	º¯¼ö Á¤ÀÇ : pop - ÆÄÀÏ¸í, width - °¡·Î»çÀÌÁî, height - ¼¼·Î»çÀÌÁî, flag - 0:½ºÅ©·Ñ¾øÀ½, 1:½ºÅ©·ÑÀÖÀ½
********************************************************************************************************/
function pop(pop,width,height,flag)
{
	var url = pop;
	var wd = width;
	var he = height;
    
    if (flag == "0" )
    {  window.open(url,"","toolbar=0,menubar=0,scrollbars=no,resizable=no,top=0,left=0,width=" + wd +",height=" + he + ";");  }
    else 
    {  window.open(url,"","toolbar=0,menubar=0,scrollbars=yes,resizable=no,top=0,left=0,width=" + wd +",height=" + he + ";");  }
}

/********************************************************************************************************\
	»õÃ¢ ¿¬°á
********************************************************************************************************/
function open_link(url){
	opener.location = "/lexus/main/prime03.jsp";
}

/********************************************************************************************************\
	»õÃ¢
********************************************************************************************************/
function open_opt(url){
window.open(url, 'OPT', 'left=100,top=50,width=676,height=600,marginwidth=0,marginheight=0,scrollbars=yes,menubar=0,resizable=no');
}

function open_email(url){
window.open('/lexus/main/email.jsp', 'email', 'left=100,top=50,width=400,height=290,marginwidth=0,marginheight=0,scrollbars=no,menubar=0,resizable=no');
}

/********************************************************************************************************
	ÁÖ¿ä³»¿ë ¹Þ¾Æº¸±â ¸µÅ©
********************************************************************************************************/
function model_mail(mast_nm){
window.open("/lexus/model/mailinput.jsp?mast_nm="+mast_nm,"_brank", "width=320,height=180")
}

/********************************************************************************************************
	Build Your Lexus ¸µÅ©
********************************************************************************************************/
function ls_build(){
window.open("/lexus/buildlex.do?mast_no=100","_self");
}
function gs_build(){
window.open("/lexus/buildlex.do?mast_no=200","_self");
}
function es_build(){
window.open("/lexus/buildlex.do?mast_no=300","_self");
}
function is_build(){
window.open("/lexus/buildlex.do?mast_no=400","_self");
}
function rx_build(){
window.open("/lexus/buildlex.do?mast_no=500","_self");
}
function sc_build(){
window.open("/lexus/buildlex.do?mast_no=600","_self");
}

/********************************************************************************************************
	Æû Áö¿ì±â
********************************************************************************************************/
function clear(){
	document.form.reset();
}

/********************************************************************************************************
	ÇÁ¸°Æ®
********************************************************************************************************/
function print_detail(){	
	window.print();
}	


/********************************************************************************************************
	·ê¿À¹ö ÀÌ¹ÌÁö ½ÃÀÛ
********************************************************************************************************/
function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
		if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/********************************************************************************************************
	·¹ÀÌ¾î
********************************************************************************************************/
function MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
		obj.visibility=v; }
}

/********************************************************************************************************
	ÀÌ¹ÌÁö ·ê¿À¹ö
********************************************************************************************************/
function restore_img_src(name, nsdoc)
{
	var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
	if (name == '')
		return;
	if (img && img.altsrc) {
		img.src    = img.altsrc;
		img.altsrc = null;
	}
}

function change_img_src(name, nsdoc, rpath, preload)
{
	var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
	if (name == '')
		return;
	if (img) {
		img.altsrc = img.src;
	img.src    = rpath;
	}
}

/********************************************************************************************************
	¸µÅ©½Ã Æ÷Ä¿½º ¾ø¾Ö´Â ÇÔ¼ö
********************************************************************************************************/
function allblur() {
	for (i = 0; i < document.links.length; i++)
		document.links[i].onfocus = document.links[i].blur;
}
window.onload=allblur

/********************************************************************************************************
	·¹ÀÌ¾î
********************************************************************************************************/
function show_layer(obj, n, v) //show_layer(id, °¹¼ö, º¸¿©ÁÙ·¹ÀÌ¾î)
{
	for (i=1; i<=n; i++)
	{
		if (document.all[obj+i] != null)
		{
			if (i == v) {document.all[obj+i].style.display="";}
			else {document.all[obj+i].style.display="none";}
		}
	}
}

/********************************************************************************************************
	·¹ÀÌ¾î ¼±ÅÃ Lease
********************************************************************************************************/
function onShowLayer(status){
		if(status == "lease1"){
			document.all['Lease1'].style.display="inline";
			document.all['Lease2'].style.display="none";
			document.all['Lease3'].style.display="none";
		}else if(status == "lease2"){
			document.all['Lease1'].style.display="none";
			document.all['Lease2'].style.display="inline";
			document.all['Lease3'].style.display="none";
		}else if(status == "lease3"){
			document.all['Lease1'].style.display="none";
			document.all['Lease2'].style.display="none";
			document.all['Lease3'].style.display="inline";
		}
}

/********************************************************************************************************
	·¹ÀÌ¾î ¼±ÅÃ Interior
********************************************************************************************************/
function onShowLayer2(status){
		if(status == "interior1"){
			document.all['Interior1'].style.display="inline";
			document.all['Interior2'].style.display="none";
		}else if(status == "interior2"){
			document.all['Interior1'].style.display="none";
			document.all['Interior2'].style.display="inline";
		}
}

/********************************************************************************************************
	·¹ÀÌ¾î ¼±ÅÃ Exterior
********************************************************************************************************/
function onShowLayer3(status){
		if(status == "exterior1"){
			document.all['Exterior1'].style.display="inline";
			document.all['Exterior2'].style.display="none";
		}else if(status == "exterior2"){
			document.all['Exterior1'].style.display="none";
			document.all['Exterior2'].style.display="inline";
		}
}

/********************************************************************************************************
	¿ìÆí¹øÈ£Ã£±â ÆË¾÷
********************************************************************************************************/
function go_zip(){
	window.open('/post/post.html', 'POST', 'left=100,top=50,width=400,height=433,marginwidth=0,marginheight=0,scrollbars=no,menubar=0,resizable=no');
}

/********************************************************************************************************
	¼­ºñ½º¼¾Å¸ ÁöµµÃ£±â ÆË¾÷
********************************************************************************************************/
function go_ser_location(){
	window.open('/lexus/location/kangnam.html', 'LOCATION', 'left=100,top=50,width=799,height=560,marginwidth=0,marginheight=0,scrollbars=no,menubar=0,resizable=no');
}

/********************************************************************************************************
	Á¤ºñ¼Ò ÁöµµÃ£±â ÆË¾÷
********************************************************************************************************/
function go_bnp_location(){
	window.open('/lexus/location/d_kangnam.html', 'LOCATION', 'left=100,top=50,width=799,height=560,marginwidth=0,marginheight=0,scrollbars=no,menubar=0,resizable=no');
}

/********************************************************************************************************
	Çö±Ý±¸ÀÔ °ßÀû¼­ ÆË¾÷
********************************************************************************************************/
function go_cash(){
	window.open('/lexus/finance/cash.jsp', 'LOCATION', 'left=100,top=50,width=677,height=600,marginwidth=0,marginheight=0,scrollbars=yes,menubar=0,resizable=no');
}

/********************************************************************************************************
	BnPShopÅõ¾î ÆË¾÷
********************************************************************************************************/
function go_tour(){
	window.open('/lexus/bnpshop/tour.jsp', 'LOCATION', 'left=100,top=50,width=660,height=658,marginwidth=0,marginheight=0,scrollbars=no,menubar=0,resizable=no');
}

/********************************************************************************************************
	ÇÁ¶óÀÓ ½ºÆäÀÌ½º ÆË¾÷
********************************************************************************************************/
function go_prime_space(){
	window.open('/lexus/lexusprime/prime_space.jsp', 'LOCATION', 'left=100,top=50,width=840,height=573,marginwidth=0,marginheight=0,scrollbars=no,menubar=0,resizable=no');
}

/********************************************************************************************************
	Æ®·»Áö¼Ç
********************************************************************************************************/
function bt(id,after){ 
eval(id+'.filters.blendTrans.stop();'); 
eval(id+'.filters.blendTrans.Apply();'); 
eval(id+'.src="'+after+'";'); 
eval(id+'.filters.blendTrans.Play();'); 
}

/********************************************************************************************************
	ÇÃ·¡½¬ ÆË¾÷¶ç¿ì±â
********************************************************************************************************/
function Open_Win(files,name,Width,Height,Scroll) 
{
	var win_width = (screen.availwidth)/2 - Math.ceil(Width/2);
	var win_height = (screen.availheight)/2 - Math.ceil(Height/2);
	window.open(files,name,'menubar=0, status=0 locationbar=0,scrollbars='+Scroll+',resizable=0,left='+win_width+',top='+win_height+',width='+Width+',height='+Height);
}