function open_window( url ) { 
	mywin = window.open(url, 'win', 'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=0,resizable=0,width=446,height=362');
}

var G_idTimeout = null;
var G_oSubMenu = null;
var G_oEventSource = null;

function cancelEvent( ) {
	var oEvent = window.event;
	oEvent.cancelBubble = true;
	oEvent.returnValue = false;
}

function isMenuLinkSelected( oMenuLink ) {
	var className = oMenuLink.className;
	return ( className == "MenuLinkSelected" || className == "MenuRootLinkSelected" );
}

function hilightMenuLink( oLink ) {
	switch( oLink.className )
	{
	case "MenuLink":
		oLink.className = "MenuLinkSelected";
		break;
	case "MenuRootLink":
		oLink.className = "MenuRootLinkSelected";
		break;
	}
}

function getParentMenuLink( oLink ) {
	var oElement = oLink;
	var tagName = oElement.tagName;
	var className = oElement.className;
	while( tagName != "BODY" ) {
		if( tagName == "DIV" && ( className == "MenuLink" || className == "MenuRootLink" || className == "MenuLinkSelected" || className == "MenuRootLinkSelected" ) ) {
			return oElement;
		}
		oElement = oElement.parentElement;
		tagName = oElement.tagName;
		className = oElement.className;
	}
	return null;
}

function getParentMenu( oMenu ) {
	var oElement = oMenu.parentElement;
	var tagName = oElement.tagName;
	var className = oElement.className;
	while( tagName != "BODY" ) {
		if( ( tagName == "DIV" && ( className == "MenuVisible" || className == "MenuHidden" ) ) || ( oElement.id == "menuRoot" ) ) {
			return oElement;
		}
		oElement = oElement.parentElement;
		tagName = oElement.tagName;
	}
	return null;
}

function closeMenuChildren( oMenu, bDeselect ) {
	var oChildren = oMenu.children.tags("DIV");
	var nLength = oChildren.length;
	for( var i = 0; i < nLength; i++ ) {
		var oElement = oChildren[i];
		switch( oElement.className )
		{
		case "MenuVisible":
			oElement.className = "MenuHidden";
			closeMenuChildren( oElement, true );
			break;
		case "MenuLinkSelected":
			if( bDeselect ) {
				oElement.className = "MenuLink";
			}
			break;
		case "MenuRootLinkSelected":
			if( bDeselect ) {
				oElement.className = "MenuRootLink";
			}
			break;
		}
	}
	return null;
}

function closeParentChildren( oMenu, bDeselect ) {
	var oParent = getParentMenu( oMenu );
	if( oParent != null ) {
		closeMenuChildren( oParent, bDeselect );
	}
}

function deselectMenuChildren( oMenu, bClose ) {
	var oChildren = oMenu.children.tags("DIV");
	var nLength = oChildren.length;
	for( var i = 0; i < nLength; i++ ) {
		var oElement = oChildren[i];
		switch( oElement.className )
		{
		case "MenuVisible":
			if( bClose ) {
				oElement.className = "MenuHidden";
				deselectMenuChildren( oElement, true );
			}
			break;
		case "MenuLinkSelected":
			oElement.className = "MenuLink";
			break;
		case "MenuRootLinkSelected":
			oElement.className = "MenuRootLink";
			break;
		}
	}
	return null;
}

function deselectParentChildren( oMenu, bClose ) {
	var oParent = getParentMenu( oMenu );
	if( oParent != null ) {
		deselectMenuChildren( oParent, bClose );
	}
}

function getSubMenuTop( oMenu, nOffsetTop ) {
	var nPosY = window.event.clientY - window.event.offsetY;
	var nMenuHeight = oMenu.clientHeight;
	var nBodyHeight = document.body.clientHeight;
	if( nMenuHeight  > nBodyHeight ) {
		nOffsetTop -= nPosY;
	}
	else if( nPosY + nMenuHeight  > nBodyHeight ) {
		nOffsetTop += nBodyHeight - nPosY - nMenuHeight;
	}
	return nOffsetTop;
}

function openSubMenu( oMenu, nTop, nLeft, bDeselect ) {
	oMenu.style.top = nTop;
	oMenu.style.left = nLeft;
	closeParentChildren( oMenu, bDeselect );
	oMenu.className = "MenuVisible";
}

function cancelTimeout( ) {
	if( G_idTimeout != null ) {
		G_oEventSource = null;
		G_oSubMenu = null;
		window.clearTimeout( G_idTimeout );
		G_idTimeout = null;
	}
}

function onopenRootSubMenu( nTop, nLeft ) {
	openSubMenu( G_oSubMenu, nTop, nLeft, true );
	hilightMenuLink( G_oEventSource );
	cancelTimeout( );
}

function onopenSubMenu( nTop, nLeft ) {
	openSubMenu( G_oSubMenu, nTop, nLeft, false );
	cancelTimeout( );
}

