
// variables
var vPageWidth          = 1000;
var vPageFrameColor     = "#e0e0e0";
var vPageBackColor      = "#ffffff";

var vSlideWidth         = vPageWidth - 20;
var vSlideTitleColor    = "#f8f8f8";
var vSlideFrameColor    = "#c0c0c0";
var vSlideBackColor     = "#ffffff";
var vBackSlideColor     = "#e0e0e0";


// définition des slideshows
var tSlideShowTitle         = new Array();
var tSlideShowFilename      = new Array();
var tSlideShowNSlides       = new Array();
var tSlideShowPDF           = new Array();
var tSlideShowDownload      = new Array();

// slideshow 0 : Mountains Platform
tSlideShowTitle[0]          = "Mountains Platform";
tSlideShowFilename[0]       = "platform";
tSlideShowNSlides[0]        = 9;
tSlideShowPDF[0]            = "../pdf/platform.pdf";
tSlideShowDownload[0]       = sPlatformDownload;
/*
// slideshow 1 : Mountains for profilometers
tSlideShowTitle[1]          = "Mountains&reg; for Profilometers";
tSlideShowFilename[1]       = "profilo";
tSlideShowNSlides[1]        = 7;
tSlideShowPDF[1]            = "../pdf/profilo.pdf";
tSlideShowDownload[1]       = sProfiloDownload;

// slideshow 2 : Mountains for microscopes
tSlideShowTitle[2]          = "Mountains&reg; for Confocal Microscopes & OIM";
tSlideShowFilename[2]       = "microscopes";
tSlideShowNSlides[2]        = 5;
tSlideShowPDF[2]            = "../pdf/microscopes.pdf";
tSlideShowDownload[2]       = sMicroscopesDownload;

// slideshow 3 : Mountains for SPM
tSlideShowTitle[3]          = "Mountains&reg; for Scanning Probe Microscopes (SPM)";
tSlideShowFilename[3]       = "spm";
tSlideShowNSlides[3]        = 5;
tSlideShowPDF[3]            = "../pdf/spm.pdf";
tSlideShowDownload[3]       = sSpmDownload;
*/




// définition des menus
function MenuBar()
    {
    DeclareMenu();

    DeclareMenuitem("index.html", "<b>" + mHome + "</b>");
    	
	DeclarePopup("", "<b>" + mCompany + "</b>");
      	DeclareMenuitem("dsvisite.html", miAboutDS);
      	DeclareMenuitem("dsvisitefr.html", miAboutDSfr);
      	DeclareMenuitem("contact.html", miContact);
      	DeclareMenuitem("directions.html", miDirections);
      	//DeclareMenuitem("fcomte.html", miFrancheComte);
      	DeclareMenuitem("directionsulis.html", miDirections2);
      	//DeclareMenuitem("directionstokyo.html", miDirections3);
      	DeclareMenuitem("jobs.html", miJobs);
      	DeclareMenuitem("legal.html", miLegalNotice);
    	FinPopup();  
    	
	DeclarePopup("", "<b>" + mMntPlatform + "</b>");
        DeclareMenuitem("platform0.html", sPlatform[0]);
	    for (i = 1; i < nPlatformPages; i++)
          	DeclareMenuitem("platform" + i + ".html", "&nbsp;&nbsp;&nbsp;&nbsp;" + sPlatform[i]);
      	DeclareMenuitem("fileformats.html", miFileFormats);
      	DeclareMenuitem("oem.html", miMntOem);
      	DeclareMenuitem("endusers.html", miMntEndUsers);
      	DeclareMenuitem("freetrial.html", miMntFreeTrial);
    	FinPopup();  
      	
	DeclarePopup("", "<b>" + mProducts + "</b>");
      	DeclareMenuitem("mntselector.html", miSelector);
      	DeclareMenuitem("mntpremium.html", miMntPremium);
      	DeclareMenuitem("mntuniversal.html", miMntUniversal);
      	DeclareMenuitem("mntscantopo.html", miMntScanTopo);
      	DeclareMenuitem("mntimagingtopo.html", miMntImagTopo);
      	DeclareMenuitem("mntprofile.html", miMntProfile);
      	DeclareMenuitem("mntra.html", miMntRa);
      	DeclareMenuitem("mntformvision.html", miMnt3DForm);
      	//DeclareMenuitem("mntimage.html", miMntImage);
      	DeclareMenuitem("mntspm.html", miMntSpm);
      	//DeclareMenuitem("upgrade.html", miUpgradePath);
    	FinPopup();  

	DeclarePopup("", "<b>" + mInfoCenter + "</b>");
      	DeclareMenuitem("press.html", miPressRel);
      	DeclareMenuitem("whatsnew.html", miMntWhatsNew);
      	DeclareMenuitem("events.html", miEvents);
      	DeclareMenuitem("newsletters.html", miNewsletters);
      	DeclareMenuitem("guide.html", miSurfaceGuide);
      	DeclareMenuitem("app1.html", miApplications);
    	FinPopup();  

	DeclarePopup("", "<b>" + mSupport + "</b>");
      	DeclareMenuitem("support.html", miSupport);
      	DeclareMenuitem("downloads.html", miDownloads);
      	DeclareMenuitem("upgrades.html", miUpgrades);
      	DeclareMenuitem("faq.html", miFAQ);
      	DeclareMenuitem("specs.html", miSpecs);
    	FinPopup();  

    DeclareMenuitem("dsvisitefr.html", "<img src='../img/fr.gif' border='0'>");
    	
    }
    
    
    


