<!--


//////////////////////////////////////
// IE Embed patch
//
// @author iezn@iezn.com
// @homepage http://iezn.com
// @create date 2006.04.19
// @last modify 2006.04.26
// @version 0.42
// ¹èÆ÷½Ã À§³»¿ëÀ» Æ÷ÇÔÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù
//////////////////////////////////////
/**
* embed ÆÐÄ¡ Àû¿ë ÄÁÅ×ÀÌ³Ê
* nullÀÎ°æ¿ì document °ªÀ» ±âº»À¸·Î ÇÕ´Ï´Ù
* id°ªÀ» ¼³Á¤ÇÑ°æ¿ì ¼³Á¤¹üÀ§ ³»¿¡¸¸ Àû¿ëÀÌ µË´Ï´Ù
* 
* º»¹®ÀÌ³ª ÀÏºÎ ³ëµå¿¡¸¸ Àû¿ëÇÒ°æ¿ì ÇØ´ç ³ëµåÀÇ id °ªÀ» ÀÔ·ÂÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù
* ¿¹)
* var __embed_target_id = "contents";
* ·Î Ã³¸®ÇÑ°æ¿ì body ³»¿¡ <ÅÂ±× id="contents">ÇÃ·¡½¬,µ¿¿µ»ó...</ÅÂ±×>
* ¾È¿¡ ³»¿ë¿¡¸¸ ÆÐÄ¡°¡ Àû¿ëµË´Ï´Ù
*/
if(typeof(__embed_target_id)=='undefined'){
	var __embed_target_id = null;
}

/**
* embed ÆÐÄ¡¸¦ Àû¿ëÇÒ ÅÂ±×¸¦ ¼³Á¤ÇÕ´Ï´Ù
* ±âº»°ªÀº object,eembed,appelt ÅÂ±×ÀÔ´Ï´Ù
* false °ªÀÎ°æ¿ì ÆÐÄ¡¿¡¼­ Á¦¿ÜµË´Ï´Ù
*/
if(typeof(__embed_tags)=='undefined'){
	var __embed_tags = {object:true,embed:true,applet:false}
}

/**
* ÇÃ·¡½¬ÆÄÀÏÁß flashvars ¸¦ »ç¿ëÇÒ°æ¿ì ÇØ´ç ÇÃ·¡½¬ÀÇ ¿ÀºêÁ§Æ®¾ÆÀÌµð:true °ªÀ¸·Î object¸¦ µî·ÏÇØ ÁÖ¼¼¿ä
*/
var __flash_force_objs = {};

if(document.attachEvent){
	document.write('<style type="text/css">');
	document.write('object,embed{display:none;}');
	document.write('</style>');
	document.attachEvent('onreadystatechange',
		function (){
			
			if(__embed_target_id===null){
				var __target = document;
			}else{
				var __target = document.getElementById(__embed_target_id);
			}
			if (document.readyState == "complete"){
				function _replace(obj){
					var obj_re = document.createElement(obj.outerHTML);					
					obj_re.style.display='inline';
					obj.parentNode.replaceChild(obj_re,obj);
				}
				function _inner(obj){
					obj.style.display='inline';					
					var html = obj.outerHTML;
					var classid = obj.classid.toLowerCase();
					if(classid=='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' && typeof(__flash_force_objs[obj.id])=='undefined'){//flash ÀÎ°æ¿ì
						obj.insertAdjacentHTML('beforeBegin',html);
						obj.parentNode.removeChild(obj);
					}else{						
						//º¯°æÇÏ°íÀÚÇÏ´Â ActiveX classid ¸¦ Ãß°¡ÇÏ½Ã±â ¹Ù¶ø´Ï´Ù
						if(classid=='clsid:6bf52a52-394a-11d3-b153-00c04f79faa6' || //media 7
						classid=='clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95' || //6.4
						classid=='clsid:6bf52a52-394a-11d3-b153-00c04f79faa6' ||
						classid=='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'
						){//media player 10
							embed_pos = html.indexOf('embed');
							if(embed_pos!=-1){//embed °¡ Á¸ÀçÇÏ´Â°æ¿ì
								var embed = '<'+html.substr(embed_pos);
								embed = embed.substr(0,embed.length-9);
								obj.insertAdjacentHTML('beforeBegin',embed);
								obj.parentNode.removeChild(obj);
							}else{
								//object·Î¸¸ µÇ¾î ÀÖ´Â°æ¿ì µ¿¿µ»ó ºÎºÐ¸¸ ÆÐÄ¡ÇÑ´Ù
								var embed = document.createElement('embed');
								var total = obj.childNodes.length;
								embed.setAttribute('autostart',0);
								if(obj.width){
									embed.setAttribute('width',obj.width);
								}
								if(obj.height){
									embed.setAttribute('height',obj.height);
								}
								for(var k=0;k<total;k++){
									n = obj.childNodes.item(k).getAttribute("name");
									v = obj.childNodes.item(k).getAttribute("value");
									if(n=='URL' || n=='url' || n=='FileName'){
										n = 'src';
									}
									embed.setAttribute(n,v);
								}
								if(embed.getAttribute('src')){
									embed.style.display = 'inline';
									obj.parentNode.replaceChild(embed,obj);
								}else{
									//ÆÄÀÏ¿¢¼¼½º object°¡ ¾Æ´Ñ°æ¿ì´Â À¯ÁöÇÑ´Ù								
								}
							}
						}
					}
				}

				if(__embed_tags.object===true){
					var objs = __target.getElementsByTagName('object');
					var i = objs.length;
					while(i-->0){
						_inner(objs[i]);
					}
				}
				if(__embed_tags.embed===true){
					var objs = __target.getElementsByTagName('embed');
					var i = objs.length;
					while(i-->0){
						_replace(objs[i])
					}
				}

				if(__embed_tags.applet===true){
					var objs = __target.getElementsByTagName('applet');
					var i = objs.length;
					while(i-->0){
						_replace(objs[i])
					}
				}
			}
		}
	);
}

