function togglelinks (show) { 
		
	var whichpost = document.getElementById(show);
	
	doSomethingWithClasses('linksshown');
	
	whichpost.className="linksshown";
	  
   
} 

var allPageTags = new Array();

function doSomethingWithClasses(theClass) { 

	//Populate the array with all the page tags 
 	var allPageTags=document.getElementsByTagName("*"); 
 
 	//Cycle through the tags using a for loop 
	for (i=0; i<allPageTags.length; i++) { 
 		
		//Pick out the tags with our class name 
 		if (allPageTags[i].className==theClass) { 
 			//Manipulate this in whatever way you want 
 			allPageTags[i].className='linkshidden';
			} 
	} 
}