function getAnswers() {

time = new Date()
randominteger = time.getSeconds()

if (document.input1.textfield.value == "") { 
alert("You didn't enter anything into the Crystal Ball!!!")
return
}

if (randominteger <= 3) answer="Did you really think so? Hahaha, I'm laughing now at your pitiful chances."
if ((randominteger >= 4) && (randominteger <= 6)) answer ="Yeah, it it's got a 65% chance of happening."
if ((randominteger >= 7) && (randominteger <= 9)) answer ="Oh come on! No way!"
if ((randominteger >= 10) && (randominteger <= 12)) answer ="As sure as I'm made of glass, this is likely to happen."
if ((randominteger >= 13) && (randominteger <= 15)) answer ="Why are you asking A CRYSTAL BALL? Do you really believe the answers?"
if ((randominteger >= 16) && (randominteger <= 18)) answer ="Give me a break, give me a break, break me off a piece of that NO!"
if ((randominteger >= 19) && (randominteger <= 21)) answer ="Good chances lie on the horizon."
if ((randominteger >= 22) && (randominteger <= 24)) answer ="Ask me again, I am restless and overworked."
if ((randominteger >= 25) && (randominteger <= 27)) answer ="Do you know how the Crystal Ball works? There's your answer."
if ((randominteger >= 28) && (randominteger <= 30)) answer ="As the sun is hot, your answer is YES."
if ((randominteger >= 31) && (randominteger <= 33)) answer ="Did you get drunk last weekend? There's your answer."
if ((randominteger >= 34) && (randominteger <= 36)) answer ="Forget about it"
if ((randominteger >= 37) && (randominteger <= 39)) answer ="Yeah, it could happen. 80% chance."
if ((randominteger >= 40) && (randominteger <= 42)) answer ="Hitler has a better chance of raising from the dead."
if ((randominteger >= 43) && (randominteger <= 45)) answer ="If you really think so, then it shall be."
if ((randominteger >= 46) && (randominteger <= 48)) answer ="Who said ambiguous answers were bad? Not me, so YES!"
if ((randominteger >= 49) && (randominteger <= 51)) answer ="You think I'm going to answer that after a day of hard work? Ask again later."
if ((randominteger >= 52) && (randominteger <= 54)) answer ="If you own a pet, yes. Otherwise, no."
if ((randominteger >= 55) && (randominteger <= 57)) answer ="The sun will rise in the east and set in the west. Thank you Captain Obvious. YES!"
if ((randominteger >= 58) && (randominteger <= 60)) answer ="I'm laughing hard, very hard. You'd better ask again."

var newWindow = window.open("","Results","width=300,height=300")
newWindow.document.write("<html><body bgcolor='#FFFFFF' text='#000000' link='#00FFFF' alink='#003366' vlink='#003366'>")
newWindow.document.write("<p align='center'><font face='Verdana' size='1' color='#000000'>Your Question:</p><p></p><font face='Verdana' size='1' color='#000000'>")
newWindow.document.write("<p align='center'>" + document.input1.textfield.value + "</p>")
newWindow.document.write("<p></p><p></p><p></p><p align='center'><font face='Verdana' size='1' color='#003366'><strong>The Great Crystal Ball Has Answered:</strong></p><p></p>")
newWindow.document.write("<font face='Verdana' size='1' color='#000000'>")
newWindow.document.write("<p align='center'>" + answer + "</p>")
newWindow.document.write("<p></p><p></p><p align='center'><a href='javascript:window.close()'><font face='Verdana' size='1' color='#003366'>Close Window</font></a></p>")
}
