<!--

// main
// 2xAI
// 2xAO
// 3fEEM
// DIGI8
// DIGIO
// GPN
// HVAC-FC
// MMC
// MMC-E
// MSLS
// LONNODE
// TSM-101
// HSM-101
// LSM-111
// RPT-TP/FT10
// RS-LON
// RTR-FT10-FT10
// RTR-FT-FO
// STP02-E
// STP-03
// TERM-FT
// TSSP02
// Wizual

window.onerror = HandleError;
var oldColor;

function HandleError(message, url, line ){
var str = "Błąd w " + url + " (linia " + line + "):\n\n"
 + message;
	alert (str);
	return true;
}

function ShowYellow( aName ){
var imgName, linkName;
var _links;
	imgName = 'p' + aName;
	linkName = 'l' + aName;
	document.images[ imgName ].src = "img/Menu/LEdgeY.gif";
	if( navigator.appName == "Netscape" ){
		document.links[ linkName ].focus();
	} else if( navigator.appName == "Microsoft Internet Explorer" ){
		document.anchors.item( linkName ).focus();
		oldColor = document.anchors.item( linkName ).style.color;
		document.anchors.item( linkName ).style.color = "yellow";
	}
	return true;
}

function ShowBlack( aName ){
var imgName, linkName;
	imgName = 'p' + aName;
	linkName = 'l' + aName;
	document.images[ imgName ].src = "img/Menu/LEdgeB.gif";
	if( navigator.appName == "Netscape" ){
		document.links[ linkName ].blur();
	} else if( navigator.appName == "Microsoft Internet Explorer" ){
		document.anchors.item( linkName ).blur();
		document.anchors.item( linkName ).style.color = oldColor; 
	}
	return true;
}


function makeMenuStr( activeItem, thisItem, isNew, title, text, url, notIntend ){
	menu = "<tr><td width=35 height=16><img src=\"";
	if( activeItem==thisItem ){
		menu += "img/Menu/LEdge_.gif";
	} else {
		menu += "img/Menu/LEdgeB.gif";
	}
	if( title=="" ) title = thisItem;
	if( text=="" ) text = thisItem;
	if( url=="" ) url = thisItem + ".html";

	menu += "\" width=35 height=16 border=0 name=\"p" + thisItem + "\"></td>";
	menu += "<td width=189 height=16 background=\"";
	if( isNew )
		menu += "img/Menu/BkgdNew.gif";
	else if( thisItem=="Resale" )
		menu += "img/Menu/BkgdEchelon.gif";
	else
		menu += "img/Menu/Bkgd.gif";
	if( notIntend )
		menu += "\" style=\"padding-left: 5px;\" ";
	else
		menu += "\" style=\"padding-left: 10px;\" ";
	if( activeItem!=thisItem )
		menu += "onMouseOver=\"ShowYellow('" + thisItem + "');\" onMouseOut=\"ShowBlack('" + thisItem + "');\" onClick=\"location.href='" + url + "'; return true;\"";
	menu += " title=\"" + title + "\">";
	if( activeItem!=thisItem )
		menu += "<a href=\"" + url + "\" class=\"navMenuLink\" name=\"l" + thisItem + "\">" + text + "</a></td>";
	else
		menu += "<span style=\"color: 6060FF;\">" + text + "</span></td>";
	menu += "</tr>\n";
	return menu;
}

function makeMenuSeparator(){
	return "<tr><td width=224 height=6 colspan=2 background=\"img/Menu/Separator.gif\"></td></tr>";
}

