﻿function features_init() {	var obj = document.getElementById("translucency");	obj.tid = "";	obj.tmp_left=0; // 목표	obj.tmp_top=0;	obj.tmp_width=920;	obj.tmp_height=565;	obj.current_top=0; // 클릭한 위치	obj.current_left=0;	obj.current_width=10;	obj.current_height=10;	obj.diff_left = 0; // 차이	obj.diff_top = 0;	obj.diff_width = 0;	obj.diff_height = 0;	obj.tmp_opacity_ie=10; // 투명도	obj.tmp_opacity_ff=0.1;	obj.cmn = 0;}function view_learnmore(va,e) {	var obj = document.getElementById("translucency");	var btype=navigator.userAgent;	obj.cmn = va;		if (document.documentElement.scrollTop == 0) {		var tmpgallery_height = document.body.scrollTop + 60;		obj.tmp_top = tmpgallery_height;	} else {		var tmpgallery_height = document.documentElement.scrollTop + 60;		obj.tmp_top = tmpgallery_height;	}	obj.tmp_left = (document.body.clientWidth-920)/2;		if (btype.indexOf("MSIE")!=-1) { // for IE		obj.current_top = event.y;		obj.current_left = event.x;		document.getElementById("translucency").style.filter="alpha(opacity=50)";		if (btype.indexOf("MSIE 5.5")!=-1) {			document.getElementById("translucency").style.height=document.body.scrollHeight + "px";		} else {			document.getElementById("translucency").style.height=document.body.clientHeight + "px";		}		document.getElementById("translucency").style.display="block";		document.getElementById("features_motion_layer").style.filter="alpha(opacity="+50+")";	} else {		obj.current_top = e.clientY;		obj.current_left = e.clientX;		document.getElementById("translucency").style.opacity=0.5;		document.getElementById("translucency").style.height=document.body.clientHeight + "px";		document.getElementById("translucency").style.display="block";		document.getElementById("features_motion_layer").style.opacity=0.5;	}	document.getElementById('features_motion_layer').style.width = obj.current_width + "px";	document.getElementById('features_motion_layer').style.height = obj.current_height + "px";	document.getElementById('features_motion_layer').style.left = obj.current_left + "px";	document.getElementById('features_motion_layer').style.top = obj.current_top + "px";	document.getElementById('features_motion_layer').style.display="block";	document.getElementById('features_layer'+obj.cmn).style.display="none";	obj.diff_left = obj.tmp_left - obj.current_left;	obj.diff_top = obj.tmp_top - obj.current_top;	obj.diff_width = obj.tmp_width - obj.current_width;	obj.diff_height = obj.tmp_height - obj.current_height;	test2();}function test2() {	var obj = document.getElementById("translucency");	tid=setTimeout(test2,1);	if(obj.current_top!=obj.tmp_top || obj.current_height!=obj.tmp_height || obj.current_left!=obj.tmp_left || obj.current_width!=obj.tmp_width) {		// 세로 위치		if(Math.abs(obj.current_top - obj.tmp_top) < 21) {			document.getElementById('features_motion_layer').style.top = obj.tmp_top + "px";			obj.current_top = obj.tmp_top;			obj.diff_top = 0;		} else {			obj.current_top = obj.current_top + Math.round(obj.diff_top/20);			document.getElementById('features_motion_layer').style.top = obj.current_top + "px";		}		// 세로 크기		if(Math.abs(obj.current_height - obj.tmp_height) < 21) {			document.getElementById('features_motion_layer').style.height = obj.tmp_height + "px";			obj.current_height = obj.tmp_height;			obj.diff_height = 0;		} else {			obj.current_height = obj.current_height + Math.round(obj.diff_height/20);			document.getElementById('features_motion_layer').style.height = obj.current_height + "px";		}		// 가로 위치		if(Math.abs(obj.current_left - obj.tmp_left) < 21) {			document.getElementById('features_motion_layer').style.left = obj.tmp_left + "px";			obj.current_left = obj.tmp_left;			obj.diff_left = 0;		} else {			obj.current_left = obj.current_left + Math.round(obj.diff_left/20);			document.getElementById('features_motion_layer').style.left = obj.current_left + "px";		}		// 가로 크기		if(Math.abs(obj.current_width - obj.tmp_width) < 21) {			document.getElementById('features_motion_layer').style.width = obj.tmp_width + "px";			obj.current_width = obj.tmp_width;			obj.diff_width = 0;		} else {			obj.current_width = obj.current_width + Math.round(obj.diff_width/20);			document.getElementById('features_motion_layer').style.width = obj.current_width + "px";		}	} else {		clearTimeout(tid);		// translucency		var btype=navigator.userAgent;		if (btype.indexOf("MSIE")!=-1) { // for IE			document.getElementById("features_motion_layer").style.filter="alpha(opacity=100)";		} else {			document.getElementById("features_motion_layer").style.opacity=1;		}		EchoDiv();	}}function LayerClose() {	// 초기화	var obj = document.getElementById("translucency");	document.getElementById('features_motion_layer').style.display='none';	document.getElementById('features_layer'+obj.cmn).style.display='none';	document.getElementById('translucency').style.display='none';	obj.tmp_left=0; // 목표	obj.tmp_top=0;	obj.tmp_width=920;	obj.tmp_height=565;	obj.current_top=0; // 클릭한 위치	obj.current_left=0;	obj.current_width=10;	obj.current_height=10;}function closeDemo() {	var obj = document.getElementById("translucency");	document.getElementById('features_motion_layer').style.display='none';	//document.getElementById('features_layer'+obj.cmn).style.display='none';	document.getElementById('features_layer').style.display='none';	document.getElementById('translucency').style.display='none';	obj.tmp_left=0;	obj.tmp_top=0;	obj.tmp_width=920;	obj.tmp_height=565;	obj.current_top=0;	obj.current_left=0;	obj.current_width=10;	obj.current_height=10;}function EchoDiv() {	var obj = document.getElementById("translucency");	var tmp_code = "";	document.getElementById('features_layer'+obj.cmn).style.left = obj.tmp_left + "px";	document.getElementById('features_layer'+obj.cmn).style.top = obj.tmp_top + "px";	document.getElementById('features_layer'+obj.cmn).style.display="block";	document.getElementById('features_motion_layer').style.display="none";}function gallery_view() {	var tabs = document.getElementById("visual_sum_tab");	var btns = tabs.getElementsByTagName("a");	var imgLayer = document.getElementById("visual_image");	var visual_vr = document.getElementById("visual_vr");	for (var i=0; i<btns.length; i++) {		btns[i].onclick = function() {				var imgs = this.getAttribute("href");			var img_type = imgs.substring(imgs.lastIndexOf(".")+1,imgs.lastIndexOf(".")+4);			var chageImg = imgLayer.firstChild;			if (img_type=="jpg" || img_type=="JPG" || img_type=="gif" || img_type=="GIF") {				var chageImg = imgLayer.firstChild;				visual_vr.style.display = "none";				imgLayer.style.display = "block";				if(chageImg.nodeType!=1) {					chageImg = chageImg.nextSibling;				}				chageImg.setAttribute("src",imgs);			} else {				visual_vr.style.display = "block";				imgLayer.style.display = "none";				var obj = document.getElementById("visual_vr");				var txt_tmp = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%">';				txt_tmp = txt_tmp + '<param name="movie" value="'+imgs+'" />';				txt_tmp = txt_tmp + '<param name="wmode" value="transparent" />';				txt_tmp = txt_tmp + '<param name="allowScriptAccess" value="always" />';				txt_tmp = txt_tmp + '<!--[if !IE]> <-->';				txt_tmp = txt_tmp + '<object type="application/x-shockwave-flash" data="'+imgs+'" width="100%" height="100%">';				txt_tmp = txt_tmp + '<param name="wmode" value="transparent" />';				txt_tmp = txt_tmp + '<param name="allowScriptAccess" value="always" />';				txt_tmp = txt_tmp + '</object>';				txt_tmp = txt_tmp + '<!--> <![endif]-->';				txt_tmp = txt_tmp + '</object>';				obj.innerHTML=txt_tmp;			}			return false;		}	}}function color_view() {	var tabs = document.getElementById("visual_sum_tab_color");	var btns = tabs.getElementsByTagName("a");	var imgLayer = document.getElementById("visual_image");	var visual_vr = document.getElementById("visual_vr");	for (var i=0; i<btns.length; i++) {		btns[i].onclick = function() {				var imgs = this.getAttribute("href");			var img_type = imgs.substring(imgs.lastIndexOf(".")+1,imgs.lastIndexOf(".")+4);			var chageImg = imgLayer.firstChild;			if (img_type=="jpg" || img_type=="JPG" || img_type=="gif" || img_type=="GIF") {				var chageImg = imgLayer.firstChild;				visual_vr.style.display = "none";				imgLayer.style.display = "block";				if(chageImg.nodeType!=1) {					chageImg = chageImg.nextSibling;				}				chageImg.setAttribute("src",imgs);			} else {				visual_vr.style.display = "block";				imgLayer.style.display = "none";				var obj = document.getElementById("visual_vr");				var txt_tmp = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%">';				txt_tmp = txt_tmp + '<param name="movie" value="'+imgs+'" />';				txt_tmp = txt_tmp + '<param name="wmode" value="transparent" />';				txt_tmp = txt_tmp + '<param name="allowScriptAccess" value="always" />';				txt_tmp = txt_tmp + '<!--[if !IE]> <-->';				txt_tmp = txt_tmp + '<object type="application/x-shockwave-flash" data="'+imgs+'" width="100%" height="100%">';				txt_tmp = txt_tmp + '<param name="wmode" value="transparent" />';				txt_tmp = txt_tmp + '<param name="allowScriptAccess" value="always" />';				txt_tmp = txt_tmp + '</object>';				txt_tmp = txt_tmp + '<!--> <![endif]-->';				txt_tmp = txt_tmp + '</object>';				obj.innerHTML=txt_tmp;			}			return false;		}	}}function gallery_close() {	var imgLayer = document.getElementById("visual_image");	var visual_vr = document.getElementById("visual_vr");	visual_vr.style.display = "block";	imgLayer.style.display = "none";	}//function view_learnmore_digitas(loaderSwf, templateSwf, flashID, first_load, xmlDir, xmlName, e) {function view_learnmore_digitas(loaderSwf, mainFile, flashID, first_load, xmlDir, xmlName, e) { //function view_learnmore_digitas(loaderSwf, flashID, first_load, xmlDir, xmlName, e) {	var obj = document.getElementById("translucency");	var btype=navigator.userAgent;		if (document.documentElement.scrollTop == 0) {		var tmpgallery_height = document.body.scrollTop + 60;		obj.tmp_top = tmpgallery_height;	} else {		var tmpgallery_height = document.documentElement.scrollTop + 60;		obj.tmp_top = tmpgallery_height;	}	obj.tmp_left = (document.body.clientWidth-920)/2;		if (btype.indexOf("MSIE")!=-1) { // for IE		obj.current_top = event.y;		obj.current_left = event.x;		document.getElementById("translucency").style.filter="alpha(opacity=50)";		if (btype.indexOf("MSIE 5.5")!=-1) {			document.getElementById("translucency").style.height=document.body.scrollHeight + "px";		} else {			document.getElementById("translucency").style.height=document.body.clientHeight + "px";		}		document.getElementById("translucency").style.display="block";		document.getElementById("features_motion_layer").style.filter="alpha(opacity="+50+")";	} else {		obj.current_top = e.clientY;		obj.current_left = e.clientX;		document.getElementById("translucency").style.opacity=0.5;		document.getElementById("translucency").style.height=document.body.clientHeight + "px";		document.getElementById("translucency").style.display="block";		document.getElementById("features_motion_layer").style.opacity=0.5;	}	document.getElementById('features_motion_layer').style.width = obj.current_width + "px";	document.getElementById('features_motion_layer').style.height = obj.current_height + "px";	document.getElementById('features_motion_layer').style.left = obj.current_left + "px";	document.getElementById('features_motion_layer').style.top = obj.current_top + "px";	document.getElementById('features_motion_layer').style.display="block";	document.getElementById('features_layer').style.display="none";	obj.diff_left = obj.tmp_left - obj.current_left;	obj.diff_top = obj.tmp_top - obj.current_top;	obj.diff_width = obj.tmp_width - obj.current_width;	obj.diff_height = obj.tmp_height - obj.current_height;	var obj = document.getElementById("features_layer");	var txt_tmp = '<object id="'+flashID+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="920" height="565">';		txt_tmp = txt_tmp + '<param name="movie" value="'+loaderSwf+'" />';		txt_tmp = txt_tmp + '<param name="wmode" value="transparent" />';		//txt_tmp = txt_tmp + '<param name="flashvars" value="first_load='+first_load+'&amp;config_file='+xmlName+'&amp;xml_dir='+xmlDir+'" />';		txt_tmp = txt_tmp + '<param name="flashvars" value="first_load='+first_load+'&amp;config_file='+xmlName+'&amp;xml_dir='+xmlDir+'&amp;main_file='+mainFile+'" />';		txt_tmp = txt_tmp + '<param name="allowfullscreen" value="true" />';		txt_tmp = txt_tmp + '<!--[if !IE]> <-->';		txt_tmp = txt_tmp + '<object id="'+flashID+'" type="application/x-shockwave-flash" data="'+loaderSwf+'" width="920" height="565">';		txt_tmp = txt_tmp + '<param name="wmode" value="transparent" />';		//txt_tmp = txt_tmp + '<param name="flashvars" value="first_load='+first_load+'&amp;config_file='+xmlName+'&amp;xml_dir='+xmlDir+'" />';		txt_tmp = txt_tmp + '<param name="flashvars" value="first_load='+first_load+'&amp;config_file='+xmlName+'&amp;xml_dir='+xmlDir+'&amp;main_file='+mainFile+'" />';		txt_tmp = txt_tmp + '<param name="allowfullscreen" value="true" />';		txt_tmp = txt_tmp + '</object>';		txt_tmp = txt_tmp + '<!--> <![endif]-->';		txt_tmp = txt_tmp + '</object>';		obj.innerHTML=txt_tmp;		test3();} function test3() {	var obj = document.getElementById("translucency");	tid=setTimeout(test3,1);	if(obj.current_top!=obj.tmp_top || obj.current_height!=obj.tmp_height || obj.current_left!=obj.tmp_left || obj.current_width!=obj.tmp_width) {		// 세로 위치		if(Math.abs(obj.current_top - obj.tmp_top) < 21) {			document.getElementById('features_motion_layer').style.top = obj.tmp_top + "px";			obj.current_top = obj.tmp_top;			obj.diff_top = 0;		} else {			obj.current_top = obj.current_top + Math.round(obj.diff_top/20);			document.getElementById('features_motion_layer').style.top = obj.current_top + "px";		}		// 세로 크기		if(Math.abs(obj.current_height - obj.tmp_height) < 21) {			document.getElementById('features_motion_layer').style.height = obj.tmp_height + "px";			obj.current_height = obj.tmp_height;			obj.diff_height = 0;		} else {			obj.current_height = obj.current_height + Math.round(obj.diff_height/20);			document.getElementById('features_motion_layer').style.height = obj.current_height + "px";		}		// 가로 위치		if(Math.abs(obj.current_left - obj.tmp_left) < 21) {			document.getElementById('features_motion_layer').style.left = obj.tmp_left + "px";			obj.current_left = obj.tmp_left;			obj.diff_left = 0;		} else {			obj.current_left = obj.current_left + Math.round(obj.diff_left/20);			document.getElementById('features_motion_layer').style.left = obj.current_left + "px";		}		// 가로 크기		if(Math.abs(obj.current_width - obj.tmp_width) < 21) {			document.getElementById('features_motion_layer').style.width = obj.tmp_width + "px";			obj.current_width = obj.tmp_width;			obj.diff_width = 0;		} else {			obj.current_width = obj.current_width + Math.round(obj.diff_width/20);			document.getElementById('features_motion_layer').style.width = obj.current_width + "px";		}	} else {		clearTimeout(tid);		// translucency		var btype=navigator.userAgent;		if (btype.indexOf("MSIE")!=-1) { // for IE			document.getElementById("features_motion_layer").style.filter="alpha(opacity=100)";		} else {			document.getElementById("features_motion_layer").style.opacity=1;		}		EchoDiv2();	}}function EchoDiv2() {	var obj = document.getElementById("translucency");	var tmp_code = "";	document.getElementById('features_layer').style.left = obj.tmp_left + "px";	document.getElementById('features_layer').style.top = obj.tmp_top + "px";	document.getElementById('features_layer').style.display="block";	document.getElementById('features_motion_layer').style.display="none";}//feature gallery loadfunction featureGalleryView3FlashLoad(objId,_site_cd,imgHref){		var obj = document.getElementById(objId);		var txt_tmp = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%">';		txt_tmp = txt_tmp + '<param name="movie" value="'+imgHref+'" />';		txt_tmp = txt_tmp + '<param name="wmode" value="transparent" />';		txt_tmp = txt_tmp + '<param name="allowScriptAccess" value="always" />';		txt_tmp = txt_tmp + '<!--[if !IE]> <-->';		txt_tmp = txt_tmp + '<object type="application/x-shockwave-flash" data="'+imgHref+'" width="100%" height="100%">';		txt_tmp = txt_tmp + '<param name="wmode" value="transparent" />';		txt_tmp = txt_tmp + '<param name="allowScriptAccess" value="always" />';		txt_tmp = txt_tmp + '</object>';		txt_tmp = txt_tmp + '<!--> <![endif]-->';		txt_tmp = txt_tmp + '</object>';		obj.innerHTML=txt_tmp;}function featureGalleryColorFlashLoad(selectNum,colorBloorean,colorSelectNum,objId,_site_cd){												var flashObj = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%" id="loader" name="loader">';		flashObj = flashObj + '<param name="movie" value="/'+_site_cd+'/flash/consumer/gallery_color.swf" />';		flashObj = flashObj + '<param name="wmode" value="transparent" />';		flashObj = flashObj + '<param name="allowScriptAccess" value="always" />';		flashObj = flashObj + '<param name="flashVars" value="xmlUrl=/'+_site_cd+'/meta/test2.xml&amp;selectNum='+selectNum+'&amp;colorSelectNum='+colorSelectNum+'&amp;colorBloorean='+colorBloorean+'" />';        flashObj = flashObj + '<!--[if !IE]>-->';        flashObj = flashObj + '<object type="application/x-shockwave-flash" data="/'+_site_cd+'/flash/consumer/gallery_color.swf" width="100%" height="100%" id="loader" name="loader">';		flashObj = flashObj + '<param name="wmode" value="transparent" />';		flashObj = flashObj + '<param name="allowScriptAccess" value="always" />';		flashObj = flashObj + '<param name="flashVars" value="xmlUrl=/'+_site_cd+'/meta/test2.xml&amp;selectNum='+selectNum+'&amp;colorSelectNum='+colorSelectNum+'&amp;colorBloorean='+colorBloorean+'" />';        flashObj = flashObj + '</object>';        flashObj = flashObj + '<!--<![endif]-->';     	flashObj = flashObj + '</object>';     	document.getElementById(objId).innerHTML = flashObj;}function featureGalleryNumFlashLoad(num,objId,_site_cd,model_cd){		var flashObj = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%" id="loader" name="loader">';		flashObj = flashObj + '<param name="movie" value="/'+_site_cd+'/flash/consumer/loader.swf" />';		flashObj = flashObj + '<param name="wmode" value="transparent" />';		flashObj = flashObj + '<param name="allowScriptAccess" value="always" />';		flashObj = flashObj + '<param name="flashVars" value="movie=/'+_site_cd+'/flash/consumer/gallery.swf&selectNum='+num+'&xml=/'+_site_cd+'/consumer/detail/galleryXML.do?model_cd='+model_cd+'%26disMod=L" />';		flashObj = flashObj + '<!--[if !IE]> <-->';		flashObj = flashObj + '<object type="application/x-shockwave-flash" data="/'+_site_cd+'/flash/consumer/loader.swf" width="100%" height="100%" id="loader" name="loader">';		flashObj = flashObj + '<param name="wmode" value="transparent" />';		flashObj = flashObj + '<param name="allowScriptAccess" value="always" />';		flashObj = flashObj + '<param name="flashVars" value="movie=/'+_site_cd+'/flash/consumer/gallery.swf&selectNum='+num+'&xml=/'+_site_cd+'/consumer/detail/galleryXML.do?model_cd='+model_cd+'%26disMod=L" />';		flashObj = flashObj + '</object>';		flashObj = flashObj + '<!--> <![endif]-->';		flashObj = flashObj + '</object>';		     	document.getElementById(objId).innerHTML = flashObj;}