var _U = "undefined";
var oPopup = window.createPopup();
function contextMenu( dataID )
{
    var oNodeListActions = document.getElementById( dataID ).XMLDocument.selectNodes("actions/action");
    var numNodes = oNodeListActions.length;
    var divTagStyle = "STYLE='white-space:nowrap; background:#cccccc; border:1px solid black; border-top:1px solid white; border-left:1px solid white; height:20px; color:black; font-family:verdana; font-weight:bold; padding:2px; padding-left:10px; font-size:8pt; cursor:hand' ";
    var divTagActions = "onmouseover='this.style.background=\"#ffffff\"' onmouseout='this.style.background=\"#cccccc\"'";
    var menu = "";

    for( n = 0; n < numNodes; n++ )
    {
        var oNodeAction = oNodeListActions.item( n );

        menu = menu + "<div ";
        menu = menu + divTagStyle;
        menu = menu + divTagActions;
        menu = menu + ">";
        menu = menu + oNodeAction.xml;
        menu = menu + "</div>";
    }
    oPopup.document.body.innerHTML = menu;
    var popupBody = oPopup.document.body;
    oPopup.show(0, 0, 100, 0);
    var realHeight = popupBody.scrollHeight;
    var realWidth = popupBody.scrollWidth + 10;
    oPopup.hide();
    oPopup.show(0, 15, realWidth, realHeight, event.srcElement);
}
function fnCheckKey()
{
	try{}
	catch(e)
	{
		fnLog(e, "fnCheckKey", this.name);
	}
}
function fnToggle()
{
	try{}
	catch(e)
	{
		fnLog(e, "fnToggle", this.name);
	}
}
function fnLaunchContributorClient()
{
	try
	{
		var app = document.getElementById("ssContributor");

		if (typeof app != _U && app != null)
		{
			app.EditContributorFile(document);
		}
	}
	catch(e)
	{
		fnLog(e, "fnLaunchContributorClient", this.name);
	}
}
function fnSwitchContributionRegionFile(strSiteId, strNodeId, strRegionId, bUseSecondary)
{
	try{}
	catch(e)
	{
		fnLog(e, "fnSwitchContributionRegionFile", this.name);
	}
}
function fnContributorImageToggle()
{
	try{}
	catch(e)
	{
		fnLog(e, "fnContributorImageToggle", this.name);
	}
}
function fnInit()
{
	try{}
	catch(e)
	{
		fnLog(e, "fnInit", this.name);
	}
}
function fnLog( e, fn, f )
{
	alert(f + "\n" + fn + "\n" + e.name + "\n" + e.description + "\n" );
}
window.onload = fnInit;