var nmbTextLayers = 15;
var i,old_txt_id='texte0';
var xml_on_off = 1; /* 0: SML page not in viwing area, 1: xml page in viewing area */


/**************************************************************************************************
*** Function: show_txt(id)									***
*** Ant:  Element 'id' exists.  								***
*** 	  The 'visibility property value of the element 'id' is 'visible'			***
***  	  The content of the element may be visible in a display area.				***
*** Cons: The 'visibility' property of the previously display element is set to 'hidden'        ***
***	  The 'visibility' property of the element 'id' is set to 'visible'       		***
*** 	  The content in the display area is hidden and replaced by the contents of element 'id'***
***	  The id of the new element is memorized for futur use.                                 ***
*** Uses: hide(id)										***
*** Var: 											***
***	id: Id of element required to have it's 'visibility' property set to visible		***
***	old_txt_id: Initialy set to "texte0" when page page loads.					***
***		Set to the id of the new element displayed                                    	***
***											        ***
**************************************************************************************************/
function show_txt(id) {
if (document.layers) { return; }
	hide(old_txt_id);
	document.getElementById(id).style.visibility = 'visible';
	old_txt_id=id
}
/****************************************************************************************************
*** Function: hideAllFrom(textNo1, to_textNo2)							  ***
*** Ant:  Elements 'textNo1'..'to_textNo2' exist.						  ***
***	  The 'visibility property value of elements 'textNo1'..'to_textNo2' may be 'visible'	  ***
***	  The contents of elements 'textNo1'..'to_textNo2' may be vsisble in some display area	  ***
*** Cons: The 'visibility' property of each element, 'textNo1'..'to_textNo2', is set to 'hidden'  ***
***	  The contents of the elements, 'textNo1'..'to_textNo2', are hidden			  ***	  
*** Uses: hide(id)										  ***
*** Var: 											  ***
***	textNo1: Id of first element in list of elements to set 'visibility' property to hidden   ***
***	to_textNo2: Id of last element in list of elements to set 'visibility' property to hidden ***
***											          ***
*** Ex: hideAllFrom(1,14); will hide all from texte1 to texte14					  ***
*****************************************************************************************************/
function hideAllFrom(textNo1, to_textNo2) {
	i = textNo1;
	while (i <= to_textNo2  && i < nmbTextLayers)
	{
	
		id = 'texte'+i;
		i++;
		hide(id);
	}

} 

/**************************************************************************************************
*** Function: hide(id)										***
*** Ant:  Element 'id' exists.									***
***	  The 'visibility property value of the element 'id' is 'visible'				***
***  	  The content of the element may be visible in a display area.				***
*** Cons: The 'visibility' property of the element 'id' is set to 'hidden'   		        ***
*** 	  The content in the display area is hidden						***
*** Uses:											***
*** Var: 											***
***	id: Id of element required to have it's 'visibility' property set to hidden		***
***											        ***
**************************************************************************************************/
function hide(id) {
if (document.layers) { return; }
	document.getElementById(id).style.visibility = 'hidden';
}

/**************************************************************************************************
*** Function: hide_txt_pub()									***
*** Ant:  Variables 'old_txt_id' and 'old_id_pub' contain exsiting element ids.			***
***	  The 'visibility property value of each element is 'visible'				***
***  	  The content of the elements may be visible in a display area.				***
*** Cons: The 'visibility' properties of the elements are set to 'hidden'  		        ***
*** 	  The contents in the display areas are hidden						***
*** Uses:											***
*** Var: 											***
***	old_txt_id, old_id_pub: Element ids required to have their 'visibility' set to hidden	***
***											        ***
**************************************************************************************************/
function hide_active_pub() {
if (document.layers) { return; }
	document.getElementById(old_id_pub).style.visibility = 'hidden';
}


/**************************************************************************************************
*** Function: changeCls(elmntId,class_name)							***
*** Ant:  The element 'elmntId' exists.								***
***  	  The class 'class_name' exists.							***
*** Cons: 'className' property value of element 'elmntId' is set to the value of 'class_name'   ***
*** Uses: hide(id)										***
*** Var: 											***
***	elmntId: Id of element required to have it's 'className' property changed		***
***	class_name: Value of 'className' property to set for element 'elmlntId'                 ***
***											        ***
**************************************************************************************************/
function changeCls(elmntId,class_name) {
//if (document.all)
document.getElementById(elmntId).className = class_name;
}

/**************************************************************************************************
*** Function: changeBg(elmntId,urlImage)							***
*** Ant:  The element 'elmntId' exists.								***
***  	  The images 'urlImage' exists where specified.						***
*** Cons: 'backgroundImage' property value of element 'elmntId' style is set to the value       ***
***        of 'urlImage'   									***
*** Uses: hide(id)										***
*** Var: 											***
***	elmntId: Id of element required to have it's 'className' property changed		***
***	urlImage: Value of 'backgroundImage property to set for element 'elmlntId' style        ***
***		  It must be of the form: 'url(imageName)'				        ***
***											        ***
**************************************************************************************************/

/**************************************************************************************************
*** Pop-up Blocker						***
**************************************************************************************************/


// Gallery script.
// With image cross fade effect for those browsers that support it.
// Script copyright (C) 2004 www.cryer.co.uk.
// Script is free to use provided this copyright header is included.
function LoadGallery(pictureName,imageFile,titleCaption,captionText)
{
  if (document.all)
  {
    document.getElementById(pictureName).style.filter="blendTrans(duration=1)";
    document.getElementById(pictureName).filters.blendTrans.Apply();
  }
  document.getElementById(pictureName).src = imageFile;
  if (document.all)
  {
    document.getElementById(pictureName).filters.blendTrans.Play();
  }
}
/*
pictureName 
The name of the image place-holder. See "An image placeholder" above. 
imageFile 
The name of the image file to be displayed. 
titleCaption 
The text placeholder to update with the new caption. See "A text placeholder" above. 
captionText 
The new text to display for the caption. */
