function ErrorDisplay(f, errorInfo)
{
    // disabled all errors by default
    for (var i=0; i<rules.length; i++)
    {
            var parts = rules[i].split(",");
            var fieldName = parts[1];

            document.getElementById(fieldName + "_error").style.display = "none";
    }

    for (var i=0; i<errorInfo.length; i++)
    {
            var fieldName;

            // radio button
            if (errorInfo[i][0].type == undefined)
                    fieldName = errorInfo[i][0][0].name;
            else
                    fieldName = errorInfo[i][0].name;

            // display the error
            document.getElementById(fieldName + "_error").style.display = "block";
            document.getElementById(fieldName + "_error").innerHTML = '&rarr;&nbsp;' + errorInfo[i][1];
    }

    return (errorInfo.length == 0) ? true : false;
}

$(function(){
	$('.autoform').find(':text, :password').not('.captcha').css({'width': '300px'});
	$('.autoform').find('textarea').not('.markup_editor').css({'width': '300px'});
	$('.autoform').find('select').css({'width': '300px'});
})
