//document.onmouseover = function ( e )
//{   
//  if ( !e ) e = window.event;   
//  var el = e.target ? e.target : e.srcElement;   
//  while ( el != null && el.tagName != "A" ) el = el.parentNode;   
//  if ( el == null ) return;   
//  if ( e.preventDefault ) e.preventDefault();   
//  else e.returnValue = true;
//};

var objNavigationArray = new Array
var objLanguageArray = new Array
var objCoordTitleArray = new Array
var objCoordValueArray = new Array
var objCreatorValueArray = new Array

objNavigationArray[0] = new Array('Qui sommes-nous',
	                              'Société',
								  'Services',
								  'Label GRTA',
								  'Produits-Commandes',
								  'Légumes',
	                              'Fruits',
								  'Produits minis',
								  'Produits exotiques',
								  'Produits secs',
	                              'Produits préparés',
								  'Produits précuits',
								  'Salades',
								  'Salades préparées',
								  'Petites herbes',
								  'Champignons',
								  'Commandes',
								  'Contactez-nous',
								  'Adresse',
								  'E-mail',
									'Glaces');

objLanguageArray[0] = new Array('&nbsp;&nbsp;&nbsp;&nbsp;Bienvenue sur le site de<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Salagastronomie SA',
                                '', 
	                            'Accueil',
								'',
								'Salagastronomie');

objCoordTitleArray[0] = new Array('Raison sociale',
                                  'Direction',
								  'Adresse',
								  'Téléphone',
								  'Téléfax',
								  'E-mail',
								  'Adresse internet');
						
objCoordValueArray[0] = new Array('Salagastronomie des Grands-Champs SA',
	                              'Daniel Charles et Christophe Charles',
							      '62, chemin de la Galaise',
								  'CH-1232 Confignon (Genève)',
							      '++41 22 794 20 53',
							      '++41 22 794 60 43',
							      'contact@salagastronomie.com',
							      'www.salagastronomie.com');

objCreatorValueArray[0] = new Array('MDPG Associates',
	                                'pgraezer@bluewin.ch');

function setTitle(p_valueIndex1,p_valueIndex2)
{
  if (p_valueIndex2 == null)
  {
    strValue = objNavigationArray[0] [p_valueIndex1];
  }
  else
  {
    strValue = objNavigationArray[0] [p_valueIndex1] + ' &raquo ' + objNavigationArray[0] [p_valueIndex2];
  }
  document.title = strValue;
}

function getTitle(p_valueIndex)
{
  return objNavigationArray[0] [p_valueIndex];
}
							  							 							  
function getCoordTitle(p_valueIndex)
{
  return objCoordTitleArray[0] [p_valueIndex];
}

function getCoordValue(p_valueIndex)
{
  return objCoordValueArray[0] [p_valueIndex];
}

function getNavigation(p_valueIndex)
{
  return objNavigationArray[0] [p_valueIndex];
}

function getWelcome(p_value)
{
  strWelcome = '<FONT class=welcome><b>' + objLanguageArray[0] [p_value]  + '</b></FONT>';
  
  return strWelcome;
}

function clearHeader()
{
  strHeader = '';

  parent.frames.titleFrame.document.titleForm.hidHeader.value = strHeader;
  parent.frames.headerFrame.document.location.href = 'header.htm';
}

function getHeader(p_value)
{
  //strHeader = '<SPAN class=headerSpan><B>' + objLanguageArray[0] [4] + ' &raquo ' + p_value + '</B></font></SPAN>    //&nbsp;&nbsp;&nbsp;&nbsp;' + getPrinter();
  strHeader = '<SPAN class=headerSpan><B>' + objLanguageArray[0] [4] + ' &raquo ' + p_value + '</B></font></SPAN>&nbsp;&nbsp;&nbsp;&nbsp;'
  
  parent.frames.titleFrame.document.titleForm.hidHeader.value = strHeader;
  parent.frames.headerFrame.document.location.href = 'header.htm';
}

function getPrinter()
{
  strPrinter = '<A href=#><img src=../images/printer.gif width=20 height=20 border=0 align=absmiddle onClick=printSelection(); title=\"imprimer le document\"></A>';
  
  return strPrinter;
  
}

function getFooter()
{
  //strFooter = '<table border=0 align=center width=575>' +
  //            '  <tr>' +
  //            '    <td align=center>' +
  //		    '      <FONT face=sans-serif style=font-size:10px><A href=../html/main.htm target=mainFrame>' + objLanguageArray[0] [2]  + '</A>  |  Copyright © 2004 ' + objCoordValueArray[0] [0] + '  |  Webmaster <FONT class=creatorLinkBlack>' + getCreatorLink() + '</FONT>' +
  //			'  </tr>' +
  //            '</table>';
			  
strFooter = '<table border=0 align=center width=575>' +
              '  <tr>' +
              '    <td align=center>' +
			  '      <FONT face=sans-serif style=font-size:10px><A href=../html/main.htm target=mainFrame>' + objLanguageArray[0] [2]  + '</A>  |  Copyright © 2004 ' + objCoordValueArray[0] [0] + '  |  <A href="print.htm" onClick="window.print();return false">Imprimer</a>' +
			  '  </tr>' +
              '</table>';  
  return strFooter;
}

function handleDiv()
{
  obj = parent.frames.mainFrame.document.getElementById('div' + parent.frames.titleFrame.document.titleForm.hidDiv.value);
  
  if(obj.scrollIntoView)
  { 
    obj.scrollIntoView(top);
  }
}

function getCreatorLink()
{
  strCreator = '<A href=mailto:' + objCreatorValueArray[0] [1] + '>' + objCreatorValueArray[0] [0] + '</A>';
  
  return strCreator;
  
}

function printSelection()
{
	parent.mainFrame.print();
  //window.parent.frames.mainFrame.focus();
  //window.print();
}
