loadCssFile = function(fileName)
{
    document.write('<link rel="stylesheet" href="' + fileName + '" type="text/css"></link>');
};

loadJsFile = function(fileName)
{
    document.write('<script type="text/javascript" src="' + fileName + '"></script>');
};

var Utils = {
	
	imageWindowOpen: function(adres)
	{
		window.open(adres, 'okienko', 'menubar=no, toolbar=no, location=no, scrollbars=no, resizable=no, status=no, width=640, height=480');
	},
	
	newWindowOpen: function(adres, width, height)
	{
		window.open(adres, 'okienko', 'menubar=no, toolbar=no, location=no, scrollbars=yes, resizable=yes, status=no, width=' + width + ', height=' + height);
	},
	
	windowsOpen: function(adres)
	{
		window.open(adres);
	},
	
	rewrite: function(adres)
	{
		if(window.location != adres) 
			window.location.replace(adres);
	},
	
	submitClick: function(formName)
	{
		document.forms[formName].submit()
	}

}

var Print = {
	
	reklama: function(item)
	{
		config='toolbar=yes,location=no,directories=no,status=no,menubar=yes,width=640,height=480';
		config += 'scrollbars=no,resizable=no';
		
		pop = window.open ("", "pop", config)
		
		var path = absolute_server_path + 'public/global/css/global.css';
		
		pop.document.write('<html>');
		pop.document.write('<head>');
		pop.document.write('<link rel="stylesheet" href="' + path + '" type="text/css"></link>');
		pop.document.write('</head>');
		pop.document.write('<body>');
		pop.document.write(item.html());
		pop.document.write('</body>');
		pop.document.write('</html>');
		
		try
		{
			pop.document.getElementById("print").style.display = "none";
		}
		catch(e){}
		
		pop.window.print();
	}
}