// flash set
var root = "/flash/";
function getROOT_PATH(){return root;}
function getNAVI_NUM(){return pageCode;}
function getNAVI_EXT(){return pageExt;}

function CloseWin(){
      window.close();
   }

/***************************************
* ¹è°æ±ô¹ÚÀÓ Á¦¾î
***************************************/
(function(){ 
/*Use Object Detection to detect IE6*/ 
var m = document.uniqueID /*IE*/ 
document.compatMode /*>=IE6*/ 
!window.XMLHttpRequest /*<=IE6*/ 
document.execCommand ; 
try{ 
if(!!m){ 
m("BackgroundImageCache", false, true) /* = IE6 only */ 
} 
}catch(oh){};
})();


// browser title
//BrowserTitle = "  "; 
//document.title = BrowserTitle;

////////////////////////////////////////////////////////////////////////////////////
// flash ¿¬µ¿ °ü·Ã function
////////////////////////////////////////////////////////////////////////////////////
//
// Flash Grid Component µ¿ÀÛ °³°ý
//
// 1. flash°¡ ·ÎµùÀÌ ¿Ï·áµÇ¸é flash ==> script dataGridLoadOk() È£Ãâ
// 2. ·Îµù Á÷ÈÄ Object ÅÂ±×ÀÇ param¿¡¼­ flashVars¼Ó¼ºÀÇ requestUrlÀÌ Á¸ÀçÇÏ¸é flash ==> script flash_enc() È£Ãâ
// 3. ·Îµù Á÷ÈÄ Object ÅÂ±×ÀÇ param¿¡¼­ flashVars¼Ó¼ºÀÇ requestUrlÀÌ Á¸ÀçÇÏÁö ¾ÊÀ¸¸é ¸ØÃã
// 4. Àü¼Û ¹öÆ°À» Å¬¸¯ ½Ã¿¡ flashDataGridSend()¸¦ È£ÃâÇÏ¸é flash ==> script flash_enc() È£Ãâ
////////////////////////////////////////////////////////////////////////////////////

// Flash Grid load ¿Ï·á ¿©ºÎ
var isFlashGridLoadOk = false;

// Flash Grid ÀÛ¾÷Áß ¿©ºÎ
var isFlashGridWorkingOk = false;

// flashLoad(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö, À©µµ¿ì¸ðµå)
function flashLoad(url,w,h,id,bg,vars,win) {	

	win = "transparent";	

	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ

	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle' alt='flash object' title=''>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='FlashVars' value='"+vars+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<param name='base' value='.'>"+
	"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";



	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);	

	//FlashÀÇ ExternalInterface°¡ Form Tag³»¿¡¼­ ¿À·ù³ª´Â ¹ö±×¸¦ ÇØ°áÇÏ´Â ÄÚµå     
	eval("window." + id + " = document.getElementById('" + id + "');");



}

function EmbedInclude(url,w,h){
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' id='"+url+"' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width="+w+" height="+h+"><param name='movie' value="+url+"><param name=quality value=high><param name=wmode value=transparent><param name='allowFullScreen' value='true' /><param name='allowScriptAccess' value='always' /><embed src="+url+" id='"+url+"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width="+w+" height="+h+" wmode=transparent></embed></object>");
}


function EmbedInclude1(){
document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' id='SiteMap' width='1032' height='320' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0'><param name='movie' value='/flash/dimchae_sitemap_mother.swf' /><param name='quality' value='high' /><param name='wmode' value='transparent'><param name='allowScriptAccess' value='always' /><embed src='/flash/dimchae_sitemap_mother.swf' quality='high' width='1032' height='280' name='SiteMap'  align='middle' wmode='transparent' quality='high' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' ></embed></object>");
}


/* quick menu script */

//----------------------------------------------
//Floating v1.1 Source By Bermann
//dobermann75@gmail.com
//----------------------------------------------

//new Floating(Àû¿ëÇÒ°³Ã¼ , XÃà¿©¹é , YÃà¿©¹é , ¹Ì²ô·¯Áö´Â¼Óµµ:ÀÛÀ»¼ö·Ïºü¸§..±âº»20 , ºü¸£±â:ÀÛÀ»¼ö·ÏºÎµå·¯¿ò..±âº»10);

