


function trim(str) {
	return  str.replace(/^\s*|\s*$/g,"");
}

function mostrarMensajeFB(titular, msg, width) {
	 if(!isset(width)) {
		var width = 500;	  
	 }
	 $.fancybox(
		'<div class="head_shadow_simple"><h3>'+titular+'</h3></div><div class="content_shadow_simple"><div class="contenedor_mensaje mensaje_comun"><p>'+msg+'</p></div></div><div class="pie_shadow_simple"></div>',
			{
			'autoDimensions' : false,
			'width' : width,
			'height' : 'auto',
			'transitionIn' : 'none',
			'transitionOut' : 'none',
			'overlayOpacity' : 0.2
			}
	);
 
}

function mostrarVentanaFrameFB(href, width, height) {
	 if(!isset(width)) {
		var width = 500;
	 }
	 if(!isset(height)) {
		 var height = 400;
	 }
	  if(!isset(onClosed)) {
		 var onClosed = '';
	 }
	 
	 
	 
	 $.fancybox({
			'type' : 'iframe',	
			'href' : href,
			'autoDimensions' : false,
			'width' : width,
			'height' : height,
			'speedIn'           : 500, 
		    'autoScale'         : false, 
		    'transitionIn'      : 'elastic', 
		    'transitionOut'     : 'elastic' ,
		    'onStart'       : function() {  },
			'onClosed'      :function() {
			 	//parent.location.reload(true); 
				}
		
	});
 
}

function AbrirVentana(theURL,winName,features,ancho,alto)
{
   
	neu=window.open(theURL,winName,features);
	neu.focus()
	neu.moveTo(Math.round((screen.availWidth-ancho)/2),Math.round((screen.availHeight-alto)/2))  
}


