var flash = new Object();
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var winHeight = 0;

flash.installed = false;
if (navigator.plugins && navigator.plugins.length) {
	for (x=0; x < navigator.plugins.length; x++) {
		if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {
			flash.installed = true;
			break;
		}
	}
}
else if (window.ActiveXObject) {
	for (x = 2; x <= 10; x++) {
		try {
			oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
			if(oFlash) {
				flash.installed = true;
			}
		}
		catch(e) {}
	}
}

// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub flashObject_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call flashObject_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

function setHistory(queryString) {
	var hist = document.getElementById('history');
	hist.src = "/history.html?" + queryString;
}

function changeFlashPage(iID) {
	document.flashObject.SetVariable("historyCall", iID);
}

var currentHeight = 0;

function sizeMe(height){
	
	if ( typeof(window.innerWidth) == 'number' )
		winHeight = window.innerHeight;
	else if ( document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight) )
		winHeight = document.documentElement.clientHeight;
	else if ( document.body && ( document.body.clientWidth || document.body.clientHeight) )
		winHeight = document.body.clientHeight;

	if ( height < winHeight )
			height = winHeight + 1;

	document.getElementById("flashContainer").style.width = "960px";		    
	document.getElementById("flashContainer").style.height = (height+300) + "px";

	currentHeight = height
	
}

function scrollLines(nLines) {
	//nLines = nLines * -17;
	//window.scrollBy(0, nLines);
}

function scrollTop() {

	//window.scrollTo(0, 0);
}

function scrollTo(y) {

	if( y+"" == undefined ) {
	     y = 0;
	}

	//window.scroll(0, y);
}

function doPrint() {

	
	
	window.print();

}