function popup(url,windowname,features) 
{ 
width=400;
height=350;
width=(width)?width:screen.width/2; 
height=(height)?height:screen.height/2; 

var screenX = (screen.width/2 - width/2); 
var screenY = (screen.height/2 - height/2); 
var features= "width=" + width + ",height=" + height +",scrollbars=no,status=no"; 
features += ",screenX=" + screenX + ",left=" + screenX; 
features += ",screenY=" + screenY + ",top=" + screenY; 

var mywin=window.open(url, windowname, features); 
if (mywin) 
mywin.focus(); 
return mywin; 
} 

function popup_x(url,windowname,ample,alt) { 
	if(!ample){ ample = 400; }
	if(!alt){ alt = 600; }
	
	var features= "width=" + ample + ",height=" + alt +",scrollbars=yes,status=no"; 
	
	var mywin=window.open(url, windowname, features); 
	
//	return mywin;
} 

function popup_petit(url,windowname,features) 
{ 
width=250;
height=200;
width=(width)?width:screen.width/2; 
height=(height)?height:screen.height/2; 

var screenX = (screen.width/2 - width/2); 
var screenY = (screen.height/2 - height/2); 
var features= "width=" + width + ",height=" + height +",scrollbars=no,status=no"; 
features += ",screenX=" + screenX + ",left=" + screenX; 
features += ",screenY=" + screenY + ",top=" + screenY; 

var mywin=window.open(url, windowname, features); 
if (mywin) 
mywin.focus(); 
return mywin; 
} 

function popup_planificador(url,windowname,features) 
{ 
width=600;
height=400;
width=(width)?width:screen.width/2; 
height=(height)?height:screen.height/2; 

var screenX = (screen.width/2 - width/2); 
var screenY = (screen.height/2 - height/2); 
var features= "width=" + width + ",height=" + height +",scrollbars=no,status=no"; 
features += ",screenX=" + screenX + ",left=" + screenX; 
features += ",screenY=" + screenY + ",top=" + screenY; 

var mywin=window.open(url, windowname, features); 
if (mywin) 
mywin.focus(); 
return mywin; 
} 


function tornarirefrescar(url)
{
	window.opener.location=url
	window.close()
}


