﻿function changeToUrban() {
    document.getElementById('urbanText').style.display = 'none'
    document.getElementById('circleText').style.display = 'block'
    document.getElementById('homebuyerText').style.display = 'none'
}

function changeToCircle() {
    document.getElementById('urbanText').style.display = 'none'
    document.getElementById('circleText').style.display = 'block'
    document.getElementById('homebuyerText').style.display = 'none'
}

function changeToHomebuyer() {
    document.getElementById('urbanText').style.display = 'none'
    document.getElementById('circleText').style.display = 'none'
    document.getElementById('homebuyerText').style.display = 'block'
}

function changePicture(imageName){
    document.getElementById('FnAMainPic').src = '/Images/' + imageName
}

function changeFloorPlan(level, res, sf){
    document.getElementById('floorPlanImage').src = '/Images/' + res + 'lvl' + level + ".gif";
    document.getElementById('floorPlanImage').jqimg = '/Images/' + res + 'lvl' + level + "_Large.gif";
    for (i = 1; i<=4; i++){
        document.getElementById('lvl' + i).style.fontWeight = 'normal';
    }
    document.getElementById('lvl' + level).style.fontWeight = 'bold';
    document.getElementById('LevelSquareFeet').innerHTML = sf;
    document.getElementById('Level').innerHTML = level;
}

function loadFloorPlan(){
    query = document.URL;
    floor = query.substring(query.indexOf('?')+6)

    if(floor == 'A')
        loadFloorA();
    else if(floor == 'B')
        loadFloorB();
    else if(floor == 'C')
        loadFloorC();
    else if(floor == 'D')
        loadFloorD();           
    else if(floor == 'E')
        loadFloorE();
    else
        loadNoFloor();
}

function loadFloorA(){
    document.getElementById('PlanLetter').innerHTML = 'A';
    document.getElementById('FloorSquareFeet').innerHTML = '1676';
    document.getElementById('LevelSquareFeet').innerHTML = '333';
    document.getElementById('floorPlanImage').src = '/Images/Alvl1.gif';
    document.getElementById('floorPlanImage').jqimg = '/Images/Alvl1_Large.gif';
    document.getElementById('lvl1').href = 'javascript:changeFloorPlan("1","A","333")';
    document.getElementById('lvl2').href = 'javascript:changeFloorPlan("2","A","622")';
    document.getElementById('lvl3').href = 'javascript:changeFloorPlan("3","A","640")';
    document.getElementById('lvl4').href = 'javascript:changeFloorPlan("4","A","81")';
}

function loadFloorB(){
    document.getElementById('PlanLetter').innerHTML = 'B';
    document.getElementById('FloorSquareFeet').innerHTML = '2234';
    document.getElementById('LevelSquareFeet').innerHTML = '422';
    document.getElementById('floorPlanImage').src = '/Images/Blvl1.gif';
    document.getElementById('floorPlanImage').jqimg = '/Images/Blvl1_Large.gif';
    document.getElementById('lvl1').href = 'javascript:changeFloorPlan("1","B","422")';
    document.getElementById('lvl2').href = 'javascript:changeFloorPlan("2","B","860")';
    document.getElementById('lvl3').href = 'javascript:changeFloorPlan("3","B","871")';
    document.getElementById('lvl4').href = 'javascript:changeFloorPlan("4","B","81")';
}

function loadFloorC(){
    document.getElementById('PlanLetter').innerHTML = 'C';
    document.getElementById('FloorSquareFeet').innerHTML = '2247';
    document.getElementById('LevelSquareFeet').innerHTML = '427';
    document.getElementById('floorPlanImage').src = '/Images/Clvl1.gif';
    document.getElementById('floorPlanImage').jqimg = '/Images/Clvl1_Large.gif';
    document.getElementById('lvl1').href = 'javascript:changeFloorPlan("1","C","427")';
    document.getElementById('lvl2').href = 'javascript:changeFloorPlan("2","C","864")';
    document.getElementById('lvl3').href = 'javascript:changeFloorPlan("3","C","875")';
    document.getElementById('lvl4').href = 'javascript:changeFloorPlan("4","C","81")';
}

function loadFloorD(){
    document.getElementById('PlanLetter').innerHTML = 'D';
    document.getElementById('FloorSquareFeet').innerHTML = '3354';
    document.getElementById('LevelSquareFeet').innerHTML = '789';
    document.getElementById('floorPlanImage').src = '/Images/Dlvl1.gif';
    document.getElementById('floorPlanImage').jqimg = '/Images/Dlvl1_Large.gif';
    document.getElementById('lvl1').href = 'javascript:changeFloorPlan("1","D","789")';
    document.getElementById('lvl2').href = 'javascript:changeFloorPlan("2","D","1,201")';
    document.getElementById('lvl3').href = 'javascript:changeFloorPlan("3","D","1,225")';
    document.getElementById('lvl4').href = 'javascript:changeFloorPlan("4","D","139")';
}

function loadFloorE(){
    document.getElementById('PlanLetter').innerHTML = 'E';
    document.getElementById('FloorSquareFeet').innerHTML = '3531';
    document.getElementById('LevelSquareFeet').innerHTML = '866';
    document.getElementById('floorPlanImage').src = '/Images/Elvl1.gif';
    document.getElementById('floorPlanImage').jqimg = '/Images/Elvl1_Large.gif';
    document.getElementById('lvl1').href = 'javascript:changeFloorPlan("1","E","789")';
    document.getElementById('lvl2').href = 'javascript:changeFloorPlan("2","E","1,201")';
    document.getElementById('lvl3').href = 'javascript:changeFloorPlan("3","E","1,225")';
    document.getElementById('lvl4').href = 'javascript:changeFloorPlan("4","E","139")';
}
