

function round(id, topl, topr, bottoml, bottomr){
        var roundArr = {
                tl: { radius: topl },
                tr: { radius: topr },
                bl: { radius: bottoml },
                br: { radius: bottomr },
                antiAlias: true     
        }
        
        var obj = document.getElementById(id);
        curvyCorners(roundArr, obj);
}


function homeround(){
        round("left",5,0,5,0);
        round("right",0,5,0,5);
}

function projectsround(){
        round("project_content",0,5,0,5);
        selectTab(1);
}

//declared number of tabs in the projects section
var tabs = 5;
var oldtab = 0;
var oldp = 0;

function selectTab(id){
       
        if(oldtab != 0){
        old = document.getElementById(oldtab);
        old.style.backgroundColor = "#6a6a6a";
        if(oldtab == 1) { old.style.backgroundImage = "url('/img/tabtop.gif')"; }
        if(oldtab == tabs) { old.style.backgroundImage = "url('/img/tabbottom.gif')";}
        }
        if(oldp != 0){
        document.getElementById(oldp).style.display = "none";
        }
        
        pid = "p" + id;
        
        var tab = document.getElementById(id);
        tab.style.backgroundColor = "#434343";
        if(id == 1) { tab.style.backgroundImage = "url('/img/tabtop_selected.gif')";}
        if(id == tabs) { tab.style.backgroundImage = "url('/img/tabbottom_selected.gif')";}
        
        document.getElementById(pid).style.display = "block";
        
        oldtab = id;
        oldp = pid;
}






