function validateProp( n )
{
	var ok = true;
	var pn = parseInt( document.getElementById( 'pn_' + n ).value );
	
	if( pn > 0 )
	{
		for( var a = 1; a <= pn; a++ )
		{
			
			if( document.getElementById( 'pr_' + n + '_' + a ).value == 0 )
			{
				document.getElementById( 'pr_' + n + '_' + a ).style.borderColor = '#ff0000';
				document.getElementById( 'pr_' + n + '_' + a ).style.borderWidth = '2px';
				ok = false;
			}
		}
	}
	
	return ok;
}

function validatePropField( i )
{
	if( document.getElementById( i ).value != 0 )
	{
		document.getElementById( i ).style.borderColor = '#a61804';
		document.getElementById( i ).style.borderWidth = '1px';
	}
	else
	{
		document.getElementById( i ).style.borderColor = '#ff0000';
		document.getElementById( i ).style.borderWidth = '2px';
	}
}