OverlayMessage=function(container){
	var parent=container.parentNode;
	var wrapper=document.createElement('div');
	
	
	parent.insertBefore(wrapper,container);
	
	parent.removeChild(container);
	wrapper.style.cssText=container.style.cssText;
	wrapper.appendChild(container);
	container.style.cssText='position: relative; width: 100%; height: 100%;';
	
	this.overlay=document.createElement('div');
	this.overlay.style.cssText='display: none;';
	wrapper.appendChild(this.overlay);
	
        this.visibleStyle='position: relative; font-family:  Helvetica, sans-serif; font-size: 16px;  color: black; top: -55%; background-color: '+OverlayMessage.backgroundColor+'; width: 40%; text-align: center; margin-left: auto; margin-right: auto; padding: 2em; border: 1px solid  '+OverlayMessage.borderColor+'; z-index: 100;';
	//this.visibleStyle='position: relative; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #ffffff; top: -55%; background-color: '+OverlayMessage.backgroundColor+'; width: 40%; text-align: center; margin-left: auto; margin-right: auto; padding: 2em; border: 0.08in ridge '+OverlayMessage.borderColor+'; z-index: 100; opacity: .75;'; // filter: alpha(opacity=75);';
	//.more {  font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #0099CC; text-decoration: none}
	//this.invisibleStyle='display: none;';
	//this.overlay.style.cssText=this.invisibleStyle;
};

OverlayMessage.backgroundColor=' white';
OverlayMessage.borderColor='#0099CC';
OverlayMessage.prototype.Set=function(message)
{
	
	this.overlay.innerHTML=message;
	//GLog.write("visible");
	
	this.overlay.style.cssText=this.visibleStyle;
	
	this.overlay.style.visibility = "visible";
};
OverlayMessage.prototype.Clear=function(){
	//this.overlay.style.cssText=this.invisibleStyle;
	//GLog.write("hidden");
	this.overlay.style.visibility = "hidden";
};
OverlayMessage.SetBackgroundColor=function(color){
	OverlayMessage.backgroundColor=color;
};
OverlayMessage.SetBorderColor=function(color){
	OverlayMessage.borderColor=color;
};
