
var AKT = "20.08.2010";




function Version( )
{
	var ret_val="";
	var date = new Date();
	var d = date.getDate();
	var day = d;
	var m = date.getMonth() + 1;
	var month = (m < 10) ? '0' + m : m;
	var yy = date.getYear();
	var year = (yy < 1000) ? yy + 1900 : yy;
	var mData = day + "." + month + "." + year
	ret_val = "Dzisiaj jest: <B>";
	ret_val += mData;
	ret_val += "</b>  Aktualizacja: <b>" + AKT + "</b>"

	return ret_val;

}



function WyswietlStrone(nazwa)
{
	newWindow = window.open(nazwa,'BitStream','');	
	newWindow.focus();
}

function WyswietlGrafike(nazwa)
{
	newWindow = window.open('src/images/' + nazwa,'BitStream','');	
	newWindow.focus();
}

function mhHover(tbl, idx, cls)
{
	var t = document.getElementById(tbl);
	if (t == null) return;
	var d = t.getElementsByTagName("TD");
	if (d == null) return;
	if (d.length <= idx) return;
	d[idx].className = cls;
}

function Move2Site(URL)
{
	window.parent.location.href=URL;
}

function PhpFileOpen(plik)
{
	var m_left=screen.availWidth/2 - 500;
	var m_top=screen.availHeight/2 - 400;

	newWindow = window.open('php/readfile.php3?filename=' + plik,
	            'BitStream',
	            'toolbar=no,menubar=no,location=no,height=400,width=540,left=200,top=200');

	newWindow.focus();
}

function getFile(plik)
{
	//alert(plik);
//	if ( (window.parent.location.href).search("plik.php3")<0 )
//	{
		PhpFileOpen(plik);
//	}
//	else
//	{
//		Move2Site("applogin.php3");
//	}		
}

function addTableObject(plik)
{
	var line="";
	line += "<A class='link1' onmouseover='return showName()' ";
	line += "onfocus='return showName()' ";
	line += "onmouseout='status=\"\"' ";
	line += " href='javascript:getFile(\"";
	line += plik;
	line +="\")' >";

	return line;
}

function showName() {
	window.status = event.srcElement.innerText;
	return true;
}
