function setSort(el, fldName){
	var cn = el.className;
	var sVal = "";
	if(cn.length > 0){
		var temp = cn.split("-");
		sVal = fldName+"-"+((temp[1]=='asc')?'desc':'asc');
	}else{
		sVal = fldName+"-asc"
	}
	location.href=setUrlParam(location.href, "setSort", sVal);	
}

function browseTo(no){
	location.href=setUrlParam(location.href, "offs", no);	
}


function setUrlParam(_url, paramName, value){
	value = value+"";
	var temp = _url.split("?");
	if(temp.length>1){	
		temp[1] = temp[1].split("&");
		if(temp[1].length > 0){
			for(var i=0; i < temp[1].length; i++){
				temp[1][i] = temp[1][i].split("=");
			}
		}
	}
	var _search = "";
	var pfound = false;
	for(var i=0; i<temp[1].length; i++){
		if(temp[1][i][0] == paramName){
			pfound = true;
			if(value.length>0){
				if(_search.length > 0) _search+= "&";
				_search+= temp[1][i][0]+"="+value;
			}
		}else{
			if(_search.length > 0) _search+= "&";
			_search+= temp[1][i][0]+"="+temp[1][i][1];
		}
	}
	if(!pfound && (value.length>0)){
		if(_search.length > 0) _search+= "&";
		_search+= paramName+"="+value;
	}
	return temp[0]+((_search.length>0) ? "?"+_search : "");
}