// ¿©±â±îÁö IE Embed ÆÐÄ¡














function Link(num){ 
	switch (num)
	{
		//top menu
		case 0: document.location.href="/index.php";// home
		break;
		case 1: document.location.href="/customer/qna.php";// e-mail
		break;
		case 2: document.location.href="/sitemap.php";// sitemap
		break;

		
		// sub01 Dimplex ºê·£µå
		case 11: document.location.href="/brand/introduction.php";// Dimplex ¼Ò°³
		break;
		case 12: document.location.href="/brand/history.php";// Dimplex ¿¬Çõ
		break;
		case 13: document.location.href="/brand/global.php";// Dimplex Global Site
		break;

		// sub02 Dimplex Fire Á¦Ç°
		case 211: document.location.href="/products/outline.php";//º®³­·Î °³¿ä
		break;

		case 221: document.location.href="/products/free_Viotta.php?sw=Viotta";//InsetÇü _ Michigan
		break;
		case 222: document.location.href="/products/inset_Horton.php?sw=Horton";//InsetÇü_ Horton
		break;
		case 223: document.location.href="/products/inset_Avola.php?sw=Avola";//InsetÇü_ Avola
		break;
		case 224: document.location.href="/products/inset_Michigan.php?sw=Michigan";//InsetÇü _ Michigan
		break;		

		case 231: document.location.href="/products/free_Rectory.php?sw=Rectory";//Free-StandingÇü_ Rectory
		break;
		case 232: document.location.href="/products/free_Montana.php?sw=Montana";//Free-StandingÇü_ Montana
		break;
		case 233: document.location.href="/products/free_Jazz.php?sw=Jazz";//Free-StandingÇü_ Jazz
		break;
		case 234: document.location.href="/products/free_LEELC.php?sw=LEE RC";//Free-StandingÇü_ LEE RC
		break;

		case 241: document.location.href="/products/wall_Sp9.php?sw=SP9";//º®°ÉÀÌÇü_ SP9
		break;
		case 242: document.location.href="/products/wall_Sp8.php?sw=SP8";//º®°ÉÀÌÇü_ SP8
		break;
		case 243: document.location.href="/products/wall_Sp4.php?sw=SP4";//º®°ÉÀÌÇü_ SP4
		break;
		case 244: document.location.href="/products/wall_Sp3.php?sw=SP3";//º®°ÉÀÌÇü_ SP3
		break;
		case 245: document.location.href="/products/wall_Sp2.php?sw=SP2";//º®°ÉÀÌÇü_ SP2
		break;

		case 251: document.location.href="/products/deco_Spacer.php?sw=Spacer Kit";//¾×¼¼»ç¸®&Àå½ÄÀå_ Spacer Kit
		break;
		case 252: document.location.href="/products/deco_Stove.php?sw=Stove Pipe";//¾×¼¼»ç¸®&Àå½ÄÀå_ Stove Pipe
		break;
		case 253: document.location.href="/products/deco_Alternative.php?sw=Alternative Fuel Beds";//¾×¼¼»ç¸®&Àå½ÄÀå_ Alternative Fuel Beds
		break;
		case 254: document.location.href="/products/deco_Holwell.php?sw=HolWell Surround";//¾×¼¼»ç¸®&Àå½ÄÀå_ HolWell Surround
		break;
		case 255: document.location.href="/products/deco_Ashmore.php?sw=Ashmore Surround";//¾×¼¼»ç¸®&Àå½ÄÀå_ Ashmore Surround
		break;
		case 256: document.location.href="/products/deco_Rockboune.php?sw=Rockboune Surround";//¾×¼¼»ç¸®&Àå½ÄÀå_ Rockboune Surround
		break;

		case 261: document.location.href="/products/online_brochure.php";//¿Â¶óÀÎ ºê·Î½´¾î
		break;

		// sub03 Dimplex ¼î·ë
		case 31: document.location.href="/showroom/experience.php";// Dimplex Ã¼Çè°ü
		break;
		case 32: document.location.href="/showroom/interior.php";// Dimplex ÀÎÅ×¸®¾î
		break;
		case 33: document.location.href="/showroom/point.php";// Dimplex Æ¯ÀåÁ¡
		break;

		// sub04 ½ºÅä¸®
		case 41: document.location.href="/story/event/list.php";// ÀÌº¥Æ®
		break;
		case 42: document.location.href="/story/story/list.php";// Ã¼Çè½ºÅä¸®
		break;
		case 43: document.location.href="/story/gallery.php";// PC °¶·¯¸®
		break;
		case 44: document.location.href="/story/e_card.php";// PC °¶·¯¸®
		break;

		// sub05 °í°´Áö¿ø
		case 51: document.location.href="/customer/news/list.php";// ´º½º&°øÁö
		break;
		case 52: document.location.href="/customer/faq/list.php?SortBy=orderby";// FAQ
		break;
		case 53: document.location.href="/customer/qna.php";// ¿Â¶óÀÎ ¹®ÀÇ&Á¦¾È
		break;
		case 54: document.location.href="/customer/buy.php";// ±¸ÀÔÃ³ ¾È³»
		break;
		case 55: document.location.href="/customer/cooperation.php";// »ç¾÷Á¦ÈÞ ¾È³»
		break;
		case 56: document.location.href="/customer/as.php";// A/S¾È³»
		break;

		// sub06 È¸»ç¼Ò°³
		case 61: document.location.href="/company/company.php";// È¸»ç°³¿ä
		break;
		case 62: document.location.href="/company/vision.php";// ºñÀü
		break;
		case 63: document.location.href="/company/info.php";// »ç¾÷Á¦ÈÞ ¾È³»
		break;
		case 64: document.location.href="/company/map.php";// À§Ä¡ ¹× ¿¬¶ôÃ³
		break;
	}
}

