

// objects
function footerItem( argText, argLink ) {
    this.text = argText;
    this.link = argLink;
}

function mapCoords( argLink, argAlt, argCoords ) {
    this.link = argLink;
    this.alt = argAlt;
    this.coords = argCoords;
}

// footer array
var footerMenu = [
    new footerItem( "© Chrysler LLC", "" ), 
    new footerItem( "Fournisseurs", "javascript:flexWin('/privacy/corporate.html', 'yes', 571, 625);" ), 
    new footerItem( "Mentions légales *", "javascript:flexWin('/privacy/corporate.html', 'yes', 571, 625);" ), 
    new footerItem( "Protection des données", "javascript:flexWin('/privacy/protection.html', 'yes', 571, 625);" )
];

// map array
var imageMap = [
    new mapCoords( 'http://www.chrysler.fr', 'Chrysler', '0,15,95,50' ), 
    new mapCoords( 'http://www.jeep.fr', 'Jeep', '100,15,148,50' )
];

// methods
function drawFooter() {
    var obj = footerMenu;
    var str = '<span class="footer">';
    for( var i = 0; i < obj.length; i++ ) {
        if( obj[i].link == "" ) {
            str += obj[i].text;
        } else {
            str += '<a class="footer" href="' + obj[i].link + '" name="&lpos=footer">';
            str += obj[i].text;
            str += '</a>';
        }
        if( i < obj.length-1 )
            str += ' | ';
    }
    str += '</span>';
    str += '<br /><img src="/img/footer3.gif" border="0" usemap="#footerMap" />';
    document.write( str );
}

function drawMap() {
    var obj = imageMap;
    var str = '<map name="footerMap">';
    for( var i = 0; i < obj.length; i++ ) {
        if( obj[i].link != "" )
            str += '<area href="' + obj[i].link + '" alt="' + obj[i].alt + '" coords="' + obj[i].coords + '" />';
    }
    str += '</map>';
    document.write( str );
}

// draw
drawMap(); drawFooter();

