<!--
/////////////////////////////////////////////////
//               IE5/6 DHTML SCRIPT            //
/////////////////////////////////////////////////

	var cspbVS="CSPBPanelBarLoading";
	var cspbGD=new Object();
	var cspbID=new Object();
	var cspbBoH=32;
	var cspbBuH=0;
	var cspbSH=0;
	var cspbBM=0;
	var cspbBS=0;
	var cspbAF=false;
	var cspbCT=0;
	var cspbCB=0;
	var cspbSS=false;
	var cspbMA=0;
	var cspbSelI=0;


	// ======================================================================================= Image Mouse Event
	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_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_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];}
	}
	// ======================================================================================= Image Mouse Event


	
	function cspbShowSection(id)
	{
		
		if(cspbVS=="CSPBPanelBarLoading")
		{
			document.all.CSPBButtons.style.display="inline";
		}
		
		if(("CSPBGroup" + id)!=cspbVS)
		{
			cspbSelI=id;
			document.all[cspbVS].style.display="none";
				
			if(document.all["CSPBGroup" + id])		// ÇÏÀ§ ¸Þ´º°¡ ÀÖÀ»½Ã¿¡¸¸ 
			{
				cspbGD=document.all["CSPBGroup" + id];cspbGD.style.display="none";
				cspbVS="CSPBGroup"+id;
				cspbRS(cspbVS);
				cspbGD.style.display="inline";
				cspbPI(id);
				
				if(cspbID.clientHeight>cspbSH)
				{
					ScrollStop=false;
					cspbCT=0;
					cspbCB=0;
					cspbMA=0;
					cspbCI(id);
					cspbSI();
				}
				else
				{
				}
				
				document.all.CSPanelBar.style.display="none";
				document.all.CSPanelBar.style.display="block";
			}
		}
		
		if(("CSPBGroupTD" + id)!=cspbVS)
		{
			cspbSelI=id;
			document.all[cspbVS].style.display="inline";
				
			if(document.all["CSPBGroupTD" + id])		// ÇÏÀ§ ¸Þ´º°¡ ÀÖÀ»½Ã¿¡¸¸ 
			{
				cspbGD=document.all["CSPBGroupTD" + id];cspbGD.style.display="none";
				cspbVS="CSPBGroup"+id;
				cspbRS(cspbVS);
				cspbGD.style.display="inline";
				cspbPI(id);
				
				if(cspbID.clientHeight>cspbSH)
				{
					ScrollStop=false;
					cspbCT=0;
					cspbCB=0;
					cspbMA=0;
					cspbCI(id);
					cspbSI();
				}
				else
				{
				}
				
				document.all.CSPanelBar.style.display="none";
				document.all.CSPanelBar.style.display="block";
			}
		}
	}
	
	
	
	function cspbRS(id)
	{
		cspbSSH(id);
		
		if(cspbSH>0)
		{
			cspbGD.style.height = cspbSH;
		}
	}
	
	
	
	function cspbSSH(id)
	{
		if(cspbAF==true)
		{
			cspbBM=document.all.CSPanelBar.offsetTop*2;
			cspbBoH=document.body.clientHeight;
			
			if(navigator.platform=="MacPPC")
			{
				cspbBuH=document.all.CSPBButtons.clientHeight+(cspbBS*2);
			}
			else
			{
				cspbBuH=document.all.CSPBButtons.offsetHeight+(cspbBS*2);
			}
			
			cspbSH=(cspbBoH-cspbBM)-(cspbBuH);
		}
		else
		{
			cspbBuH=document.all.CSPBButtons.offsetHeight+(cspbBS*2);
			cspbSH=cspbBoH-cspbBuH;
		}
		
		if(cspbSH<32)
		{
			cspbSH=24;
		}
	}
	
	
	
	function cspbPI(id)
	{
		cspbID=document.all["CSPBIcons" + id];
		cspbID.style.clip="rect(0 "+cspbGD.clientWidth+" "+cspbSH+" 0)";
		cspbID.y=0;
		
		if(cspbBS>0 && navigator.platform!="MacPPC")
		{
			cspbID.y=1;
		}
		
		cspbID.x=cspbBS;
		var cspbPO=cspbGD;
		var cspbPId="";
		
		while(cspbPId!="CSPBButtons")
		{
			cspbID.y+=cspbPO.offsetTop;
			cspbPO=cspbPO.parentElement;
			
			if(cspbPO.tagName=="TR")
			{
				cspbPO=cspbPO.parentElement;
			}
			
			cspbPId=cspbPO.id;
		}
		
		if(navigator.platform=="MacPPC")
		{
			cspbID.style.top="auto";
			cspbID.style.left="auto";
		}
		else
		{
			cspbID.style.top=cspbID.y;
			cspbID.style.left=cspbID.x;
		}
	}
	
	
	
	function cspbCI(id)
	{
		cspbID.style.clip="rect(0 "+cspbGD.clientWidth+" "+cspbSH+" 0)";
	}
	
	
	
	function cspbSU(speed)
	{
		if(cspbSS==false)
		{
			cspbCB=cspbSH+cspbMA;
			
			if(cspbMA>0)
			{
				cspbMA-=7;
				cspbID.style.top=cspbID.offsetTop+7;
				cspbCT=cspbMA;
				cspbCB=cspbSH+cspbMA;
				cspbID.style.clip="rect("+cspbCT+" "+cspbID.clientWidth+" "+cspbCB+" 0)";
				cspbSI("up");
				setTimeout("cspbSU("+speed+");",speed);
			}
			else
			{
				cspbSS=true;
				cspbSI();
			}
		}
	}
	
	
	
	function cspbRefresh()
	{
		cspbVS="CSPBPanelBarLoading";
		cspbShowSection(cspbSelI);
	}
	
	
	
	function cspbSetHeight(px)
	{
		cspbBoH=px;
	}
//-->

	window.onload=csWindowLoad;
	window.onresize=csWindowResize;
	
	function csWindowLoad()
	{
		//	csSetHeight();
		csWindowWidthCookie();
		cspbShowSection(document.body.id);
	}
	
	function csWindowResize()
	{
		//	csSetHeight();
		csWindowWidthCookie();
		cspbRefresh();
	}
	
	// Client-side PanelBar height setting
	function csSetHeight()
	{
		if(window.innerHeight)
			cspbSetHeight(window.innerHeight-73);
		else if(document.body.clientHeight)
			cspbSetHeight(document.body.clientHeight-73);
	}
	
	// Detect window size and set cookie
	function csWindowWidthCookie()
	{
		var csWindowWidth = 750;
		if(window.innerWidth)
			csWindowWidth = window.innerWidth;
		else if(document.body.offsetWidth)
			csWindowWidth = document.body.offsetWidth;
		if(document.cookie)
			document.cookie = "WindowWidth=" + csWindowWidth + ";path=/";
	}
