function printLoadingMessage(loadingMessageText)
{
        if(!loadingMessageText)// Si aucun message personnalisé n'a été précisé, on lui donne le message par défaut.
        {
                loadingMessageText = 'Chargement...';
        }
        var parentNode = document.getElementById('loadingMessage');// On récupère le nœud parent qui est la balise div.
        var textNode = document.createTextNode(loadingMessageText);// On crée un nœud enfant qui est tout simplement le texte.
        parentNode.replaceChild(textNode, parentNode.firstChild);// On accroche le texte à la balise div.
        document.getElementById('loadingMessage').style.visibility='visible';// Puis on rend visible le bloc.
}

function hideLoadingMessage()
{
        document.getElementById('loadingMessage').style.visibility='hidden';// On rend le message invisible.
}

var ns6=document.getElementById&&!document.all

function restrictinput(maxlength,e,placeholder){
if (window.event&&event.srcElement.value.length>=maxlength)
return false
else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/ 
if (pressedkey.test(String.fromCharCode(e.which)))
e.stopPropagation()
}
}

function countlimit(maxlength,e,placeholder){
var theform=eval(placeholder)
var lengthleft=maxlength-theform.value.length
var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
if (window.event||e.target&&e.target==eval(placeholder)){
if (lengthleft<0)
theform.value=theform.value.substring(0,maxlength)
placeholderobj.innerHTML=lengthleft
}
}
//trouvé sur: www.portugal-tchat.com//

function displaylimit(thename, theid, thelimit){
var theform=theid!=""? document.getElementById(theid) : thename
var limit_text='<strong><span id="'+theform.toString()+'">'+thelimit+'</span></strong> caractères restants.'
if (document.all||ns6)
document.write(limit_text)
if (document.all){
eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
}
else if (ns6){
document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
}
}
			// <!--
			function afficher(id, act)
				{
				if(act == 1)
					{
					window.document.getElementById(id).style.display = 'block';
					}
				else
					{
					window.document.getElementById(id).style.display = 'none';
					}
				}
			// -->
			
//<!--
function insertTag(startTag, endTag, textareaId, tagType) {
	var field = document.getElementById(textareaId);
	field.focus();
	
	if (window.ActiveXObject) {
		var textRange = document.selection.createRange();            
		var currentSelection = textRange.text;
	} else {
		var startSelection   = field.value.substring(0, field.selectionStart);
		var currentSelection = field.value.substring(field.selectionStart, field.selectionEnd);
		var endSelection     = field.value.substring(field.selectionEnd);
	}
	
	if (tagType) {
		switch (tagType) {
			case "lien":
					endTag = "[/a]";
					if (currentSelection) {
							if (currentSelection.indexOf("http://") == 0 || currentSelection.indexOf("https://") == 0 || currentSelection.indexOf("ftp://") == 0 || currentSelection.indexOf("www.") == 0) {
									var label = prompt("Quel est le texte du lien ?") || "";
									startTag = "[a href=" + currentSelection + "]";
									currentSelection = label;
							} else {
									var URL = prompt("Quelle est l'url ?");
									startTag = "[a href=" + URL + "]";
							}
					} else {
							var URL = prompt("Quelle est l'url ?") || "";
							var label = prompt("Quel est le libellé du lien ?") || "";
							startTag = "[a href=" + URL + "]";
							currentSelection = label;                     
					}
			break;

			case "image":
					endTag = "";
					if (currentSelection) {
									var label = prompt("Quelle est l'adresse de l'image ?") || "";
									startTag = "[img src=" + currentSelection + " /]";
					} else {
							var URL = prompt("Quelle est l'adresse de l'image ?") || "";
							startTag =  "[img src=" + URL + "  /]";  
					}
			break;
			case "citation":
					endTag = "[/div]";
					if (currentSelection) 
					{
						if (currentSelection.length > 30) 
						{
							var auteur = prompt("Quel est l'auteur de la citation ?") || "";
							startTag = "[div class=citation][strong]citation de " + auteur + " :[/strong]\n";
						} 
						else 
						{
							var citation = prompt("Quelle est la citation ?") || "";
							startTag = "[div class=citation][strong]citation de " + currentSelection + " :[/strong]\n";
							currentSelection = citation;    
						}
					} 
					else 
					{
							var auteur = prompt("Qui est l'auteur de la citation ?") || "";
							var citation = prompt("Quelle est la citation ?") || "";
							startTag = "[div class=citation][strong]citation de " + auteur + " :[/strong]\n";
							currentSelection = citation;    
					}
			break;	
		}
	}
	
	if (window.ActiveXObject) {
		textRange.text = startTag + currentSelection + endTag;
		textRange.moveStart('character', -endTag.length-currentSelection.length);
		textRange.moveEnd('character', -endTag.length);
		textRange.select();  
	} else { // Ce n'est pas IE
		field.value = startSelection + startTag + currentSelection + endTag + endSelection;
		field.focus();
		field.setSelectionRange(startSelection.length + startTag.length, startSelection.length + startTag.length + currentSelection.length);
	}      
}

