function FormSubmit( strFormName, strTarget, strAction )
{
	var objForm    = document.forms( strFormName );
	objForm.target = strTarget;
	objForm.action = strAction;

	objForm.submit();
}



function ClickMenu(Dir,Part,Mode) {
	document.GHForm.Dir.value = Dir
	document.GHForm.Part.value = Part
	document.GHForm.Mode.value = Mode
	document.GHForm.idx.value = ""
	document.GHForm.SearchWay.value = ""
	document.GHForm.SearchWord.value = ""
	
	//FormSubmit( "GHForm", "_self", "/Metro.htm" );
	document.location.href= "/Metro.htm?Dir="+Dir+"&Part="+Part+"&Mode="+Mode;
}

function ClickView(Dir,Part,Mode,idx,page) {
	document.GHForm.Dir.value = Dir
	document.GHForm.Part.value = Part
	document.GHForm.Mode.value = Mode
	document.GHForm.idx.value = idx
	document.GHForm.Page.value = page
	
	if ((Dir=="Ne") || (Dir=="An")){
	document.location.href= "/Metro.htm?Dir="+Dir+"&Part="+Part+"&Mode="+Mode+"&idx="+idx+"&page="+page;
	}
	else {
	FormSubmit( "GHForm", "_self", "/Metro.htm" );
	}
}

function ClickList(Dir,Part,Mode,Page) {
	document.GHForm.Dir.value = Dir
	document.GHForm.Part.value = Part
	document.GHForm.Mode.value = Mode
	document.GHForm.Page.value = Page
	
	FormSubmit( "GHForm", "_self", "/Metro.htm" );
}

function ClickMenu_1(Dir,SubDir,Part,Mode) {
	document.GHForm.Dir.value = Dir
	document.GHForm.SubDir.value = SubDir
	document.GHForm.Part.value = Part
	document.GHForm.Mode.value = Mode
	document.GHForm.idx.value = ""
	document.GHForm.SearchWay.value = ""
	document.GHForm.SearchWord.value = ""
	
	//FormSubmit( "GHForm", "_self", "/Metro.htm" );
	document.location.href= "/Metro.htm?Dir="+Dir+"&SubDir="+SubDir+"&Part="+Part+"&Mode="+Mode+"&idx=&SearchWay=&SearchWord=";
}

function ClickView_1(Dir,SubDir,Part,Mode,idx,page) {
	document.GHForm.Dir.value = Dir
	document.GHForm.SubDir.value = SubDir
	document.GHForm.Part.value = Part
	document.GHForm.Mode.value = Mode
	document.GHForm.idx.value = idx
	document.GHForm.Page.value = page
	
	FormSubmit( "GHForm", "_self", "/Metro.htm" );
}

function ClickList_1(Dir,SubDir,Part,Mode,Page) {
	document.GHForm.Dir.value = Dir
	document.GHForm.SubDir.value = SubDir
	document.GHForm.Part.value = Part
	document.GHForm.Mode.value = Mode
	document.GHForm.Page.value = Page
	
	FormSubmit( "GHForm", "_self", "/Metro.htm" );
}

function ClickMenu2(Dir,Part,subject1,Mode) {
	document.GHForm.Dir.value = Dir
	document.GHForm.Part.value = Part
	document.GHForm.subject1.value = subject1
	document.GHForm.Mode.value = Mode
	document.GHForm.SearchWay.value = ""
	document.GHForm.SearchWord.value = ""
	document.GHForm.FromClick.value = Dir.substr(0,1)+subject1+"T"    
	
	FormSubmit( "GHForm", "_self", "/Metro.htm" );
}

function ClickView2(Dir,Part,subject1,Mode,idx,page) {
	document.GHForm.Dir.value = Dir
	document.GHForm.Part.value = Part
	document.GHForm.subject1.value = subject1
	document.GHForm.Mode.value = Mode
	document.GHForm.idx.value = idx
	document.GHForm.Page.value = page
	
	if ((Dir=="Ne") || (Dir=="An")){
	document.location.href= "/Metro.htm?Dir="+Dir+"&Part="+Part+"&subject1="+subject1+"&Mode="+Mode+"&idx="+idx+"&page="+page;
	}
	else {
	FormSubmit( "GHForm", "_self", "/Metro.htm" );
	}
}

function ClickList2(Dir,Part,subject1,Mode,Page) {
	document.GHForm.Dir.value = Dir
	document.GHForm.Part.value = Part
	document.GHForm.subject1.value = subject1
	document.GHForm.Mode.value = Mode
	document.GHForm.Page.value = Page
	
	FormSubmit( "GHForm", "_self", "/Metro.htm" );
}


function ClickMenu2_1(Dir,SubDir,Part,subject1,Mode) {
	document.GHForm.Dir.value = Dir
	document.GHForm.SubDir.value = SubDir
	document.GHForm.Part.value = Part
	document.GHForm.subject1.value = subject1
	document.GHForm.Mode.value = Mode
	document.GHForm.SearchWay.value = ""
	document.GHForm.SearchWord.value = ""
	
	FormSubmit( "GHForm", "_self", "/Metro.htm" );
}

