function framePrint(whichFrame){
    parent[whichFrame].focus();
    parent[whichFrame].print();
}

function ePrint(adpage){
	windmal(600, 400, 'Imprimir (Beta)', 'print_frame(\''+adpage+'\')', 'plugins/eprint/index.php');
	window.print_frame = function(src_page){
	    var frame = document.getElementById('print_frame');
	    frame.src = src_page;
	}
}

function ePrintPdf(adpage){
 	var fieldonc = document.getElementById('pdfcontents_id');
 	var xmlhttp=windmal_ajax();
    xmlhttp.onreadystatechange = function () { 
          if (xmlhttp.readyState==4) {
               if (xmlhttp.status==200) {
                    var contents = xmlhttp.responseText;
                    fieldonc.value = contents;
                    document.forms['frm_genpdf'].submit();
               } 
          }
     };
     xmlhttp.open("GET", adpage);
     xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1");
     xmlhttp.send(null);	
}

function printServiceChangeContentId(id_content){
	var button_print = document.getElementById('pagebutton_print');
	var objc = document.getElementById(id_content);
	global_print_contentbox = id_content;
}