function makeMenu( active ){
	menu = "<table width=747 border=0 cellspacing=0 cellpadding=0>";
	menu += "<tr><td colspan=2 width=745 height=76><img src=\"img/Menu/TopNarrow.gif\" width=745 height=76 border=0></td></tr>";
	menu += "<tr><td width=230 valign=top>";
	menu += "<table width=224 border=0 cellpadding=0 cellspacing=0 class=\"navMenu\">";
	menu += makeMenuStr( active, "main", 0, "iBASe i LonWorks", "iBASe i LonWorks", "/", 1 );
	menu += makeMenuSeparator();
	menu += makeMenuStr( active, "GPN", 0, "Uniwersalny węzeł LON", "", "" );
	menu += makeMenuStr( active, "STP02-E", 0, "Zintegrowany sterownik pomieszczenia", "STP-02/E", "STP02-Ev01.html" );
	menu += makeMenuStr( active, "STP03", 0, "Zintegrowany sterownik pomieszczenia", "STP-03", "" );
	menu += makeMenuStr( active, "TSSP02", 0, "Sterownik temperatury", "", "" );
	//menu += makeMenuStr( active, "MSLS", 0, "Moduł czujnika ruchu z pomiarem natężenia oświetlenia", "", "" );
	menu += makeMenuStr( active, "HVAC-FC", 0, "Sterownik klimakonwektora", "", "" );
	menu += makeMenuSeparator();
	menu += makeMenuStr( active, "2xAI", 0, "", "", "" );
	menu += makeMenuStr( active, "2xAO", 0, "", "", "" );
	menu += makeMenuStr( active, "DIGIO", 0, "Uniwersalny moduł we/wy", "", "" );
	menu += makeMenuStr( active, "DIGI8", 0, "Uniwersalny moduł ośmiu wejść dwustanowych", "", "" );
	document.write( menu );
	menu  = makeMenuSeparator();
	//menu += makeMenuStr( active, "3fEEM", 0, "Moduł pomiarowy trójfazowy energii elektrycznej", "", "" );
	//menu += makeMenuStr( active, "MMC", 0, "Licznik przeznaczony do zbierania danych z liczników mediów", "", "" );
	menu += makeMenuStr( active, "MMC-02", 0, "Licznik przeznaczony do zbierania danych z liczników mediów", "", "" );
	menu += makeMenuStr( active, "RS-LON", 0, "Konwerter RS-232 na zmienne sieciowe LonWorks", "", "" );
	menu += makeMenuStr( active, "MBUS-LON", 0, "Konwerter MBUS na zmienne sieciowe LonWorks", "", "" );
	menu += makeMenuSeparator();
	menu += makeMenuStr( active, "LONNODE", 1, "Uniwersalny węzeł LON", "", "" );
	menu += makeMenuStr( active, "TSM-101", 1, "Kanałowy czujnik temperatury", "", "" );
	menu += makeMenuStr( active, "HSM-101", 1, "Kanałowy czujnik wilgotności i temperatury", "", "" );
	menu += makeMenuStr( active, "LSM-111", 1, "Czujnik oświetlenia (zewnętrzny)", "", "" );
	menu += makeMenuSeparator();
	menu += makeMenuStr( active, "RTR-FT-FO", 0, "Ruter FT/FO", "RTR-FT/FO", "RTR-FT-FO.html" );
	menu += makeMenuStr( active, "RTR-FT10-FT10", 0, "Ruter FT10/FT10", "RTR-FT10/FT10", "RTR-FT10-FT10.html" );
	menu += makeMenuStr( active, "RTR-XFT-PLT", 0, "Router FT10,XF-1250/PLT", "", "RTR-FT-PLT.html" );
	menu += makeMenuStr( active, "RPT-TP/FT10", 0, "Repeater TP/FT-10", "", "RPT-TPFT10.html" );
	menu += makeMenuStr( active, "Phase Coupler", 0, "Moduł sprzęgający fazy", "", "PhaseCoupler.html" );
	menu += makeMenuStr( active, "TERM-FT", 0, "Terminator sieci FT", "", "" );
	document.write( menu );
	menu  = makeMenuSeparator();
	menu += makeMenuStr( active, "Wizual", 0, "Nasza wizualizacja pawilonu B1 na Akademii Górniczo-Hutniczej w Krakowie", "Wizualizacja", "", 1 );
	menu += makeMenuStr( active, "Resale", 0, "(Re)Dystrybucja produktów w technologii LonWorks", "Dystrybucja", "http://www.zdania.com.pl/LonWorksResale.html", 1 );
	menu += "<tr><td width=224 height=32 colspan=2><img src=\"img/Menu/End.gif\" width=224 height=32 border=0></td></tr>"
	menu += "</table></td><td width=520><div align=center>";

	document.write( menu );
}

function makePostMenu(){
	document.write( "</div></td></tr></table>" );
}

function writeFooter(){
	document.write( "<hr><br><div align=center>" );
		document.write( "[ <a href=\"http://www.zdania.com.pl/\">ZDANiA</a> ] | " );
		document.write( "[ <a href=\"/\">iBASe</a> ]</div>" );
	document.write( "<table width=\"100%\" align=center><tr><td width=\"30%\"><a href=\"mailto:hayduk@zdania.com.pl\">webmaster email</a></td>" );
	document.write( "<td width=\"30%\" align=center><img src=\"img/email3.gif\" alt=\"email\" height=32 width=32 align=absbottom><a href=\"mailto:office@zdania.com.pl\"> &nbsp; Email</a></td>" );
	document.write( "<td width=\"30%\" align=right>Ostatnia modyfikacja <br>" + document.lastModified + "</td></tr></table>" );
}

function LonWorksReg(){
	document.write( "L<span style='font-size: 85%;'>ON</span>W<span style='font-size: 85%;'>ORKS</span><span style='vertical-align: super; font-size: 80%;'>&reg;</span>" );
}

function iBASeTM(){
	document.write( "iBASe<span style='vertical-align: super; font-size: 60%;'>TM</span>" );
}

//-->
