// ------------------------------------------------------------------------------------
// Menu
// ------------------------------------------------------------------------------------

/***********************************************
* AnyLink Drop Down Menu-  Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="index2.php?p=bio">Biography</a>'
menu1[1]='<a href="index2.php?p=facts">Facts & Trivia</a>'
menu1[2]='<a href="index2.php?p=name">Name Analysis</a>'
menu1[3]='<a href="index2.php?p=starsigns">Star Sign & Astrology</a>'
menu1[4]='<a href="index2.php?p=quotes">Quotes</a>'
menu1[5]='<a href="index2.php?p=articles">Articles</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="http://julianne-hough.ws/Visuals/">Photos</a>'
menu2[1]='<a href="http://hough-media.com/">Videos</a>'
menu2[2]='<a href="http://julianne-hough.ws/avatars">MSN/LJ Icons</a>'
menu2[3]='<a href="index2.php?p=banners">Support Banners</a>'
menu2[4]='<a href="index2.php?p=dolls">Dolls</a>'
menu2[5]='<a href="http://mac.softpedia.com/get/Internet-Utilities/Official-Julianne-Hough-Theme-Toolbar-from-Universal-Music.shtml">JuJu MAC Toolbar</a>'
menu2[6]='<a href="index2.php?p=wallpapers">Desktop Wallpapers</a>'
menu2[7]='<a HREF="mailto:jay@echoit.net.au">Donate Media</a>'

//Contents for menu 3, and so on
var menu3=new Array()
menu3[0]='<a href="index2.php?p=dwts_info">What is it About?</a>'
menu3[1]='<a href="index2.php?p=dwts_dances">The Dances</a>'
menu3[2]='<a href="index2.php?p=dwts_apolo">S4: Julianne & Apolo</a>'
menu3[3]='<a href="index2.php?p=dwts_helio">S5: Julianne & Helio</a>'
menu3[4]='<a href="index2.php?p=dwts_adam">S6: Julianne & Adam</a>'
menu3[5]='<a href="index2.php?p=dwts_cody">S7: Julianne & Cody</a>'
menu3[6]='<a href="index2.php?p=dwts_chuck">S8: Julianne & Chuck</a>'

//Contents for menu 4, and so on
var menu4=new Array()
menu4[0]='<a href="index2.php?p=music_covers">CD Covers</a>'
menu4[1]='<a href="index2.php?p=music_disc">Discography</a>'
menu4[2]='<a href="http://julianne-hough.ws/Lyrics">Lyrics</a>'
menu4[3]='<a href="index2.php?p=music_clips">Clips</a>'
menu4[4]='<a href="index2.php?p=music_listen">Listen & Buy</a>'
menu4[5]='<a href="index2.php?p=music_chart">On The Charts</a>'
menu4[6]='<a href="index2.php?p=music_reviews">Reviews</a>'
menu4[7]='<a href="http://eventful.com/ringtones?id=P0-001-000070478-9&from=demand_confirm">Buy Ringtones</a>'

//Contents for menu 5, and so on
var menu5=new Array()
menu5[0]='<a href="index2.php?p=fotm">Fan of the Moment</a>'
menu5[1]='<a href="index2.php?p=potm">Photo of the Moment</a>'
menu5[2]='<a href="index2.php?p=quiz">Julianne Quiz</a>'
menu5[3]='<a href="index2.php?p=degrees">6 Degrees to Julianne</a>'
menu5[4]='<a href="index2.php?p=youjuju">You + Julianne = ?</a>'
menu5[5]='<a href="index2.php?p=hangman">Hangman</a>'
menu5[6]='<a href="index2.php?p=prediction">Mind Reader</a>'
menu5[7]='<a href="index2.php?p=fortune">Fortune Teller</a>'
menu5[8]='<a href="index2.php?p=puzzles">Jigsaw Puzzles</a>'
menu5[9]='<a href="index2.php?p=lookalikes">Look-Alikes</a>'
menu5[10]='<a href="http://www.hotornot.com/voting/hot_celebs/BE/GUE/">Hot or Not?</a>'
menu5[11]='<a href="http://www.richardsandsouthern.com/juliannehough">Merchandise</a>'
menu5[12]='<a href="index2.php?p=chat">Chat</a>'

//Contents for menu 6, and so on
var menu6=new Array()
menu6[0]='<a href="index2.php?p=layouts">Past Layouts</a>'
menu6[1]='<a href="index2.php?p=sotm">Site of the Moment</a>'
menu6[2]='<a href="index2.php?p=links">Affiliates</a>'
menu6[3]='<a href="index2.php?p=links_apply">Apply for Affiliates</a>'
menu6[4]='<a href="index2.php?p=linkback">Link Back</a>'
menu6[5]='<a href="index2.php?p=listed">Memberships & Listed</a>'
menu6[6]='<a href="index2.php?p=faq">FAQ</a>'
menu6[7]='<a href="index2.php?p=disclaimer">Disclaimer</a>'
menu6[8]='<a href="index2.php?p=credit">Credits</a>'


var menuwidth='165px' //default menu width
var menubgcolor='transparent'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="margin-top: 1px;visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu






// ------------------------------------------------------------------------------------
// Cards
// ------------------------------------------------------------------------------------
var cards = new Array(6);
var play = 0;
var cn = 0;
var ttl = 0;
cards[1] = "        CARD  ONE        \n  1  3  5  7  9 11 13 15 \n 17 19 21 23 25 27 29 31 \n 33 35 37 39 41 43 45 47 \n 49 51 53 55 57 59 61 63";
cards[2] = "        CARD  TWO        \n  2  3  6  7 10 11 14 15 \n 18 19 22 23 26 27 30 31 \n 34 35 38 39 42 43 46 47 \n 50 51 54 55 58 59 62 63";
cards[3] = "       CARD  THREE       \n  4  5  6  7 12 13 14 15 \n 20 21 22 23 28 29 30 31 \n 36 37 38 39 44 45 46 47 \n 52 53 54 55 60 61 62 63";
cards[4] = "        CARD FOUR        \n  8  9 10 11 12 13 14 15 \n 24 25 26 27 28 29 30 31 \n 40 41 42 43 44 45 46 47 \n 56 57 58 59 60 61 62 63";
cards[5] = "        CARD FIVE        \n 16 17 18 19 20 21 22 23 \n 24 25 26 27 28 29 30 31 \n 48 49 50 51 52 53 54 55 \n 56 57 58 59 60 61 62 63";
cards[6] = "        CARD  SIX        \n 32 33 34 35 36 37 38 39 \n 40 41 42 43 44 45 46 47 \n 48 49 50 51 52 53 54 55 \n 56 57 58 59 60 61 62 63";
var ccol = new Array("","#AD5173","#9C3863","#6B7994","#C67D4A","#5A2C5A","#5269A5");
var knos = new Array("",1,2,4,8,16,32);

function Nextcard() {
	cn++;
	if(cn == 7) {
		End();
	} else {
		document.getElementById('x').card.value=cards[cn];
		document.getElementById('x').card.style.backgroundColor=ccol[cn];
		document.getElementById('x').text.value="Is your number on the card above?";
	}
}

function Restart() {
	play=0;
	cn=0;
	ttl=0;
	document.getElementById('x').card.style.backgroundColor = "#FFFFFF";
	document.getElementById('x').card.style.color = "#000000";
	document.getElementById('x').card.value = "Think of a number between 1 and 63. Six cards will be displayed. After the last one, your number is revealed.";
	document.getElementById('x').text.value = "Click Start";
	document.getElementById('x').stbt.value = "Start";
}

function Yes() {
	ttl = ttl + knos[cn];
	Nextcard();
}

function Start() {
	document.getElementById('x').card.style.color = "White";
	document.getElementById('x').stbt.value = "Restart";
	play = 1;
	Nextcard();
}

function End() {
	play = 2;
	if(ttl < 10)
	ttl = " " + ttl;
	ttl = " " + ttl;
	var one = ttl.charAt(1);
	var two = ttl.charAt(2);
	document.getElementById('x').card.value = "\n   THE NUMBER YOU WERE   \n    THINKING OF WAS :    \n      -- [ "+one+" "+two+" ] --";
	document.getElementById('x').card.style.color = "black";
	document.getElementById('x').text.value = "Click Restart to play again";
}

function click() {
	event.cancelBubble = true;
	event.returnValue = false;
}




// ------------------------------------------------------------------------------------
// Quiz
// ------------------------------------------------------------------------------------

<!-- Begin
var ans = new Array;
var done = new Array;
var yourAns = new Array;
var explainAnswer = new Array;

var score = 0;
ans[1] = "a";
ans[2] = "c";
ans[3] = "b";
ans[4] = "d";
ans[5] = "a";
ans[6] = "d";
ans[7] = "b";
ans[8] = "c";
ans[9] = "d";
ans[10] = "a";

function Engine(question, answer) {
yourAns[question]=answer;
}

function Score(){
var answerText = "";
for(i=1;i<=10;i++){
   answerText=answerText+"\nQuestion :"+i+"";
  if(ans[i]!=yourAns[i]){
    answerText=answerText+"\nThe correct answer was "+ans[i]+"\n";
  }
  else{
    answerText=answerText+" \nCorrect! ";
    score++;
  }
}

answerText=answerText+"\n\nYour total score is : "+score+"\n";

//now score the user
answerText=answerText+"\nComment : ";
if(score<=0){
answerText=answerText+"You need to learn some more";
}
if(score>=1 && score <=4){
answerText=answerText+"bit more practice";
}
if(score>=4 && score <=7){
answerText=answerText+"doing ok";
}
if(score>8){
answerText=answerText+"You are one hot java babe!";
}

alert(answerText);

}
//  End -->
