// JavaScript Document
function MaximizeWindow()
{
	if ( (window.outerHeight != screen.availHeight) & (window.outerWidth != screen.availWidth) )
	{
		window.moveTo(0,0);
		window.resizeTo(screen.availWidth, screen.availHeight);
	}
}
function ResizeWindow()
{
	browser_height = document.body.clientHeight;
	if( (browser_height-100) < document.all.data_area.scrollHeight )
		document.all.data_area.style.height = browser_height-120;
	else
	{
		document.all.data_area.style.height = browser_height-120;
	}
	document.all.data_table.style.height = browser_height-120;
}
function _ResizeWindow()
{
	var myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
	//Non-IE
		myHeight = window.innerHeight;
	} else if( document.documentElement &&
	  ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myHeight = document.body.clientHeight;
	}	
	document.getElementById("leftMenu").height=myHeight - 137;
	document.getElementById("menuFrame").height=myHeight - 137;
	document.getElementById("textFrame").height=myHeight - 137;
	document.getElementById("MainTR").height=myHeight - 107;
}

function ShowMenu()
{
	window.top.document.all.menuFrame.width=200;
	window.top.document.getElementById("menuCol").width=200;
}

function HideMenu()
{
	window.top.document.all.menuFrame.src = "about:blank";
	window.top.document.all.menuFrame.width=1;
	window.top.document.getElementById("menuCol").width=1;
}

function reloadFrames(menuFile,dataFile)
{
	 window.top.document.all.menuFrame.src = menuFile;
	 window.top.document.all.textFrame.src = dataFile;
};

function ViewEffect( LineName )
{
	document.getElementById(LineName).style.backgroundColor = "#E2E8EC";
	document.getElementById(LineName).style.color = "#3333CC";
	document.getElementById(LineName).style.cursor = "pointer";
}

function HideEffect( LineName )
{
	document.getElementById(LineName).style.backgroundColor = "";
	document.getElementById(LineName).style.color = "#FFFFFF";
} 

function EmitentInfo( FileName )
{
	strFileName = FileName + ".html";
	showModalDialog( strFileName, document, 'status:no;dialogWidth:900px;dialogHeight:600px;center:yes;edge:sunken;resizable:yes' ); 
}

function PrintDate()
{
		today = new Date();
		date_now = today.getDate();
		indmonth_now = today.getMonth();
		year_now = today.getYear();
		hour_now = today.getHours();
		minute_now = today.getMinutes();
		switch(indmonth_now)
		{
			case 0 :
				month_now = "января";
				break;
			case 1 :
				month_now = "февраля";
				break;
			case 2 :
				month_now = "марта";
				break;
			case 3 :
				month_now = "апреля";
				break;
			case 4 :
				month_now = "мая";
				break;
			case 5 :
				month_now = "июня";
				break;
			case 6 :
				month_now = "июля";
				break;
			case 7 :
				month_now = "августа";
				break;
			case 8 :
				month_now = "сентября";
				break;
			case 9 :
				month_now = "октября";
				break;
			case 10 :
				month_now = "ноября";
				break;
			case 11 :
				month_now = "декабря";
				break;
		}
		str_today = date_now + " " + month_now + " " + year_now + " " + hour_now + ":" + minute_now;
//		document.all.TodayIs.innerText = str_today;
		document.getElementById("TodayIs").innerText = str_today;
}
