I created a dice game using the code below. I would like to build on it, to build a craps game, asking for help on the programming logic either using if else, or switch statements. The dice can roll random numbers, would like to be able to:

1) First roll, if the dice roll 7 or 11 you win
2) First roll, if the dice roll 2,3,12 you lose
3) First roll, if the dice roll 4,5,6,8,9,10 - that becomes the point, you must roll one of these to win before you roll a 7, if you roll 7 you lose


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>

var diceFace=new Array("images/c1.gif", "images/c2.gif", "images/c3.gif", "images/c4.gif", "images/c5.gif", "images/c6.gif");

function throwdice(){
//create a random integer between 0 and 5
var randomdice=Math.round(Math.random()*5);
var randomdice2=Math.round(Math.random()*5);


<img src="images/d1.gif" name="mydice" id="mydice">
<img src="images/d1.gif" name="mydice2" id="mydice2">

<input type="button" value="Throw dice!" onClick="timer()">