function popup(winurl,winname,width,height) {
	var version, handle;
	handle = window.open(winurl,winname, 'width=' + width + ',height=' + height + ',resizable=1,scrollbars=1');
	version = navigator.appVersion.substring(0,1);
	if (version!="2") handle.focus();
}

function popup1(winurl,winname,width,height) {
	var version, handle;
	handle = window.open(winurl,winname, 'width=' + width + ',height=' + height + ',resizable=0,scrollbars=0');
	version = navigator.appVersion.substring(0,1);
	if (version!="2") handle.focus();
}

function showpic(objid,filename) {
	document.getElementById(objid).src = filename;
}

function clear_form_field(obj,fieldvalue) {
	if (obj.value == fieldvalue) {
		obj.value = '';
	}
}
function reset_form_field(obj,fieldvalue) {
	if (obj.value == '') {
		obj.value = fieldvalue;
	}
}

function close_and_refresh() {
	if (window.opener) {
		window.opener.location = window.opener.location;
	}
	window.focus();
	window.close();
}
