<!--
var g_Iv;
var highlight_id = -1;

var g_lRefID;
var g_strName;
var g_strViewPortName;
var g_strViewPortFile;
var browser;

var lastSelectedRow = -1;
var lastSelectedRowStyle;


function Init(file)
{
	var installed=1;
	if ( navigator.appName.indexOf("Netscape") == -1 )
	{
		g_Iv = iso_img;
		browser = "IE";
	}
	else
	{
		g_Iv = document.iso_img;
		browser = "NS";

		// check if isoview plug-in is installed, if not give a hint how to do
		if (!navigator.plugins['IsoView Plug-in'])
		{
			var newWin = window.open('staticpages/plugin.htm','plugin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=250,height=400');
			newWin.focus();
			installed = 0;
		}
	}
	
	if (installed)
	{
		g_Iv.OpenFile(file, "home");
		// set tool tips
		for (i=1; i<PartsName.length; i++)
		    if (PartsHs[i] != '')
		    {
			if (PartsRef[i] != '')
				g_Iv.SetObjectTip(0, PartsHs[i], PartsName[i] + ' ' + str_subassembly);
			else
				g_Iv.SetObjectTip(0, PartsHs[i], PartsName[i]);
		    }
		g_Iv.setObjectTipState(5);
	}

	checkParam();
}


function HlHs(id)
{
	/* unhighlight previously highlighted hotspot */
	if (highlight_id != -1)
		g_Iv.HighlightHotspot(0,highlight_id,32,0);
	highlight_id = id;
	/* highlight hotspot */
	g_Iv.HighlightHotspot(0,id,36,255);
	/* check corresponding radio button in parts table */
	hiliteAndScrollRow(id);
}


function HsHit(nMouseBtn, lRefID, strName, strViewPortName, strViewPortFile)
{
	g_Iv.DisposeContextMenu();
	/*** left mouse button -- highlight hostspot and show selected article in seperate line ***/
	if (nMouseBtn == 1)
	{
		HlHs(strName);
		writeFstLine(strName);
	}

	/*** right mouse button -- show context menu ***/
	if ((nMouseBtn == 2) && (browser != "NS"))
	{
		for (i=1; i<=PartsHs.length; i++)
			if (PartsHs[i] == strName)
			{
				/* speichern der Hotspot-Werte in globalen variablen */
				g_lRefID = lRefID;
				g_strName = strName;
				g_strViewPortName = strViewPortName;
				g_strViewPortFile = strViewPortFile;

				/* Generierung des Context-Menue */
				g_Iv.AddContextMenuItem(str_iso_cm_one, true);
				if (PartsRef[i] != '')
					g_Iv.AddContextMenuItem(str_iso_cm_two, true);
				else
					g_Iv.AddContextMenuItem(str_iso_cm_two, false);
				g_Iv.CreateContextMenu();

				/* display */
				if (browser == "NS")
					g_Iv.DoPopupMenu(getOffsetX(),getOffsetY());
				else
					g_Iv.DoPopupMenu(-1,-1);
			}
	}

}

function ShowObject( id )
{

	HlHs(id);
	writeFstLine(id)
}


function ContextMenuItemHit( item, Title )
{
	/*** show hotspot ***/
	if (item == 1)
		HsHit(1, g_lRefID, g_strName, g_strViewPortName, g_strViewPortFile);

	/*** go to assembly ***/
	if (item == 2)
	{
		for (i=1; i<=PartsHs.length; i++)
			if (PartsHs[i] == g_strName)
			{
				if (PartsRef[i] != '')
					goToAssembly(i);
				break;
			}
	}

	g_Iv.DisposeContextMenu();
}


//-->

