function form_submit(form_name) {
	document.getElementById(form_name).submit();
}

function __confirm($message,$path) {
	if(confirm($message))  	{
		location=$path;
	}
}

function open_image_window(url) {
	newWin=window.open(url,"newWindow","menubar=no,status=no,location=no,width=50,height=50,toolbar=no,scrollbars=auto,resizable=yes,left=5,top=5");
}

popup_win = "";
function set_win_focus() {
	if(popup_win != "")
		if(!popup_win.closed) {
			popup_win.focus();
		}
}
document.onclick=set_win_focus;
function open_window(path, width, height) {
	var top = ((screen.height/2)-(height/2));
	var left = ((screen.width/2)-(width/2));
	var features = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left='+left+ ',top='+top+',width='+ width +',height=' + height;
	popup_win = window.open(path,'popup',features);
	popup_win.focus();
}
function open_window_full(path) {
	var features = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=0,top=0,width='+ (screen.availWidth) +',height=' + (screen.availHeight);
	popup_win = window.open(path,'popup',features);
	popup_win.focus();
}

function set_field_visibility(cval,id,hval) {
	if(cval==hval) {
		document.getElementById(id).style.display='';		
	}
	else {
		document.getElementById(id).style.display='none';
	}
}
