var 
	pdfbuttontitle = 'Guardar como PDF';



if(typeof(pdfbuttonlabel) == 'undefined')
{
	pdfbuttonlabel = 'Guardar como PDF';
}

if(typeof(pdfbuttonstyle) == 'undefined')
{
	pdfbuttonstyle = 'button'
}


document.write('<style type="text/css">.save_as_pdf {display:inline-block; width:128px;	height:26px;	background-image: url(http://dl.getdropbox.com/u/647003/pdf_button.PNG);	background-repeat: no-repeat;	border-top-width: 0px;	border-right-width: 0px;	border-bottom-width: 0px;	border-left-width: 0px;	border-top-style: none;	border-right-style: none;	border-bottom-style: none;	border-left-style: none;}');
document.write('.save_as_pdf a  {	display:inline-block; 	width:145px;	height:20px; line-height:1.1em;   padding-left:5px;    padding-top:6px;	color:#000000;	text-decoration:none;	font-size:10px;		text-align:center;}'); 
document.write('.save_as_pdf a:hover  {	text-decoration:none;	}'); 
document.write('</style>');

if (pdfbuttonstyle=='link')
{
    document.write('<a href="javascript:savePageAsPDF()" title="' + pdfbuttontitle + '">' + pdfbuttonlabel + '</a>');
}
else
{
	document.write('<span class="save_as_pdf"><a href="javascript:savePageAsPDF()" title="' + pdfbuttontitle + '">' + pdfbuttonlabel + '</a></span>');
}

if (author==null) {
var author="";}

if (subj==null) {
var subj="";}

if (title==null) {
var title=escape(document.title);}

if (keywords==null) {
var keywords="";}

var app="http://www.web2pdfconvert.com";

if (allowcpy==null) {
var allowcpy="";} //yes/no

if (allowmodif==null) {
var allowmodif="yes";} //yes/no

if (allowprn==null) {
var allowprn="";} //yes/no 

if (keylen==null) {
var keylen="";} //40/128

if (userpass==null) {
var userpass="";}

if (ownerpass==null) {
var ownerpass="";}

if (preservelinks==null) {
var preservelinks="yes";} //yes/no

if (compress==null) {
var compress="flate";} //none/flate

if (marginleft==null) {
var marginleft="";} //0-999

if (marginright==null) {
var marginright="";} //0-999

if (margintop==null) {
var margintop="";} //0-999

if (marginbottom==null) {
var marginbottom="";} //0-999

if (allowscript==null) {
var allowscript="yes";}

if (psize==null) {
var psize="";}//A4/A3

if (porient==null) {
var porient="";} //Portrait/Landscape

if (ctype==null) {
var ctype="";}//pdftext/pdfimage

if (wsize==null) {
var wsize="";}


function savePageAsPDF() {

var pURL = "http://www.web2pdfconvert.com/HTMLtoPDFTemplate.aspx?cURL=" + escape(document.location.href) + "&author=" + author + "&subj=" + subj+ "&title=" + title+ "&app=" + app;
pURL+="&keywords="+keywords+"&allowcpy="+allowcpy+"&allowmodif="+allowmodif+"&allowprn="+allowprn+"&keylen="+keylen;
pURL+="&userpass="+userpass+"&ownerpass="+ownerpass+"&preservelinks="+preservelinks+"&compress="+compress;
pURL+="&marginleft="+marginleft+"&marginright="+marginright+"&margintop="+margintop+"&marginbottom="+marginbottom;
pURL+="&psize="+psize+"&porient="+porient+"&ctype="+ctype+"&allowscript="+allowscript+"&wsize="+wsize+"&outputmode=link";

window.open(pURL);
}