<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script>
<script type="text/javascript">
function slideUpDiv(){
var main1 = document.getElementById('main');
if (main1.style.display == "none") {
$('#main').slideDown();
}
else {
$('#main').slideUp();
}
}
</script> <input type='button' value='slide' onclick="slideUpDiv()">
<div id='main' style='display:none'>
<div id='main_1'>main1</div>
<div id='main_2'>main2</div>
</div>