function Floating(FloatingObj,MarginX,MarginY,Percentage,setTime) {
	this.FloatingObj = FloatingObj;
	this.MarginX = (MarginX) ? MarginX : 0;
	this.MarginY = (MarginY) ? MarginY : 0;
	this.Percentage = (Percentage) ? Percentage : 20;
	this.setTime = (setTime) ? setTime : 10;
	this.FloatingObj.style.position = "absolute";
	this.Body = null;
	this.setTimeOut = null;
	this.Run();
}

Floating.prototype.Run = function () {
	if ((document.documentElement.scrollLeft + document.documentElement.scrollTop) > (document.body.scrollLeft + document.body.scrollTop)) {
		this.Body = document.documentElement;
	} else {
		this.Body = document.body;
	}

	var This = this;
	var FloatingObjLeft = (this.FloatingObj.style.left) ? parseInt(this.FloatingObj.style.left,10) : this.FloatingObj.offsetLeft;
	var FloatingObjTop = (this.FloatingObj.style.top) ? parseInt(this.FloatingObj.style.top,10) : this.FloatingObj.offsetTop;
	var DocLeft = this.Body.scrollLeft + this.MarginX;
	var DocTop = this.Body.scrollTop + this.MarginY;

	var MoveX = Math.abs(FloatingObjLeft - DocLeft);
	MoveX = Math.ceil(MoveX / this.Percentage);
	var MoveY = Math.abs(FloatingObjTop - DocTop);
	MoveY = Math.ceil(MoveY / this.Percentage);

	if (FloatingObjLeft < DocLeft) {
		this.FloatingObj.style.left = FloatingObjLeft + MoveX + "px";
	} else {
		this.FloatingObj.style.left = FloatingObjLeft - MoveX + "px";
	}

	if (FloatingObjTop < DocTop) {
		this.FloatingObj.style.top = FloatingObjTop + MoveY + "px";
	} else {
		this.FloatingObj.style.top = FloatingObjTop - MoveY + "px";
	}

	window.clearTimeout(this.setTimeOut);
	this.setTimeOut = window.setTimeout(function () { This.Run(); },this.setTime);
}

/***************************************
* IMAGE_ROLLOVER
***************************************/

function menuOn(imgEl) {
	imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}

function menuOut(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}

/***************************************
* FAQ 
***************************************/
function showBx(id)
{
    var bx = document.getElementById(id);
    if (bx.style.display == 'block') 
    {
        bx.style.display='none';
    }
    else
    {
        bx.style.display='block';
    }
}
/***************************************
* show util 
***************************************/
function showUtil()
{
    var bx = document.getElementById("vlink");
    if (bx.style.display == 'block') 
    {
        bx.style.display='none';
    }
    else
    {
        bx.style.display='block';
    }
}

/***************************************
* image vertical align middle
***************************************/
// ¼¼·Î Áß¾ÓÁ¤·Ä
function verticalAlign(obj){
    result=(obj.offsetParent.offsetHeight - obj.offsetHeight)/2+"px";
    if(obj.readyState == "complete"){
        obj.style.marginTop="0";
        obj.style.marginTop=result;
    }else{
        return result;
    }
}

/***************************************
* Popup window
***************************************/
function openWin(url, w, h)
{
	window.open(url,'POPup','width='+w+', height='+h+'');
}
function openWin1(url, w, h)
{
	window.open(url,'POPup','width='+w+', height='+h+', scrollbars=yes');
}
function emailPop(){
  openWin('/member/email_reject.asp','553','286');
}


