function goService(Selector){
  if (Selector.options[Selector.selectedIndex].value != '')
    top.location.href=Selector.options[Selector.selectedIndex].value;
};

function goService2(Selector){
  if (Selector.options[Selector.selectedIndex].value != '')
    self.location.href=Selector.options[Selector.selectedIndex].value;
};


function MM_showHideLayers() { //v2.0
  var i, visStr, args, theObj;
  args = MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)
    visStr   = args[i+2];
    if (navigator.appName == 'Netscape' && document.layers != null) {
      theObj = eval(args[i]);
      if (theObj) theObj.visibility = visStr;
    } else if (document.all != null) { //IE
      if (visStr == 'show') visStr = 'visible'; //convert vals
      if (visStr == 'hide') visStr = 'hidden';
      theObj = eval(args[i+1]);
      if (theObj) theObj.style.visibility = visStr;
  } }
}

function MM_swapImgRestore() { //v2.0
  if (document.MM_swapImgData != null)
    for (var i=0; i<(document.MM_swapImgData.length-1); i+=2)
      document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];
}

function MM_preloadImages() { //v2.0
  if (document.images) {
    var imgFiles = MM_preloadImages.arguments;
    if (document.preloadArray==null) document.preloadArray = new Array();
    var i = document.preloadArray.length;
    with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
      preloadArray[i] = new Image;
      preloadArray[i++].src = imgFiles[j];
  } }
}