function oncloseSubMenu( ) {
	closeParentChildren( G_oEventSource, false );
	cancelTimeout( );
}

function startRootSubMenuOpen( oEventSource, oSubMenu ) {
	G_oEventSource = oEventSource;
	G_oSubMenu = oSubMenu;
	G_idTimeout = window.setTimeout( 'onopenRootSubMenu( ' + getSubMenuTop( G_oSubMenu, oEventSource.offsetTop ) + ', ' + oEventSource.offsetWidth + ' );', 150 );
}

function startSubMenuOpen( oEventSource, oSubMenu ) {
	G_oEventSource = oEventSource;
	G_oSubMenu = oSubMenu;
	G_idTimeout = window.setTimeout( 'onopenSubMenu( ' + getSubMenuTop( G_oSubMenu, oEventSource.offsetTop ) + ', ' + oEventSource.offsetWidth + ' );', 350 );
}

function startSubMenuClose( oEventSource ) {
	G_oEventSource = oEventSource;
	G_oSubMenu = null;
	G_idTimeout = window.setTimeout( 'oncloseSubMenu( );', 350 );
}

function onclickBody( ) {
	if( window.event.srcElement.tagName != "A" ) {
		cancelTimeout( );
		closeMenuChildren( menuRoot, true );
	}
}

function onclickMenu( oMenu ) {
	if( window.event.srcElement.tagName != 'A' ) {
		cancelEvent( );
	}
}

function onclickMenuRootLink( oMenu, itemURL ) {
	cancelTimeout( );
	var src = getParentMenuLink( window.event.srcElement );
	deselectParentChildren( src, false );
	hilightMenuLink( src );
	window.location.href = itemURL;
	cancelEvent( );
}

function onmouseoverMenuRootLink( oMenu ) {
	cancelTimeout( );
	if( oMenu.className == "MenuHidden" ) {
		var src = getParentMenuLink( window.event.srcElement );
		startRootSubMenuOpen( src, oMenu );
	}
	cancelEvent( );
}

function onclickMenuLink( oMenu ) {
	cancelTimeout( );
	var src = getParentMenuLink( window.event.srcElement );
	var bSelected = isMenuLinkSelected( src );
	if( oMenu.className == "MenuHidden" ) {
		if( bSelected ) {
			openSubMenu( oMenu, getSubMenuTop( oMenu, src.offsetTop ), src.offsetWidth, false );
		}
		else {
			openSubMenu( oMenu, getSubMenuTop( oMenu, src.offsetTop ), src.offsetWidth, true );
			hilightMenuLink( src );
		}
	}
	cancelEvent( );
}

function onmouseoverMenuLink( oMenu ) {
	cancelTimeout( );
	var src = getParentMenuLink( window.event.srcElement );
	deselectParentChildren( src, false );
	hilightMenuLink( src );
	if( oMenu.className == "MenuHidden" ) {
		startSubMenuOpen( src, oMenu );
	}
	cancelEvent( );
}

function onclickMenuItemLink( ) {
	cancelTimeout( );
	var src = window.event.srcElement;
	var className = src.className;
	if( src.tagName == "DIV" && ( className == "MenuLinkSelected" || className == "MenuRootLinkSelected" ) ) {
		var oChildren = src.children.tags("A");
		var nLength = oChildren.length;
		for( var i = 0; i < nLength; i++ ) {
			window.location.href = oChildren(i).href;
			cancelEvent( );
		}
	}
}

function onmouseoverMenuItemLink( ) {
	var src = getParentMenuLink( window.event.srcElement );
	if( src != null ) {
		cancelTimeout( );
		deselectParentChildren( src, false );
		hilightMenuLink( src );
		startSubMenuClose( src );
	}
	cancelEvent( );
}