//Á¦Ç°¼Ò°³ÂÊ ¸Þ´º ·Ñ¿À¹ö
over="index.html";
last="index.html";
but_a = new Image();
but_b = new Image();
but_c = new Image();
but_a.src = "/images/btn_products01a.gif";
but_b.src = "/images/btn_products02a.gif";
but_c.src = "/images/btn_products03a.gif";

function bar_over(item) {
  over = item;
  if (item == 'a') {
	 document[item].src = but_a.src;}
  else if (item=='b') {
	 document[item].src = but_b.src;}
  else if (item=='c') {
	 document[item].src = but_c.src;}
};

function bar_out(item1) {
  last = over;
  if (item1 == "a") {
	document.a.src = "/images/btn_products01.gif"; }
  else if (item1 == "b") {
	document.b.src = "/images/btn_products02.gif"; }
  else if (item1 == "c") {
	document.c.src = "/images/btn_products03.gif"; }			 
};	


//µ¿¿µ»ó °ü·Ã
var currID = null;
var mute = "off";
var pause = "off";
var stop = "off";
var cbp_min = "";
var cbp_max = "";
var replay = "off";
var curr1_x = "";

function close_myplayer() {
	clearInterval(currID);
}

function open_myplayer() {
	currID = setInterval("myplayer_position()", 100);
	cbp_min = parseInt(document.all.curr1.style.pixelLeft);
	cbp_max = parseInt(document.all.curr1.style.pixelLeft) + parseInt(document.all.state_bar.width);
	curr1_x = document.all.curr1.style.pixelLeft;
	document.myplayer.filename = file_name;
}

function myplayer_position() {
	if (document.myplayer.PlayState ==2) {
			document.all.curr1.style.pixelLeft = CurrBarPo(document.all.myplayer.CurrentPosition);
	}
	if (document.all.myplayer.CurrentPosition == document.all.myplayer.Duration) {
			document.all.curr1.style.pixelLeft = cbp_min;
			document.all.myplayer.CurrentPosition = 0;
			OnStop();
			if (replay == "on") document.myplayer.play();
	}
}

function CurrBarPo(cbp) {
	  var cbp_position = ((cbp_max - cbp_min) * cbp) / document.all.myplayer.Duration;
	  cbp_position = parseInt(cbp_position) + cbp_min;
	  return cbp_position;
}