/***************************************
* ÀÌ¹ÌÁö·Î ¹Ù·Î ÆË¾÷¶ç¿ì±â
****************************************/
function view(what) { 
  var imgwin = window.open("",'WIN','scrollbars=no,status=no,toolbar=no,resizable=0,location=no,menu=no,width=10,height=10'); 
  imgwin.focus(); 
  imgwin.document.open(); 
  imgwin.document.write("<html>\n"); 
  imgwin.document.write("<head>\n"); 
  imgwin.document.write("<title>POP UP</title>\n"); 

  imgwin.document.write("<sc"+"ript>\n"); 
  imgwin.document.write("function resize() {\n"); 
  imgwin.document.write("pic = document.il;\n"); 

  imgwin.document.write(" var imgw = eval(pic).width; ");
  imgwin.document.write("  if (eval(pic).width > 800){ eval(pic).width = 800\n "); //800pxº¸´ÙÅ©¸é 800À¸·Î
  imgwin.document.write(" } else if(eval(pic).width < 800){ eval(pic).width = eval(pic).width\n} "); //800pxº¸´ÙÀÛÀ¸¸é ¿ø·¡Å©±â·Î

  imgwin.document.write(" if (eval(pic).height) { var name = navigator.appName\n"); 
  imgwin.document.write("  if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 80; myWidth = eval(pic).width + 10;\n"); 
  imgwin.document.write("  } else { myHeight = eval(pic).height + 9; myWidth = eval(pic).width; }\n"); 
  imgwin.document.write("  clearTimeout();\n"); 
  imgwin.document.write("  var height = screen.height;\n"); 
  imgwin.document.write("  var width = screen.width;\n"); 
  imgwin.document.write("  var leftpos = width / 2 - myWidth / 2;\n"); 
  imgwin.document.write("  var toppos = height / 2 - myHeight / 2; \n"); 
  imgwin.document.write("  self.moveTo(leftpos, toppos);\n");
  imgwin.document.write("  if (myWidth > width) { myWidth = width; }\n");
  imgwin.document.write("  self.resizeTo(myWidth, myHeight-11);\n"); 
  imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
  imgwin.document.write("</sc"+"ript>\n"); 

  imgwin.document.write("</head>\n"); 
  imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 

  imgwin.document.write("<img border=\"0\" src=\""+what+"\" name=il onload='resize();' style='cursor:pointer; display:block;' onclick='window.close();'>\n"); 

  imgwin.document.write("</body>\n");
  imgwin.document.close(); 
}

	/***************************************
	* Åõ¸í png Ä¡È¯
	***************************************/
	function setPng24(obj,switche) {
	//aa = document.getElementById(obj).className;
	//alert(aa);
			obj.width=obj.height=1;
			obj.className=obj.className.replace(/\bpng24\b/i,'');
			obj.style.filter =
			"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
			obj.src='';
			return '';
	}
  
//----------------------------------------------
//Floating v1.1 Source By Bermann
//dobermann75@gmail.com
//----------------------------------------------

//new Floating(Àû¿ëÇÒ°³Ã¼ , XÃà¿©¹é , YÃà¿©¹é , ¹Ì²ô·¯Áö´Â¼Óµµ:ÀÛÀ»¼ö·Ïºü¸§..±âº»20 , ºü¸£±â:ÀÛÀ»¼ö·ÏºÎµå·¯¿ò..±âº»10);

function Floating(FloatingObj,MarginX,MarginY,Percentage,setTime) {
	this.FloatingObj = FloatingObj;
	this.MarginX = (MarginX) ? MarginX : 0;
	this.MarginY = (MarginY) ? MarginY : 0;
	this.Percentage = (Percentage) ? Percentage : 20;
	this.setTime = (setTime) ? setTime : 10;
	this.FloatingObj.style.position = "absolute";
	this.Body = null;
	this.setTimeOut = null;
	this.Run();
}

Floating.prototype.Run = function () {
	if ((document.documentElement.scrollLeft + document.documentElement.scrollTop) > (document.body.scrollLeft + document.body.scrollTop)) {
		this.Body = document.documentElement;
	} else {
		this.Body = document.body;
	}

	var This = this;
	var FloatingObjLeft = (this.FloatingObj.style.left) ? parseInt(this.FloatingObj.style.left,10) : this.FloatingObj.offsetLeft;
	var FloatingObjTop = (this.FloatingObj.style.top) ? parseInt(this.FloatingObj.style.top,10) : this.FloatingObj.offsetTop;
	var DocLeft = this.Body.scrollLeft + this.MarginX;
	var DocTop = this.Body.scrollTop + this.MarginY;

	var MoveX = Math.abs(FloatingObjLeft - DocLeft);
	MoveX = Math.ceil(MoveX / this.Percentage);
	var MoveY = Math.abs(FloatingObjTop - DocTop);
	MoveY = Math.ceil(MoveY / this.Percentage);

	if (FloatingObjLeft < DocLeft) {
		this.FloatingObj.style.left = FloatingObjLeft + MoveX + "px";
	} else {
		this.FloatingObj.style.left = FloatingObjLeft - MoveX + "px";
	}

	if (FloatingObjTop < DocTop) {
		this.FloatingObj.style.top = FloatingObjTop + MoveY + "px";
	} else {
		this.FloatingObj.style.top = FloatingObjTop - MoveY + "px";
	}

	window.clearTimeout(this.setTimeOut);
	this.setTimeOut = window.setTimeout(function () { This.Run(); },this.setTime);
}

