/*
footer_ext

pack&go
tell a friend
print

*/

function openPrintPage() {
	printFile=document.location.href;
	printFile=printFile.split("/");
	printFile=printFile[printFile.length-1];
	printFile=printFile.split("?");
	printFile=printFile[0];
	printFile=printFile.split("#");
	printFile=printFile[0];
	printFile=printFile.split(".");
	printFile=printFile[0]+"_print."+printFile[1];
	
	defaultHeight=822;
	deltaHeight=97;
	if (screen.availHeight<(defaultHeight+deltaHeight)) {
		height=screen.availHeight-deltaHeight;
	} else {
		height=defaultHeight;
	}
	printPage=eval("window.open(printFile, \"printwindow\", \"toolbar=yes,resize=yes,status=no,scrollbars=yes,personalbar=no,menubar=yes,width=700,height="+height+"\")");
}

function tellafriend() {
	referPage=document.location.href;
	referArray=referPage.split("#");
	referPage=referArray[0];
	referArray=referPage.split("?");
	referPage=referArray[0];
	
	referArray=referPage.split("/");
	// ceck: docs or cgi
	if (referArray[referArray.length-3]=="cgi-bin") {
		referPage=referArray[referArray.length-3]+"/"+referArray[referArray.length-2]+"/"+referArray[referArray.length-1];
	} else {
		referPage=referArray[referArray.length-2]+"/"+referArray[referArray.length-1];
	}
	//alert (referPage);
	filename=""+pathPre+"main/tellafriend_es.html";
	filename+="?"+referPage;
	recomm=window.open(filename,"refer","toolbar=no,resize=yes,status=no,scrollbars=no,personalbar=no,menubar=no,width=400,height=440");
	//document.location.href=""+pathPre+"/main/tellafriend_en.html";
}

footerEString=""+
"<tr><td><table border=0 cellpadding=0 cellspacing=0 width=392>"+
	"<tr>"+
		"<td bgcolor=#cccccc><img src=\""+pathPre+"gfx/trans.gif\" width=\"196\" height=\"1\" border=\"0\" alt=\"\"></td>"+
		
		"<td bgcolor=\"#cccccc\"><img src=\""+pathPre+"gfx/trans.gif\" width=\"196\" height=\"1\" border=\"0\" alt=\"\"></td>"+
	"</tr>"+
	"<tr>"+
		
		"<td height=28><table border=0 cellpadding=0 cellspacing=0>"+
			"<tr>"+
				"<td><img src=\""+pathPre+"gfx/icon_tell.gif\" width=\"13\" height=\"10\" border=\"0\" alt=\"\"></td>"+
				"<td>&nbsp;<a href=\"javascript:tellafriend()\" class=\"bluebold\">D&iacute;selo a un amigo</a></td>"+
			"</tr>"+
		"</table></td>"+
		
		"<td align=right><table border=0 cellpadding=0 cellspacing=0>"+
			"<tr>"+
				"<td><img src=\""+pathPre+"gfx/icon_print.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\"></td>"+
				"<td>&nbsp;<a href=\"javascript:openPrintPage()\" class=\"bluebold\">Imprimir P&aacute;gina</a></td>"+
			"</tr>"+
		"</table></td>"+
	"</tr>"+
"</table></td></tr>"+
"";

document.write(footerEString);
