First off:
Your page is in violation of Dynamic Drive's
usage terms, which, among other things, state that the script credit must appear in the source code of each
page using the script. Please reinstate the notice first.
You can do that like so -
Replace:
Code:
<script src="includes/common_scripts.js" type="text/javascript"></script>
with:
Code:
<script src="includes/common_scripts.js" type="text/javascript">
//Includes:
/***********************************************
* Contractible Headers script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use. Last updated Mar 23rd, 2004.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
on whichever pages actually use this script, or in the include/template, if this is from an include/template.
On to your problem - Where you have:
Code:
<a href="#null" onClick="expandcontent('sc1');"><img src="images/nav/left_nav_home_02.gif" alt="" width="199" height="21" hspace="0" vspace="0" border="0"></a>
It should be:
Code:
<span onclick="expandcontent('sc1');" style="cursor:pointer;"><img src="images/nav/left_nav_home_02.gif" alt="" width="199" height="21" hspace="0" vspace="0" border="0"></span>
This prevents those browsers which otherwise would, from reloading the page, important once we turn persistence off. You can further style this span, if need be, using the inline style, an id or class name to make it look like the links in this section.
What I think you need is a test of the location.href of the page to decide if that header should be expanded or not. Set persistence to off. Find this part of the script:
Code:
function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
getElementbyClass("switchcontent")
if (enablepersist=="on" && typeof ccollect!="undefined"){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0"
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
var tests=[/web_writing\.php/, /seo\.php/, /blog\.php/, /pr\.php/]
for (var i_tem = 0; i_tem < tests.length; i_tem++)
if(tests[i_tem].test(location.href))
expandcontent('sc1')
}
Add the red parts. That should do it.
Bookmarks