/*
function goSite(seq){

	if(seq!=undefined){
		
		var url = "";
		var feature = "";

		if(seq=="1"){ //¼­ºñ½º½ÅÃ»
			url = "http://www.winiasvc.co.kr/winiasvc/02_consultation/as_before.asp?sub_num=1";
			feature = "" ;
		}else if(seq=="2"){ //¸ð´ÏÅÍµð
			url = "http://monitord.dimchae.co.kr";
			feature = "";
		}else if(seq=="3"){ //ºñ³ëµð
			url = "/vinod/vinod_main.htm";
			feature = "width=800,height=525";
		}else if(seq=="4"){ //¸Å°ÅÁø
			
			//url = "/magazine/magazine_NO6/magazine11-12/view.htm";
			url = "/magazine/index.asp?url=/magazine/magazine_NO6/magazine11-12/view.htm&seq=25";
			
			//url = "/magazine/magazine_NO5/magazine10/view.htm";
			//url = "/magazine/index.asp?url=/magazine/magazine_NO5/magazine10/view.htm&seq=24"
			
			feature = "width=1024,height=768";
		}else if(seq=="5"){ //µõÃ¤ Æ¯ÀåÁ¡
			url = "/product/showroom/showroom.asp";
			feature = "fullscreen=yes,channelmode";
		}else if(seq=="6"){ //À§´Ï¾Æ¸¸µµ
			url = "http://www.winiamando.com";
			feature = "";
		}else if(seq=="7"){ //À§´Ï¾Æ¿¡¾îÄÁ
			url = "http://www.winia.co.kr";
			feature = "";
		}else if(seq=="8"){ //À§´Ï¾Æ¼­ºñ½º¼¾ÅÍ
			url = "http://www.winiasvc.co.kr/winiasvc/";
			feature = "";
		}else if(seq=="9"){ //À§´Ï¾Æ¼îÇÎ¸ô
			url = "http://www.winiashop.com/winiasvc/05_mall/ref_step02.asp?cate01=010000&sub_num=1";
			feature = "";
		}else if(seq=="10"){ //µõÃ¤ ¹Ì´ÏÈ¨ÇÇ
			url = "http://www.cyworld.com/dimchae2007";
			feature = "";
		}else if(seq=="11"){ //ÀÌ¸ÞÀÏ¼öÁý°ÅºÎ
			url = "/member/view_popup.asp";
			feature = "width=400,height=300";
		}else if(seq=="12"){//È¸¿ø¼öÁ¤
			url = "http://www.winiamando.com/sso/modify_form.asp?r_url=/index.asp";
			feature = "";
		}else if(seq=="13"){//°íÃß¹ç¾È³»ÆË¾÷
			url = "/popup/071128_popup/popup.asp";
			feature = "width=388,height=395,scroll=no";
			window.location.href = "/club/event/event_view.asp?isLastEvent=N&seq=199";

		}else if(seq=="15"){ //µõÃ¤ Æ¯ÀåÁ¡
			url = "/product/showroom/stand.asp";
			feature = "width=940,height=610,scroll=no";
		}else if(seq=="16"){ //µõÃ¤ Æ¯ÀåÁ¡
			url = "/vinod/vinod_main.htm";
			feature = "width=800,height=525,scroll=no";
		}
		window.open(url,"",feature);
	}
}
*/

//e-brosher º¸±â
function show(theURL){
	url =theURL;
	left1=(screen.availWidth-1024-5)/2;
	top1=(screen.availHeight-768-10)/2;
	newWin = window.open(url+'VIEW.HTM','','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=0, height=0, top='+top1+', left='+left1);
}

