

// functie generala de popup:
function LoadPopupBase( url, w, h )
{
	if (!w) w=400; 
	if (!h) h=400; 
	win = window.open( url, "Popup", 'status=no,toolbar=0,scrollbars=1,menubar=0,titlebar=0,resizable=1,dependent=yes, z-lock=yes, width='+w+',height='+h );	
	if ( !win )
	{
		alert('It appears that pop-up blockers are enabled on your computer, which may prevent\nsome components from functioning properly. Please temporarily disable any\npop-up blockers.\n\nTo disable the Windows XP pop-up blocker, from the Tools menu in Internet Explorer,\nselect Pop-up Blocker, then Turn Off Pop-up Blocker. To disable other pop-up blockers\nthat are part of a search engine or toolbar, right-click on a toolbar in Internet Explorer\nand click to deselect all toolbars except Standard Buttons, Address Bar, and Links.');
	}	
	else
	{		
		win.moveTo( screen.width/2-w/2, screen.height/2-h/2);
		win.focus();
	}
}

function selectAll( nameSelect, act ) 
 {
	var sel = document.getElementById( nameSelect ); 
	
	for( i = 0 ; i < sel.length ; i++ )
	{
		sel.options[i].selected = act;
	}
 }
 
 
// popup pentru manager de fisiere:
function popupMyFiles ( link_mfiles ) 
{
	return window.open( link_mfiles, "popMyFiles", "width=575, height=425, status=no");
}


// popup pentru vizualizare imagine:
function viewImage ( camp_imagine ) 
{
	var el = document.getElementById( camp_imagine ); 
	if ( el.value )
		return window.open( el.value, "Image", "width=575, height=425, status=no");
	else 
		return false;
}


// id-ul pentru campul de tip imagine:
var camp_imagine;

// preluare link imagine din popup-up:
function sendImage( link_fisier ) 
{
	if ( camp_imagine ) 
	{
		var el = document.getElementById( camp_imagine );
		el.value = link_fisier;
	}
	
	return false;
}
