/* formatter de links friendlys para JQgrid */
/* 	el - the element
	cellval - the cell value
	opts - a set of options containing
		rowId - the id of the row
		colModel - the colModel for this column
		rowData - the data for this row
*/
linkFriendlyFmtr = function (el, cellval, opts){
	
	$(el).html(formatLinkFriendly(cellval));
}

function formatLinkFriendly(val){
	//return '<a href="">'+val+'</a>';
	return '<a href="">'+val+'</a>';
	//return "asdfasdfasdf";
}

function formatLinkFriendly2(cellval, opts) {
	var op = {baseLinkUrl: opts.baseLinkUrl,showAction:opts.showAction, addParam: opts.addParam, target: opts.target, idName: opts.idName },
	target = "";
	if(!isUndefined(opts.colModel.formatoptions)) {
		op = $.extend({},op,opts.colModel.formatoptions);
	}
	if(op.target) {target = 'target=' + op.target;}
	idUrl = op.baseLinkUrl+op.showAction + '?'+ op.idName+'='+opts.rowId+op.addParam;
    if(isString(cellval)) {	//add this one even if its blank string
		return "<a "+target+" href=\"" + idUrl + "\">" + cellval + "</a>";
    }else {
		return $.fn.fmatter.defaultFormat(cellval,opts);
    }
};
