function fOnLoad() {
    //setup feature button click and mouse over events(allow for bubble up/down)
    dojo.connect(dojo.byId('feature_background'),"onmouseover",featureEventHandler);
    dojo.connect(dojo.byId('feature_index_link'),"onclick",function(){document.location.href='index.html';});
}

function featureEventHandler(evtObj) {
    var deviceDivId = globalCarrier + "_" + globalColor ;
    if(evtObj.target.id) {
        strObj = evtObj.target.id;
        switch(strObj.substring(0,12)) { //test for what div the mouse is over
            case "selector_loc":
                dojo.byId("feature_treo_" + deviceDivId + "_off").style.display = "none";  //turn off this background
                dojo.byId("feature_treo_" + deviceDivId + "_on").style.display = "block";  //turn off this background
                dojo.byId(strObj).style.backgroundImage = "url($[urlbase]/images/products/smartphones/centro/$[lang]/selector/" + thisPage + "_" + strObj + "_on.jpg)" ;
                hideScreenShots();
                dojo.byId(strObj+"_screen_shot").style.display = "block";
                globalCurrentView = strObj;
                break;
            case "selector_are":
                if(globalCurrentView!="") {
/*                     dojo.byId(globalCurrentView).style.backgroundImage = "url($[urlbase]/images/products/smartphones/centro/$[lang]/selector/" + thisPage + "_" + strObj + "_off.jpg)" ; */
                    dojo.byId(globalCurrentView).style.backgroundImage = "url()" ;
                }
                break;
            case "feature_back":
                showTreo();
                break;
            default:
                showTreo();
                break;
        }
    }
}
function hideScreenShots() {
    for(i=1; i<=orbCount;i++) {
        dojo.byId("selector_loc" + String(i) + "_screen_shot").style.display = "none"; //turn off screens
    }

}

function showTreo() {
    var deviceDivId = globalCarrier + "_" + globalColor ;
    hideScreenShots();
    //featured treo device
    dojo.byId("feature_treo_sprint_pink_off").style.display = "none";  //turn off this background
    dojo.byId("feature_treo_sprint_red_off").style.display = "none";  //turn on this background
    dojo.byId("feature_treo_sprint_black_off").style.display = "none";  //turn on this background
    dojo.byId("feature_treo_sprint_pink_on").style.display = "none";  //turn off this background
    dojo.byId("feature_treo_sprint_red_on").style.display = "none";  //turn on this background
    dojo.byId("feature_treo_sprint_black_on").style.display = "none";  //turn on this background
    dojo.byId("feature_treo_" + deviceDivId + "_off").style.display = "block";  //turn off this background
}

function fadeOneObject(targetFadeObject) {
    tFade = new dojo.fx.Toggler({ node: targetFadeObject, hideDuration:250, showDuration: 500}); 
    tFade.hide(10);									   
    tFade.show(200); 
}
function fadeTwoObjects(targetFadeOutObject, targetFadeInObject) {
    tFade1 = new dojo.fx.Toggler({ node: targetFadeOutObject, hideDuration:250}); 
    tFade1.hide(10);								   
    tFade2 = new dojo.fx.Toggler({ node: targetFadeInObject, showDuration:250}); 
    tFade2.show(10); 
}