function curr1_move() {
	var x = event.clientX;
	document.all.curr1.style.pixelLeft = x;
	var curr1_afterX = parseInt(x - curr1_x);
	var cp = "";
	cp = (document.all.myplayer.Duration * curr1_afterX) / document.all.state_bar.width;
	document.myplayer.CurrentPosition = cp;
}
function OnPlay(){
	if (myplayer.PlayState != 2)
	{
		myplayer.Play();
		chImg_play();
	}
}
function OnStop(){
	myplayer.Stop();
	myplayer.CurrentPosition=0;
	chImg_stop();
}

function OnPause(){
	if (myplayer.PlayState == 2)
	{
		myplayer.Pause();
	}
}

function chImg_play(){
	img1.src="/images/movie_play_on.gif"
	img2.src="/images/movie_stop.gif"
}
function chImg_stop(){
	img1.src="/images/movie_play.gif"
	img2.src="/images/movie_stop_on.gif"
}		




//°Ô½ÃÆÇ °Ë»ö
function checkWordSearch()
{	
	
		chkForm=document.searchForm
					
		if (chkForm.SrchWord.value == "")
		{
				alert("°Ë»ö¾î¸¦ ÀÔ·Â ÇÏ¼¼¿ä");
				chkForm.SrchWord.focus();
				return;
		}
		chkForm.submit();		
}


//´ñ±Û Ã¼Å© ±â´É
function check_delKMemo(getMemoForms)
 {
		goForm = document.getElementById(getMemoForms);
	
		if(!goForm.passwd.value)
		{
				
				alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä!")
				goForm.passwd.focus();
				return ;
		}
		else
		{
			goForm.submit();		
		}
 }


function getObject(objectId)
{
	if(document.getElementById && document.getElementById(objectId))
	{
		return document.getElementById(objectId);
	}
	else if(document.getElementByName && document.getElementByName(objectId))
	{
		return document.getElementByName(objectId);
	}
	else if (document.all && document.all(objectId))
	{
		return document.all(objectId);
	}
	else if (document.layers && document.layers[objectId])
	{
		return document.layers[objectId];
	}
	else
	{
		return false;
	}
}

	//ÀÌ¹ÌÁö ÆÄÀÏ »õÃ¢ ¿©´Â ½ºÅ©¸³Æ®
	winObj=null;	// ÃÊ±âÈ­
	function OpenWin(sel,imgname)
	{
		img = new Image();
		img.src=sel.document[imgname].src;	
		draw();
	}

	function draw()
	{
		if(img.complete == false) 
		{
			setTimeout("draw()", "100");
			return;
		}
		
	width=img.width //+ 20; //ÀÌ¹ÌÁö ³Êºñ°ª
	height=img.height// + 25; //ÀÌ¹ÌÁö ³ôÀÌ °ª

	var attr ="width="+width + ",height="+height

	// À©µµ¿ì¸¦ ¿­°í ÀÌ¹ÌÁö Ãâ·Â.
	if(winObj != null && winObj.closed == false) 
	{	winObj.close();	}
	winObj = window.open("","imgwindow",attr + ',top=160' + ',left=200, resizable=0' );
	winObj.document.open()
	winObj.document.write("<html><body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>")
	winObj.document.write("<img alt='ÀÌ¹ÌÁö¸¦ Å¬¸¯ ÇÏ½Ã¸é ÇöÀçÃ¢À» ´Ý½À´Ï´Ù' src=" + img.src + " style='cursor: hand;'" + " onClick='self.close()'")
	winObj.document.write("<body><html>")
	winObj.document.close()


	}		



	// °¡¿îµ¥·Î »õÃ¢ ¶ç¿ì±â
function winOpenCenter(url, wname, width, height, scrl)
{
		
	var winl = (screen.width - width) / 2;
	var wint = (screen.height - height) / 2;

	if (scrl == null) {
		var scroll = "no";
	} else {
		var scroll = "yes";
	}

	window.open(url, wname, "left=" + winl + ", top=" + wint + ", scrollbars=" + scroll + ", resizable=no, width=" + width + ", height=" + height);
}


//-------------ÀÌ¹ÌÁö »çÀÌÁî Ã¢Å©±â¿¡ ¸Â°Ô ¸®»çÀÌÂ¡--------------//

