function fiuta(uri) {
    w = (document.all ? screen.width : screen.width) * 0.9;
    h = (document.all ? screen.height : screen.height-150) * 0.9;
    op = 'scrollbars=yes,toolbar=yes,location=yes,directories=yes,menubar=yes,resizable=yes,status=yes,width=' + w + ',height=' + h + ',screenX=0,screenY=0,top=0,left=0';
    window.open(uri,'',op);
}
function fiutaFilter(uri) {
    //document.location.href = uri;
    window.location.assign(uri);
}
function fiutaLink(sBase64,bOpenInPopup){
  var sUrl=fiutaDecode64(sBase64);
  FiutaViewDecodedLink(sUrl,bOpenInPopup);
}
function FiutaViewDecodedLink(sUrl,bOpenInPopup){
  if(bOpenInPopup){
    w = (document.all ? screen.width : screen.width) * 0.9;
    h = (document.all ? screen.height : screen.height-150) * 0.9;
    var op = 'scrollbars=yes,toolbar=yes,location=yes,directories=yes,menubar=yes,resizable=yes,status=yes,width=' + w + ',height=' + h + ',screenX=0,screenY=0,top=0,left=0';
    window.open(sUrl,"",op);
  }else{
    window.location.href=sUrl;
  }
}
function fiutaDecode64(sBase64){
  var kk_keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  var chr1,chr2,chr3,enc1,enc2,enc3,enc4; 
  var output="";
  var i=0;
  sBase64=sBase64.replace(/-/g,"+").replace(/_/g,"=").replace(/\./g,"/");
  if(sBase64.match("/[^A-Za-z0-9+\\/=]/")){
    return"";
  }
  do{
    enc1=kk_keyStr.indexOf(sBase64.charAt(i++));
    enc2=kk_keyStr.indexOf(sBase64.charAt(i++)); 
    enc3=kk_keyStr.indexOf(sBase64.charAt(i++));
    enc4=kk_keyStr.indexOf(sBase64.charAt(i++));
    chr1=(enc1<<2)|(enc2>>4);
    chr2=((enc2&15)<<4)|(enc3>>2);
    chr3=((enc3&3)<<6)|enc4;
    output+=String.fromCharCode(chr1);
    if(enc3!=64){
      output+=String.fromCharCode(chr2);
    }
    if(enc4!=64){
      output+=String.fromCharCode(chr3);
    }
    chr1=chr2=chr3=enc1=enc2=enc3=enc4="" ;
  }
  while(i<sBase64.length);
  return output;
}