var pass;
var DivObj = new Object();

function Show_details_onclick(DivID)
{

 if (pass==2)
	 //pass does not equal 2 at the first click. So disappears off to else statement.
 	{
	 //now that pass =2 this script is re-run everytime a click happens.
	 DivID.style.display="";
	 //show the clicked on DivID details.
	 DivObj.style.display="none";
	 //hide the previously shown DivID which is now stored in DivObj
	 DivObj=DivID;
	 //make DivObj = the new shown DivID.
	 }
if (DivObj == DivID)
	{
	 DivID.style.display="";
	}	 
 else
	 {
	  pass=2;
	  //OK pass=2 now.
	  parseInt(pass);
	  //Yep its an interger
	  defaultdiv.style.display="none";
	  //Hide the default part1 DivID.
	  DivID.style.display="";
	  //show the clicked on (DivID) text.
	  DivObj=DivID;
	  //New object now = the DivID.
	  }
}