﻿function SubmitForm()
{
	var form = document.forms[0];
	if (form) 
	{
		if (form.submitted) form.submitted.value = 1;
		form.submit();
	}
}

function ResetForm() 
{
	document.forms[0].reset(); 
}

function CloseWin() 
{
	window.opener.window.focus();
	window.close();
}

function CatchLocalEnter(event)
{
	if ((window.event && window.event.keyCode == 13) || (event && event.which == 13))
	{
		SubmitForm();
	} else {
		return true;
	}
	return false;
}

function openWin(page, width, height) 
{
	var x = window.open(page, "winobj", "width="+width+",height="+height+",location=no,menubar=no,toolbar=no,scrollbars=no");
	x.focus();
}

function openScrollWin(page, width, height) 
{
	var x = window.open(page, "winobj", "width="+width+",height="+height+",location=no,menubar=no,toolbar=no,scrollbars=yes");
	x.focus();
}