function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

function tagit(srvroot){
                var ranNum= Math.round(Math.random()*9999999999);
		document.write('<IMG src="'+srvroot+'/images/pixel.gif?rn=' + ranNum + '&visitorid=' + getCookie('visitorid') + '&id=' + getCookie('id') + '">');
}


function URLencode(sStr) {
    return escape(sStr);
//    return escape(sStr).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27');
  }

function montrer4(pURL,pCRED,pLEG,pALT,pHEIGHT,pWIDTH)
{
  //debugger;
  //alert("testpURL="+URLencode(pURL));
  //alert("montrer.php?pURL="+URLencode(pURL)+"&pCRED="+URLencode(pCRED)+"&pLEG="+URLencode(pLEG));
  //document.placeholder.pname.value=pURL;
  //document.placeholder.pcredits.value=pCRED;
  //document.placeholder.plegende.value=pLEG;

  //large=window.open("montrer.php?pURL="+URLencode(pURL)+"&pCRED="+URLencode(pCRED)+"+"&pLEG="+URLencode(pLEG)+","fenetre","scrollbar=1, location=0 ,menubar=0, toolbar=0, status=yes, resizable=yes");
  //large=window.open("montrer.php?pURL="+URLencode(pURL)+"&pCRED="+URLencode(pCRED)+"+"&pLEG="+URLencode(pLEG)+","fenetre","scrollbar=1, location=0 ,menubar=0, toolbar=0, status=yes, resizable=yes");
  
  large=window.open("montrer.php?pURL="+URLencode(pURL)+"&pCRED="+URLencode(pCRED)+"&pLEG="+URLencode(pLEG)+"&pALT="+URLencode(pALT),
     "fenetre","height="+pHEIGHT+" width="+pWIDTH+" scrollbar=1, location=0 ,menubar=0, toolbar=0, status=yes, resizable=yes");
  
}



function montrer(pURL,liste){
		n_window = window.open(pURL, "fenetre", liste);
		n_window.focus();
	}

function montrer2(pURL,nom,liste){
		n_window = window.open(pURL,nom,liste);
		n_window.focus();
	}


function montrer3(pURL,pCRED,pLEG)
{
  debugger;
  document.placeholder.pname.value=pURL;
  document.placeholder.pcredits.value=pCRED;
  document.placeholder.plegende.value=pLEG;

  large=window.open("montrer.html","fenetre","scrollbar=1, location=0 ,menubar=0, toolbar=0, status=yes, resizable=yes");
}

 formdisplayed=0;



function azertyuiop(y) 
{
   for(i=0;i<y.length;i++) {
   	document.write(String.fromCharCode(5^y.charCodeAt(i)));
  			   }
}


function testit()
 { 
 debugger;
 alert("testit");
// 	document.write("<H2>TEST</H2>"); 
 }

