
function moveStars(id, xCoord, yCoord) {
    var theStar=document.getElementById(id);
    theStar.style.left = xCoord+"px";
    theStar.style.top = yCoord+"px";
}
function determineXcoord(id) {
    xCoord = parseInt(document.getElementById(id).style.left);
    return xCoord;
}
function shiftStarRight(id) {
    var theStar = document.getElementById(id);
    var dx = 10;
    if (id == "bigStarGreen") {
        dx += 5;
    } else if (id == "bigStarRed") {
        dx += 8;
    }
    theStar.style.left = determineXcoord(id) + dx + "px";
}
function shiftStarLeft(id) {
    var theStar = document.getElementById(id);
    var dx = 10;
    if (id == "bigStarGreen") {
        dx += 5;
    } else if (id == "bigStarRed") {
        dx += 8;
    }
    theStar.style.left = determineXcoord(id) - dx + "px";
}
function determineWindowWidth() {
    var width = window.innerWidth;
    return width;
}
function determineWindowHeight() {
    var height = window.innerHeight;
    return height;
}
function validate() {
    if (document.theForm.player.value.length == 0) {
        alert("You should enter your name before submitting.");
        return false;
    }
    var numChars = document.theForm.player.value.length;
    re = /\W/;
    if (re.test(document.theForm.player.value)) {
        alert("Your first name should only contain letters, numbers, and underscores");
        return false;
    } else if (true) {
	alert("There isn't really a most frustrated players list.  haha!");
        return false;
    }
    return true;
}