function ClickView2_1(Dir,SubDir,Part,subject1,Mode,idx,page) {
	document.GHForm.Dir.value = Dir
	document.GHForm.SubDir.value = SubDir
	document.GHForm.Part.value = Part
	document.GHForm.subject1.value = subject1
	document.GHForm.Mode.value = Mode
	document.GHForm.idx.value = idx
	document.GHForm.Page.value = page
	
	FormSubmit( "GHForm", "_self", "/Metro.htm" );
}

function ClickList2_1(Dir,SubDir,Part,subject1,Mode,Page) {
	document.GHForm.Dir.value = Dir
	document.GHForm.SubDir.value = SubDir
	document.GHForm.Part.value = Part
	document.GHForm.subject1.value = subject1
	document.GHForm.Mode.value = Mode
	document.GHForm.Page.value = Page
	
	FormSubmit( "GHForm", "_self", "/Metro.htm" );
}

function ClickBoard(Dir,Part,subject1,Mode,idx,Page) {
	document.GHForm.Dir.value = Dir
	document.GHForm.Part.value = Part
	document.GHForm.subject1.value = subject1
	document.GHForm.Mode.value = Mode
	document.GHForm.idx.value = idx
	document.GHForm.Page.value = Page
	
	FormSubmit( "GHForm", "_self", "/MetroBoard.htm" );
}

function ClickBoard2(Dir,SubDir,Part,subject1,Mode,idx,Page) {
	document.GHForm.Dir.value = Dir
	document.GHForm.SubDir.value = SubDir
	document.GHForm.Part.value = Part
	document.GHForm.subject1.value = subject1
	document.GHForm.Mode.value = Mode
	document.GHForm.idx.value = idx
	document.GHForm.Page.value = Page
	
	FormSubmit( "GHForm", "_self", "/MetroBoard.htm" );
}

function eMetro(local) {
	var eMet;
	eMet = window.open('/common/counterEmetroWin.asp?local='+local+'','eMETRO','width=1012 height=706');
	eMet.focus(); 
	}

function nMail(obj1,obj2,obj3,obj4) {
    	window.open('/News/NewsMailSend.asp?NewsID='+obj1+'&Title='+obj2+'&Dir='+obj3+'&Part='+obj4+'','nMail','width=460 height=460 status=no scrollbars=no')
}
function nPrint(obj1,obj2) {
    	window.open('/News/NewsPrint.asp?NewsID='+obj1+'&Dir='+obj2+'','nPrint','width=640 height=600 status=no scrollbars=yes')
}
function nClip(obj1,obj2) {
    	window.open('/News/NewsClip.asp?NewsID='+obj1+'&Part='+obj2+'','nClip','width=460 height=300 status=no scrollbars=no')
}
 
function ComIntro(obj1) {
    	window.open('http://home.metroseoul.co.kr/MetroCompany.htm?id='+obj1+'','MtroHome','width=965 scrollbars=yes')
}
function ComMap() {
    	NewWindow('http://home.metroseoul.co.kr/MetroCompany.htm?Dir=Contact','MtroHome','965','700','yes')
}
function ComRecruit() {
    	window.open('http://home.metroseoul.co.kr/MetroCompany.htm?Dir=Career&Sub=01','MtroHome','width=965 scrollbars=yes')
}
function PagePrint(dir,part,subject,idx) {
    	window.open('/common/PagePrint.asp?Dir='+dir+'&Part='+part+'&Subject1='+subject+'&idx='+idx,'pagePrint','width=600 scrollbars=yes')
}

function NewWindow(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	
	if (parseInt(navigator.appVersion) >= 4) 
	{ 
		win.window.focus(); 
	}
}


function searchChk() {
	if(document.searchForm.searchWord.value == "") {
		alert("°Ë»öÇÒ ´Ü¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		document.searchForm.searchWord.focus();
		return;
	}
	document.searchForm.submit();
}

function searchNews() {
	if(document.searchNewsForm.SearchWord.value == "") {
		alert("°Ë»öÇÒ ´Ü¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		document.searchNewsForm.SearchWord.focus();
		return;
	}
	document.searchNewsForm.submit();
}

function PDFsearch() {
	document.PDFsearchForm.submit();
}


function shortChk() {
	if(document.shortForm.shortName.value == "") {
		alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿ä.");
		document.shortForm.shortName.focus();
		return false;
	}
	if(document.shortForm.shortCont.value == "") {
		alert("ÀÇ°ßÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
		document.shortForm.shortCont.focus();
		return false;
	}
	if(document.shortForm.shortCont.value.length < 10) {
		alert("Á» ´õ ±ä ÀÇ°ßÀ» ³²°Ü ÁÖ½Ê½Ã¿À.     ");
		document.shortForm.shortCont.focus();
		return false;
	}

	document.shortForm.submit();
}

function ClickAdver(code,url){
	var code=code
	code=code+"_POP"
	var realUrl=url
	var gazzaUrl=realUrl.replace('?', '$');
	gazzaUrl=gazzaUrl.replace('&', '*');
	document.location.href= "/MetroAdver.htm?Code="+code+"&url="+gazzaUrl
}
