// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
function swap_img_on(id) {
    swap_img(id, id + '_on.png');
}

function swap_img_off(id) {
    swap_img(id, id + '_off.png');
}

function swap_img(id, name) {
    var e = document.getElementById(id);
    e.src = '/images/' + name;
}

function swap_constellex_on() {
    swap_img("copyright_link", "constellink_100.png")
}

function swap_constellex_off() {
    swap_img("copyright_link", "constellink_25.png")
}

function MM_preloadImages() {
    var d = document;
    if ( d.images ) {
        if( !d.MM_p ) {
            d.MM_p=new Array();
        }
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
        for(i=0; i<a.length; i++) {
            if ( a[i].indexOf("#") != 0) {
                d.MM_p[j]=new Image;
                d.MM_p[j++].src=a[i];
            }
        }
    }
}

function preloadImages() {
    MM_preloadImages('/images/constellink_100.png','#1','/images/home_on.png','#3','/images/info_on.png','#4','/images/pics_on.png','#5','/images/register_on.png','#5','/images/rules_on.png','#6','/images/sponsors_on.png','#7');
}