function montre(id) { 
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}
window.onload=montre;

function afficheInfo(){
	document.write('<p style="font-weight:normal;text-align:left;">PageRank® est la propriété de <a href="http://www.google.com" style="color:#333">Google, Inc</a>.. Ce site n\'est pas affilié à <a href="http://www.google.com" style="color:#333">Google, Inc</a>..<br>Toutes les marques citées appartiennent à leurs compagnies respectives.<br>Trademarks remain trademarks of their respective companies.</p>');
}
function textCounter(theField,theCharCounter,theLineCounter,maxChars,maxLines,maxPerLine)
{
	var strTemp = "";
	var strLineCounter = 0;
	var strCharCounter = 0;
	for (var i = 0; i < theField.value.length; i++)
	{
		var strChar = theField.value.substring(i, i + 1);
		if (strChar == '\n')
		{
			strTemp += strChar;
			strCharCounter = 1;
			strLineCounter += 1;
		}
		else if (strCharCounter == maxPerLine)
		{
			strTemp += '\n' + strChar;
			strCharCounter = 1;
			strLineCounter += 1;
		}
		else
		{
			strTemp += strChar;
			strCharCounter ++;
		}
	}
	theCharCounter.value = maxChars - strTemp.length;
	theLineCounter.value = maxLines - strLineCounter;
}

function getBody(){
	if(document.compatMode && document.compatMode!="BackCompat"){
		return document.documentElement;
	}else{
		return document.body;
	}
}

function showDHTML( e, name, description  ){
	document.getElementById( "bubble" ).style.visibility = "visible";
	document.getElementById( "bubble" ).style.display = "block";
	document.getElementById( "bubblecaption" ).innerHTML = unescape(name);
	document.getElementById( "bubbledescription" ).innerHTML = unescape(description);
	document.getElementById( "bubble" ).style.left = ( e.clientX - 150 ) + "px";//- 23 + getBody().scrollLeft ) + "px";
	document.getElementById( "bubble" ).style.top = ( e.clientY )  + "px";//- 185 + getBody().scrollTop )  + "px";
	
}

function hideDHTML(){
	document.getElementById( "bubble" ).style.left = "0px";
	document.getElementById( "bubble" ).style.top = "0px";
	document.getElementById( "bubble" ).style.visibility = "hidden";
	document.getElementById( "bubble" ).style.display = "none";
}

function vote(id){

	var largeur = 100;
	var hauteur = 100;
	
	var gauche = (screen.width - largeur)/2;
	var haut = (screen.height - hauteur)/2;

	window.open("http://www.top-pagerank.fr/vote-"+id+".html","2","width="+largeur+",height="+hauteur+",left="+gauche+",top="+haut+",toolbar=no,menubar=no,resizable=no,location=no,directories=no,status=no,scrollbars=no,copyhistory=no");
}

function votevideo(id){

	var largeur = 100;
	var hauteur = 100;
	
	var gauche = (screen.width - largeur)/2;
	var haut = (screen.height - hauteur)/2;

	window.open("http://www.top-pagerank.fr/vote,video-"+id+".html",id,"width="+largeur+",height="+hauteur+",left="+gauche+",top="+haut+",toolbar=no,menubar=no,resizable=no,location=no,directories=no,status=no,scrollbars=no,copyhistory=no");
}

function out(id){
	
	var largeur = screen.width;
	var hauteur = screen.height;

	window.open("http://www.top-pagerank.fr/out-"+id+".html","2","width="+largeur+",height="+hauteur+",left=0,top=0,toolbar=yes,menubar=yes,resizable=yes,location=yes,directories=yes,status=yes,scrollbars=yes,copyhistory=yes");
}

function redir(url){
	
	var largeur = screen.width;
	var hauteur = screen.height;

	window.open(url,"2","width="+largeur+",height="+hauteur+",left=0,top=0,toolbar=yes,menubar=yes,resizable=yes,location=yes,directories=yes,status=yes,scrollbars=yes,copyhistory=yes");
}

