function getElement(id) 
        { 
		return document.getElementById ? document.getElementById(id) : document.all ? document.all(id) : null; 
        } 

function getContenuFrame(nomFrame)
        { 
		if(document.frames)
			{
			return contenuFrame=document.frames[nomFrame];
			}
				
		var tmpFrame=getElement(nomFrame);
		
		if (tmpFrame.contentWindow) 
			{
			// For IE5.5 and IE6 For NS6
			return tmpFrame.contentWindow;
			}
		else
			{
			// For IE5
			return tmpFrame;
			}
        }
        
function getHauteurDocument (tmpFrame)
{
	return document.body && document.body.scrollHeight ? document.body.scrollHeight : document.height ? document.height : null; 
}


function redimmensionnerFrame(IDframe,tmpParent,hauteur)
	{
	tmpFrame=getElement(IDframe);
	
	contenu=getContenuFrame(IDframe);
	if (typeof tmpFrame != 'undefined') 
		{
		if(platformDetect()=="mac")
			{
			//mac
			if(typeof contenu.document != 'undefined')
				{
				//MAC : IE, NN7
				docHeight = contenu.document.body.offsetHeight
				}
			else
				{
				//MAC : NN 4.7
				docHeight = contenu.document.body.offsetHeight
				//docHeight=3000;
				}
			}
		else
			{
			//PC
			docHeight = contenu.document.body.scrollHeight;
			}
		tmpFrame.style.height = docHeight + 30 +'px' ;
		}
	}

function platformDetect()
	{
	if(navigator.appVersion.indexOf("Win") != -1)
		{
		return("windows");
		}
	else if(navigator.appVersion.indexOf("Mac") != -1)
		{
		return("mac");
		}
	else
		{
		return ("Other");
		}
	}

var IDtimer = null;
function initialiser()
	{
	if (frameRechercheAnnuaireChargee)
		{
		clearInterval(IDtimer);
		return true;
		}
	else
		{
		if (typeof IDtimer == 'undefined')
			{
			IDtimer=setInterval("initialiser()",5000);
			}
		else
			{
			// Ici on veut qu'il se recharge qu'une seule fois
			document.frames['rechercheAnnuaire'].location.reload();
			clearInterval(IDtimer);
			}
		return false;
		}
	}