/*
Otervre do noveho nove okno s predanym url
*/
function newwin(url)
{
    wasOpen  = false;
    win = window.open(url, "_blank", "fullscreen=yes, widht=screen.width, height=screen.height, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes");
    return (typeof(win)=='object')?true:false;
}

/*
Otervre do noveho nove okno s predanym url
*/
function newsmallwin(url)
{
    wasOpen  = false;
    winwidth = 500;
    winheight = 400;
    win = window.open(url, "_blank", "width="+winwidth+",height="+winheight+",left="+((screen.width-winwidth)/2)+",top="+((screen.height-winheight)/2)+",screenX="+((screen.width-winwidth)/2)+",screenY="+((screen.height-winheight)/2)+",menubar=no,status=no,toolbar=no,resizable=no,scrollbars=no");
    return (typeof(win)=='object')?true:false;
}

/*
Otevre nove decorovane okno, tedy s tool bary, status barem, atd.
*/
function newDecoratedWin(url)
{
    wasOpen  = false;
    win = window.open(url, "_blank", "fullscreen=no, widht=screen.width, height=screen.height, menubar=yes, status=yes, toolbar=yes, resizable=yes, scrollbars=yes");
    return (typeof(win)=='object')?true:false;
}

/*window.onLoad = initAll();*/

/******************************************
* Ajax load XML file script -- By Eddie Traversa (http://dhtmlnirvana.com/)
* Script featured on Dynamic Drive (http://www.dynamicdrive.com/)
* Keep this notice intact for use
******************************************/

/******************************************
* Modifications to Eddie Traversa's file by
* Benj Arriola (http://www.benjarriola.com)
*******************************************/

function initAll()
{
	ajaxLoader('page.php?dynamicPage=','mainNavBox');
}

function ajaxLoader(url,id) 
{
	if (document.getElementById) 
	{
		var ajaxpage = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
	}
	
	if (ajaxpage) 
	{
		ajaxpage.onreadystatechange = function() 
		{
			if (ajaxpage.readyState == 4 && ajaxpage.status == 200) 
			{
				el = document.getElementById(id);
				el.innerHTML = ajaxpage.responseText;
			}
		}
			
		ajaxpage.open("GET", url, true);
		ajaxpage.send(null);
	}
}

