function goto(url)
{
	document.location.href = url;
}

function markErrorFields(strError)
{
	var errStr = "";
 
 	if(strError!="")
 	{
    	strError = strError.replace("'","&acute;");
 		var names = strError.split("|");
 
 		for(i=0;i<names.length-1;i++)
		{
        	if(names[i]!="")
            {
            	findRow(names[i]);
			}
        }
     }
}
 
function findRow(elId)
{
	var cel = jQuery('#'+elId).parent("td");
    var row = jQuery(cel).parent("tr");
    jQuery(row).addClass('error');
}

function removeErrorClass()
{
	jQuery('tr').removeClass('error');
}


function focusFields(strForm, strError)
{ 
 	if(strError!="")
 	{
    	strError = strError.replace("'","&acute;");
 		var names = strError.split("|");
	 	$('#' + names[0]).focus(); 
     }
	 else
	 {
	 	$(strForm + ' :input:first').focus(); 
	 }
}

$(document).ready(function()
{
	$("a.fancy").fancybox();
});
