/******************************/
/* FUNCTION js_open_new_win() */
/******************************/
// Opens a web page in a new window,
// receives:
//   the url (ex: www.molior.ca)
//   the window name, or 0 (ex: Totem)
//   the window's features, or 0 (ex: 'width=400,height=300')
// returns:
//   false (so that the normal link won't work)
function js_open_new_win(the_url,win_name,features) {
  if (features) {
    window.open(the_url, win_name, features);
  } else if (win_name) {
    window.open(the_url, win_name);
  } else {
    window.open(the_url);
  }
  return false;
}


/*******************************/
/* FUNCTION confirm_del_link() */
/*******************************/
// Displays an confirmation box beforme to submit a "DELETE" query.
// This function is called while clicking the delete links in admin mode
// receives:
//   the url (ex: www.molior.ca)
//   a string identifying the data to delete (ex: 'Le groupe Molior... (id=88)
// returns:
//   true if the browser is Opera or the user cliked yes,
//   false otherwise
function confirm_del_link(the_url, lang, del_str)
{
  // Browser is Opera (crappy js implementation)
  if (typeof(window.opera) != 'undefined') {
    return true;
  }
  
  if (lang) {
    var confirm_del_msg = 'Voulez-vous vraiment supprimer :\n';
  } else {
    var confirm_del_msg = 'Do you really want to delete:\n';
  }
  
  var is_confirmed = confirm(confirm_del_msg + del_str);
  /*if (is_confirmed) {
    the_url.href += '&amp;is_js_confirmed=1';
  }*/

  return is_confirmed;
} // end of the 'confirmLink()' function