<!DOCTYPE html>
<!--// $Id$ //-->
<html><head>
<meta name="GENERATOR" content="LMS {$layout.lmsv}">
{include file="language.html"}
<title>LMS – {if $layout.pagetitle != ""}{$layout.pagetitle}{/if}</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="css/map.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/common.js"></script>
{if $js}<script type="text/javascript">
<!--
	{$js}
//-->
</script>{/if}
{if $part == "main"}
{include file="openlayers.html"}
<script>

	function init()
	{
		{include file="map.js"}

		map = createMap(devices, devlinks, nodes, nodelinks, ranges, false);

		var selectlayer = new OpenLayers.Control.SelectFeature(map.getLayersByName(devicesLbl)[0], {
			clickout: true, toggle: false,
			multiple: true, hover: false,
			toggleKey: "ctrlKey", // ctrl key removes from selection
			multipleKey: "shiftKey", // shift key adds to selection
			onSelect: function(feature) {
				var map = feature.layer.map;
				sendvalue(targetfield, feature.data.id);
			}
		});
		map.addControl(selectlayer);
		selectlayer.activate();

		$(function() {
			map.updateSize();
		});

		set_lastonline_limit({ConfigHelper::getConfig('phpui.lastonline_limit')});
		setTimeout("netdevmap_refresh()", lastonline_limit * 1000);

        autoiframe_setsize('autoiframe');
	}

</script>
{/if}
</head>
{if ! $part}
<frameset frameborder="0" framespacing="0" ROWS="30,*">
	<frame scrolling="no" frameborder="0" marginheight="0" marginwidth="0" name="cal" noresize src="?m=choosenetdevfrommap&p=top">
	<frame scrolling="always" frameborder="0" marginheight="0" marginwidth="0" name="m" noresize src="?m=choosenetdevfrommap&p=main">
</frameset>
{/if}
{if $part == "main"}
<body onload="init()" class="lms-ui-popup">
<div id="map" class="smallmap"></div>
</body>
<script>

	document.querySelector('#map').onmousewheel = function(e) {
		e.preventDefault();
	}

</script>
{/if}
{if $part == "top"}
<body class="lms-ui-popup">
<table cellpadding="5" width="100%">
	<tr>
		<td class="fall dark" align="center">
			<B>{trans("Select network device:")}</B>
		</td>
	</tr>
</table>
{/if}
</html>
