Change CSS Class By Java Script

<head>
<style type="text/css">
.show { display: auto; }
.hide { display: none; }
</style>
<title>Untitled</title>
</head>
<body>
<a href="#" onclick="changeStyle()">Change</a>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js"&amp;gt;&amp;lt;/script">
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/dom/dom-min.js"&amp;gt;&amp;lt;/script">
<script type="text/javascript">
function changeStyle() {
var D = YAHOO.util.Dom;
D.setStyle(D.getElementsByClassName('data_div', 'div'), 'display', 'none');
// OR
// D.replaceClass(D.getElementsByClassName('data_div', 'div'), 'show', 'hide');
}
</script>