// en-tête des pages
function TopTitle(bIndex)
	{
	StartPage(0, "");
	document.write("<table width='100%' bgcolor='white' cellpadding='0' cellspacing='0'><tr>");
    document.write("<td><a href='index.html'><img src='../img/logods.jpg' border='0'></a><img src='../img/makalubandeau.png' border='0'></td>");
    // bandeau d'animation flash
    document.write("<td align='right'>");
      
    /* 
    document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='680' height='80' id='banner1' align='middle'>");
    document.write("<param name='allowScriptAccess' value='sameDomain' />");
    document.write("<param name='movie' value='banner1.swf' />");
    document.write("<param name='quality' value='high' />");
    document.write("<param name='wmode' value='opaque' />");
    document.write("<param name='loop' value='true' />");
    document.write("<param name='bgcolor' value='#ffffff' />");
    document.write("<embed src='banner1.swf' quality='high' loop='true' wmode='opaque' bgcolor='#ffffff' width='680' height='80' name='banner1' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
    document.write("</object>");
    */
    
    document.write("</td></tr></table>");
    EndPage();
    StartPage(0, "");
    // barre de menu en dessous
    MenuBar();
    EndPage();
	}	


	


// début du corps de page
function StartPage(nCellPadding, nColor)
	{
	if (nColor == "") 
	    nColor = vPageBackColor;
    document.write("<table align='center' width='" + vPageWidth + "' cellpadding='1' cellspacing='0' bgcolor='" + vPageFrameColor + "'>");
    document.write("<tr><td>");
    document.write("<table align='center' width='100%' cellspacing='0' cellpadding='" + nCellPadding + "'>");
    document.write("<tr>");
    document.write("<td bgcolor='" + nColor + "' valign='top'>");
	}
	
// fin du corps de page
function EndPage()
	{
    document.write("</td></tr></table>");
    document.write("</td></tr></table>");
	}
	
// copyright de bas de page
function BottomMsg()
    {
    StartPage(5, "#f8f8f8");
    document.write("<div class='smallcentered'>" + sBottomMsg + "</div>");
    EndPage();
    }



// début du corps de slide
function StartSlide(iSlideShow, nCurrentSlide)
	{	
	var tmpColor = vPageBackColor;
	vPageBackColor = vBackSlideColor;
	StartPage(10, "");
    document.write("<table align='center' width='100%' cellpadding='1' cellspacing='0' bgcolor='" + vSlideFrameColor + "'>");
    document.write("<tr><td>");
    document.write("<table width='100%' cellspacing='0' cellpadding='0'><tr><td>");
    
    document.write("<table width='100%' cellpadding='0' cellspacing='0'><tr>");
        document.write("<td width='70' bgcolor='" + vSlideTitleColor + "' valign='top'></td>");
        // titre    
        document.write("<td bgcolor='" + vSlideTitleColor + "' valign='top'>");
        document.write("<div class='title'>" + tSlideShowTitle[iSlideShow] + "</div>");
        document.write("</td>");
        // flèches
        document.write("<td width='70' align='center' bgcolor='" + vSlideTitleColor + "'>");
        // back
        var n = nCurrentSlide;
        var sFilename2;
        if (n > 1)
            {
            n = n-1;
            sFilename2 = tSlideShowFilename[iSlideShow] + n + ".html";
            document.write("<a href='" + sFilename2 + "'><img src='../img/back.gif' border='0'></a>&nbsp;");
            }
        else
            document.write("<img src='../img/backgray.gif' border='0'>&nbsp;");
        // first
        var sFilename2 = tSlideShowFilename[iSlideShow] + "1.html";
        document.write("<a href='" + sFilename2 + "'><img src='../img/home.gif' border='0' alt='First'></a>&nbsp;");
        // next
        n = nCurrentSlide;
        if (n < tSlideShowNSlides[iSlideShow])
            {
            n = n+1;
            sFilename2 = tSlideShowFilename[iSlideShow] + n + ".html";
            document.write("<a href='" + sFilename2 + "'><img src='../img/next.gif' border='0'></a>&nbsp;");
            }    
        else
            document.write("<img src='../img/nextgray.gif' border='0'>&nbsp;");    
        document.write("</td>");    
    document.write("</tr></table>");
    
    document.write("</td></tr>");
    document.write("<tr><td height='1' bgcolor='" + vSlideFrameColor + "'></td></tr>");
    document.write("<tr><td bgcolor='" + vSlideBackColor + "' valign='top'>");
    
    document.write("<table width='100%' cellpadding='5'><tr><td valign='top'>");
    vPageBackColor = tmpColor;
	}
	
	
