$(document).ready(function() {
	var picWidth = $(window).width() - 280;
	$("#middlediv").css("width", picWidth);
	$("#main_right").css("width", picWidth);

	var picHeight = $(window).height() - 30;
	$("#main_right").css("height", picHeight);

	var treeHeight = $(window).height() - 60;
	$("#tree").css("min-height", treeHeight);
	$("#tree").css("max-height", treeHeight);

	document.getElementById("main_right").src = "zlpg";
	$("#middlesrc").val('zlpg');
})

$('#sssj').click(function() {
	document.getElementById("main_right").src = "sssj";
	$("#middlesrc").val('sssj');
})

$('#yxzt').click(function() {
	document.getElementById("main_right").src = "yxzt";
	$("#middlesrc").val('yxzt');
})

$('#wtzb').click(function() {
	document.getElementById("main_right").src = "wtzb";
	$("#middlesrc").val('wtzb');
})

$('#wtqs').click(function() {
	document.getElementById("main_right").src = "wtqs";
	$("#middlesrc").val('wtqs');
})

$('#zlpg').click(function() {
	document.getElementById("main_right").src = "zlpg";
	$("#middlesrc").val('zlpg');
})

function OnlineTree() {
	getNodeData();
	zTreeOnAsyncSuccess();
}

function OfflineTree() {
	getOffData();
	zTreeOnAsyncSuccess();
}

function showInfo() {
	var indexdd = document.getElementById("lineIndex").value;

    layer.open({
        type: 2,
        title: '监测点详情',
        maxmin: false,
        shadeClose: true, // 点击遮罩关闭层
        area: ['80%', '80%'],
        content: 'pointInfo',
        scrollbar: false,
        success: function (layero, index) {
            $(layero).find("iframe")[0].contentWindow.getPointData(indexdd);
        }
    });
}


