function getTip(){
	var xhr; 
    try {  xhr = new ActiveXObject('Msxml2.XMLHTTP');   }
    catch (e) 
    {
        try {   xhr = new ActiveXObject('Microsoft.XMLHTTP');    }
        catch (e2) 
        {
          try {  xhr = new XMLHttpRequest();     }
          catch (e3) {  xhr = false;   }
        }
     }
  
    xhr.onreadystatechange  = function()
    { 
         if(xhr.readyState  == 4)
         {
              if(xhr.status  == 200) 
                  document.getElementById("tips").innerHTML = "<p>"+xhr.responseText+"</p><a href='#' id='nextLink' onclick='getTip();'>another tip...</a>";
         }
    }; 

   xhr.open("GET", "tips.php",  true); 
   xhr.send(null);
}

function cast(i){
    if (i < 4){
    	  document.getElementById("rollButton").style.display='none';        
        document.getElementById("slideImage").src = imageDB[i].src;
        i++;
        setTimeout("cast("+i+")",2000);
    }
    else{
    document.getElementById("rollButton").style.display = 'block';
    }
}

function pause(v){
    document.getElementById("result").innerHTML = v;
}

function showResult(){
    document.getElementById("result").innerHTML = "and the result is: "+getRandom(6);
}

