function move_in(img_name,img_src) {
	document[img_name].src=img_src;
}

function move_out(img_name,img_src) {
	document[img_name].src=img_src;
}

function goPage(page) {
	var fm = document.form1;
	fm.page.value = page;
	fm.submit();
}

function showHideLayer(layer, action) {
	var vis = document.all[layer].style;
	(action == "Y") ? vis.visibility = "visible" : vis.visibility = "hidden";
}

function chgBgColor(e, col) {
	e.style.backgroundColor = '#' + col;
}

function showhide(element, act) {
	if (act == 'hide') {
		act = 'none';
	} else {
		act = 'block';
	}
	if (document.all) {
		document.all[element].style.display = act;
	} else {
		document.getElementById(element).style.display = act;
	}
}

function showMatch(which) {
	if (which == 'main_match_lower') {
		showhide('main_match_lower', 'show');
		showhide('main_match_upper', 'hide');
	} else {
		showhide('main_match_lower', 'hide');
		showhide('main_match_upper', 'show');
	}
}

function parSet(form, par, value) {
	if (navigator.appName == "Microsoft Internet Explorer") {
		if(!eval(form+'.'+par))
			return;
	} else if (navigator.appName == "Netscape") {
		if(eval(form+'.'+par)==undefined)
			return;
	}

	var type = '';
	type = eval(form+'.'+par+'.type');
	
	if (navigator.appName == "Microsoft Internet Explorer") {
		if ( (eval(form+'.'+par+'.length') > 1) && (type != "select-one") && (type != "select-multiple") )
			type = eval(form+'.'+par+'[0].type');
	} else if (navigator.appName == "Netscape") {
		if ( (type == undefined) || ( (eval(form+'.'+par+'.length') > 1) && (type.length==0) ) )
			type = eval(form+'.'+par+'[0].type');
	} else alert("Your browser may have problem to run this page.")
	
	if (type == 'checkbox') {
		if ( (value != null) && (value != "") )
		eval(form+'.'+par+'.checked = true;');
	} else if (type == 'radio') {
		loop_count = 0;
		for (i=0; i < eval(form+'.'+par+'.length'); i++) {
			loop_count++;
			if (eval(form+'.'+par+'['+i+'].value == \''+ value + '\''))
				eval(form+'.'+par+'['+i+'].checked = true'); 
		}
		if (loop_count == 0) {
			if (eval(form+'.'+par+'.value == \''+ value + '\''))
				eval(form+'.'+par+'.checked = true'); 
		}
	} else if (type.indexOf('select') != -1) {
		for (i=0; i < eval(form+'.'+par+'.options.length'); i++) {
			//alert(form+'.'+par+'.options['+i+'].value == \'' + value + '\'');
			if (eval(form+'.'+par+'.options['+i+'].value == \'' + value + '\''))
				eval(form+'.'+par+'.options['+i+'].selected = true');
		}
	} else if (type != 'file') {
		eval(form+'.'+par+'.value = \'' + value + '\'');
	}
}