function pop_action(url) {

var action = window.open(url, 'action', 'location=no,toolbar=no,menubar=no,status=no,scrollbars=no, width=350, height=400');
action.focus();
return false;
}


function pop_gal(path, width, height)
{
var scroll = 0;

if( width > screen.availWidth-30 )
	{
	width = screen.availWidth-30;
	scroll = 1;
	}
if( height > screen.availHeight-30 )
	{
	height = screen.availHeight-30;
	scroll = 1;
	width = Number(width) + 16;
	}

var options = "location=no,toolbar=no,menubar=no,status=no";

if( scroll )
	options += ",scrollbars=yes";

options += ",width=" + width;
options += ",height=" + height;

//alert(options);

var fenetre = window.open(path, '', options);
if( scroll ) 
	fenetre.moveTo(0,0);
return false;
}



function pop_info(url) {

var horiz_offset = 50;
var width = 800;
var height = screen.availHeight-30;

if( width > screen.availWidth - horiz_offset )
	width = screen.availWidth - horiz_offset;

var options = "location=no,toolbar=no,menubar=no,status=no,scrollbars=yes";
options += ",width=" + width;
options += ",height=" + height;

var info = window.open(url,'info', options);
info.moveTo(horiz_offset,0);
info.focus();
return false;
}
function pop_site(url) {
var info = window.open(url);
info.focus();
return false;
}

function find_window(current, name) {
var next = current.opener;
if(next != null && next.name != name) {
	return find_window(next, name);
	}
else {
	return next;
	}
}

function parent_focus() {
if(opener != null) {
	opener.focus();
	//close();
	return false;
	}
else 
	return true;
}


function pop_img( img_path, img_wdth, img_hght )
{
img_width = Number(img_wdth) + 20;
img_height = Number(img_hght) + 25;
var scroll = 0;

if( img_width > screen.availWidth-30 )
	{
	img_width = screen.availWidth-30;
	scroll = 1;
	}
if( img_height > screen.availHeight-30 )
	{
	img_height = screen.availHeight-30;
	scroll = 1;
	}

var options = "location=no,toolbar=no,menubar=no,status=no";

if( scroll )
	options += ",scrollbars=yes";

options += ",width=" + img_width;
options += ",height=" + img_height;

//alert(options);

var fenetre = window.open( img_path, '', options);
if( scroll ) 
	fenetre.moveTo(0,0);
return false;
}