function goPage( pageNum ) {
	var keyword = window.document.getElementById( "strKeyword" ).value;
	if( keyword != "" ) {
		window.document.forms[ "frmLandExportList" ].method.value = "getSearch";
		window.document.forms[ "frmLandExportList" ].prmKeyword.value = keyword;
		window.document.forms[ "frmLandExportList" ].prmSearchKind.value = window.document.getElementById( "strSearchKind" ).value;
	} else {
		window.document.forms[ "frmLandExportList" ].method.value = "getList";
	}
	
	window.document.forms[ "frmLandExportList" ].prmPagingNum.value = pageNum;
	window.document.forms[ "frmLandExportList" ].submit();
}

function viewContent( boardNo ) {
	window.document.forms[ "frmLandExportList" ].method.value = "getView";
	window.document.forms[ "frmLandExportList" ].prmBoardNo.value = boardNo;
	window.document.forms[ "frmLandExportList" ].submit();
}

function xssReplace(a){
	var limit_char = /[~!\#$^&%*\=+|:;?"<,.>']/;
	var tmp_str="";
	for(var i=0; i<a.length; i++) {
		var data1=a.charAt(i);
		tmp_str+=data1.replace(limit_char,"");
	}
	return tmp_str;
}

$( function() {
	$( "#btnLand" ).click( function () {
		window.location.href = "explore0801.do";		
	});	
	
	$( "#btnLandName" ).click( function () {
		window.location.href = "explore0802.do";		
	});	
	
	$( "#btnHistory" ).click( function () {
		window.location.href = "explore0803.do";		
	});	
	
	$( "#btnLandList" ).click( function () {
		window.location.href = "explore0801.do";		
	});	
	
	$( "#btnLandNameList" ).click( function () {
		window.location.href = "explore0802.do";		
	});	
	
	$( "#btnHistoryList" ).click( function () {
		window.location.href = "explore0803.do";		
	});	
	
	$( "#btnSearch" ).click( function () {
		window.document.forms[ "frmLandExportList" ].method.value = "getSearch";
		window.document.forms[ "frmLandExportList" ].prmKeyword.value = xssReplace(window.document.getElementById( "txtSearch" ).value);
		window.document.forms[ "frmLandExportList" ].prmSearchKind.value = window.document.getElementById( "selSearch" ).value;
		window.document.forms[ "frmLandExportList" ].submit();
		
	});	
	
	$( "#txtSearch" ).keydown( function() {
		if( window.event.keyCode == 13 ) {
			window.document.forms[ "frmLandExportList" ].method.value = "getSearch";
			window.document.forms[ "frmLandExportList" ].prmKeyword.value = xssReplace(window.document.getElementById( "txtSearch" ).value);
			window.document.forms[ "frmLandExportList" ].prmSearchKind.value = window.document.getElementById( "selSearch" ).value;
			window.document.forms[ "frmLandExportList" ].submit();
		}
	});
});


