
function emptyField(field) {
	field.value = "";
}

function fieldEmpty( foo ) {
	for (var i = 0; i < foo.length; i++) {
		var c = foo.charAt( i );
		if (( c != ' ') && (c != '/n') && (c != '/t'))
			return false;
	}
	return true;
}


function addEvent(obj, evType, fn, useCapture){
    if (obj.addEventListener){
        obj.addEventListener(evType, fn, useCapture);
        return true;
    } else if (obj.attachEvent){
        var r = obj.attachEvent("on"+evType, fn);
        return r;
    }
    return false;
}
function AssignMenuEvents(pObject) {
  var node ;
  var vPreviousIndex ;
  for (i=0; i < pObject.childNodes.length; i++) {
    node = pObject.childNodes[i];
    if (node.tagName == "LI") {
      if (document.all && document.getElementById) {
        node.onmouseover=function() { this.className+=" over"; }
        node.onmouseout=function() { this.className=this.className.replace(" over", ""); }
      }
    }
    if (node.childNodes.length > 0) {
      vPreviousIndex = i ;
      AssignMenuEvents(node);
      i = vPreviousIndex ;
    }
  }
}
function AssignMenuEventsStart() {
  if (document.all && document.getElementById) {
    // Skip Mozilla. DO IE
    var node = document.getElementById("flag-top");
    if (node) {
      AssignMenuEvents(node);
    }
  }
}
addEvent(window,'load',AssignMenuEventsStart);