function goSite(seq){

	if(seq!=undefined){
		
		var url = "";
		var feature = "";

		if(seq=="1"){ //¼­ºñ½º½ÅÃ»
			url = "http://www.winiasvc.co.kr/winiasvc/02_consultation/as_before.asp?sub_num=1";
			feature = "" ;
		}else if(seq=="2"){ //¸ð´ÏÅÍµð
			url = "http://monitord.dimchae.co.kr";
			feature = "";
		}else if(seq=="3"){ //ºñ³ëµð
			url = "/vinod/vinod_main.htm";
			feature = "width=800,height=525";
		}else if(seq=="4"){ //¸Å°ÅÁø
			feature = "width=1024,height=768";
		}else if(seq=="5"){ //µõÃ¤ Æ¯ÀåÁ¡
			url = "/product/showroom/showroom.asp";
			feature = "fullscreen=yes,channelmode";
		}else if(seq=="6"){ //À§´Ï¾Æ¸¸µµ
			url = "http://www.winiamando.com";
			feature = "";
		}else if(seq=="7"){ //À§´Ï¾Æ¿¡¾îÄÁ
			url = "http://www.winia.co.kr";
			feature = "";
		}else if(seq=="8"){ //À§´Ï¾Æ¼­ºñ½º¼¾ÅÍ
			url = "http://www.winiasvc.co.kr/winiasvc/";
			feature = "";
		}else if(seq=="9"){ //À§´Ï¾Æ¼îÇÎ¸ô
			url = "http://www.winiashop.com/winiasvc/05_mall/ref_step02.asp?cate01=010000&sub_num=1";
			feature = "";
		}else if(seq=="10"){ //µõÃ¤ ¹Ì´ÏÈ¨ÇÇ
			url = "http://www.cyworld.com/dimchae2007";
			feature = "";
		}else if(seq=="11"){ //ÀÌ¸ÞÀÏ¼öÁý°ÅºÎ
			url = "/member/view_popup.asp";
			feature = "width=400,height=300";
		}else if(seq=="12"){//È¸¿ø¼öÁ¤
			url = "http://www.winiamando.com/sso/modify_form.asp?r_url=/index.asp";
			feature = "";
		}else if(seq=="13"){//°íÃß¹ç¾È³»ÆË¾÷
			url = "/popup/071128_popup/popup.asp";
			feature = "width=388,height=395,scroll=no";
			window.location.href = "/club/event/event_view.asp?isLastEvent=N&seq=199";
		}else if(seq=="15"){ //µõÃ¤ Æ¯ÀåÁ¡
			url = "/product/showroom/stand.asp";
			feature = "width=940,height=610,scroll=no";
		}else if(seq=="16"){ //µõÃ¤ Æ¯ÀåÁ¡
			url = "/vinod/vinod_main.htm";
			feature = "width=800,height=525,scroll=no";
		}else if(seq=="17"){ //µõÃ¤ Æ¯ÀåÁ¡
			url = "/product/showroom/door.asp";
			feature = "width=940,height=610,scroll=no";
		}
		window.open(url,"",feature);
	}
}


/// -----ÇÃ·¡½Ã¿¬µ¿ ----------------------------

 var sitemapFrame;
 var sitemapStatus = false;
 var jsReady = false;
 var sitemapHiddenId;
var showId;
function pageInit() {
   sitemapFrame = document.getElementById("SitemapFrame");
   jsReady = true;
}
function isReady() {
	 return jsReady;
 }
function CloseWin(){
     window.close();
 }

function thisMovie(movieName) {
	 if (navigator.appName.indexOf("Microsoft") != -1) {
		 return window[movieName];
	 } else {
		 return document[movieName];
	 }
 }


 function hiddenSitemap() 
 {
    sitemapFrame.style.display = "none";
	clearInterval(sitemapHiddenId);
 }

 function showSitemap() 
 {
   thisMovie("SiteMap").AppearSitemap();
 
	 clearInterval(showId);
 }

 function goSiteMap()
 {
   sitemapFrame.style.display = "block";
  showId = setInterval(showSitemap,300);
	  
 }

 //sitemapHiddenId = setInterval(hiddenSitemap,500);
 
 // lo: source url
// w: source width
// h: source height
// t: wmode ("" none, transparent, opaque ...)
// flashID: source ID
// flashvar: get variable
function view_flash(lo,w,h,t, flashID, flashvar){
document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+w+'" height="'+h+'" id="'+flashID+'">');
document.write ('<param name="movie" value="'+lo+'">');
document.write ('<param name="quality" value="high">');
document.write ('<param name="wmode" value="'+t+'">');
document.write ('<param name="allowScriptAccess" value="always">');
document.write ('<param name="FlashVars" value="'+flashvar+'">');
document.write ('<embed src="'+lo+'" FlashVars="'+flashvar+'" quality="high" allowScriptAccess="always" wmode="'+t+'" width="'+w+'" height="'+h+'" name="'+flashID+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" ></embed>');
document.write ('</object>');
}
 