I have a JavaScript function like this:
<script type="text/javascript" src="http://tem.parstools.com/zeos/js/animatedcollapse.js"></script>
<script type="text/javascript">
animatedcollapse.addDiv('bannertop', 'fade=0,speed=200,persist=1')
animatedcollapse.ontoggle=function($, divobj, state){
if (divobj.id=="bannertop") //only react to these two collapsible DIVs
document.getElementById(divobj.id+"-toggle").src=(state=="block")? "image1.png" : "image2.png"
}
animatedcollapse.init()
</script>
This function is called when user click on the specific image like:
<a href="javascript:animatedcollapse.toggle('bannertop')"><img id="bannertop-toggle" src="image_source" /></a>
But, I want first time my site loading this function calling automatically.
sorry for my weak English typing.
Can any body can help me?
thanks