function upload_img_resize(target_img,imgsize) 
{ 
		var newX; 
		var newY; 
		var newHeight; 
		var newWidth; 
		if (imgsize < 100){
			var maxWidth = 800;
			var maxHeight = 600;
		}else{
			var maxWidth = imgsize;
			var maxHeight = imgsize*0.75;
		}

		var newImg = new Image(); 
		newImg.src = target_img.src; 

		imgw = newImg.width; 
		imgh = newImg.height; 

		if (imgw > maxWidth || imgh > maxHeight) { 
			if (imgw > imgh) { 
				if (imgw > maxWidth) 
					newWidth = maxWidth; 
				else 
					newWidth = imgw; 
					newHeight = Math.round((imgh * newWidth) / imgw); 
			} else { 
				if (imgh > maxHeight) 
					newHeight = maxHeight; 
				else 
					newHeight = imgh; 
					newWidth = Math.round((imgw * newHeight) / imgh); 
				} 
		}else { 
			newWidth = imgw; 
			newHeight = imgh; 
		} 

		newWidth = newWidth.toFixed(0)
		newHeight = newHeight.toFixed(0)

		newX = maxWidth / 2 - newWidth / 2; 
		newY = maxHeight / 2 - newHeight / 2; 
		target_img.onload = null; 
		target_img.src = newImg.src; 
		target_img.width = newWidth; 
		target_img.height = newHeight; 
} 


 //Ã¼Çè ½ºÅä¸® Ã¼Å©ÇÔ¼ö
function checkEditFormStory(getOper)
{
		var getForm = document.checkForm
	/*		
		if ((getForm.attachFile5.value == "") && (getForm.getFileName5.value == ""))
		{
			alert("¸®½ºÆ® ÀÌ¹ÌÁö¸¦ ÀÔ·ÂÇÏ¼¼¿ä")
			getForm.attachFile5.focus();
			return ;
		}
		else if (getForm.attachFile5.value != "") 
		{
			if (fileCheckOnly(getForm.attachFile5.value,"")  == false) 	{	return ;	}
		}
	
	*/
		if (isCkeckBlank(getForm.title,"Á¦¸ñ" ) == false)	{	return ;	}		//°Ô½Ã¹° Á¦¸ñ
		if (isCkeckBlank(getForm.id,"ÀÌ¸§" ) == false)	{	return ;	}	//°Ô½Ã¹° ÀÌ¸§
		if (isCkeckBlank(getForm.pwd,"ºñ¹Ð¹øÈ£" ) == false)	{	return ;	}	// °Ô½Ã¹° ºñ¹Ð¹øÈ£
		if (checkEmail(getForm.email,"ÀÌ¸ÞÀÏ" ) == false)	{	return ;	}	// °Ô½Ã¹° ÀÌ¸ÞÀÏ
		getForm.content.value = getObject("editBox").html;
		getForm.submit();
}



//°í°´Áö¿ø ÆûÃ¼Å©
function checkWriteFormQna()
{
		var getForm = document.checkForm
		
		
		if (isCkeckBlank(getForm.name,"ÀÌ¸§") == false)						{	return;	} //ÀÌ¸§ Ã¼Å©
		if (isCkeckBlank(getForm.tel,"¿¬¶ôÃ³") == false)				{	return;	} //¿¬¶ôÃ³ Ã¼Å©
		if (checkEmail(getForm.email,"ÀÌ¸ÞÀÏ") == false)					{	return;	} //ÀÌ¸ÞÀÏ Ã¼Å©
		
		if (getForm.part.value == "")
		{
			alert("¹®ÀÇ À¯ÇüÀ» ¼±ÅÃÇÏ¼¼¿ä")
			return ;
		}

		if (isCkeckBlank(getForm.title,"Á¦¸ñ") == false)					{	return;	} //Á¦¸ñ Ã¼Å©
		if (isCkeckBlank(getForm.content,"³»¿ë") == false)				{	return;	} //³»¿ë Ã¼Å©
		
	getForm.submit();
}



