﻿function SitemapControl()
{
}

SitemapControl.openInPopUp = function(url, width, height)
{
    if (width == null)
    {
        width = 650;
    }
    
    if (height == null)
    {
        height = 750;
    }
    
	var xOffset = (window.screenLeft + (document.body.clientWidth / 2)) - width / 2;
	var yOffset = (window.screenTop + (document.body.clientHeight / 2)) - height / 2 - 30;
	
	var winOpts =
	    'toolbar=no,' +
	    'menubar=no,' +
	    'scrollbars=yes,' +
	    'location=no,' +
	    'resizable=no,' +
	    'status=no,' +
	    'width=' + width + ',' +
	    'height=' + height;
	    
	var win = window.open(
	    url,
	    'popup',
	    winOpts);
	    
	win.focus();
}
