//***********************************************************************
//*	Aimmed  Honest Javascript Version1.0 	2003. 05. 14.
//***********************************************************************/

//Go menu at FlashMenu
function goMenu(menuNum) {
//	alert(menuNum);
	var strPath = "/";
	if (menuNum == "A0") strPath = "/about/message.asp";
	if (menuNum == "A1") strPath = "/about/message.asp";
	if (menuNum == "A2") strPath = "/about/history.asp";
	if (menuNum == "A3") strPath = "/about/result.asp";
	if (menuNum == "A4") strPath = "/about/patent.asp";
	if (menuNum == "A5") strPath = "/about/organization.asp";

	if (menuNum == "B0") strPath = "/news/news_list.asp";
	if (menuNum == "B1") strPath = "/news/news_list.asp";
	if (menuNum == "B2") strPath = "/news/seminar_list.asp";

		
	if (menuNum == "C0") strPath = "/post/research_05_01.asp";
	if (menuNum == "C5") strPath = "/post/research_05_01.asp";
	if (menuNum == "C6") strPath = "/post/research_06_01.asp";
	if (menuNum == "C7") strPath = "/post/research_07_01.asp";
	if (menuNum == "C8") strPath = "/post/research_08_01.asp";
	if (menuNum == "C9") strPath = "/post/research_09_01.asp";


	if (menuNum == "D0") strPath = "/blood/blood01.asp";
	if (menuNum == "D1") strPath = "/blood/blood01.asp";
	if (menuNum == "D2") strPath = "/blood/blood02.asp";
	if (menuNum == "D3") strPath = "/blood/blood03.asp";
	if (menuNum == "D4") strPath = "/blood/blood04.asp";
	if (menuNum == "D5") strPath = "/blood/blood05.asp";
	if (menuNum == "D6") strPath = "/blood/blood06.asp";
		
	if (menuNum == "E0") strPath = "/site/site.asp";
	
	if (menuNum == "F0") strPath = "http://www.mogam.re.kr/mainframe.asp";
	
	if (menuNum == "G0") strPath = "/";						//home
	
	if (menuNum == "H0") strPath = "http://www.mogam.re.kr/eng";	//english
	
	if (menuNum == "J0") strPath = "/site/map.asp";			//sitemap
	
	if (menuNum == "K0") strPath = "/site/contact.asp";		//contact us
	
	if (menuNum == "I0"){
		window.open('http://www.greencross.com/introduction/info.asp','','width=800,height=500,resizble=1,scrollbars=1');	//recruit
	}
		
		document.location.href=strPath;
}


// popup
function popWin(URL,winX,winY,winName,kind) {	// URL : pagename in the popup window, winX, winY : popup page size, winName : popup filename, kind : 0 - no scroll bar 1 - Use scroll bar
	if (kind == "") {
		kind = 0;
	}
	winPath = URL;
	winStatus = "top=10,left=10,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,copyhistory=0,scrollbars="+kind+",width="+winX+",height="+winY;
  	newWin = window.open(winPath,winName,winStatus);
}


//overroll images
// ######image filenames are must ' _on.gif' or ' _off.gif'######
function imgChange(tmpObj) {
	var strTotalPath = document.images[tmpObj].src;
	var arrWhereFileName = strTotalPath.split("/");
	var intWhereFileName = strTotalPath.indexOf(arrWhereFileName[arrWhereFileName.length-1]);
	var strPath = strTotalPath.substring(0,intWhereFileName);
	var strFileName = strTotalPath.substring(intWhereFileName);
	var strFileExt = strFileName.substring(strFileName.indexOf("."));
	var strFileNameWithOutExt = strFileName.substring(0,strFileName.indexOf(strFileExt));
	var arrFileName = strFileNameWithOutExt.split("_");
	if (arrFileName[arrFileName.length-1] == "on") {
		newFileName = strFileName.replace("_on","_off");
	} else {
		newFileName = strFileName.replace("_off","_on");
	}
	newFilePath = strPath + newFileName;
	document.images[tmpObj].src = newFilePath;
//	alert("strTotalPath : " + strTotalPath + "\nintWhereFileName : " + intWhereFileName + "\nstrPath : " + strPath + "\nstrFileName : " + strFileName + "\nstrFileExt : " + strFileExt + "\nstrFileNameWithOutExt : " + strFileNameWithOutExt + "\nnewFileName : " + newFileName + "\nnewFilePath : " + newFilePath);
}

function imgChange2(tmpObj,tmpState) {
	var strTotalPath = document.images[tmpObj].src;
	var arrWhereFileName = strTotalPath.split("/");
	var intWhereFileName = strTotalPath.indexOf(arrWhereFileName[arrWhereFileName.length-1]);
	var strPath = strTotalPath.substring(0,intWhereFileName);
	var strFileName = strTotalPath.substring(intWhereFileName);
	var strFileExt = strFileName.substring(strFileName.indexOf("."));
	var strFileNameWithOutExt = strFileName.substring(0,strFileName.indexOf(strFileExt));
	var arrFileName = strFileNameWithOutExt.split("_");
	var tmpState = "_" + tmpState;
	if (arrFileName[arrFileName.length-1] == "on") {
		newFileName = strFileName.replace("_on",tmpState);
	} else {
		newFileName = strFileName.replace("_off",tmpState);
	}
	newFilePath = strPath + newFileName;
	document.images[tmpObj].src = newFilePath;
}


//Family Site
function surfto(form) { 
	        var myindex=form.cmbSearch.selectedIndex ;
	        window.open(form.cmbSearch.options[myindex].value, "", ""); 
			form.cmbSearch.selectedIndex = 0;   ///Making always first Menu
		} 

