/******************************************************************************
* navconfig.js                                                                 *
*                                                                             *
* Copyright 2000 by AMG.                                                      *
* Web address: http://www.art-work.de                                         *
* Last update: August 15, 2000.                                             *
*                                                                             *
* Contains the configuration-data for the Ronal navigation  *
*                                                                         *
******************************************************************************/
// Define NavBar

var Navigation = new NavBar(0);
var Menu;
var upDir = '';

//fileName = document.location.href;
//if (fileName.indexOf("cockpit") >= 0 || fileName.indexOf("thanks") >= 0) upDir = '';


//Accueil
newMenu = new NavBarMenu(100, 130);
newMenu.addItem(new NavBarMenuItem("Accueil", upDir+"../bienvenue.htm"));
Navigation.addMenu(newMenu);

//Présentation
newMenu = new NavBarMenu(110, 180);
newMenu.addItem(new NavBarMenuItem("Présentation", ""));
newMenu.addItem(new NavBarMenuItem("Historique", upDir+"presentation.htm#historique"));
newMenu.addItem(new NavBarMenuItem("Situation géographique", upDir+"presentation.htm#sitgeo"));
newMenu.addItem(new NavBarMenuItem("Activité", upDir+"presentation.htm#activite"));
Navigation.addMenu(newMenu);

//Salons
newMenu = new NavBarMenu(100, 150);
newMenu.addItem(new NavBarMenuItem("Salons", ""));
newMenu.addItem(new NavBarMenuItem("Dates à retenir", upDir+"agenda.htm#date"));
newMenu.addItem(new NavBarMenuItem("Actualité", upDir+"agenda.htm#actualite"));
newMenu.addItem(new NavBarMenuItem("Réseau revendeurs", upDir+"agenda.htm#revendeurs"));
Navigation.addMenu(newMenu);

//Produits
newMenu = new NavBarMenu(100, 110);
newMenu.addItem(new NavBarMenuItem("Produits", ""));
newMenu.addItem(new NavBarMenuItem("Pur", upDir+"prodPur.htm"));
newMenu.addItem(new NavBarMenuItem("Open", upDir+"prodOpen.htm"));
newMenu.addItem(new NavBarMenuItem("Style", upDir+"prodStyle.htm"));
newMenu.addItem(new NavBarMenuItem("Sanidoor", upDir+"prodSanidoor.htm"));
newMenu.addItem(new NavBarMenuItem("Rondoor", upDir+"prodRondoor.htm"));
newMenu.addItem(new NavBarMenuItem("Olympia", upDir+"prodOlympia.htm"));
newMenu.addItem(new NavBarMenuItem("City", upDir+"prodCity.htm"));
newMenu.addItem(new NavBarMenuItem("Elegance", upDir+"prodElegance.htm"));
newMenu.addItem(new NavBarMenuItem("Favorit", upDir+"prodFavorit.htm"));
newMenu.addItem(new NavBarMenuItem("Falter/Antalya", upDir+"prodFalter.htm"));
newMenu.addItem(new NavBarMenuItem("Swing", upDir+"prodSwing.htm"));
Navigation.addMenu(newMenu);

//Contacts
newMenu = new NavBarMenu(110, 120);
newMenu.addItem(new NavBarMenuItem("Contacts", ""));
newMenu.addItem(new NavBarMenuItem("Commerciaux", upDir+"contacts.htm#email"));
newMenu.addItem(new NavBarMenuItem("Renseignements", upDir+"contacts.htm#formulaire"));
Navigation.addMenu(newMenu);


function navBarInit()
{
netscFraming();
if (framesOK)
	{
	Navigation.create();
	img = getImage("NaviLocator");
	NaviPosX = getImagePageLeft(img) + 100;
	NaviPosY = getImagePageTop(img) + 6;
	Navigation.moveTo(NaviPosX, NaviPosY);
	setNaviPosition(NaviPosX,NaviPosY);
	}
}

function setNaviPosition(x,y)
{
var viewTop, viewBottom;
var dy;

viewTop = getPageScrollY();
viewBottom = viewTop + getWindowHeight();
if (Navigation.bottom < viewTop || Navigation.bottom < 150)
    Navigation.moveTo(x, viewTop - Navigation.height);
if (Navigation.top > viewBottom)
    Navigation.moveTo(x, viewBottom);

dy = Math.round(Math.abs(viewTop - Navigation.y) / 2);
if (viewTop < Navigation.y)
    dy = -dy;

if (viewTop > 150)
	{
	Navigation.moveBy(0, dy);
	}
else
	{
	Navigation.moveTo(x, y);
	}
setTimeout('setNaviPosition(NaviPosX,NaviPosY)', 25);
}

// Framing Extension

function is_msie() 
{
	return (navigator.appName == "Microsoft Internet Explorer");
}

function Framing()
{ 
	/*if (this.document == top.document || top.location.host != this.location.host)
	{
		dummy = location.pathname;
		while (dummy.indexOf('/') >= 0)
			{
			//dummy_save = dummy;
			dummy = dummy.substring(0,dummy.lastIndexOf('/'));
			dummy_save = dummy;
			}
		
		var pathprefix = location.protocol + '//' + location.host + dummy_save + '/';
		var doctitle = "Willkommen bei Ronal";
		var bgFrameFile = "framebg.htm";
		var bgFrameName = "Links";
		var contentFrameName = "Basis";
		var cols = (isMinNS4) ? 94 : 94;
		
		document.clear();
		document.open("text/html");
		document.writeln('<html>\n<head><title>' +doctitle+ '</title></head>');
		document.writeln('<frameset framespacing="0" border="false" frameborder="0" cols="'+cols+',*">'+
		'<frame src="'+pathprefix+bgFrameFile+'" name="'+bgFrameName+'" scrolling="no" marginwidth="0" marginheight="0">'+
		'<frame src="'+top.location.href+'" name="'+contentFrameName+'" scrolling="auto" target="_self" marginwidth="20" marginheight="16">'+
		'</frameset></html>');
		document.close();
		framesOK = false;
		return true;
	}
	else
	{
		framesOK = true; 
		return false;
	}*/
	framesOK=true;
}

function msieFraming()
{
	if (is_msie())
	{
		if (Framing())
		{
			window.setTimeout('top.Basis.location.href = '+'"'+top.location.href+'";',10);
		}
	}
}

function netscFraming()
{
	if (!is_msie()) Framing();
}

msieFraming();