var G_oDoc = window.document;
function o( out )
{
	G_oDoc.write(out);
}
function beginNav( ) {
	if( screen.width > 640 )
	{
		o( '<div style="position:absolute; left:' + String( screen.width - 375 ) + '; z-index:3; width:200;"></div>');
	}
	o( "<div style=\"position:absolute; left:" + String( screen.width - 180 ) + "; z-index:3;\">");
}
function oMRB( ) {
	o('<div id="menuRoot" class="MenuRoot" style="top: 95">');
}
function oMRE( ) {
	o('</div>');
}
function oMRL( menuID, menuName, itemURL ) {
	if( itemURL.charAt(0) == '/' ) {
		itemURL = u + itemURL;
	}
	o('<div class="MenuRootLink" onmouseover="onmouseoverMenuRootLink(' + menuID + ');" onclick="onclickMenuRootLink(' + menuID + ', \'' + itemURL + '\' );">' + menuName + '</div>');
}
function oML( menuID, menuName ) {
	o('<div class="MenuLink" onmouseover="onmouseoverMenuLink(' + menuID + ');" onclick="onclickMenuLink(' + menuID + ');">' + menuName + '</div>');
}
function oMIL( itemURL, itemName ) {
	if( itemURL.charAt(0) == '/' ) {
		itemURL = u + itemURL;
	}
	o('<div class="MenuLink" onmouseover="onmouseoverMenuItemLink( );" onclick="onclickMenuItemLink( );"><a href="' + itemURL + '">' + itemName + '</a></div>');
}
function oMB( menuID ) {
	o('<div id="' + menuID + '" class="MenuHidden" onclick="onclickMenu( ' + menuID + ' );">');
}
function oME( ) {
	o('</div>');
}
function printMenubar( )
{
	oMRB( );
		oMRL('menukine', 'Kinésithérapie', 'kine_definition.htm');
		oMRL('menuprofession', 'Professionnels','kine_juri.htm');
		oMRL('menuetudiants', 'Etudiants', 'kine_devenir.htm');
		oMRL('menuparticul', 'Particuliers', 'particul/apport/apport1.htm');
	oMRL('menubdd', 'B.de données', 'kine_bdd.htm');
		oMRL('menuutile', 'Utile', 'utile.htm');
		oMRL('menuannuaire', 'Annuaire', 'recherche.php');
		oMRL('menudial', 'Dialoguer', '1.htm');
	
		
		
		oMB('menukine');
			oMIL('kine_definition.htm', 'Définition');
			oMIL('kine_domaine.htm', 'Domaines');
			oMIL('kine_specialisation.htm', 'Spécialisation');
			oMIL('kine_mode.htm', 'Modes d exercice');
			oMIL('kine_techniq.htm', 'Techniques');
	               	oMIL('kine_actu.htm', 'Actualités');
 			oMIL('kine_bdk.htm', 'Bilan Diagnostique');
		oME( );
		oMB('menuprofession');
			oMIL('kine_juri.htm', 'Juridique profession');
			oMIL('fiscal/kine_gestion.htm','Juridique Gestion');
			oMIL('kine_instal.htm', 'Installation');
			oMIL('fiscal/fiscal.htm', 'Fiscalité');
			oMIL('kine_form_cont.htm', 'Formation');
			oMIL('diversification/kine_diversification.htm', 'Diversification');
			oMIL('kine_cond_exerc.htm', 'Conditions Exercice');
			oMIL('kine_repres.htm', 'Organismes');
			oMIL('install2.htm', 'Démographie');
		oME( );
		oMB('menuetudiants');
			oMIL('kine_devenir.htm', 'Devenir Kine');
			oMIL('kine_etudes.htm', 'Les etudes');
			oMIL('kine_ecoles.htm', 'Les Ecoles');
			oMIL('kine_repres.htm', 'Organismes');
		oME( );
			oMB('menuparticul');
				oMIL('particul/sommaire.htm', 'Sommaire');
				oMIL('massage/massage.htm', 'Le Massage');
				oMIL('particul/sommaire.htm', 'Techniques');
				oMIL('esthet/esthet01.htm', 'Esthétique');
				oMIL('particul/thalasso.htm', 'Thalassothérapie');
				oMIL('particul/cures_ther.htm', 'Cures Thermales');
				
			oME( );
			oMB('menubdd');
				oMIL('bdd_juri/sommaire.htm', 'Juridique');
				oMIL('../annu/index.php3', 'Associations Professionnelles');
				oMIL('../annu/index.php3', 'Associations de malades');
				oMIL('../annu/index.php3', 'Sites et Liens');
					oME( );


			oMB('menuutile');
				oMIL('kine_annonce.htm', 'Petites Annonces');
				oMIL('dico/dicofren.php3', 'Equivalences termes anatomiques');
				oMIL('kine_video.htm', 'Video Formation');
				oMIL('sitemap.htm', 'Plan du Site');
				oMIL('../forum/index.php3', 'Forum');
				oMIL('recherche/moteured.php3', 'Recherche par mot-clé');
							oME( );
			oMB('menuannuaire');
				oMIL('recherche.php', 'Recherche Kiné');
				oMIL('consultpart.php', 'Recherche Partenaire');
				oMIL('inscripkine.php', 'Inscription Kiné');
				oMIL('inscrippart.php', 'Inscription Partenaire');
				
								
					oME( );
					
					
		oMB('menudial');
			oMIL('kine_forum.htm', 'Forum');
			
			oML('menudial2','Posez vos Questions sur:');
			oMB('menudial2');
				oMIL('quest_rep/ques_rep1.htm', 'Divers');
				oMIL('quest_rep/ques_rep_sport.htm', 'Le Sport');
				oMIL('quest_rep/ques_rep_sante.htm', 'La Santé');
				oMIL('quest_rep/ques_rep_bien.htm', 'Le Bien Etre');
						
		oME( );
			
									
					
					
	oMRE( );
			
	
		
}
