function fancyRules() { 
 if (!document.getElementsByTagName) return;			// check if the browser supports our code
 
 	var hr = document.getElementsByTagName("hr");		// grab all the HRs and put them in an array
 
 	for (var i=0; i<hr.length; i++) {					// loop through the array of HRs
	
 		var newhr = hr[i]; 
		var wrapdiv = document.createElement('div');    // Now create the outer div 		
		wrapdiv.className = 'line';                     // Give it a class
		newhr.parentNode.replaceChild(wrapdiv, newhr);  // Swap out the HR for now
		wrapdiv.appendChild(newhr);                     // Pop the HR inside the DIV
	}
} 
window.onload = fancyRules;