﻿// JScript File

function fnc_window_large(str_doc) {
    //derive window options    
    var hei = screen.availHeight / 1.5;
    var wid = screen.availWidth / 1.65;
    var strwinopts = "scrollbars, status=0, title='MapGuide Quick Tip', menubar=0, resizable=yes, toolbar=0, HEIGHT=" + hei + ",WIDTH=" + wid;

    //open document in new window (if window not already open)
    hlpWindow = window.open(str_doc, 'report_win', strwinopts);
    if (!hlpWindow.opener) {
        hlpWindow.opener = window;

    }

    // get winodw focus and move it to top left corner of the screen	
    hlpWindow.focus();
    hlpWindow.moveTo(0, 0);
}

function fnc_window_large(str_doc) {
    //derive window options    
    var hei = screen.availHeight / 1.5;
    var wid = screen.availWidth / 1.65;
    var strwinopts = "scrollbars, status, title='MapGuide Quick Tip', menubar=0, resizable=yes, toolbar=0, HEIGHT=" + hei + ",WIDTH=" + wid;

    //open document in new window (if window not already open)
    hlpWindow = window.open(str_doc, 'windowname', 'scrollbars,resizable,status,toolbar,menubar');
    if (!hlpWindow.opener) {
        hlpWindow.opener = window;

    }

    // get winodw focus and move it to top left corner of the screen	
    hlpWindow.focus();
    hlpWindow.moveTo(0, 0);
}
function fnc_window(str_doc)
{
//derive window options    
	var hei = screen.availHeight / 2;
	var wid = screen.availWidth / 1.65;
	var strwinopts = "scrollbars, status, title='MapGuide Quick Tip', menubar=no, resizable=yes, toolbar=no, HEIGHT=" + hei + ",WIDTH=" + wid;
	
//open document in new window (if window not already open)
	hlpWindow = window.open(str_doc,'report_win', strwinopts);
	if (!hlpWindow.opener)
	{
		hlpWindow.opener = window;
		   
	}
	
// get winodw focus and move it to top left corner of the screen	
	hlpWindow.focus();
	hlpWindow.moveTo(0,0);
}

function fnc_hlp_window(str_doc) {
    //derive window options    
    var hei = screen.availHeight / 1.25;
    var wid = screen.availWidth / 4;
    var strwinopts = "scrollbars, status, title='Interactive Map Help', menubar=no, resizable=yes, toolbar=no, HEIGHT=" + hei + ",WIDTH=" + wid;

    //open document in new window (if window not already open)
    hlpWindow = window.open(str_doc, 'User Guide', strwinopts);
    if (!hlpWindow.opener) {
        hlpWindow.opener = window;

    }

    // get winodw focus and move it to top left corner of the screen	
    hlpWindow.focus();
    hlpWindow.moveTo(0, 0);
}


function fnc_toggle_legend() {

    if (parent.parent.frames[1].document.getElementById("InfoBand").style.width ==
'0px') {
        parent.parent.frames[1].minInfoWidth = 20;
        parent.parent.frames[1].ResizeTo(200);
        //parent.parent.frames[1].InitialMapView();
        parent.parent.mapFrame.Refresh();
    }
    else {
        parent.parent.frames[1].minInfoWidth = 0;
        parent.parent.frames[1].ResizeTo(0);
        parent.parent.frames[1].document.getElementById("LayerCaption").style.width = 0;
        parent.parent.frames[1].document.getElementById("LegendCtrl").style.width = 0;
        parent.parent.frames[1].document.getElementById("PropertyCaption").style.width = 0;
        parent.parent.frames[1].document.getElementById("PropertyCtrl").style.width = 0;
        // parent.parent.frames[1].InitialMapView();
        parent.parent.mapFrame.Refresh();
    }


}