// fin du corps de slide
function EndSlide(iSlideShow, nCurrentSlide)
	{
    document.write("</td></tr></table>");
    
    document.write("</td></tr>");    
    // trait de séparation
    document.write("<tr><td height='1' bgcolor='" + vSlideFrameColor + "'></td></tr>");
    // cartouche de bas de page
    document.write("<tr><td bgcolor='" + vSlideTitleColor + "' valign='top'>");
    document.write("<table width='100%'><tr>");
    // lien sur le PDF
    document.write("<td align='left'>");
    document.write("&nbsp;<img src='../img/arrow.gif'>&nbsp;<a href='" + tSlideShowPDF[iSlideShow] + "'>" + tSlideShowDownload[iSlideShow] + "</a></td>");
    // numéros de pages de la présentation
    document.write("<td align='right'>");
    for (i = 1; i <= tSlideShowNSlides[iSlideShow]; i++)
        {
        if (i == nCurrentSlide)
          document.write("<span class='currentpagenumber'><b>" + i + "</b></span>&nbsp;");
        else
          {
          var sFilename2 = tSlideShowFilename[iSlideShow] + i + ".html";
          document.write("<span class='pagenumber'><a href='" + sFilename2 + "'>" + i + "</a></span>&nbsp;");
          }
        }
    document.write("</td></tr>");
    
    document.write("</td></tr>");
    document.write("</table>");
    document.write("</td></tr></table>");
    
    EndPage();
	}
		


function PlatformMenu(nPage)
    {
    document.write("<p class='menuright'>");
    document.write("<b>" + sPlatformTitle + "</b><br /><br />");
    for (i = 0; i < nPlatformPages; i++)
        {
        if (i == nPage)
            document.write("&nbsp;<img src='../img/arrowselect.gif' />&nbsp;");
        else
            document.write("&nbsp;<img src='../img/arrow.gif' />&nbsp;");
        
        document.write("<a href='platform" + i + ".html'>" + sPlatform[i] + "</a><br />");
        }        
    document.write("</p><br />");
    }

function VolcanyonMenu(nPage)
    {
    document.write("<p class='menuright'>");
    document.write("<b>" + sVolcanyonTitle + "</b><br /><br />");
    for (i = 0; i < nVolcanyonPages; i++)
        {
        if (i == nPage)
            document.write("&nbsp;<img src='../img/arrowselect.gif' />&nbsp;");
        else
            document.write("&nbsp;<img src='../img/arrow.gif' />&nbsp;");
        
        document.write("<a href='volcanyon" + i + ".html'>" + sVolcanyon[i] + "</a><br />");
        }        
    document.write("</p><br />");
    }

function NobisMenu(nPage)
    {
    document.write("<p class='menuright'>");
    document.write("<b>" + sNobisTitle + "</b><br /><br />");
    for (i = 0; i < nNobisPages; i++)
        {
        if (i == nPage)
            document.write("&nbsp;<img src='../img/arrowselect.gif' />&nbsp;");
        else
            document.write("&nbsp;<img src='../img/arrow.gif' />&nbsp;");
        
        document.write("<a href='nobis" + i + ".html'>" + sNobis[i] + "</a><br />");
        }        
    document.write("</p><br />");
    }






//***
//*** fonctions utilitaires pour la gestion des menus
//***

function DeclareMenu()
  	{
  	document.write("<div id='mainMenu1' xml:lang='fr' lang='fr'>");
  	document.write("<ul id='menuList1'>");
  	}

function DeclareMenuitem(lien, texte)
  {
  document.write("<li><a href='" + lien + "'>" + texte + "</a></li>");
  }
    	

function DeclarePopup(lien, texte)
  	{
  	document.write("<li><a class='actuator' href='" + lien + "'>" + texte + "</a>");
  	document.write("<ul class='menu'>");
  	}

function FinPopup()
  	{
  	document.write("</ul>");
  	document.write("</li>");
  	}

function FinMenu()
  	{
  	document.write("</ul>");
  	document.write("</div>");
  	}