//Æû °ª °ø¶õÃ¼Å© ÈÄ °æ°í ¸Þ½ÃÁö ¶ç¿ì±â 
function isCkeckBlank(checkBlank,notice)
{
	if(checkBlank.value.length == 0) 
		{
			alert(notice+" À»(¸¦) ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
			checkBlank.focus();
			return false;
		}
 return true;
}

///ÀÌ¸ÞÀÏ Ã¼Å©
function checkEmail(obj,notice)
{
	 if (isCkeckBlank(obj,notice) == false)	 		{	return false;	}

	 if( obj.value.length > 0 )
	{
            var regExp = /[a-z0-9]{2,}@[a-z0-9-]{2,}\.[a-z0-9]{2,}/i;
                if(!regExp.test(obj.value))
                {
                        alert('Àß¸øµÈ e-mail Çü½ÄÀÔ´Ï´Ù.');
                        obj.value = "";
                        obj.focus();
                        return false ;
               }
	}
 return true;
}






function CheckTelNo()
{
	if(event.keyCode != 45 )
	{
		if( event.keyCode < 48 || event.keyCode > 57 ) event.keyCode=0;
	}
}








//////ÀÌ¹ÌÁö ÆÄÀÏ¹«°á¼º °Ë»ç ÇÔ¼ö
function fileCheckView(obj)
{
		// ¼±ÅÃÆÄÀÏÀÇ °æ·Î¸¦ ºÐ¸®ÇÏ¿© È®ÀåÀÚ¸¦ ±¸ÇÕ´Ï´Ù.
		pathpoint	= obj.lastIndexOf('.');
		filepoint		= obj.substring(pathpoint+1,obj.length);
		loc				=	obj.lastIndexOf('\\')
		fileName	=	obj.substring(pathpoint,loc+1); //ÆÄÀÏ¸í
		filetype		= filepoint.toLowerCase();			//È®ÀåÀÚ
		
		//È®ÀåÀÚ Ã¼Å©	
		 if (obj.match(/(.php|.asp|.jsp|.inc|.htm|.html|.pl|.cgi|.exe|.js)$/gi) )
		{
			alert('ÇØ´ç ÆÄÀÏÀº ¾÷·Îµå°¡ ºÒ°¡´ÉÇÕ´Ï´Ù');
			return false;	
		}

}





//////ÀÌ¹ÌÁö ÆÄÀÏ¹«°á¼º °Ë»ç ÇÔ¼ö
function fileCheckOnly(obj,preName)
{
		
	// ¼±ÅÃÆÄÀÏÀÇ °æ·Î¸¦ ºÐ¸®ÇÏ¿© È®ÀåÀÚ¸¦ ±¸ÇÕ´Ï´Ù.
	pathpoint	= obj.lastIndexOf('.');
	
	filepoint		= obj.substring(pathpoint+1,obj.length);
	loc			=	obj.lastIndexOf('\\')
	fileName	=	obj.substring(pathpoint,loc+1);
	filetype		= filepoint.toLowerCase();
	
		
	// È®ÀåÀÚ°¡ ÀÌ¹ÌÁö ÆÄÀÏÀÌ¸é preview¿¡ º¸¿©ÁÝ´Ï´Ù. || filetype=='asf' || filetype=='mov' || filetype=='avi')
	 if (obj.match(/(.jpg|.gif|.png|.jpeg|.bmp)$/gi) )
	{
			// ÀÌ¹ÌÁö È®ÀåÀÚÀÌÁö¸¸ BMP È®ÀåÀÚ¶ó¸é ÀÏ´Ü °æ°í¸¦ ÁØ´Ù.
			// ÀÌ ºÎºÐÀº ²À ÇÊ¿äÇÑ ºÎºÐÀº ¾Æ´ÏÁö¸¸ Á¦°¡ ¿î¿µÀÚ¶ó¸é bmp ÆÄÀÏÀº ¿ë·®ÀÌ Å©±â¶§¹®¿¡ À¢Áö.. -_-;
			if(filetype=='bmp')
			{
				upload = confirm('BMP ÆÄÀÏÀº À¥»ó¿¡¼­ »ç¿ëÇÏ±â¿£ ÀûÀýÇÑ ÀÌ¹ÌÁö Æ÷¸ËÀÌ ¾Æ´Õ´Ï´Ù.\n±×·¡µµ °è¼Ó ÇÏ½Ã°Ú½À´Ï±î?');
				if(!upload) return false;
			}

			if(preName != "")
			{									
					imgSrc = document.getElementById(preName)
					imgSrc.src = obj;
			}
	}
	else
	{
		// ÀÌ¹ÌÁö È®ÀåÀÚ°¡ ¾Æ´Ò°æ¿ì °æ°í¸¦ ÁÖ¸ç, ¿ø·¡ÀÇ ÀÓ½Ã ÀÌ¹ÌÁö °æ·Î·Î ¹Ù²ãÁÝ´Ï´Ù.
		alert('ÀÌ¹ÌÁö ÆÄÀÏ¸¸ ¾÷·Îµå ÇÏ½Ç¼ö ÀÖ½À´Ï´Ù.');
		return false;
	}
		
	
}


//ÇÑ±Û Ã¼Å©
function isKor(str)
{
	for(i=0; i<str.length; i++)
	{
		if(str.charCodeAt(i) > 12593)
				return true;
  	}
	return false;
}



 function check_delK()
 {
	var form = document.delform
	
     if( form.pwd.value == "")
    {
        alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·Â ÇÏ¼¼¿ä!.");
        form.pwd.focus();
        return;
    }
	
	form.submit();		
 }

//°Ô½ÃÆÇ ºñÈ¸¿ø »èÁ¦
	ne=(document.layers)? 1:0
	ie=(document.all)? 1:0 
 
function del_list(name)
{	
	divname=(ie)? document.all[name].style:document.layers[name] 
	
	if(ie || ne)
	{
		if(divname.display=="none")
		{
			divname.display="inline"
			document.delform.pwd.focus()
		}
		else
		{	divname.display="none"	}	
	}
}

// ÀÌ¹ÌÁö ¸®»çÀÌÁî
function imgRsize(mw, mh, iw, ih) {
	cs = new Array;

	if (mw > 0 && mh > 0) {
		if (iw > mw || ih > mh) {
			var rw = iw / mw;
			var rh = ih / mh;
			if (rw > rh) {
				cs[0] = mw;
				cs[1] = Math.ceil(ih * mw / iw);
			} else {
				cs[0] = Math.ceil(iw * mh / ih);
				cs[1] = mh;
			}
		} else {
				cs[0] = iw;
				cs[1] = ih;
		}
	} else if (mw > 0) {
		if (iw > mw) {
			cs[0] = mw;
			var rw = mw / iw;
		} else {
			cs[0] = iw;
			var rw = 1;
		}
		cs[1] = Math.ceil(ih * rw);
	} else if (mh > 0) {
		if (ih > mh) {
			cs[1] = mh;
			var rh = mh / ih;
		} else {
			cs[1] = ih;
			var rh = 1;
		}
		cs[0] = Math.ceil(iw * rh);
	}

	return cs;
}
			

	function goUrl(getUrls)
	{
			var gourl = "http://"+getUrls;
			window.open(gourl,"","")
	}
	
	




//eCard ÆûÃ¼Å© 2005-12-13 11:11¿ÀÀü

	function SendingMail(Gubn)
	
	{
		var fromname = CardForm.FromName.value;
		var fromemail = CardForm.FromEmail.value;

		var toname = CardForm.ToName.value;
		var toemail = CardForm.ToEmail.value;
		
		var subject = CardForm.Subject.value;
		var msgbody = CardForm.MsgBody.value;
		

		if(Gubn == "0") 
		{
			if(!fromname){
				alert("º¸³»´Â »ç¶÷ ÀÌ¸§¶õÀ» ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä");
				CardForm.FromName.focus();
				return;
			}
			if(!fromemail){
				alert("º¸³»´Â »ç¶÷ E-mail¶õÀ» ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä");
				CardForm.FromEmail.focus();
				return;
			} else {
				if (checkEmail(CardForm.FromEmail,"ÀÌ¸ÞÀÏ" ) == false)	{	return ;	}
			}		
			
			
			if(CardForm.WhileCheck.checked == false)
			{
				if(!toname){
					alert("¹Þ´Â »ç¶÷ ÀÌ¸§¶õÀ» ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä");
					CardForm.ToName.focus();
					return;
				}		
				if(!toemail){
					alert("¹Þ´Â »ç¶÷ E-mail¶õÀ» ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä");
					CardForm.ToEmail.focus();
					return;
				} else {
					if (checkEmail(CardForm.ToEmail,"ÀÌ¸ÞÀÏ" ) == false)	{	return ;	}
				}
			}
			
			
	
			if(!subject){
				alert("¸ÞÀÏ Á¦¸ñÀ» ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä");
				CardForm.Subject.focus();
				return;
			}
			if(!msgbody){
				alert("¸ÞÀÏ ³»¿ëÀ» ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä");
				CardForm.MsgBody.focus();
				return;
			} else {

				var LineCnt = CardForm.MsgBody.value.split('\n').length;
				if(LineCnt>6)
				{
					alert("±Û Line ¼ö´Â 6LineÀ¸·Î Á¦ÇÑµË´Ï´Ù");
					return;
				}
			}

		}





		document.CardForm.action="SendingCardExec.php?PreViewGubn="+Gubn;
		document.CardForm.method="post";
		document.CardForm.submit();
	
	}

	function LineCheck()
	{
		var LineCnt = CardForm.MsgBody.value.split('\n').length;
		if(LineCnt>6)
		{
			alert("±Û Line ¼ö´Â 6LineÀ¸·Î Á¦ÇÑµË´Ï´Ù");
			return;
		}
	}

	function updateChar(length_limit)
	{
		var comment='';
		comment = eval("document.CardForm.MsgBody");
		var form = document.CardForm;
		var length = calculate_msglen(comment.value);
		document.getElementById("textlimit").innerHTML = length;
		
		var LineCnt = CardForm.MsgBody.value.split('\n').length;
		document.getElementById("linelimit").innerHTML = LineCnt;
		
		if (length > length_limit)
		{
			alert("ÃÖ´ë " + length_limit + "byteÀÌ¹Ç·Î ÃÊ°úµÈ ±ÛÀÚ¼ö´Â ÀÚµ¿À¸·Î »èÁ¦µË´Ï´Ù.");
			comment.value = comment.value.replace(/\r\n$/, "");
			comment.value = assert_msglen(comment.value, length_limit);
		}



	}

	function calculate_msglen(message)
	{
		var nbytes = 0;

		for (i=0; i<message.length; i++)
		{
			var ch = message.charAt(i);
			if(escape(ch).length > 4)
			{
				nbytes += 2;
			}
			else if (ch == '\n')
			{
				if (message.charAt(i-1) != '\r')
				{
					nbytes += 1;
				}
			}
			else if (ch == '<' || ch == '>')
			{
				nbytes += 4;
			}
			else
			{
				nbytes += 1;
			}
		}

		return nbytes;
	}

	function assert_msglen(message, maximum)
	{
		var inc = 0;
		var nbytes = 0;
		var msg = "";
		var msglen = message.length;

		for (i=0; i<msglen; i++)
		{
			var ch = message.charAt(i);
			if (escape(ch).length > 4) {
				inc = 2;
			} else if (ch == '\n') {
				if (message.charAt(i-1) != '\r') {
					inc = 1;
				}
			} else if (ch == '<' || ch == '>') {
				inc = 4;
			} else {
				inc = 1;
			}
			if ((nbytes + inc) > maximum) {
				break;
			}
			nbytes += inc;
			msg += ch;
		}
	
		document.getElementById("textlimit").innerHTML = nbytes;
		return msg;
	}

	
//  -->
 

function Link(num){ 
	switch (num)
	{
		case 01: document.location.href="/index.html"; //home
			break;
		case 02: document.location.href="#"; //·Î±×ÀÎ
			break;
		case 03: document.location.href="/main/etc/dentia/linksite.html"; //°ü·Ã»çÀÌÆ®
			break;
		case 04: document.location.href="/main/etc/dentia/sitemap.html"; //»çÀÌÆ®¸Ê
			break;
		case 05: document.location.href="/bbs/zboard.php?id=committee"; //¿î¿µÀ§Àü¿ëÃ¢
			break;

		//ÃæÄ¡¿¹¹æ »ïÃÑ»ç
		case 61: document.location.href="/main/etc/3rules/xylitol.html"; //ÀÚÀÏ¸®Åç
			break;
		case 62: document.location.href="/main/etc/3rules/fluorine.html"; //ºÒ¼Ò
			break;
		case 63: document.location.href="/main/etc/3rules/brushing.html"; //ÀÕ¼ÖÁú
			break;

		//About Us
		case 11: document.location.href="/main/about/intro.html"; //ÀÎ»ç¸»
			break;
		case 12: document.location.href="/main/about/business.html"; //»ç¾÷³»¿ë
			break;
		case 13: document.location.href="/main/about/present.html"; //¿î¿µÀ§¿ø ¼Ò°³
			break;
		case 14: document.location.href="/main/about/chichi.html"; //Ä¡Ä¡¼Ò°³
			break;

		//information
		case 21: document.location.href="/main/info/prevention.html"; //ÃæÄ¡¿¹¹æÁ¤º¸
			break;
		case 22: document.location.href="/bbs/zboard.php?id=material"; //¿¬±¸ÀÚ·á
			break;
		case 23: document.location.href="/main/info/poster.html"; //ÃæÄ¡¿¬È«º¸ÀÚ·á
			break;

		//Q&A
		case 31: document.location.href="/bbs/zboard.php?id=faq"; //FAQ
			break;
		case 32: document.location.href="/bbs/zboard.php?id=qna"; //Q&A
			break;
		case 33: document.location.href="/bbs/zboard.php?id=diction"; //¿ë¾î»çÀü
			break;

		//community
		case 41: document.location.href="/bbs/zboard.php?id=free"; //°Ô½ÃÆÇ
			break;
		case 42: document.location.href="/bbs/zboard.php?id=photo"; //Æ÷Åä°¶·¯¸®
			break;
		case 43: document.location.href="/bbs/zboard.php?id=debate"; //ÁýÁßÅä·Ð
			break;

		//education
		case 51: document.location.href="/bbs/zboard.php?id=edu_board"; //±³À°ÆÀ °Ô½ÃÆÇ
			break;
		case 52: document.location.href="/bbs/zboard.php?id=edu_gal"; //±³®‚ÆÀ °¶·¯¸®
			break;
		case 53: document.location.href="/main/edu/apply.html"; //±³À° ½ÅÃ»¼­
			break;
	}
}	