/* validate registration form */
function submitenter(myfield,e)
{
    var keycode;
    if (window.event) 
        keycode = window.event.keyCode;
    else if (e) 
        keycode = e.which;
    else 
        return true;

    if (keycode == 13)
    {
        //myfield.form.submit();
        return false;
    }
    else
        return true;
}


/* Fetch window width and hide/show right side */
function liveWidth(){
    var x;
	x = window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;
	if (x < 850) { 
		document.getElementById("right_side").style.display="none"; 
		var x = document.getElementsByTagName("body");
		x[0].style.width="815px";
	} else {	/*
		document.getElementById("right_side").style.display="";	
		var x = document.getElementsByTagName("body");
		x[0].style.width="986px";*/
	}
}

/* Atach to events */
window.onload = liveWidth;
document.onload = liveWidth;
window.onresize = liveWidth;
document.onresize = liveWidth;