

// 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( "©2006 DaimlerChrysler. Все права защищены.", "" ), 
    new footerItem( "PRIVACY STATEMENT", "javascript:flexWin('/topics/privacy.html', 'yes', 571, 625);" ), 
    new footerItem( "ОБРАТНАЯ СВЯЗЬ", "/feed_back.html" )
];

// map array
var imageMap = [
    new mapCoords( 'http://www.chrysler-jeep.com.ua/chrysler.html', 'Chrysler', '60,15,155,50' ), 
    new mapCoords( 'http://www.chrysler-jeep.com.ua/jeep.html', 'Jeep', '160,15,208,50' ), 
    new mapCoords( 'http://www.dodge.com.ua/', 'Dodge', '0,15,40,50' ), 
    new mapCoords( 'http://www.daimlerchrysler.com/dccom/cg', 'Chrysler Group', '0,80,208,100' )
];

// 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="/user/img/footer.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();

