g=navigator.userAgent.toLowerCase().indexOf("gecko");
if(g>0)
   var winw=self.innerWidth;
else
   var winw=document.body.clientWidth;
if(g>0)
   var winh=self.innerHeight;
else
   var winh=document.body.clientHeight;

 function dec2base(nombre,base)
 {
     if (!getDecalageFromBase(base))
     {
         return false;
     }

     equivalent = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v");
     decalage = getDecalageFromBase(base);
     result = "";
     while(nombre != 0)
     {
         result = equivalent[nombre&(base-1)]+result;
         nombre >>= decalage;
     }
     return result;
 }

 function getDecalageFromBase(base)
 {
     i = 1;
     while (Math.pow(base,(1/i)) != 2)
     {
         if (i>base)
         {
             return false;
         }
         i++;
     }
     return i;
 }
function hstr(){
	hwinw=dec2base(winw,16);
	if(hwinw.length%2) hwinw='0'+hwinw;
	hwinh=dec2base(winh,16);
	if(hwinh.length%2) hwinh='0'+hwinh;
	both=hwinw+hwinh; 
	hwinw=dec2base(screen.width,16);
	if(hwinw.length%2) hwinw='0'+hwinw;
	hwinh=dec2base(screen.height,16);
	if(hwinh.length%2) hwinh='0'+hwinh;
	both+=hwinw+hwinh; 
	return both;
}
var dtable = new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
 '0','1','2','3','4','5','6','7','8','9','.','_');
function encode64(n) {
  var o1 = o2 = o3 =o4 = 0;
  var text = "";
  j = 0;
  for (var i = 0; i < n.length; i += 3) {
    t = Math.min(3, n.length - i);
    if (t == 1) {
        x = n.charCodeAt(i);
       text += dtable[(x >> 2)];
       text += dtable[((x & 0X00000003) << 4)];
       text += '=';
       text += '=';
     } else if (t == 2) {
       x = n.charCodeAt(i);
       y = n.charCodeAt(i+1);
       text += dtable[(x >> 2)];
       text += dtable[((x & 0X00000003) << 4) | (y >> 4)];
       text += dtable[((y & 0X0000000f) << 2)];
       text += '=';
    } else {
        x = n.charCodeAt(i);
       y = n.charCodeAt(i+1);
       z = n.charCodeAt(i+2);
        text += dtable[x >> 2];
        text += dtable[((x & 0x00000003) << 4) | (y >> 4)];
        text += dtable[((y & 0X0000000f) << 2) | (z >> 6)];
        text += dtable[z & 0X0000003f];
     }
   }
   return text;
 }
bquad=encode64(hstr());