// (c) Ida Swarczewskaja

var googlemap = '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;time=&amp;date=&amp;ttype=&amp;q=route+de+la+snecma+evry&amp;sll=48.616882,2.449608&amp;sspn=0.011746,0.029182&amp;ie=UTF8&amp;om=1&amp;ll=48.625818,2.454844&amp;spn=0.042381,0.068579&amp;z=14&amp;iwloc=addr&amp;output=embed&amp;s=AARTsJryzkpnI6U4X2bdE3P-Zv2G6VccCw"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;time=&amp;date=&amp;ttype=&amp;q=route+de+la+snecma+evry&amp;sll=48.616882,2.449608&amp;sspn=0.011746,0.029182&amp;ie=UTF8&amp;om=1&amp;ll=48.625818,2.454844&amp;spn=0.042381,0.068579&amp;z=14&amp;iwloc=addr&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>' ;

function change(section, subsection) {
    var menu = "menu" + section ;
    var page = "page" + section + subsection ;    
    var big = "images/big_" + section + ".jpg" ;
    var small = "images/small_" + section + ".jpg" ;
    if (section == 3) {
	big = "images/big_" + section + subsection + ".jpg" ;
	small = "images/small_" + section + subsection + ".jpg" ;
    }
    document.getElementById("submenu").innerHTML = document.getElementById(menu).innerHTML ;
    document.getElementById("content").innerHTML = document.getElementById(page).innerHTML ;
    document.getElementById("imagetag").src = big ;
    document.getElementById("smallimagetag").src = small ;    
    var menu1 = document.getElementById("menu") ;
    if (menu1) {
	// alert (menu1.innerHTML) ;
	var nodes = menu1.childNodes ;	
	for (var i=0; i < nodes.length ; i++) {
	    // alert ("section=" + section + " i=" + i + "node=" + nodes[i].nodeName) ;
	    if (i==(4-section)) nodes[i].className = "current" ;
	    else nodes[i].className = "normal" ;
	}	
    }
    menu1 = document.getElementById("submenu") ;
    if (menu1) {
	// alert (menu1.innerHTML) ;
	var nodes = menu1.childNodes ;	
	for (var i=0; i < nodes.length ; i++) {
	    // alert ("section=" + section + " i=" + i + "node=" + nodes[i].nodeName) ;
	    if (i==subsection-1) nodes[i].className = "current" ;
	    else nodes[i].className = "normal" ;
	}	
    }
    if (section==4 && subsection==4) {
	document.getElementById("gmap").innerHTML = googlemap ;
    } /* else {
	document.getElementById("gmap").innerHTML = "" ;
	} */
}