function getWindowHeight() {
	var winH = 460;
	if(parseInt(navigator.appVersion) > 3) {
		if(navigator.appName == "Netscape") {
			winH = window.innerHeight;
		}
		if(navigator.appName.indexOf("Microsoft") != -1) {
			winH = document.body.offsetHeight;
		}
	}
	var newHeight = winH - 270;
	if(newHeight < 10) {
		newHeight = 10;
	}
	var elem = document.getElementById("main_content");
	elem.style.height =  newHeight + "px";
	//alert(winH);
}
function changeGraph1(inType, inStart, inEnd) {
	var itm = document.getElementById('graph');
	itm.src = ___hostname + '/graph2.php?type=' + inType + '&start=' + inStart + '&end=' + inEnd;
	//var itm = document.getElementById('downFundsRez');
	//itm.href = ___hostname + '/generateCSV.php/t/' + inType + '/sTime/' + inStart + '/eTime/' + inEnd;
}
function changeGraph2(inType) {
	var itm = document.getElementById('graph');
	itm.src = ___hostname + '/graph2.php?type=' + inType + '&all=1';
	//var itm = document.getElementById('downFundsRez');
	//itm.href = ___hostname + '/generateCSV.php?t=' + inType + '&all=1';
}
function changeGraph3(inType, inStart, inEnd) {
	var itm = document.getElementById('graph');
	itm.src = ___hostname + '/graph2.php?type=' + inType + '&dStart=' + document.getElementById(inStart).value + '&dEnd=' + document.getElementById(inEnd).value;
	//var itm = document.getElementById('downFundsRez');
	//itm.href = ___hostname + '/generateCSV.php/t/' + inType + '/sTime/' + document.getElementById(inStart).value + '/eTime/' + document.getElementById(inEnd).value + '/d/1';
}
function changeView(inType) {
	var itm = document.getElementById('graph');
	if(itm.src.indexOf('&view=') == -1) {
		itm.src = itm.src + '&view=' + inType;
	} else {
		itm.src = itm.src.slice(0, itm.src.indexOf('&view=')) + '&view=' + inType;
	}
}
function changeAltGraph1(inType, inStart, inEnd) {
	var itm = document.getElementById('graph');
	itm.src = ___hostname + '/graph3.php?type=' + inType + '&start=' + inStart + '&end=' + inEnd;
}
function changeAltGraph2(inType) {
	var itm = document.getElementById('graph');
	itm.src = ___hostname + '/graph3.php?type=' + inType + '&all=1';
}
function changeAltGraph3(inType, inStart, inEnd) {
	var itm = document.getElementById('graph');
	itm.src = ___hostname + '/graph3.php?type=' + inType + '&dStart=' + document.getElementById(inStart).value + '&dEnd=' + document.getElementById(inEnd).value;
}
