function popup(url, w, h) {
   var dx = Math.round((screen.availWidth - w) / 2);
   var dy = Math.round((screen.availHeight - h) / 2);
   return window.open(url,'','width='+w+', height='+h+', left='+dx+', top='+dy+', toolbar=no, statusbar=no, scrollbars=yes, resizable=yes, menubar=no');
}


function popup_custom(url,w,h,params) {
   var dx = Math.round((screen.availWidth - w) / 2);
   var dy = Math.round((screen.availHeight - h) / 2);
   var all_params = 'width='+w+', height='+h+', left='+dx+', top='+dy;
   if(params.length > 0) all_params += ',' + params;
   return window.open(url,'',all_params);
}

function str_append(separator, str1, str2) {
   if(str1 != "") str1 += separator;
   str1 += str2;
   return str1;
}


/* Visual */

function rowOver(el) {
   el.className = 'list_row_over';
   return true;
}

function rowOut(el) {
   el.className = 'list_row_out';
   return true;
}

var original_color = "#FFFFFF";

function setBgcolor(el, color) {
   original_color = el.style.backgroundColor;
   el.style.backgroundColor = color;
   el.style.cursor = "pointer";
}

function clearBgcolor(el) {
   el.style.backgroundColor = original_color;
   el.style.cursor = "default";
}

function cursor(el, type) {
   el.style.cursor = type;
   return true;
}


/* Navigation */

function go(url) {
   window.location = url;
   return true;
}
