﻿///////////////////////////////////////////////////////////////////////////////////////////////
function ChangeContent(type)
{
	document.images.Image15.src="http://test.sundosoft.co.kr/Common/Images/main_M1_tab01.gif";
	document.images.Image16.src="http://test.sundosoft.co.kr/Common/Images/main_M1_tab02.gif";
	document.images.Image17.src="http://test.sundosoft.co.kr/Common/Images/main_M1_tab03.gif";
	document.images.Image18.src="http://test.sundosoft.co.kr/Common/Images/main_M1_tab04.gif";

	     if ( type == "SundoNews" )		//Image15
	{
		document.all["SundoNews"].style.display   = "block";
		document.all["ProductNews"].style.display = "none";
		document.all["Lib"].style.display         = "none";
		document.all["EduInfo"].style.display     = "none";
		
		document.images.Image15.src="http://test.sundosoft.co.kr/Common/Images/main_M1_tab01on.gif";
	}
	else if ( type == "ProductNews" )	//Image16
	{
		document.all["SundoNews"].style.display   = "none";
		document.all["ProductNews"].style.display = "block";
		document.all["Lib"].style.display         = "none";
		document.all["EduInfo"].style.display     = "none";	
		
		document.images.Image16.src="http://test.sundosoft.co.kr/Common/Images/main_M1_tab02on.gif";
	}
	else if ( type == "Lib" )			//Image17
	{
		document.all["SundoNews"].style.display   = "none";
		document.all["ProductNews"].style.display = "none";
		document.all["Lib"].style.display         = "block";
		document.all["EduInfo"].style.display     = "none";
		
		document.images.Image17.src="http://test.sundosoft.co.kr/Common/Images/main_M1_tab03on.gif";
	}
	else if ( type == "EduInfo" )		//Image18
	{
		document.all["SundoNews"].style.display   = "none";
		document.all["ProductNews"].style.display = "none";
		document.all["Lib"].style.display         = "none";
		document.all["EduInfo"].style.display     = "block";
		
		document.images.Image18.src="http://test.sundosoft.co.kr/Common/Images/main_M1_tab04on.gif";
	}
		
	/*
	if ( document.all["Info"].style.display == "block")
	{
		document.all["Info"].style.display = "none";
		document.all["Supp"].style.display = "block"
	}
	else
	{
		document.all["Info"].style.display = "block"
		document.all["Supp"].style.display = "none";
	}
	*/
	
}
///////////////////////////////////////////////////////////////////////////////////////////////


function ImageChanger()
{	
	var subtype = "";
	
	if(location.href.split("&").length > 1)
		subtype = location.href.split("&")[1].split("subtype=")[1];

	if(document.all[subtype] != undefined)
	{
		document.all[subtype].innerHTML = "<Font class='Eve_left_c'>" + document.all[subtype].innerHTML + "</Font>";
	}
}

function LinkPage(url, type, subtype)
{
	location.href = "http://event.sundosoft.co.kr/" + url + "?type=" + type + "&subtype=" + subtype;
	
}

function OpenPage()
{
	var type = location.href.split("&")[0].split("type=")[1];
	ImageChanger();
	
	switch (type)
	{
		case "Ws" :
			
			document.all["Ws_Sub"].style.display		= "block";
			document.all["Uc_Sub"].style.display		= "none";
			document.all["Semi_Sub"].style.display	= "none";
			document.all["Etc_Sub"].style.display		= "none";
			document.all["Cal_Sub"].style.display		= "none";
			document.images.Image25.src="http://event.sundosoft.co.kr/images/eve_left_menu01on.gif";
			break;
			
		case "Uc" : 
			document.all["Ws_Sub"].style.display		= "none";
			document.all["Uc_Sub"].style.display		= "block";
			document.all["Semi_Sub"].style.display	= "none";
			document.all["Etc_Sub"].style.display		= "none";
			document.all["Cal_Sub"].style.display		= "none";
			document.images.Image26.src="http://event.sundosoft.co.kr/images/eve_left_menu02on.gif";
			break;
			
		case "Semi" : 
			document.all["Ws_Sub"].style.display		= "none";
			document.all["Uc_Sub"].style.display		= "none";
			document.all["Semi_Sub"].style.display	= "block";
			document.all["Etc_Sub"].style.display		= "none";
			document.all["Cal_Sub"].style.display		= "none";
			document.images.Image27.src="http://event.sundosoft.co.kr/images/eve_left_menu03on.gif";
			break;
		
		case "Etc" : 
			document.all["Ws_Sub"].style.display		= "none";
			document.all["Uc_Sub"].style.display		= "none";
			document.all["Semi_Sub"].style.display	= "none";
			document.all["Etc_Sub"].style.display		= "block";
			document.all["Cal_Sub"].style.display		= "none";
			document.images.Image28.src="http://event.sundosoft.co.kr/images/eve_left_menu04on.gif";
			break;
		
		case "Cal" : 
			document.all["Ws_Sub"].style.display		= "none";
			document.all["Uc_Sub"].style.display		= "none";
			document.all["Semi_Sub"].style.display	= "none";
			document.all["Etc_Sub"].style.display		= "none";
			document.all["Cal_Sub"].style.display		= "block";
			document.images.Image29.src="http://event.sundosoft.co.kr/images/eve_left_menu05on.gif";
			break;
		
		default : 
			document.all["Ws_Sub"].style.display		= "none";
			document.all["Uc_Sub"].style.display		= "none";
			document.all["Semi_Sub"].style.display		= "none";
			document.all["Etc_Sub"].style.display		= "none";
			document.all["Cal_Sub"].style.display		= "none";

			break;
	}
}