3 text inputs rotate value with button

Here is what I want to happen. I have three input boxes. You can put in whatever you want in both boxes. Hit the rotate button and the values move down one and the bottom one goes to the first input box. I have this working in actionscript but I cannot get it to work in javascript. I know they are different, but there are similarities. Thanks for any help you can give me.


<html>
<body>
<script type="text/javascript">
function thisguy()
{
var name1v = name1;
var name2v = name2;
var name3v = name3;
var name1 = name3v;
var name2 = name1v;
var name3 = name2v

}
</script>
<label>Name1
<input name="name1" type="text" id="name1" value="">
<p>
<label>Name2
<input name="name2" type="text" id="name2" value="">
<p>
<label>Name3
<input name="name3" type="text" id="name3" value="">
<p>
<input type="button" name="rotate" id="rotate" value="Rotate" onclick="thisguy()"/>


</body>
</html>