/*
// General Javascript
//
// 2008-04-24 Julie Maillet
*/

function window_open (url, window_name, width, height)
  // Open a new window
  { 
    var args = "";
    args += "width=" + width + "," + "height=" + height + ","
    + "scrollbars=yes,"
    + "statusbar=true,"
    + "status=true,"
    + "titlebar=yes,"
    + "menubar=yes,"
    + "location=yes,"
    + "toolbar=1";
    window.open(url, window_name, args);
  }

function general_show_hide (id,style_display)
  {
    var obj = document.getElementById(id);
		if (!style_display) style_display = 'block'; 
    if (obj.style.display == 'none') { obj.style.display = style_display; }
    else { obj.style.display = 'none'; }
  }
function general_hide (id)
  { document.getElementById(id).style.display = 'none'; }
function general_hide_array (ids)
  {
		var myArr = ids.split(",");
		for (var i=0; i < myArr.length; i++) {
			general_hide(myArr[i]);
		}
  }
function general_show (id,style_display)
  { if (!style_display) style_display = 'block'; document.getElementById(id).style.display = style_display; }
function general_class_set (id,newClass)
	{ document.getElementById(id).className = newClass;	}
function general_class_set_array (ids,newClass)
  {
		var myArr = ids.split(",");
		for (var i=0; i < myArr.length; i++) {
			general_class_set(myArr[i],newClass);
		}
  }
