function getElem(name)
{
    nr=document.getElementById(name);
    return(nr);
}
/*
var menus = new Array();



function showMenu( id ) {
        menus[id] = false;
        document.getElementById(id).style.display = 'block';
		document.getElementById( id ).style.visibility = 'visible';
}

function hide (id) {
        if (menus[id])
        {
                document.getElementById(id).style.display = 'none';
				document.getElementById( id ).style.visibility = 'hidden';
				
        }
}
function hideMenu(id) {
        menus[id] = true;
        hide(id);
}

*/
var menus = new Array();

function showMenu(id) {
        menus[id] = false;
        document.getElementById(id).style.visibility = 'visible';
}

function hide (id) {
        if (menus[id])
        {
                document.getElementById(id).style.visibility = 'hidden';
        }
}
function hideMenu(id) {
        menus[id] = true;
        window.setTimeout ('hide("'+id+'")', 100)
}  


function showImageDetails( image_url, image_width, image_height ) {
	image_height = parseInt(image_height) +0;
	image_width = parseInt(image_width) +16;
	
	
	var oConfig = { 'url': image_url, 'width': image_width, 'height': image_height };
	
	createWindow( oConfig );
	newWindow = createWindow( oConfig );
	newWindow.document.write( '<html><body style="margin=0px; padding: 0px;"><img src="'+image_url+'" alt="" /></body></html>' );
	newWindow.document.close();

	
}

/* funkcija naudojama ControlSelectItem kontrolse, popupina svetaines medi pasirinkumui */
/*	var ref = window.open( url, 'popupWin', 'toolbar=0,scroolbars=1,location=0,statusbar=0,menubar=0,resizable=1' ); */

function ControlSelectItemPopup( event, url ) {
	var oConfig = { 'url': url };
	var ref = createWindow( oConfig );
	return ref;
}
