var AFS_Account="00044198";
var AFS_Tracker="auto";
var AFS_Server="www";
var AFS_Page="DetectName";
var AFS_Url="DetectUrl";

var dvy_lang;
  if (navigator.userLanguage)           // Explorer
    dvy_lang = navigator.userLanguage;
  else if (navigator.language)          // FF
    dvy_lang = navigator.language;
  else
    dvy_lang = "en";

  if (dvy_lang==="it-IT")
    dvy_lang = "it";

var HomebA=1;
var HomebB=1;
var HomebC=2;
var HomebTemp;

var wpsfaT;
var wpsfa1='Windows Printing System For Applications';
var wpsfa2='THE solution for DOS & *nix, since 1996';
  if (dvy_lang==="it")
    wpsfa2='LA soluzione per DOS & *nix, dal 1996';

function WpsfaChange() {
wpsfaT=wpsfa1; wpsfa1=wpsfa2; wpsfa2=wpsfaT;
document.getElementById("wpsfa").innerHTML = wpsfaT;
setTimeout("WpsfaChange()",3000); }

function FieldTranslate() {
document.translate.u.value = document.URL ;
if (document.translate.u.value.substring(0,16) == "http://translate") {
   document.translate.b1.disabled = true ; }
else {
   document.translate.tl.value = dvy_lang ; } }

function HeadImgChange() {
HomebTemp=HomebC; HomebC=HomebB; HomebB=HomebA; HomebA=HomebTemp;
document.getElementById('homeban1').style.zIndex = HomebA;
document.getElementById('phb1').style.zIndex = HomebA;
document.getElementById('ulhb1').style.zIndex = HomebA;
document.getElementById('homeban2').style.zIndex = HomebB;
document.getElementById('phb2').style.zIndex = HomebB;
document.getElementById('ulhb2').style.zIndex = HomebB;
document.getElementById('homeban3').style.zIndex = HomebC;
document.getElementById('phb3').style.zIndex = HomebC;
document.getElementById('ulhb3').style.zIndex = HomebC;
setTimeout("HeadImgChange()",8000); }

function DvyAdCount(nGoDown)  {
if (dvy_lang === "it") {
   document.getElementById("AdWords").innerHTML="<iframe src='http://www.printfil.com/iadwords.htm' style='border:none;width:1px;height:1px;' marginheight='0' marginwidth='0' frameborder='0'></iframe>" ; }
else {
   document.getElementById("AdWords").innerHTML="<iframe src='http://www.printfil.com/adwords.htm' style='border:none;width:1px;height:1px;' marginheight='0' marginwidth='0' frameborder='0'></iframe>" ; } ;
if (nGoDown > 0) {
   setTimeout('GoDown()',nGoDown); } }

function GoDown()  { 
if (dvy_lang === "it") {
   window.location = "http://www.printfil.com/idown.htm" ; }
else {
   window.location = "http://www.printfil.com/edown.htm" ; } }

function RotateFaq() {
var nRnd;
var aFaqT;
var aFaqL;
var aFaqC;
if (dvy_lang === "it") {
  aFaqT = new Array("DOSBox"    ,"Windows 64 bit","Terminal Server"                              ,"FAQ"     ,"Prezzi"    ,"Stampe Lente"                            ,"Dos su Usb","Dos su E-Mail","Sequenze Escape","Code Pages");
  aFaqL = new Array("ifaq32.htm","ifaq30.htm"    ,"article/dos-print-windows-terminal-server.htm","ifaq.htm","iprice.htm","article/slow-dos-printing-in-windows.htm","ifaq2.htm" ,"ifaq5.htm"    ,"ifaq3.htm"       ,"ifaq22.htm");
  aFaqC = new Array("Come stampare da DOSBox","Come stampare da DOS in sistemi Windows a 64 bit","Installazione di Printfil e particolarit&agrave;","Clicca qui per visualizzare le risposte alle domande pi&ugrave; frequenti","Quanto costa Printfil ?","Perch&egrave; le stampe DOS sono cos&igrave; lente ?","Posso stampare da DOS su una stampante USB ?","Pu&ograve; una stampa DOS essere spedita direttamente via email ?","Printfil supporta particolari Codici di Controllo Stampante ?","Devo stampare caratteri speciali, come &ntilde;, &yacute; o &#1081;. Printfil li gestisce ?"); }
else {
  aFaqT = new Array("DOSBox"    ,"Windows 64 bit","Terminal Servers"                             ,"FAQ"     ,"Prices"    ,"Slow Printing"                           ,"Dos To Usb","Dos to E-Mail","Escape Sequences","Code Pages");
  aFaqL = new Array("efaq32.htm","efaq30.htm"    ,"article/dos-print-windows-terminal-server.htm","efaq.htm","eprice.htm","article/slow-dos-printing-in-windows.htm","efaq2.htm" ,"efaq5.htm"    ,"efaq3.htm"       ,"efaq22.htm");
  aFaqC = new Array("How to print from DOSBox","How to print from DOS in 64 bit Windows systems","Printfil Installation and particularities","Click here to see the most Frequently Asked Questions","How much does Printfil cost ?","Why printing from DOS is so slow ?","Can I print from DOS to an USB printer ?","Can a DOS print job being sent directly via email ?","Does Printfil support particular Printer Control Codes ?","My language has special characters, like &ntilde;, &yacute; or &#1081;. Does Printfil support them ?"); }
if (document.referrer.toLowerCase().indexOf("dosbox")>=0) // Se c'e' DOSBox nel referrer
  nRnd=0;                                                 // elemento 0
else 
  nRnd=Math.floor((Math.random()*10));                    // elemento 0..9
document.getElementById("rndfaqtitle").innerHTML = aFaqT[nRnd];
document.getElementById("rndfaqcontent").innerHTML = "<b><i><a href='http://www.printfil.com/"+aFaqL[nRnd]+"'>"+aFaqC[nRnd]+"</a></i></b>"; }