function preview(textareaId, previewDiv) {
	var field = textareaId.value;
	if (document.getElementById('previsualisation').checked && field) {
		

	
		field = field.replace(/\n/g, '<br />').replace(/\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
		
		field = field.replace(/\[strong\]([\s\S]*?)\[\/strong\]/g, '<strong>$1</strong>');
		field = field.replace(/\[em\]([\s\S]*?)\[\/italique\]/g, '<em>$1</em>');
		field = field.replace(/\[del\]([\s\S]*?)\[\/del\]/g, '<del>$1</del>');
		field = field.replace(/\[u\]([\s\S]*?)\[\/u\]/g, '<u>$1</u>');
		field = field.replace(/\[a href="([\s\S]*?)"\]([\s\S]*?)\[\/a\]/g, '<a href="$1">$2</a>');
		/*field = field.replace(/\[lien url=([\s\S]*?)\]([\s\S]*?)\[\/lien]/g, '<a href="$1" title="$2">$2</a>');*/
		field = field.replace(/\[img src="([\s\S]*?)" \/]/g, '<img src="$1" alt="Image" />');
		/*field = field.replace(/\[citation nom=(.*?)\]([\s\S]*?)\[\/citation\]/g, '<br /><span class="citation">Citation de $1 :</span><div class="citation2">$2</div>');
		field = field.replace(/\[citation lien=(.*?)\]([\s\S]*?)\[\/citation\]/g, '<br /><span class="citation"><a href="$1">Citation</a></span><div class="citation2">$2</div>');
		field = field.replace(/\[citation nom=(.*?) lien=(.*?)\]([\s\S]*?)\[\/citation\]/g, '<br /><span class="citation"><a href="$2">Citation : $1</a></span><div class="citation2">$3</div>');
		field = field.replace(/\[citation lien=(.*?) nom=(.*?)\]([\s\S]*?)\[\/citation\]/g, '<br /><span class="citation"><a href="$1">Citation : $2</a></span><div class="citation2">$3</div>');
		field = field.replace(/\[citation\]([\s\S]*?)\[\/citation\]/g, '<br /><span class="citation">Citation</span><div class="citation2">$1</div>');*/
		field = field.replace(/\[span style="font-size: (.*?)px;"\]([\s\S]*?)\[\/span\]/g, '<span style="font-size: $1px;">$2</span>');
		field = field.replace(/\[div style=text-align: (.*?)\]([\s\S]*?)\[\/div\]/g, '<div style="text-align: $1;">$2</div>');
		field = field.replace(/\[span style="color: (.*?);"\]([\s\S]*?)\[\/span\]/g, '<span style="color: $1;">$2</span>');
		/*
		$tags = array('span', 'kbd', 'var', 'del', 'div', 'strong', 'em', 'dfn', 'cite', 'q', 'blockquote', 'p', 'br', 'a', 'ol', 'ul', 'li', 'abbr', 'acronym', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7', 'h8', 'img', 'tr', 'th', 'td', 'table', 'caption', 'thead', 'tfoot', 'tbody', 'dl', 'dd', 'dt', 'map', 'area', 'code', 'sub', 'sup');
		// array_push($tags, 'script', 'object'); peuvent être ajouté (-sécurité) / can be added (-security)
		$attributes = array('class', 'id', 'dir', 'title', 'lang', 'style', 'href', 'hreflang', 'rel', 'rev', 'tabindex', 'type', 'accesskey', 'charset', 'datetime', 'cite', 'alt', 'longdesc', 'usemap', 'src', 'coords', 'shape', 'nohref');
		// array_push($attributes, 'onclick', 'ondblclick', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onunload', 'onblur', 'onfocus', 'defer'); peuvent être ajouté (-sécurité) / can be added (-security)
		int $i;
		for($i = 0; $i < count($attributes); $i++)
			{
			var $attribute = $attributes[$i];
			
			field=field.replace('/ ' . $attribute . '=([^"\=\]]+) ([a-z0-9]+)=/', ' ' . $attribute . '="$1" $2=', field);
			field=field.replace('/\[([^\]]+) ' . $attribute . '=([^"\]]+) \/\]/', '[$1 ' . $attribute . '="$2" /]', field);
			field=field.replace('/\[([^\]]+) ' . $attribute . '=([^"\]]+)\]/', '[$1 ' . $attribute . '="$2"]', field);
			/*$string = field.replace('/\[([^\]]+) ' . $attribute . '=([^"\]]+) ([^\s][a-z0-9]+)=(.)/', '[$1 ' . $attribute . '="$2" $3=$4', field);
			field = field.replace('/\[([^\]]+) ' . $attribute . '=([^"\]]+) \/\]/', '[$1 ' . $attribute . '="$2" /]', field);
			field = field.replace('/\[([^\]]+) ' . $attribute . '=([^"\]]+)\]/', '[$1 ' . $attribute . '="$2"]', field);
			}
		field=field.replace('/ (?:[a-z0-9]+)=(?:[^"\]]+)/', '', field);
		foreach($tags as $tag)
			{
			field = field.replace('/\[([\/]?)' . $tag . '([^\]>]*)\]/', '<$1' . $tag . '$2>', field);
			}
		*/
		
		
		document.getElementById(previewDiv).innerHTML = field;
	}
}

function getXMLHttpRequest() {
	var xhr = null;
	
	if (window.XMLHttpRequest || window.ActiveXObject) {
		if (window.ActiveXObject) {
			try {
				xhr = new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
		} else {
			xhr = new XMLHttpRequest();
		}
	} else {
		alert("Votre navigateur ne supporte pas l'objet XMLHTTPRequest...");
		return null;
	}
	
	return xhr;
}


function view(textareaId, viewDiv){
	var content = encodeURIComponent(document.getElementById(textareaId).value);
	var xhr = getXMLHttpRequest();
	
	if (xhr && xhr.readyState != 0) {
		xhr.abort();
		delete xhr;
	}
	
	xhr.onreadystatechange = function() {
		if (xhr.readyState == 4 && xhr.status == 200){
			document.getElementById(viewDiv).innerHTML = xhr.responseText;
		} else if (xhr.readyState == 3){
			document.getElementById(viewDiv).innerHTML = "<div style=\"text-align: center;\">Chargement en cours...</div>";
		}
	}
	
	xhr.open("POST", "view.php", true);
	xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xhr.send("string=" + content);
}


function smilies(img) 
	{
window.document.formulaire.textarea.value += '' + img + '';
	}
/*
function go(id)
{
if(document.getElementById(id).style.display == 'block')
{document.getElementById(id).style.display = 'none';}
else
{document.getElementById(id).style.display = 'block';}
}
function size(id)
{
if(document.getElementById(id).style.height == '90%' && document.getElementById(id).style.width == '90%')
{document.getElementById(id).style.height = '70%';
document.getElementById(id).style.width = '50%';
document.getElementById(id).style.left = '25%';
document.getElementById(id).style.top = '8%';
document.getElementById('haut_' + id).style.width = '48%';}
else
{document.getElementById(id).style.height = '90%';
document.getElementById(id).style.width = '90%';
document.getElementById(id).style.left = '5%';
document.getElementById(id).style.top = '5%';
document.getElementById('haut_' + id).style.width = '88%';}
}

		var checkflag = false;
		function check(field) 
		{
			if (checkflag == false) 
				{
					for (i = 0; i < (field.length); i++) 
						{
							field[i].checked = true;
						}
					checkflag = true;
					return "Aucun message"; 
				}
			
			else 
				{
					for (i = 0; i < (field.length) ; i++) 
						{
							field[i].checked = false; 
						}
					checkflag = false;
					return "Tous les messages"; 
				}
		}
		
	/*
	* Montre / Cache un div
	
	function DivStatus( nom )
		{
			var divID = nom;
			if ( document.getElementById && document.getElementById( divID ) ) // Pour les navigateurs récents
				{
					Pdiv = document.getElementById( divID );
					PcH = true;
		 		}
			else if ( document.all && document.all[ divID ] ) // Pour les veilles versions
				{
					Pdiv = document.all[ divID ];
					PcH = true;
				}
			else if ( document.layers && document.layers[ divID ] ) // Pour les très veilles versions
				{
					Pdiv = document.layers[ divID ];
					PcH = true;
				}
			else
				{
					
					PcH = false;
				}
				
			if ( PcH )
				{
					Pdiv.className = ( Pdiv.className == 'cachediv' ) ? '' : 'cachediv';
				}
		}
	
// Fonction permettant de modifier l'opacité d'un objet
function Obj_SetOpacity( obj_, opa_){ 
  //-- Recup l'objet 
  var Obj = ( typeof (obj_)=='object') ? obj_ : document.getElementById( obj_); 
  //-- Si existe 
  if( Obj){ 
    if(document.all && !window.opera){ 
      Obj.style.filter = "alpha(opacity=" + opa_ + ");" 
    } 
    else{ 
      var Val = opa_/100; 
      Obj.style.setProperty( "-moz-opacity", Val, ""); 
      Obj.style.setProperty( "-khtml-opacity", Val, ""); 
      Obj.style.setProperty( "opacity", Val, ""); 
    } 
  } 
}

// Fonction permettant de gérer l'effet d'un clique sur une case au jeu d'échecs
function clique_case(nom_case)
  {
    if ( typeof this.case_case == 'undefined'  )
      {
        this.case_case = nom_case;
      }
    else
      {
        if ( this.case_case != nom_case && document.getElementById(nom_case).style.backgroundColor != 'grey' )
          {
            document.getElementById(this.case_case).style.border='0px red solid';
            this.case_case = nom_case;
          }
      }
    if ( document.getElementById(nom_case).style.backgroundColor != 'grey' )
      {
        this.case_case = nom_case;  
      }
    div_deplacement = document.getElementById('div_deplacement');
    span_deplacement_piece = document.getElementById('deplacement_piece');
    input_case_finale = document.getElementById('input_case_finale');
    if ( div_deplacement.style.display != 'none' && document.getElementById(nom_case).style.backgroundColor != 'grey' )
      {
        liste_lettres = new Array("A","B","C","D","E","F","G","H");
        positions=nom_case.split('x');
        span_deplacement_piece.innerHTML = liste_lettres[positions[0]-1]+positions[1];
        input_case_finale.value = nom_case;
        bouton_deplacement = document.getElementById('bouton_deplacement');
        document.getElementById(nom_case).style.border='2px red solid';
        Obj_SetOpacity(nom_case,100);
        document.getElementById(nom_case).style.width="65px";
        document.getElementById(nom_case).style.height="65px";
        bouton_deplacement.style.display = 'block';
        document.getElementById('non_autorise').style.display = 'none';
      }
  }
  
// Fonction permettant de gérer l'effet d'un clique sur une pièce au jeu d'échecs  
function clique_piece(nom_complet,nom,nom_image,case_origine)
  {
    if ( typeof this.piece == 'undefined' )
      {
        this.piece = nom_complet;
      }
    else
      {
        if ( this.piece != nom_complet )
          {
            document.getElementById(this.case_ancienne).style.backgroundColor="transparent";
            Obj_SetOpacity(this.piece,100);
            this.piece = nom_complet;
          }
        else
          {
            this.piece = nom_complet;
          }
      }
    ancienne_piece = this.piece;
    this.piece = nom_complet;
    this.case_ancienne = case_origine;
    div_deplacement = document.getElementById('div_deplacement');
    span_nom_piece = document.getElementById('nom_piece');
    input_nom_piece = document.getElementById('input_nom_piece');
    input_case_origine =  document.getElementById('input_case_origine');

    if ( div_deplacement.style.display == 'none' )
      {
        div_deplacement.style.display = 'block';
      }
    
    span_nom_piece.innerHTML = nom;
    input_nom_piece.value = nom_complet;
    input_case_origine.value = case_origine;
    document.getElementById(case_origine).style.backgroundColor='grey';
    Obj_SetOpacity(case_origine,40);
    document.getElementById('non_autorise').style.display = 'none';
  }
  
// Fonction permetttant d'actualiser le plateau
function actualiser_plateau(id_partie,joueur) {
        var xhr = getXMLHttpRequest();
        if(xhr && xhr.readyState != 0) {
                xhr.abort(); 
        }
        xhr.onreadystatechange = function() { 
                if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
                        if ( xhr.responseText == 1 )
                          {
                            window.location.href='echecs.php?partie_id='+id_partie+'';
                            return(false);
                          }
                } else if(xhr.readyState == 2 || xhr.readyState == 3) {
                }
        }
        xhr.open("GET", "./../php/echecs_bin.php?id_partie="+id_partie+"&joueur="+joueur, true);
        xhr.send(null);
        setTimeout(function(){actualiser_plateau(id_partie,joueur)}, 10000);
}

// Fonction permetttant d'actualiser le chat
function actualiser_chat(id_partie) {
        var xhr = getXMLHttpRequest();
        if(xhr && xhr.readyState != 0) {
                xhr.abort(); 
        }
        xhr.onreadystatechange = function() { 
                if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
                        if ( xhr.responseText != '' )
                          {
                            document.getElementById("chat_echecs").innerHTML = xhr.responseText;
                            return(false);
                          }
                } else if(xhr.readyState == 2 || xhr.readyState == 3) {
                }
        }
        xhr.open("GET", "./../php/echecs_bin2.php?id_partie="+id_partie, true);
        xhr.send(null);
        setTimeout(function(){actualiser_chat(id_partie)}, 10000);
}

// Fonction permettant de vérifier si le titre d'un topic est rempli
function verif_titre()
  {
    titre = document.getElementById("titre_topic");
    validation = document.getElementById("validation_topic");
    alerte_titre = document.getElementById("alerte_titre");
    
    if ( titre.value == null || titre.value == 'undefined' || titre.value == '' )
      {
        validation.disabled=true;
        alerte_titre.innerHTML = 'Vous devez rentrer un titre pour pouvoir poster votre sujet';
      }
    else
      {
        validation.disabled=false;
        validation.value = 'Poster';
        alerte_titre.innerHTML = '';
      }
  }*/
function PopupCentrer(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}

function toutcoche (id, checked) {
	var el = document.getElementById(id);
	for (var i = 0; i < el.elements.length; i++) {
	  el.elements[i].checked = checked;
	}
      }
	  
    var thumb = null;
    function showThumbnail(which,e)
    {
        thumb = document.getElementById('thumb');
        if( thumb && thumb.style.visibility == 'hidden' )
        {
            thumb.style.left       = e.pageX ? pageXOffset + e.clientX + 20 : document.body.scrollLeft + e.x + 20;
            thumb.style.top        = e.pageY ? pageYOffset + e.clientY : document.body.scrollTop  + e.y;
            thumb.style.visibility = 'visible';
            thumb.innerHTML        = '<img src="' + which + '" width="20" height="20" />';
        }
    }
    function closeThumbnail()
    {
        if( thumb )
            thumb.style.visibility = 'hidden';
    }
	

function multiClass(eltId) 
	{
	arrLinkId = new Array('_1','_2','_3');
	intNbLinkElt = new Number(arrLinkId.length);
	//arrClassLink = new Array('current','ghost');
	strContent = new String()
	for (i=0; i<intNbLinkElt; i++) 
	{
		strContent = "menu"+arrLinkId[i];
		if ( arrLinkId[i] == eltId ) 
		{
			if(document.getElementById(arrLinkId[i]).className == 'ghost')
			{
				document.getElementById(arrLinkId[i]).className = 'current';
				document.getElementById(strContent).className = 'on content';
				document.getElementById('haut_menus').style.dislay = 'block';
				document.getElementById('fond_menus').style.dislay = 'block';
				document.getElementById('bas_menus').style.dislay = 'block';
			}
			else
			{
				document.getElementById(arrLinkId[i]).className = 'ghost';
				document.getElementById(strContent).className = 'off content';
				document.getElementById('haut_menus').style.dislay = 'none';
				document.getElementById('fond_menus').style.dislay = 'none';
				document.getElementById('bas_menus').style.dislay = 'none';
			}
		}
		else if ( document.getElementById(arrLinkId[i]).className == 'current' || document.getElementById(strContent).className == 'on content') 
		{
			document.getElementById(arrLinkId[i]).className = 'ghost';
			document.getElementById(strContent).className = 'off content';
		}
	}	
}

 // _______________________
 // PALETTE DE COULEUR
 // _______________________
 
 function ouvrir_palette()
{
	//ma_palette = window.open("palette.html","Palette_de_couleur","height=380,width=400,status=0, scrollbars=0,,menubar=0");
	mapalette = PopupCentrer('palette.html', 270, 260, 'status=no, directories=no, toolbar=no, location=no, menubar=no, scrollbars=no, resizable=no');
	if(mapalette == false)
		insertTag('[span style=color:#CodeCouleur;]', '[/span]', 'textarea');
}
 
function valid_couleur(couleur) //fonction appelée lorsqu'on valide la palette. On récupère la couleur.
{
	insertTag('[span style=color:'+ couleur +';]', '[/span]', 'textarea');
	//document.forms[formulaire].elements[champ].value=couleur;
}



function go(id)
{
if(document.getElementById(id).style.display == 'block')
{document.getElementById(id).style.display = 'none';}
else
{document.getElementById(id).style.display = 'block';}
}

function go2(id) {

	if(document.getElementById(id).style.display == 'block') {
		document.getElementById(id).style.display = 'none';
	}
	else {
		document.getElementById(id).style.display = 'block';
		document.getElementById(id).style.background = 'none';
	}
	
}

function size(id)
{
if(document.getElementById(id).style.height == '90%' && document.getElementById(id).style.width == '90%')
{document.getElementById(id).style.height = '70%';
document.getElementById(id).style.width = '50%';
document.getElementById(id).style.left = '25%';
document.getElementById(id).style.top = '8%';
document.getElementById('haut_' + id).style.width = '48%';}
else
{document.getElementById(id).style.height = '90%';
document.getElementById(id).style.width = '90%';
document.getElementById(id).style.left = '5%';
document.getElementById(id).style.top = '5%';
document.getElementById('haut_' + id).style.width = '88%';}
}


	function DivStatus( nom )
		{
			var divID = nom;
			if ( document.getElementById && document.getElementById( divID ) ) // Pour les navigateurs récents
				{
					Pdiv = document.getElementById( divID );
					PcH = true;
		 		}
			else if ( document.all && document.all[ divID ] ) // Pour les veilles versions
				{
					Pdiv = document.all[ divID ];
					PcH = true;
				}
			else if ( document.layers && document.layers[ divID ] ) // Pour les très veilles versions
				{
					Pdiv = document.layers[ divID ];
					PcH = true;
				}
			else
				{
					
					PcH = false;
				}
				
			if ( PcH )
				{
					Pdiv.className = ( Pdiv.className == 'cachediv' ) ? '' : 'cachediv';
				}
		}
