window.onload = setFocusOnForm;

function setFocusOnForm(){
	try{
		var fldName;
		
		fldName = document.getElementById('invalidFieldName').value;
		
		if(fldName != ""){
			document.getElementById(fldName).select();
			/* Tab order seems to go awol in IE8 when using the select method so inlcude focus method too - seems to resolve problem */
			document.getElementById(fldName).focus();
		}
		else{
			document.getElementById("title").focus();
		}
	}
	catch(e){
	}
}
