Please help me!! What is wrong with my code??

<div id="pictureFrameDogodki">

                                            <div id="pictureMainDogodki1" style="display:none;">
                                                <img src="images/snowparty.jpg" alt="pa"/>
                                            </div>
                                            
                                            <div id="pictureMainDogodki2" style="display:block;">
                                                <img src="images/pokerturnir_zanet.jpg" alt="po" />
                                            </div>
                                            
                                            <div id="pictureMainDogodki3" style="display:none;">
                                                <img src="images/molella.jpg" alt="mo" />
                                            </div>
                                            
                                            <div id="pictureMainDogodki4"  style="display:none;">
                                                <img src="images/Inna.jpg" alt="in" />
                                            </div>  
                                            
                                            <div id="pictureMainDogodki5" style="display:none;">
                                                <img src="images/demosntracije.jpg" alt="d"/>
                                            </div>
                                            
                                        </div>
                                        <div id="frameDogodkiMeni">
                                        	<div class="frameGumb1">
                                            	<a class="gumbFrame" href="javascript:toggle('pictureMainDogodki5');" title="prva" onclick="toggle('pictureMainDogodki5');">5</a>
                                            </div>
                                            <div class="frameGumb">
                                            	<a class="gumbFrame" href="#" title="prva"  onclick="toggle('pictureMainDogodki4');">4</a>
                                            </div>
                                            <div class="frameGumb">
                                            	<a class="gumbFrame" href="#" title="prva"  onclick="toggle('pictureMainDogodki3');">3</a>
                                            </div>
                                            <div class="frameGumb">
                                            	<a class="gumbFrame" href="#" title="prva"  onclick="toggle('pictureMainDogodki2');">2</a>
                                            </div>
                                            <div class="frameGumb">
                                            	<a class="gumbFrame" href="#" title="prva"  onclick="toggle('pictureMainDogodki1');">1</a>
                                            </div>
                                        </div>


<script type="text/javascript">
    function toggle(id) {
        var state = document.getElementById(id).style.display;
            if (state == 'block') {
                document.getElementById(id).style.display = 'none';
            } else(state=='none') {
                document.getElementById(id).style.display = 'block';
            }
        }
</script>

else(state=='none') {
document.getElementById(id).style.display = 'block';
}

You don't need to put the expression into 'else' statement. Replace with below:

else {
document.getElementById(id).style.display = 'block';
}

Also, place the codes in code tags.

Tnx!I forgot if!!!:))

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.