function ShowDefine(name, e)
{
	var DefineWindow = MM_findObj('definewindow');
	var DefineFrame = MM_findObj('defineframe');
	var IfrRef = document.getElementById('DivShim'); 
	
	
	DefineFrame.src = "define.aspx?name=" + name;
	DefineFrame.location = "define.aspx?name=" + name;
	
	
	if (!e) var e = window.event;
	var toX;
	var toY;
	
	var ie = document.all;
	scrollLeft = document.body.scrollLeft;
	scrollTop = document.body.scrollTop;
	
	if (e.pageX)
	{
		toX = e.pageX;
		toY = e.pageY - 125;
		boxWidth = toX + 340;
		boxHeight = toY + 230;
		
		if (boxWidth > window.innerWidth - scrollLeft)
			toX -= (boxWidth - window.innerWidth - scrollLeft) + 10 ;
		if (boxHeight > window.innerHeight + scrollTop)
			toY -= (boxHeight - window.innerHeight - scrollTop) + 60;
	}
	else
	{
		toX = e.clientX + document.body.scrollLeft;
		toY = e.clientY + document.body.scrollTop - 125;
		boxWidth = toX + 318;
		boxHeight = toY + 225;
		
		if (boxWidth > document.body.offsetWidth - scrollLeft)
			toX -= (boxWidth - document.body.offsetWidth) + 30 - scrollLeft;
		if (boxHeight > document.body.offsetHeight + scrollTop)
			toY -= (boxHeight - document.body.offsetHeight) + 60 - scrollTop;
	}
	

	DefineWindow.style.left = toX;
	DefineWindow.style.top = toY;
	DefineWindow.style.display = "block";
 
	IfrRef.style.width = DefineWindow.offsetWidth - 10; 
	IfrRef.style.height = DefineWindow.offsetHeight; 
	IfrRef.style.top = DefineWindow.style.top; 
	IfrRef.style.left = DefineWindow.style.left; 
	IfrRef.style.zIndex = DefineWindow.style.zIndex - 1; 
	IfrRef.style.display = "block"; 

	
}
function HideDefine()
{
	var DefineWindow = MM_findObj('definewindow');
	var DefineFrame = MM_findObj('defineframe');
	var IfrRef = MM_findObj('DivShim'); 
	DefineFrame.src = "define.aspx?name=" + name;
	DefineFrame.location = "define.aspx?name=" + name;
	DefineWindow.style.display = "none";
	IfrRef.style.display = "none"; 
}

var html = "<div id=\"definewindow\" style=\"position:absolute; z-index:100; display:none\">";
html+="		  <table width=\"100\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
html+="			<tr>";
html+="			  <td><img src=\"images/dwindow_top.gif\" width=\"318\" height=\"54\"></td>";
html+="			</tr>";
html+="			<tr>";
html+="			  <td style=\"background-image:url(images/dwindow_fill.gif); background-repeat:repeat-y\"><table width=\"100%\"  border=\"0\" cellspacing=\"10\" cellpadding=\"4\">";
html+="				  <tr>";
html+="					<td><iframe id=\"defineframe\" name=\"defineframe\" width=\"300\" height=\"100\" scrolling=\"Yes\" frameborder=\"0\" src=\"define.aspx\"></iframe></td>";
html+="				  </tr>";
html+="				  <tr>";
html+="					<td align=\"right\"><a href=\"javascript:HideDefine();\"><img src=\"images/btnclose.gif\" width=\"55\" height=\"27\" border=\"0\"></a></td>";
html+="				  </tr>";
html+="			  </table></td>";
html+="			</tr>";
html+="			<tr>";
html+="			  <td><img src=\"images/dwindow_btm.gif\" width=\"318\" height=\"28\"></td>";
html+="			</tr>";
html+="		  </table>";
html+="		</div>";
html+="		 <iframe";
html+="  id=\"DivShim\"";
html+="  src=\"javascript:false;\"";
html+="  scrolling=\"no\"";
html+="  frameborder=\"0\"";
html+="  style=\"position:absolute; top:0px; left:0px; display:none;\">";
html+=" </iframe>";

document.write(html);


