window.onload = function()
{
	setTitle();
	setMail(true);
	setModelInfo();
	showButton("url", true);
	parent.header.lastView = "graphic";
	if (bSwitchViews){window.setTimeout("showButton('graphic', true)", 100)};
	checkPrint();
  actualizeTreeView();	
	var arrElems = document.getElementsByTagName('tr');
	for (var i = 0; i < arrElems.length; i++)
	{
		arrElems[i].onmouseover = function(){this.className = "rowHover"};
		arrElems[i].onmouseout = function(){this.className = ""};
	}
	parent.header.bSwitch = false;
}

window.onunload = function()
{
	showButton("graphic", false);
	showButton("url", false);
	showButton("modelinfo", false);
	showButton("mail", false);
	showButton("print1", false);
	showButton("print2", false);
	parent.header.addHistory(document.title, currModelType, currModelId);
	if (!parent.header.bSwitch){parent.header.bModelLoaded = false}
}

function openObjectAndModel(modId, instId)
{
	openWindow(modId, "");
	openWindow(modId, instId);
}