// Fonctions clicks
var id3_keyStr = "ABCDEFGHIJKLMNOP" +
                "QRSTUVWXYZabcdef" +
                "ghijklmnopqrstuv" +
                "wxyz0123456789+/" +
                "=";


function slgoh() {
	id3_go('/');
}

function id3_go(u) {document.location.href=u;}

function id3_go_blank(u) {
	window.open(u);
}

function id3_go64(url)
{
    var url = id3_decode64(url);
    id3_go(url);
    return false;
}

function id3_go64b(url) {
	var url = id3_decode64(url);
	window.open(url,'_blank');
	return false;
}

function id3_goidb(id)
{
	var o=document.getElementById(id);
	if (o)
		window.open(o.href,'_blank');
}
function sl_goliensp(keyword) {
	
id3_go('http://www.seloger.com/s_'+'overt'+'ure.htm?'+'search='+keyword);
}


function id3_decode64(input) {
   var output = "";
   var chr1, chr2, chr3 = "";
   var enc1, enc2, enc3, enc4 = "";
   var i = 0;

   // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
   var base64test = /[^A-Za-z0-9\+\/\=]/g;
   if (base64test.exec(input)) {
      return '';
   }
   input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");

   do {
      enc1 = id3_keyStr.indexOf(input.charAt(i++));
      enc2 = id3_keyStr.indexOf(input.charAt(i++));
      enc3 = id3_keyStr.indexOf(input.charAt(i++));
      enc4 = id3_keyStr.indexOf(input.charAt(i++));

      chr1 = (enc1 << 2) | (enc2 >> 4);
      chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
      chr3 = ((enc3 & 3) << 6) | enc4;

      output = output + String.fromCharCode(chr1);

      if (enc3 != 64) {
         output = output + String.fromCharCode(chr2);
      }
      if (enc4 != 64) {
         output = output + String.fromCharCode(chr3);
      }

      chr1 = chr2 = chr3 = "";
      enc1 = enc2 = enc3 = enc4 = "";

   } while (i < input.length);

   return output;
}
// fin fonctions clicks
