var BrwTool;
try {
	BrwTool = new ActiveXObject("BrwTools.BrwTools.1");
	BrwTool.Resize(0);
}
catch (e) {
		//alert("Errore Caricamento Brwtools");
}

function doExit() {
	try {
		BrwTool.ExecuteExitPrevBrw();
	}
	catch (e) {
		return window.close();
	}
}

function doOpenNewWindow (file, title) {
	var t, l;
	l=0;
	t=0;
	if(null == title) title='KIOSK';
	window.open(file, title);
}

function doOpenNewWindowResize (file, title, size) {
	var t, l;
	l=0;
	t=0;
	if(null == title) title='KIOSK';
	if(null == size) size=1;	
	try 
	{
//		BrwTool.Resize(parseInt(size));
		BrwTool.Resize(size);
	}
	catch (e) 
	{
		//alert("Errore Resize in Brwtools");
	}
	window.open(file, title);
}

function doPrint(type) {
	try {
		if (BrwTool.PrinterStatus) {
			if(null == type)
				type = 0;
			//Print Dialog: 2
			//Print Screen: 1
			//Print Current Frame: 0
			BrwTool.SendToPrinter(type);
		}
	}
	catch (e) {
		window.print();
	}
}

function doBack() {
	try {
		BrwTool.GoBack();
	}
	catch (e) {
		history.back();
	}
}
