function roundedCorners() {
 if (parseFloat(navigator.appVersion) >= 5 ||
     parseFloat(navigator.appVersion.split("MSIE")[1]) >= 5) {
	 var divs = document.getElementsByTagName('div');
	 var rounded_divs = [];
	 /* First locate all divs with 'rounded' in their class attribute */
	 for (var i = 0; i < divs.length; i++) {
		 if (/rounded/.exec(divs[i].className)) {
			 rounded_divs[rounded_divs.length] = divs[i];
		 }
	 }
	 /* Now add additional divs to each of the divs we have found */
	 for (var i = 0; i < rounded_divs.length; i++) {
		 var original = rounded_divs[i];
		 /* Make it the inner div of the four */
		 var origClass = original.className;
		 original.className = "innerDiv";
		 /* Now create the outer-most div */
		 var tr = document.createElement('div');
		 tr.className = origClass + '2';
		 tr.id = original.id + '2';
		 /* Swap out the original (we'll put it back later) */
		 original.parentNode.replaceChild(tr, original);
		 /* Create the two other inner nodes */
		 var tl = document.createElement('div');
		 tl.className = "tl";
		 var br = document.createElement('div');
		 br.className = "br";
		 /* Now glue the nodes back in to the document */
		 tr.appendChild(tl);
		 tl.appendChild(br);
		 br.appendChild(original);
	 }
		/* for the bottom corners on #main */
		var main = document.getElementById("main");
		main.id = "";
		main.className = "mainInner";
		var mainWrapper = document.createElement('div');
		mainWrapper.id = "main";
		main.parentNode.replaceChild(mainWrapper, main);
		mainWrapper.appendChild(main);
	}
} 