function commentaire(id)
{
	comment = 'Suite à des abus, les commentaires sont fermés.';
/*comment = '<form name="commentaire" method="post" action="http://www.top-pagerank.fr/add_comment.html">';
comment += '<table border="0" cellspacing="0" cellpadding="0"><tr>';
comment += '<td width="5" height="26">&nbsp;</td>';
comment += '<td height="25" style="border-top:solid #444 1px;color:#444; font-size:13px; text-decoration:none; font-weight:bold; background-color:#E3F2DF; vertical-align:middle;">';
comment += '<font style="padding-left:5px;">Ajouter un commentaire</font></td><td>&nbsp;</td></tr><tr><td height="5" colspan="3"></td></tr><tr><td width="5" height="26">&nbsp;</td>';
comment += '<td style="width:485px; background-color:#F5F5F5; border:1px solid #E5E5E5; padding:5px 0px 0px 0px; color:#CC0000; font-weight:bold; font-size:13px;">Votre Pseudo :';
comment += '</td><td>&nbsp;</td></tr><tr><td height="37">&nbsp;</td><td style="vertical-align:middle;">'
comment += '<input type="text" name="pseudo" style="width:485px; height:18px; font-family: Verdana; font-size:11px; color:#666; vertical-align:middle;" maxlength="50" /></td>';
comment += '<td>&nbsp;</td></tr><tr><td height="27">&nbsp;</td>';
comment += '<td style="width:485px; background-color:#F5F5F5; border:1px solid #E5E5E5; padding:5px 0px 0px 0px; color:#CC0000; font-weight:bold; font-size:13px;"> ';
comment += 'Commentaire : </td><td>&nbsp;</td></tr><tr><td height="120">&nbsp;</td>';
comment += '<td style="vertical-align:middle;"><textarea name="texte" style="width:485px; height:100px; font-family: Verdana; font-size:11px; color:#666;" maxlength="200">';
comment += '</textarea></td><td>&nbsp;</td></tr><tr><td height="30">&nbsp;</td><td style="vertical-align:middle;"><input type="hidden" name="id" value="'+id+'" />';
comment += '<input type="submit" name="Submit" value="Ajouter le commentaire" /></td><td>&nbsp;</td></tr></table></form>';*/

document.write(comment);
}

function ajouterflux()
{
comment = '<form name="ajouterflux" method="post" action="http://www.top-pagerank.fr/ajouter-un-flux.html">';
comment += '<table border="0" cellspacing="0" cellpadding="0">';
comment += '<tr><td height="5" colspan="3"></td></tr><tr><td width="5" height="26">&nbsp;</td>';
comment += '<td style="width:485px; background-color:#F5F5F5; border:1px solid #E5E5E5; padding:5px 0px 0px 0px; color:#CC0000; font-weight:bold; font-size:13px;">Votre adresse email :';
comment += '</td><td>&nbsp;</td></tr><tr><td height="37">&nbsp;</td><td style="vertical-align:middle;">'
comment += '<input type="text" name="email" style="width:485px; height:18px; font-family: Verdana; font-size:11px; color:#666; vertical-align:middle;" maxlength="50" /></td>';
comment += '<td>&nbsp;</td></tr><tr><td>&nbsp;</td>';
comment += '<td style="width:485px; background-color:#F5F5F5; border:1px solid #E5E5E5; padding:5px 0px 0px 0px; color:#CC0000; font-weight:bold; font-size:13px;"> ';
comment += 'Url de votre flux XML : </td><td>&nbsp;</td></tr><tr><td>&nbsp;</td>';
comment += '<td style="vertical-align:middle;" height="37"><input type="text" name="url_flux" style="width:485px; height:18px; font-family: Verdana; font-size:11px; color:#666; vertical-align:middle;" maxlength="150" />';
comment += '</td><td>&nbsp;</td></tr><tr><td height="30">&nbsp;</td><td style="vertical-align:middle;">';
comment += '<input type="submit" name="Submit" value="Soumettre le flux" /></td><td>&nbsp;</td></tr></table></form>';

document.write(comment);
}

function email()
{
Fmail = '<form action="http://www.top-pagerank.fr/newsletter.html" method="post" name="formemail" id="email">';
Fmail += '<u>Newsletter</u><input type="text" value="Enter Your email" onclick="javascript:this.value=\'\';" name="email" />';
Fmail += '<input type="submit" value="OK" class="sub" /> For receive the free best videos in your email !</form>';

document.write(Fmail);
}