/* ===================================================================================================
 * webViewControl
 * ===================================================================================================
 */
 
/// jsonParameters
/// { fullControlName: <string>,
///   text: <string>,
///   visible: "0" | "1"
///   enabled: "0" | "1"
///   tabstop: "0" | "1"
///   description: <columnDescriptor>
/// }
webViewControl_Initialize = function(jsonParameters)
{
	var P = parseParameters(jsonParameters);
	//alert(JSON.stringify(P));
	var c = getControl(P.fullControlName);
	c.description = P.description;
	if (typeof P.src != 'undefined') 
		c.src = P.src;
	else
		c.src = "webView-empty.html";
	c.title = c.src;
};

webViewControl_Update = function(jsonParameters)
{
	var P = parseParameters(jsonParameters);
	//alert(JSON.stringify(P));
	var c = getControl(P.fullControlName);
	if (typeof P.src != 'undefined') 
		c.src = P.src;
	c.title = c.src;
};

webViewControl_Navigate = function(jsonParameters)
{
	var P = parseParameters(jsonParameters);
	//alert(JSON.stringify(P));
	var c = getControl(P.fullControlName);
	if (typeof P.src != 'undefined') 
		c.src = P.src;
	c.title = c.src;
};

webViewControl_Invoke = function(jsonParameters)
{
	var P = parseParameters(jsonParameters);
	//alert("Invoke:\r\n" + JSON.stringify(P));
	var c = getControl(P.fullControlName);
	if (typeof P.innerMessage != 'undefined')
		c.contentWindow.postMessage(JSON.stringify(P.innerMessage));
};
