I got a simple piece of javascript that should reveal a div from the right when the onclick is pressed!
However on firebug I am getting a function not defined error! I have the same function on the left and that is working fine. Here is my code..
<div id="cpBtnRgt" onclick="toggleCPRgt()">
    <div></div>
    <div></div>
    <div></div>
</div>
<script type="text/javascript">
    function toggleCPRgt(){
    var cpRgt = document.getElementById("cpRgt");
    cpRgt.style.height = window.innerHeight - 60+"px";
    if(cpRgt.style.right == "0px"){
        cpRgt.style.right = "-300px";
    } else {
        cpRgt.style.right = "0px";
    }
}
</script>
I have also set up a JSFiddle here... http://jsfiddle.net/r6fkq3jt/
 
     
     
     
    