function MM_swapImage() { //v2.0
  var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData;
  for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {
    objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
        (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
      objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
    obj = eval(objStr);
    if (obj != null) {
      swapArray[j++] = obj;
      swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
      obj.src = MM_swapImage.arguments[i+2];
  } }
  document.MM_swapImgData = swapArray; //used for restore
}

function Selection_change(Select)
{
	i=Select.selectedIndex;
	if(Select.options[i].value != 0)
	{
		top.down.location = Select.options[i].value;
	}
	Select.selectedIndex = 0;
}
function active(direction) {
 imgOn = eval(direction+ "n.src")
 document[direction].src = imgOn;
 }

 function inactive(direction) {
 imgOff = eval(direction+ "r.src")
  document[direction].src = imgOff;
 }

 tmenu01n = new Image()
 tmenu01n.src = "/www/images/top_menu01_on.gif"
 tmenu01r = new Image()
 tmenu01r.src = "/www/images/top_menu01.gif"

 tmenu02n = new Image()
 tmenu02n.src = "/www/images/top_menu02_on.gif"
 tmenu02r = new Image()
 tmenu02r.src = "/www/images/top_menu02.gif"

 tmenu021n = new Image()
 tmenu021n.src = "/www/images/top_menu021_on.gif"
 tmenu021r = new Image()
 tmenu021r.src = "/www/images/top_menu021.gif"

 tmenu03n = new Image()
 tmenu03n.src = "/www/images/top_menu03_on.gif"
 tmenu03r = new Image()
 tmenu03r.src = "/www/images/top_menu03.gif"

 tmenu031n = new Image()
 tmenu031n.src = "/www/images/top_menu031_on.gif"
 tmenu031r = new Image()
 tmenu031r.src = "/www/images/top_menu031.gif"

 tmenu04n = new Image()
 tmenu04n.src = "/www/images/top_menu04_on.gif"
 tmenu04r = new Image()
 tmenu04r.src = "/www/images/top_menu04.gif"

 tmenu05n = new Image()
 tmenu05n.src = "/www/images/top_menu05_on.gif"
 tmenu05r = new Image()
 tmenu05r.src = "/www/images/top_menu05.gif"

 tmenu06n = new Image()
 tmenu06n.src = "/www/images/top_menu06_on.gif"
 tmenu06r = new Image()
 tmenu06r.src = "/www/images/top_menu06.gif"


function SetCookie(sName, sValue) {
	document.cookie = sName + "=" + escape(sValue) + "; path=/www";
}

function GetCookie(sName) {
	var aCookie = document.cookie.split("; ");
	for (var i=0; i < aCookie.length; i++) {
		var aCrumb = aCookie[i].split("=");
		if (sName == aCrumb[0]) {
			return unescape(aCrumb[1]);
		}
	}
	return null;
}

//	sCurrentMainMenu = GetCookie('sMainMenu');
//	sCurrentSubMenu = GetCookie('sSubMenu');

function Init(sMainMenu, sSubMenu) {
	try {
	
		if (sMainMenu == '0') {
			document.topimages.src = "/www/images/title_000.gif";
		} else if (sMainMenu == '1') {
			document.topimages.src = "/www/images/title_001.gif";
		} else if (sMainMenu == '2') {
			document.topimages.src = "/www/images/title_002.gif";
		} else if (sMainMenu == '3') {
			document.topimages.src = "/www/images/title_003.gif";
		} else if (sMainMenu == '4') {
			document.topimages.src = "/www/images/title_004.gif";
		}
	}  catch(e) {
		// any exception will be ignor.
		;
	}	
}

function GoGo(sMainMenu, sSubMenu) {

	if (sMainMenu == '0') {
		if (sSubMenu == '00') {
			document.location.href = "/www/start.php";
		} else if (sSubMenu == '01') {
			document.location.href = "/www/sign.php";
		} else if (sSubMenu == '012') {
			document.location.href = "/www/forgot.php";
		} else if (sSubMenu == '013') {
			document.location.href = "/www/join.php";
		} else if (sSubMenu == '014') {
			document.location.href = "/www/sign-out.php";
		} else if (sSubMenu == '015') {
			document.location.href = "/www/modify.php";
		} else if (sSubMenu == '02') {
			document.location.href = "/www/apoints/apoint01.php";
		} else if (sSubMenu == '022') {
			document.location.href = "/www/apoints/apoint02.php";
		} else if (sSubMenu == '03') {
			document.location.href = "/www/minfo/";
		} else if (sSubMenu == '032') {
			document.location.href = "/www/minfo/info02.php";
		} else if (sSubMenu == '033') {
			document.location.href = "/www/minfo/info03.php";
		} else if (sSubMenu == '034') {
			document.location.href = "/www/minfo/info04.php";
		} else if (sSubMenu == '035') {
			document.location.href = "/www/minfo/info05.php";
		} else if (sSubMenu == '036') {
			document.location.href = "/www/minfo/map.php";
		}
	} else if (sMainMenu == '1') {
		if (sSubMenu == '01') {
			document.location.href = "/www/mbranch/branch01.php";
		} else if (sSubMenu == '02') {
			document.location.href = "/www/mbranch/branch02.php";
		} else if (sSubMenu == '03') {
			document.location.href = "/www/mbranch/branch03.php";
		} else if (sSubMenu == '04') {
			document.location.href = "/www/mbranch/branch04.php";
		} else if (sSubMenu == '05') {
			document.location.href = "/www/mbranch/branch05.php";
		} else if (sSubMenu == '06') {
			document.location.href = "/www/mbranch/branch06.php";
		}
	} else if (sMainMenu == '2') {
		if (sSubMenu == '01') {
			document.location.href = "/GLstudio/bbs/list.php?db=1";
		} else if (sSubMenu == '02') {
			document.location.href = "/GLstudio/bbs/list.php?db=2";
		} else if (sSubMenu == '03') {
			document.location.href = "/GLstudio/bbs/list.php?db=3";
		} else if (sSubMenu == '04') {
			document.location.href = "/www/mforum/survey.php";
		} else if (sSubMenu == '05') {
			document.location.href = "/GLstudio/bbs/list.php?db=4";
		} else if (sSubMenu == '06') {
			document.location.href = "/GLstudio/bbs/list.php?db=5";
		}
	} else if (sMainMenu == '3') {
		if (sSubMenu == '01') {
			document.location.href = "/www/mcommunity/m01-01.php";
		} else if (sSubMenu == '11') {
			document.location.href = "/www/mcommunity/m01-01.php";
		} else if (sSubMenu == '12') {
			document.location.href = "/GLstudio/bbs/list.php?db=6";
		} else if (sSubMenu == '02') {
			document.location.href = "/www/mcommunity/m02-01.php";
		} else if (sSubMenu == '21') {
			document.location.href = "/www/mcommunity/m02-01.php";
		} else if (sSubMenu == '22') {
			document.location.href = "/GLstudio/bbs/list.php?db=7";
		}
	}

//	SetCookie('sMainMenu', sMainMenu);
//	SetCookie('sSubMenu', sSubMenu);
}

function goMenu(url, sMainMenu, sSubMenu) {
	document.location.href=url;
//	SetCookie('sMainMenu', sMainMenu);
//	SetCookie('sSubMenu', sSubMenu);
}