var dlg = null;
function open_window(url, name, hsiz, vsiz, extra) {
  var options = "titlebar=no,toolbar=no" 
              + ",width=" + hsiz + ",height=" + vsiz + extra;
  if (!dlg) dlg = window.open(url, name, options); 
  else if (!dlg.closed) dlg.window.focus();
  else dlg = window.open(url, name, options); 
}

function change_locale(loc) {
  if (location.href.match(/acb/)) {
    return;
  }
  var str = location.href.replace(/locale=.{5}/, "locale="+loc);
  if (!str.match(/locale/)) {
    if (str.match(/\?/)) {
      str += "&locale="+loc;
    } else {
      str += "?locale="+loc;
    }
  }
  str.replace(/#/, "");
  location.href=str;
}

function goto_url (obj) {
	var url = obj.children(0).href;
	window.location.href=url;
}

