// JavaScript Document
$(document).ready(function(){
	window.name = "W190";
	
	getSearch();
});

function getSearch(){
	var setParam = {
		'appname':'NAIS3WEB',
		'prgname':'W192',
		'ssid': $('#ssid').val(),
		'arguments':'ssid'
	};
	getSearchCore(setParam);
}

function getSearchCore(searchParam){
	$.ajax({
		async : false,
		url: ajaxURL,
		data : searchParam,
		dataType:'html',
		scriptCharset: 'utf-8',
		success : function(html){			
			var getHtml = $($.parseHTML(html));
			var sessionError = getHtml.filter('#sessionError').val();
			if(sessionError === '0'){
				$('#divSearchContents').empty();
				$('#divSearchContents').append(getHtml.filter('#divSearchRes')[0].innerHTML);
			}else {
				cm_sessionError();
			}
		},
		error : function(XMLHttpRequest, textStatus, errorThrown){
				cmAjaxError(XMLHttpRequest, textStatus, errorThrown);
		}
	});
}

function NPHelp(){
	var hdnWebDocAlias = $('#hdnWebDocAlias').val();
	window.open(hdnWebDocAlias+"help/nphelp_work001.htm");
}