﻿	var __helpOnLineRemote__ = null;
	
//	function __onGetHelpOnlineDescriptionComplete(result) 
	function __onGetHelpOnlineDescriptionComplete() 
	{			
		var result = "";	
		
		if (__helpOnLineRemote__ != null) {
		
			if (__helpOnLineRemote__.readyState == 4) {
		
				if (__helpOnLineRemote__.status == 200) {
					result = __helpOnLineRemote__.responseText;			
					
					var divHelp = document.getElementById("__divHelpOnLineInfo__");
					divHelp.innerHTML = "";
					
					var workArea = document.getElementById("__divHelpOnLine_WorkArea__");						
					workArea.style.display = "block";
					
					var newIF = document.getElementById("__ifHelpOnLine_WorkArea__");
					newIF.style.top = workArea.style.top;
					newIF.style.left = workArea.style.left;									
					
					newIF.style.width = workArea.style.width;
					newIF.style.height = workArea.style.height;			
					newIF.style.display = "block";

					newIF.style.zIndex = "9998";
					workArea.style.zIndex = "9999";
					
					newIF.style.position = "absolute";			
					workArea.style.position = "absolute";	
						
					divHelp.innerHTML = result;
				} else {
					result = __helpOnLineRemote__.statusText;
				}
				__helpOnLineRemote__ = null;
			}
		}			
	}
	
	function __hideHelpOnLine() 
	{
			var divHelp = document.getElementById("__divHelpOnLineInfo__");
			divHelp.innerHTML = "";
			
			var workArea = document.getElementById("__divHelpOnLine_WorkArea__");
			workArea.style.display = "none";
			workArea.style.position = "";
			
			var ifr = document.getElementById("__ifHelpOnLine_WorkArea__");
			ifr.style.display = "none";	
			ifr.style.position = "";
	}
	
	function __showHelpOnLine(ctrl, helpType, helpWidth, helpHeight) 
	{		
			__hideHelpOnLine();
			
			var tbl = document.getElementById("__tblHelpOnLine_WorkArea__");
			tbl.style.width = (helpWidth) + "px";
			tbl.style.height = (helpHeight) + "px";
			
			var div = document.getElementById("__divHelpOnLine_WorkArea__");
			div.style.width = (helpWidth) + "px";
			div.style.height = (helpHeight) + "px";
			div.style.top = (findPosY(ctrl)) + "px";
			div.style.left = (findPosX(ctrl)) + "px";					
			
			__helpOnLineRemote__ = webPartsRemoteCall("../webparts/helponline/HelpOnLine.aspx?idHelp=" + helpType, __onGetHelpOnlineDescriptionComplete);
//			DynamicWebParts.getHelpOnLineDescription(helpType, __onGetHelpOnlineDescriptionComplete);		
	}

