﻿// PRELOADS ALL THE BUTTONS NEEDED
// Works: IE4+, NS4+, Opera

	function preButtons() {
		loadingFlag = true;
		
		// footer preloads
        createObject('heartoff','/_img/generic/foot_heart_off.gif');
        createObject('hearton','/_img/generic/foot_heart_on.gif');
        createObject('antioff','/_img/generic/foot_anti_off.gif');
        createObject('antion','/_img/generic/foot_anti_on.gif');
        createObject('catoff','/_img/generic/foot_cat_off.gif');
        createObject('caton','/_img/generic/foot_cat_on.gif');
        
        // button preloads
        createObject('btnmoredoff','/_img/buttons/more_dark_off.gif');
        createObject('btnmoredon','/_img/buttons/more_dark_on.gif');
        createObject('btnmoreloff','/_img/buttons/more_light_off.gif');
        createObject('btnmorelon','/_img/buttons/more_light_on.gif');
        createObject('btnbuycdoff','/_img/buttons/buy_cd_off.gif');
        createObject('btnbuycdon','/_img/buttons/buy_cd_on.gif');
        createObject('btngetmp3off','/_img/buttons/get_mp3_off.gif');
        createObject('btngetmp3on','/_img/buttons/get_mp3_on.gif');
        createObject('btnsubarroff','/_img/buttons/submitarrow_off.gif');
        createObject('btnsubarron','/_img/buttons/submitarrow_on.gif');
        createObject('btnsubarrnewsoff','/_img/buttons/submitarrow_news_off.gif');
        createObject('btnsubarrnewson','/_img/buttons/submitarrow_news_on.gif');
        createObject('btngooff','/_img/buttons/go_off.gif');
        createObject('btngoon','/_img/buttons/go_on.gif');
        createObject('btnviewalloff','/_img/buttons/view_all_off.gif');
        createObject('btnviewallon','/_img/buttons/view_all_on.gif');
        createObject('btnnextarroff','/_img/buttons/nextarrow_off.gif');
        createObject('btnnextarron','/_img/buttons/nextarrow_on.gif');
        createObject('btnprevarroff','/_img/buttons/prevarrow_off.gif');
        createObject('btnprevarron','/_img/buttons/prevarrow_on.gif');
        createObject('btnsubmitoff','/_img/buttons/submit_off.gif');
        createObject('btnsubmiton','/_img/buttons/submit_on.gif');
        
        // frontpage preloads
        createObject('tartistsoff','/_img/tabs/artists_off.gif');
        createObject('tartistson','/_img/tabs/artists_on.gif');
        createObject('tmp3soff','/_img/tabs/mp3s_off.gif');
        createObject('tmp3son','/_img/tabs/mp3s_on.gif');
        createObject('tvideosoff','/_img/tabs/videos_off.gif');
        createObject('tvideoson','/_img/tabs/videos_on.gif');
        
        // newsbox tabs
        createObject('newstabusoff','/_img/boxheaders/b_news_tabus_off.gif');
        createObject('newstabuson','/_img/boxheaders/b_news_tabus_on.gif');
        createObject('newstabworldoff','/_img/boxheaders/b_news_tabworld_off.gif');
        createObject('newstabworldon','/_img/boxheaders/b_news_tabworld_on.gif');
            
        loadingFlag = false;
        preloadFlag = true;
	}

// SEARCH BOX BUTTON EVENTS FOR IE6

if (window.ie6) {
    window.addEvent("load", function() {

        var searchButton = $E("button.search");

        if (searchButton) {
            searchButton.addEvent("mouseover", function(){
                $(searchButton).setStyle("background-position", "0 -22px");
                $(searchButton).setStyle("cursor", "pointer");
            });
            searchButton.addEvent("mouseout", function(){
                $(searchButton).setStyle("background-position", "0 0");
                $(searchButton).setStyle("cursor", "arrow");
            });
            searchButton.addEvent("click", function(){
                $E("form.searchform").submit();
            });
        }

    });
}
