// CHD JavaScript Document
var lastSource=null;
var lastColor=null;
function displayNote(el_ID,message,source,newColor){
	/*	Note that this function relies on testing the existing string in targetElement.msg
		Also be sure to use addslashes to the source string.
		
		Be sure to add custom attribute msg="" to target element
		*/
	var el=document.getElementById(el_ID);
	if (el!=null){
		msg=el.getAttribute('msg');
		if (msg!=null){
			if (lastSource!=null){
				lastSource.style.color=lastColor;
				lastSource=null;
				}
			if ((message!=msg)&message!=''){
				el.innerHTML = message;
				el.setAttribute('msg',message);
				el.style.display='block';
				if (source!=null){
					lastColor=source.style.color;
					lastSource=source;
					if (newColor!=null){
						source.style.color=newColor;
						}
					}
				}
			else{
				el.innerHTML='';
				el.setAttribute('msg','');
				el.style.display='none';
				}
			}
		}
	}
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}
function googleCacheFix(){
	var mylist=document.body
	for (i=0; i<mylist.childNodes.length; i++){
		if (mylist.childNodes[i].nodeName=="DIV")
			mylist.childNodes[i].style.position="static";
	}
}addLoadEvent(googleCacheFix);
//addLoadEvent(function(){return;});

