  /**
  * Genera un iframe para mostrar un contenido especifico, recibe como parametros en id del objeto
  * que lo contiene (puede ser un td o div), la comunidad para ubicar la hoja de estilos y el contenido
  */
  function iframePreview(idParent, contenido, comunidad, cliente){
	  
	  var html="<html>\n";
	  html+="<head>\n";
	   html+="<title>Preview</title>\n";
	  
	  baseURL = document.baseURI || document.URL;
	  if(baseURL && baseURL.match(/(.*)\/([^\/]+)/)) baseURL = RegExp.$1 + "/";
	  html+='<base href="'+baseURL+'" />'+"\n";
	  
	  // Importa los estilos de la comunidad
	  html+="<link href=\"info/"+cliente+"/web/"+comunidad+"/estilos/personal.css\" rel=\"stylesheet\" type=\"text/css\">\n";
	  html+="<link href=\"info/"+cliente+"/web/"+comunidad+"/estilos/aplicacion.css\" rel=\"stylesheet\" type=\"text/css\">\n";
	  
	  html+="<style type=\"text/css\">html,body { border: 0px; background-color: #FFFFFF;}</style>\n";
	  html+="</head>\n";
	  html+="<body class=\"dSinDisenno\" style=\"background:#FFFFFF;text-align:left\">\n";
	  html+=contenido;
	  html+="</body>\n";
	  html+="</html>";
      
	  var iframe = document.createElement("iframe");
	  iframe.style.width="100%";
	  iframe.style.height="250px";

	  // Si el contenido es vacio muestra algo pequenno
	  if(trim(contenido)=="" || trim(contenido)=="<br />") iframe.style.height="30px";
      
	  var textarea = getElement(idParent);
	  textarea.appendChild(iframe);
      
	  var doc = iframe.contentWindow.document;
	  doc.open();
	  doc.write(html);
	  doc.close();
  } // iframePreview
