/*Skirtas customizinti input type=file, kai paduodamas
jo vardas ir tekstboxo, kuriam reikia perrasyti pasirinkta faila, vardai
*/
function SelectFile(source, destination)
{
destination.value = source.value;
return;
}
function doShowHide(img, name)
{
	var obj;
	//alert(img.src);
	if(img.className=="plus")
	{
		img.className="minus";
		img.src="icons/collapse2.gif";
	}
	else
	{
		img.className="plus";
		img.src="icons/expand2.gif"
	}
	obj = document.getElementById(name);
	if(obj.style.display=="none")
		obj.style.display="inline";
		else
			obj.style.display="none";
	return;
}
function Msg(tekstas)
{
	alert(document.getElementById(tekstas).value);
}

function ShowHideHelp(helpPane,helpFrame)
{
	var plotis;
	var hp = document.getElementById(helpPane);
	var frm = document.getElementById(helpFrame);
	var cnt = document.getElementById('contentCell');
	var act = document.getElementById('actioncell');
	
	plotis = hp.style.width;
	//alert(plotis);
	if(plotis=="20%")
	{
		hp.style.width="1%";
		frm.style.width="1%";
		cnt.style.width="82%";
		//act.style.width="18%";
		frm.className = "";
		
	}
		else
		{
			hp.style.width="20%";
			frm.style.width="100%";
			cnt.style.width="62%";
			//act.style.width="18%";
			frm.className = "left_border";
		}
}
function OpenWindow(kelias,plotis,aukstis,papildomi)
{
	if(papildomi=='') papildomi='';else papildomi=papildomi+',';
	window.open(kelias,'',papildomi+ 'width='+plotis+',height='+aukstis+',left='+(screen.availWidth/2-plotis/2)+',top='+(screen.availHeight/2-aukstis/2)+',scrollbars=yes');
}

function ShowModalWindow(kelias,plotis,aukstis,papildomi)
{
	if(papildomi=='') papildomi='';else papildomi=papildomi+',';
	window.showModelessDialog(kelias,'',papildomi+ 'dialogWidth='+plotis+',dialogHeight='+aukstis+',dialogLeft='+(screen.availWidth/2-plotis/2)+',dialogTop='+(screen.availHeight/2-aukstis/2)+',scroll=yes,status=no');
}

function ShowSnipet(snipetas,Tekstas)
{
	if(snipetas.style.display=='none')
	{
		snipetas.innerHTML = Tekstas;
		snipetas.style.posLeft=event.x-snipetas.clientWidth;
		snipetas.style.posTop=event.y-snipetas.clientHeight+5;
		snipetas.style.display='inline';
	}
	return 0;
}
function HideSnipet(snipetas)
{
	snipetas.style.display="none";
	snipetas.innerHTML = "";
}
