/**
* Abre el popup de legales
* @author	Federico Campo Piombi
* @version	1.0
* @since	05 May 2007
*/
function openLegales(){
	var siteCenter = _getScreenCenter();
	var wndWidth = 360;
	var wndHeight = 380;
	var xpos = siteCenter.x - (wndWidth/2);
	var ypos = siteCenter.y - (wndHeight/2);
	var wnd = openWindow("legales.html", wndWidth, wndHeight, xpos, ypos, "yes");
}


/**
* Abre el popup de Wallpapers y carga el archivo seleccionado
* @author	Federico Campo Piombi
* @version	1.0
* @since	06 May 2007
* 
* @param	file (String) nombre de la imagen wallpaper
*/
function openWallpaper(file){
	var siteCenter = _getScreenCenter();
	var wndWidth = 400;
	var wndHeight = 330;
	var xpos = siteCenter.x - (wndWidth/2);
	var ypos = siteCenter.y - (wndHeight/2);
	var wnd = openWindow("wallpaper.html?file="+file , wndWidth, wndHeight, xpos, ypos, "no");
}


/**
* Abre el popup de Postales y carga el archivo seleccionado
* @author	Federico Campo Piombi
* @version	1.0
* @since	06 May 2007
* 
* @param	file (String) nombre de la imagen postal
*/
function openPostal(file){
	var siteCenter = _getScreenCenter();
	var wndWidth = 600;
	var wndHeight = 350;
	var xpos = siteCenter.x - (wndWidth/2);
	var ypos = siteCenter.y - (wndHeight/2);
	var wnd = openWindow("postal.html?file="+file , wndWidth, wndHeight, xpos, ypos, "no");
}


/**
* Abre un popup con los parametros especificados y retorna la referencia
* 
* @author	Federico Campo Piombi
* @version	1.0
* @since	05 May 2007
* 
* @param 	file (String) Nombre del archivo a abrir
* @param	width (Number) Ancho de la ventana
* @param	height (Number) Altura de la ventana
* @param	xpos (Number) posicion X de la ventana
* @param	ypos (Number) posicion Y de la ventana
* 
* @return	window
*/
function openWindow(file, width, height, xpos, ypos, scrollbars){
	var wnd = window.open(file,'','width=' +width+ ', height=' +height+ ', left=' +xpos+ ', right=' +ypos+ ', toolbar=0, status=0, menubar=0, scrollbars='+scrollbars);
	return wnd
};



/**
* Calcula el centro de la pantalla y retorna un objeto con la posicion X e Y
* 
* @author	Federico Campo Piombi
* @version	1.0
* @since	05 May 2007
* 
* @return	Object
*/
function _getScreenCenter(){
	var point = {x:screen.width/2, y:screen.height/2};
	return point;
}