function replaceParamVal(paramName,replaceWith) {
var oUrl = this.location.href.toString();
var re=eval('/('+ paramName+'=)([^&]*)/gi');
if (re.test(oUrl)){
var nUrl = oUrl.replace(re,paramName+'='+replaceWith);
}else{
if(oUrl.indexOf('?')>0){
var nUrl = oUrl+"&"+paramName+"="+replaceWith;
}else{
var nUrl = oUrl+"?"+paramName+"="+replaceWith;
}
}
this.location = nUrl;
}
var oUrl = this.location.href.toString();
var re=eval('/('+ paramName+'=)([^&]*)/gi');
if (re.test(oUrl)){
var nUrl = oUrl.replace(re,paramName+'='+replaceWith);
}else{
if(oUrl.indexOf('?')>0){
var nUrl = oUrl+"&"+paramName+"="+replaceWith;
}else{
var nUrl = oUrl+"?"+paramName+"="+replaceWith;
}
}
this.location = nUrl;
}