function UnderDevelopment(){
	alert('Under development!');
	return false;
}
// Check All
var CheckValue = true;
function CheckAll(which){
	for (i=0; i<which.length; i++)
	{
	var cb = which.elements[i];
	if (cb.name == "uid"+[i])
	  cb.checked = CheckValue;
		cb=cb+cb;
	}
	CheckValue = !CheckValue;
}

// adminisrators / sitepages rights
function CheckAllLangPages(which){
	var cfields = document.getElementsByClassName(which);
	for (i = 0; i < cfields.length; i++) {
		cfields[i].checked = CheckValue;
	}
	CheckValue = !CheckValue;
}


// Validate MultiAction select
function ValidateMultiAction(flag){
	var err = true;
	var total = 0;
	for (var i = 0; i < document.ListForm.elements.length; i++) {
		if ( document.ListForm.elements[i].checked == true ){
			err = false;
			total++;
		}
	}
	if ( err == true){
		alert('You have not select any item(s)!');
		document.ListForm.newnode.value='';
		return false;
	} else {
//		if(document.ListForm.action.value=='Delete'){
//			if (total==1){
//				if (flag=='delcateg'){
//					var delmsg = "Attention! \nDeleting this category you will also delete the subcategories and items under this section.\nAre you sure you want to delete this category?";
//				} else if (flag=='delsubcateg') {
//					var delmsg = "Attention! \nDeleting this subcategory you will also delete all items under this section.\nAre you sure you want to delete this subcategory?";
//				} else {
//					var delmsg = "Are you sure you want to delete this item?"
//				}
//			}
//			if (total > 1){
//				if (flag=='delcateg'){
//					var delmsg = "Attention! \nDeleting these categories you will also delete all subcategories and items under these sections.\nAre you sure you want to delete these categories?";
//				} else if (flag=='delsubcateg') {
//					var delmsg = "Attention! \nDeleting these subcategories you will also delete all items under these sections.\nAre you sure you want to delete this subcategories";
//				} else {
//					var delmsg = "Are you sure you want to delete these items?"
//				}
//			}
//			if (ConfirmAction(delmsg)){
//				document.ListForm.submit();
//			} else {
//				document.ListForm.action.value='';
//				return false;
//			}
//		} else {
//			document.ListForm.submit();
//		}
		document.ListForm.submit();
	}
}

// Validate MultiAction select
function ValidateMultiAction2(flag){
	var err = true;
	var total = 0;
	for (var i = 0; i < document.ListForm.elements.length; i++) {
		if ( document.ListForm.elements[i].checked == true ){
			err = false;
			total++;
		}
	}
	if ( err == true){
		alert('You have not select any user(s)!');
		document.ListForm.newnode.value='';
		return false;
	} else {
		document.ListForm.submit();
	}
}


function arrowchange(id){
	if (document.getElementById) {
		var el = document.getElementById (id);
		if (el && el.className) {
			el.className = (el.className == 'navOpened') ? 'navClosed' : 'navOpened';
		}
	}
}

function go_to(href){
	window.location = href;
	return false;
}

function ConfirmAction(msg) {
	return confirm(msg);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Show Hide
function showhide(id){
	if (document.getElementById){
	obj = document.getElementById(id);
		if (obj.style.display == "none"){
			obj.style.display = "";
		} else {
			obj.style.display = "none";
		}
	}
}
// Hide
function hide(id){
if (document.getElementById){
obj = document.getElementById(id);
obj.style.display = "none";
}
}
// Show
function show(id){
if (document.getElementById){
obj = document.getElementById(id);
obj.style.display = "";
}
}

/*
function ShowHideDiv(pass) {
  var divs = document.getElementsByTagName('div');

	for(i=0;i<divs.length;i++){

		var divid = divs[i].id
		if (divid.indexOf("dx")!=-1){
			if (divid.indexOf(pass)!=-1){

				if(divs[i].id.match(pass)){
					if (document.getElementById) {
						if (document.getElementById){
							if (divs[i].style.display == "none"){
								divs[i].style.display = "";
							} else {
								divs[i].style.display = "none";
							}
						} else {
							if (document.layers) { // Netscape 4
								if (document.layers[divs[i]].visibility == "hidden"){
									document.layers[divs[i]].visibility = 'visible';
								} else {
									document.layers[divs[i]].visibility = "hidden";
								}
							} else { // IE 4
								if (document.all.divs[i].visibility == "hidden"){
									document.all.divs[i].visibility = 'visible';
								} else {
									document.all.divs[i].visibility = "hidden";
								}
							}
						}
					}
				}

			} else {
				//alert(divs[i].id);
				if (document.getElementById){
					divs[i].style.display="none";
				} else {
					if (document.layers) // Netscape 4
						document.divs[i].visibility = 'hidden';
					else // IE 4
						document.all.divs[i].visibility = 'hidden';
				}
			}
		}

	}

}


  // StripTables
  // this function is need to work around
  // a bug in IE related to element attributes
  function hasClass(obj) {
     var result = false;
     if (obj.getAttributeNode("class") != null) {
         result = obj.getAttributeNode("class").value;
     }
     return result;
  }

 function stripe(id) {

    // the flag we'll use to keep track of
    // whether the current row is odd or even
    var even = false;

    // if arguments are provided to specify the colours
    // of the even & odd rows, then use the them;
    // otherwise use the following defaults:
    var evenColor = arguments[1] ? arguments[1] : "#fff";
    var oddColor = arguments[2] ? arguments[2] : "#eee";

    // obtain a reference to the desired table
    // if no such table exists, abort
    var table = document.getElementById(id);
    if (! table) { return; }

    // by definition, tables can have more than one tbody
    // element, so we'll have to get the list of child
    // &lt;tbody&gt;s
    var tbodies = table.getElementsByTagName("tbody");

    // and iterate through them...
    for (var h = 0; h < tbodies.length; h++) {

     // find all the &lt;tr&gt; elements...
      var trs = tbodies[h].getElementsByTagName("tr");

      // ... and iterate through them
      for (var i = 0; i < trs.length; i++) {

	    // avoid rows that have a class attribute
        // or backgroundColor style
	    if (!hasClass(trs[i]) && ! trs[i].style.backgroundColor) {

         // get all the cells in this row...
          var tds = trs[i].getElementsByTagName("td");

          // and iterate through them...
          for (var j = 0; j < tds.length; j++) {

            var mytd = tds[j];

            // avoid cells that have a class attribute
            // or backgroundColor style
	        if (! hasClass(mytd) && ! mytd.style.backgroundColor) {

		      mytd.style.backgroundColor = even ? evenColor : oddColor;

            }
          }
        }
        // flip from odd to even, or vice-versa
        even =  ! even;
      }
    }
  }
  //usage: <body onload="stripe('stiptable', '#E1E6F0', '#F3E8D7');">


//textarea maxlength
function charsLeft(what, whatValue, maxChars)
{
	lengthLeft = maxChars - whatValue.length;
	if (lengthLeft < 0)
	{
		what.value = what.value.substring(0,maxChars);
	}
}
//usage:  onchange="charsLeft(this,this.value,255);" onkeyup="charsLeft(this,this.value,255);"


// {{{ hide status bar message
function hidestatus(){
	window.status=''
	return true
}
if (document.layers){
	document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT | Event.CLICK);
	pref("dom.disable_window_open_feature.status", false);
	pref("dom.disable_window_status_change", false);
}
document.onmouseover=hidestatus
document.onmouseout=hidestatus
document.onclick=hidestatus
// }}}
*/
