
function SetStateChecked(sFormName, sFormElementName)
{
	var aCheeckBoxes = document.forms[sFormName].elements[sFormElementName]
	for( var i=0; i < aCheeckBoxes.length; i++ )
	{
		aCheeckBoxes[i].checked = true
	}
}

function SetStateUnChecked(sFormName, sFormElementName)
{
	var aCheeckBoxes = document.forms[sFormName].elements[sFormElementName]
	for( var i=0; i < aCheeckBoxes.length; i++ )
	{
		aCheeckBoxes[i].checked = false
	}
}

function hideMaps(map_id) {
	for( var i=1; i < 4; i++ )
	{
		m_id = 'map_' + i;
		p_id = 'p_' + i;
		if(m_id != map_id) {
			document.getElementById(m_id).style.display = 'none';
			document.getElementById(p_id).className = '';
		} else {
			document.getElementById(p_id).className = 'selected';
		}
	}
}

function showMap(id) {
	hideMaps('');
	map_id = 'ma' + id;
	document.getElementById(map_id).style.display = '';
	document.getElementById(id).className = 'selected';
}

function openWnd(url,wnd_name,width,height,scrollbars){		
	var stScrollBar = (scrollbars ? 'yes' : 'no');
	newWnd = window.open(url,wnd_name,'width='+width+',height='+height+',status=yes,menubar=no,resizable=yes,scrollbars='+stScrollBar+',left='+String((screen.width-width)/2)+',top='+String((screen.height-height)/2));
	newWnd.focus();
}