java script


Code HTML4Strict:
<script type="text/javascript">
function show1(){
    document.getElementById(1).style.display="";
    document.getElementById(2).style.display="none";
}
function show2(){
    document.getElementById(2).style.display="";
    document.getElementById(1).style.display="none";
}
</script>

HTML
Code HTML4Strict:
<div class="faredivwrap">
            <div class="farenav">
                <div onClick="show1()">book now 1</div>
                <div onClick="show2()">book now 2</div>
            </div>
            <div class="farecontent">
                <div id="1" style="display:none;">1 form display here</div>
                <div id="2" style="display:none;">2 form display here</div>
 
            </div>
        </div>

CSS
Code HTML4Strict:
<style>
.faredivwrap{ 
    border:1px solid #000;
    background-color:#CCC;
    position:absolute;
}
.farenav{ position:relative; float:left; margin:5px;}
.farecontent{position:relative;float:left;margin:5px;}
.farenav div{ border:1px solid #000;}
.farecontent div{ border:1px solid #000; min-height:60px;}
</style>

i need a function
like
show();
it takes argument..
and works instead of
function show1(){
document.getElementById(1).style.display="";
document.getElementById(2).style.display="none";
}
function show2(){
document.getElementById(2).style.display="";
document.getElementById(1).style.display="none";
}