Forum Moderators: open
If any one is shaking their head thinking there is a much simpler way, please feel free to let me know.
Cheers
<html>
<head>
<link rel="shortcut icon" href="favicon.ico" >
<title>Angel Reading</title>
<link href="AngelMessenger.css" rel="stylesheet" type="text/css" />
<script language="Javascript" type="text/javascript">
<!--
<!-- Hide script from old browsers
myPix1 = new Array("A_New_Dawn.jpg ","Accept_Heaven's_Help.jpg","Adriana.jpg","Akasha.jpg","Alchemy.jpg", "Archangel_Gabrielle.jpg", "Archangel_Michael.jpg", "Archangel_Raphael.jpg", "Archangel_Uriel.jpg", "Arielle.jpg", "Astara.jpg", "Athena.jpg", "Aurora.jpg", "Azure.jpg", "Bethany.jpg", "Blessed_Change.jpg", "Break_Free.jpg", "Bridgette.jpg", "Caressa.jpg", "Celeste.jpg", "Chantall.jpg", "Consult_an_Expert.jpg", "Contemplation_Time.jpg", "Crystal.jpg", "Daniel.jpg", "Desiree.jpg", " Divine_Magic.jpg",
"Dream_Big.jpg", "Empowerment.jpg", "Explore_Your_Options.jpg", "Father_Healing.jpg", "Fiona.jpg", "Francesca.jpg", "Friendship.jpg", "Grace_&_Antoinette.jpg", "Have_Faith.jpg", "Healing_Heart.jpg", "Helpful_Person.jpg", "Indriel.jpg", "Isabella.jpg", "Isaiah.jpg", "Leila.jpg", "Let_Yourself_Receive.jpg", "Make_a_Decision.jpg", "Make_a_Wish.jpg", "Maya.jpg", "Merlina.jpg", "Morning_Affirmations.jpg", "Mother_ Healing.jpg", "Music_for_Manifesting.jpg", "Mystique.jpg", "Oceana.jpg", "Omega.jpg", "Opal.jpg",
"Patience.jpg", "Pay_Attention.jpg", "Play_time.jpg", "Positive_Energy.jpg", "Protection.jpg", "Raye.jpg", "Ready_set_go.jpg", "Rest.jpg", "Rochelle.jpg", "Rosetta.jpg", "Self-Forgiveness.jpg", "Self_employment.jpg", "Serena.jpg", "Serephina.jpg", "Set_Your_Sights_Higher.jpg", "Shanti.jpg", "Simplify_Your_Life.jpg", "Sonya.jpg", "Soulmate_Relationship.jpg", "Stay_Optimistic.jpg", "Syncronicity.jpg", "Teresa.jpg", "Time_to_Move_On.jpg", "Tranquility.jpg", "Treasure_Chest.jpg", "Vanessa.jpg", "Wait.jpg", "Watch_Your_thoughts.jpg", "Waves_of_Prosperity.jpg", "Worthiness.jpg", "Yes.jpg", "You're_Being_Helped.jpg", "Yvonne.jpg", "Zanna.jpg" )
myPix2 = new Array("A_New_Dawn.jpg","Accept_Heaven's_Help.jpg","Adriana.jpg","Akasha.jpg","Alchemy.jpg", "Archangel_Gabrielle.jpg", "Archangel_Michael.jpg", "Archangel_Raphael.jpg", "Archangel_Uriel.jpg", "Arielle.jpg", "Astara.jpg", "Athena.jpg", "Aurora.jpg", "Azure.jpg", "Bethany.jpg", "Blessed_Change.jpg", "Break_Free.jpg", "Bridgette.jpg", "Caressa.jpg", "Celeste.jpg", "Chantall.jpg", "Consult_an_Expert.jpg", "Contemplation_Time.jpg", "Crystal.jpg", "Daniel.jpg", "Desiree.jpg", " Divine_Magic.jpg",
"Dream_Big.jpg", "Empowerment.jpg", "Explore_Your_Options.jpg", "Father_Healing.jpg", "Fiona.jpg", "Francesca.jpg", "Friendship.jpg", "Grace_&_Antoinette.jpg", "Have_Faith.jpg", "Healing_Heart.jpg", "Helpful_Person.jpg", "Indriel.jpg", "Isabella.jpg", "Isaiah.jpg", "Leila.jpg", "Let_Yourself_Receive.jpg", "Make_a_Decision.jpg", "Make_a_Wish.jpg", "Maya.jpg", "Merlina.jpg", "Morning_Affirmations.jpg", "Mother_ Healing.jpg", "Music_for_Manifesting.jpg", "Mystique.jpg", "Oceana.jpg", "Omega.jpg", "Opal.jpg",
"Patience.jpg", "Pay_Attention.jpg", "Play_time.jpg", "Positive_Energy.jpg", "Protection.jpg", "Raye.jpg", "Ready_set_go.jpg", "Rest.jpg", "Rochelle.jpg", "Rosetta.jpg", "Self-Forgiveness.jpg", "Self_employment.jpg", "Serena.jpg", "Serephina.jpg", "Set_Your_Sights_Higher.jpg", "Shanti.jpg", "Simplify_Your_Life.jpg", "Sonya.jpg", "Soulmate_Relationship.jpg", "Stay_Optimistic.jpg", "Syncronicity.jpg", "Teresa.jpg", "Time_to_Move_On.jpg", "Tranquility.jpg", "Treasure_Chest.jpg", "Vanessa.jpg", "Wait.jpg", "Watch_Your_thoughts.jpg", "Waves_of_Prosperity.jpg", "Worthiness.jpg", "Yes.jpg", "You're_Being_Helped.jpg", "Yvonne.jpg", "Zanna.jpg" )
myPix3 = new Array("A_New_Dawn.jpg","Accept_Heaven's_Help.jpg","Adriana.jpg","Akasha.jpg","Alchemy.jpg", "Archangel_Gabrielle.jpg", "Archangel_Michael.jpg", "Archangel_Raphael.jpg", "Archangel_Uriel.jpg", "Arielle.jpg", "Astara.jpg", "Athena.jpg", "Aurora.jpg", "Azure.jpg", "Bethany.jpg", "Blessed_Change.jpg", "Break_Free.jpg", "Bridgette.jpg", "Caressa.jpg", "Celeste.jpg", "Chantall.jpg", "Consult_an_Expert.jpg", "Contemplation_Time.jpg", "Crystal.jpg", "Daniel.jpg", "Desiree.jpg", " Divine_Magic.jpg",
"Dream_Big.jpg", "Empowerment.jpg", "Explore_Your_Options.jpg", "Father_Healing.jpg", "Fiona.jpg", "Francesca.jpg", "Friendship.jpg", "Grace_&_Antoinette.jpg", "Have_Faith.jpg", "Healing_Heart.jpg", "Helpful_Person.jpg", "Indriel.jpg", "Isabella.jpg", "Isaiah.jpg", "Leila.jpg", "Let_Yourself_Receive.jpg", "Make_a_Decision.jpg", "Make_a_Wish.jpg", "Maya.jpg", "Merlina.jpg", "Morning_Affirmations.jpg", "Mother_ Healing.jpg", "Music_for_Manifesting.jpg", "Mystique.jpg", "Oceana.jpg", "Omega.jpg", "Opal.jpg",
"Patience.jpg", "Pay_Attention.jpg", "Play_time.jpg", "Positive_Energy.jpg", "Protection.jpg", "Raye.jpg", "Ready_set_go.jpg", "Rest.jpg", "Rochelle.jpg", "Rosetta.jpg", "Self-Forgiveness.jpg", "Self_employment.jpg", "Serena.jpg", "Serephina.jpg", "Set_Your_Sights_Higher.jpg", "Shanti.jpg", "Simplify_Your_Life.jpg", "Sonya.jpg", "Soulmate_Relationship.jpg", "Stay_Optimistic.jpg", "Syncronicity.jpg", "Teresa.jpg", "Time_to_Move_On.jpg", "Tranquility.jpg", "Treasure_Chest.jpg", "Vanessa.jpg", "Wait.jpg", "Watch_Your_thoughts.jpg", "Waves_of_Prosperity.jpg", "Worthiness.jpg", "Yes.jpg", "You're_Being_Helped.jpg", "Yvonne.jpg", "Zanna.jpg" )
myPix4 = new Array("A_New_Dawn.jpg","Accept_Heaven's_Help.jpg","Adriana.jpg","Akasha.jpg","Alchemy.jpg", "Archangel_Gabrielle.jpg", "Archangel_Michael.jpg", "Archangel_Raphael.jpg", "Archangel_Uriel.jpg", "Arielle.jpg", "Astara.jpg", "Athena.jpg", "Aurora.jpg", "Azure.jpg", "Bethany.jpg", "Blessed_Change.jpg", "Break_Free.jpg", "Bridgette.jpg", "Caressa.jpg", "Celeste.jpg", "Chantall.jpg", "Consult_an_Expert.jpg", "Contemplation_Time.jpg", "Crystal.jpg", "Daniel.jpg", "Desiree.jpg", " Divine_Magic.jpg",
"Dream_Big.jpg", "Empowerment.jpg", "Explore_Your_Options.jpg", "Father_Healing.jpg", "Fiona.jpg", "Francesca.jpg", "Friendship.jpg", "Grace_&_Antoinette.jpg", "Have_Faith.jpg", "Healing_Heart.jpg", "Helpful_Person.jpg", "Indriel.jpg", "Isabella.jpg", "Isaiah.jpg", "Leila.jpg", "Let_Yourself_Receive.jpg", "Make_a_Decision.jpg", "Make_a_Wish.jpg", "Maya.jpg", "Merlina.jpg", "Morning_Affirmations.jpg", "Mother_ Healing.jpg", "Music_for_Manifesting.jpg", "Mystique.jpg", "Oceana.jpg", "Omega.jpg", "Opal.jpg",
"Patience.jpg", "Pay_Attention.jpg", "Play_time.jpg", "Positive_Energy.jpg", "Protection.jpg", "Raye.jpg", "Ready_set_go.jpg", "Rest.jpg", "Rochelle.jpg", "Rosetta.jpg", "Self-Forgiveness.jpg", "Self_employment.jpg", "Serena.jpg", "Serephina.jpg", "Set_Your_Sights_Higher.jpg", "Shanti.jpg", "Simplify_Your_Life.jpg", "Sonya.jpg", "Soulmate_Relationship.jpg", "Stay_Optimistic.jpg", "Syncronicity.jpg", "Teresa.jpg", "Time_to_Move_On.jpg", "Tranquility.jpg", "Treasure_Chest.jpg", "Vanessa.jpg", "Wait.jpg", "Watch_Your_thoughts.jpg", "Waves_of_Prosperity.jpg", "Worthiness.jpg", "Yes.jpg", "You're_Being_Helped.jpg", "Yvonne.jpg", "Zanna.jpg" )
myPix5 = new Array("A_New_Dawn.jpg","Accept_Heaven's_Help.jpg","Adriana.jpg","Akasha.jpg","Alchemy.jpg", "Archangel_Gabrielle.jpg", "Archangel_Michael.jpg", "Archangel_Raphael.jpg", "Archangel_Uriel.jpg", "Arielle.jpg", "Astara.jpg", "Athena.jpg", "Aurora.jpg", "Azure.jpg", "Bethany.jpg", "Blessed_Change.jpg", "Break_Free.jpg", "Bridgette.jpg", "Caressa.jpg", "Celeste.jpg", "Chantall.jpg", "Consult_an_Expert.jpg", "Contemplation_Time.jpg", "Crystal.jpg", "Daniel.jpg", "Desiree.jpg", " Divine_Magic.jpg",
"Dream_Big.jpg", "Empowerment.jpg", "Explore_Your_Options.jpg", "Father_Healing.jpg", "Fiona.jpg", "Francesca.jpg", "Friendship.jpg", "Grace_&_Antoinette.jpg", "Have_Faith.jpg", "Healing_Heart.jpg", "Helpful_Person.jpg", "Indriel.jpg", "Isabella.jpg", "Isaiah.jpg", "Leila.jpg", "Let_Yourself_Receive.jpg", "Make_a_Decision.jpg", "Make_a_Wish.jpg", "Maya.jpg", "Merlina.jpg", "Morning_Affirmations.jpg", "Mother_ Healing.jpg", "Music_for_Manifesting.jpg", "Mystique.jpg", "Oceana.jpg", "Omega.jpg", "Opal.jpg",
"Patience.jpg", "Pay_Attention.jpg", "Play_time.jpg", "Positive_Energy.jpg", "Protection.jpg", "Raye.jpg", "Ready_set_go.jpg", "Rest.jpg", "Rochelle.jpg", "Rosetta.jpg", "Self-Forgiveness.jpg", "Self_employment.jpg", "Serena.jpg", "Serephina.jpg", "Set_Your_Sights_Higher.jpg", "Shanti.jpg", "Simplify_Your_Life.jpg", "Sonya.jpg", "Soulmate_Relationship.jpg", "Stay_Optimistic.jpg", "Syncronicity.jpg", "Teresa.jpg", "Time_to_Move_On.jpg", "Tranquility.jpg", "Treasure_Chest.jpg", "Vanessa.jpg", "Wait.jpg", "Watch_Your_thoughts.jpg", "Waves_of_Prosperity.jpg", "Worthiness.jpg", "Yes.jpg", "You're_Being_Helped.jpg", "Yvonne.jpg", "Zanna.jpg" )
function choosePix() {
if (document.images) {
randomNum = Math.floor((Math.random() * myPix1.length))
document.myPicture1.src = myPix1[randomNum]
randomNum = Math.floor((Math.random() * myPix2.length))
document.myPicture2.src = myPix2[randomNum]
randomNum = Math.floor((Math.random() * myPix3.length))
document.myPicture3.src = myPix3[randomNum]
randomNum = Math.floor((Math.random() * myPix4.length))
document.myPicture4.src = myPix4[randomNum]
randomNum = Math.floor((Math.random() * myPix5.length))
document.myPicture5.src = myPix5[randomNum]
}
}
// End hiding script from old browsers -->
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<style type="text/css">
<!--
a:link {
text-decoration: none;
color: #DDDE5E;
}
a:visited {
text-decoration: none;
color: #DDDE5E;
}
a:hover {
text-decoration: underline;
color: #00FFFF;
}
a:active {
text-decoration: none;
}
-->
</style>
</head>
<body onload="choosePix();">
<div id="wrapper-TL"></div>
<div id="wrapper-TR">
<div align="center"></div>
<table width="100%" border="0">
<tr>
<td colspan="3" align="center" valign="top"><table width="662" border="0" cellspacing="5">
<tr align="left" valign="top">
<td width="265"> </td>
<td width="265"><div align="center"><img src="Back_of_Card-low.jpg" alt="angel image" name="myPicture1" width="265" height="365" /><strong><br />
5</strong></div></td>
<td width="106"> </td>
</tr>
<tr align="left" valign="top">
<td height="396"><div align="center"><img src="Back_of_Card-low.jpg" width="265" height="365" name="myPicture3" alt="angel image" /><strong><br />
3</strong></div></td>
<td><div align="center"><img src="Back_of_Card-low.jpg" width="265" height="375" name="myPicture2" alt="angel image" /><strong><br />
2</strong></div></td>
<td><div align="center"><img src="Back_of_Card-low.jpg" width="265" height="375" name="myPicture4" alt="angel image" /><strong><br />
4</strong></div></td>
</tr>
<tr align="left" valign="top">
<td> </td>
<td><div align="center"><img src="Back_of_Card-low.jpg" width="265" height="375" name="myPicture5" alt="angel image" /><strong><br />
1</strong></div></td>
<td> </td>
</tr>
</table> </td>
</tr>
</table>
</body>
</html>
<!DOCTYPE - Be sure to use one of these!
<html>
<head>
<title>Angel Reading</title>
<script type="text/javascript">
window.onload = function(){choosePix();}
var picsNlinks = [
{ "pic":"A_New_Dawn.jpg" , "link":"A_New_Dawn.html" },
{ "pic":"Accept_Heaven\'s_Help.jpg" , "link":"Accept_Heaven\'s_Help.html" },
{ "pic":"Adriana.jpg" , "link":"Adriana.html" },
{ "pic":"Akasha.jpg" , "link":"Akasha.html" },
{ "pic":"Alchemy.jpg" , "link":"Alchemy.html" },
{ "pic":"Archangel_Gabrielle.jpg" , "link":"Archangel_Gabrielle.html" },
{ "pic":"Archangel_Michael.jpg" , "link":"Archangel_Michael.html" },
{ "pic":"Archangel_Raphael.jpg" , "link":"Archangel_Raphael.html" },
{ "pic":"Archangel_Uriel.jpg" , "link":"Archangel_Uriel.html" },
{ "pic":"Arielle.jpg" , "link":"Arielle.html" },
{ "pic":"Astara.jpg" , "link":"Astara.html" },
{ "pic":"Athena.jpg" , "link":"Athena.html" },
{ "pic":"Aurora.jpg" , "link":"Aurora.html" },
{ "pic":"Azure.jpg" , "link":"Azure.html" },
{ "pic":"Bethany.jpg" , "link":"Bethany.html" },
{ "pic":"Blessed_Change.jpg" , "link":"Blessed_Change.html" },
{ "pic":"Break_Free.jpg" , "link":"Break_Free.html" },
{ "pic":"Bridgette.jpg" , "link":"Bridgette.html" },
{ "pic":"Caressa.jpg" , "link":"Caressa.html" },
{ "pic":"Celeste.jpg" , "link":"Celeste.html" } /***Note no comma (,) after the last item!***/
];
/*** Continue the above pattern... I did the first 20! Be sure to observe the syntax and don't forget the comma's (,) or colons (:), the white (blank) spaces I left in are irrelevant - just easier to look at. Note "pic" and "link" are just 'made up' names and can be whatever you want as long as same throughout. If wanted you can expand it to use more name:value pairs in each item, such as adding a ,"title":"value" to each. Also, I would not recommend testing this with less than 20 items in the array if there are 5 images being chosen (see my next comment below about the 'if' statement in the function), as testing revealed the choosePix function needed to run anywheres from 1 to 5 times on rare occassions - with the - 20 array items/5 on page - combo.(This can be confirmed by adding a simple line - alert("choosePix function ran"); above the 'if' statement). I suspect with 80 items it will very rarely need to re-run ***/
function choosePix()
{
rNum1 = Math.floor((Math.random() * picsNlinks.length));
rNum2 = Math.floor((Math.random() * picsNlinks.length));
rNum3 = Math.floor((Math.random() * picsNlinks.length));
rNum4 = Math.floor((Math.random() * picsNlinks.length));
rNum5 = Math.floor((Math.random() * picsNlinks.length));
/*** The 'if' statement below checks to make sure none of the numbers are duplicates, so no two images on the page (or links) of the five will be the same. If a duplicate (rNum1 same as rNum4 for example) is found, this function will start over and choose new random numbers. ***/
if (rNum1==rNum2 ¦¦ rNum1==rNum3 ¦¦ rNum1==rNum4 ¦¦ rNum1==rNum5 ¦¦ rNum2==rNum3 ¦¦ rNum2==rNum4 ¦¦ rNum2==rNum5 ¦¦ rNum3==rNum4 ¦¦ rNum3==rNum5 ¦¦ rNum4==rNum5)
{
setTimeout(choosePix,10); /***schedule this function to run again - 10=1/100th sec. delay ***/
return; /***stop this function first - it just seems right!***/
}
else
{
/*** I added in the .alt property changes below just for demo (you will see them if you test this in a folder without the actual images - as I did), although may be good idea to leave them in. You could expand this more to add in changing the .title property of the image also - if you want descriptive text tooltips (only IE [incorrectly] shows alt text as tooltips, should use title= for that) that are different for each random image. Or just add in changing the .title and use the .pic for it like I did here with the .alt's ***/
document.getElementById("myPicture1").src = picsNlinks[rNum1].pic;
document.getElementById("myPicture1").alt = picsNlinks[rNum1].pic;
document.getElementById("chglink1").href = picsNlinks[rNum1].link;
document.getElementById("myPicture2").src = picsNlinks[rNum2].pic;
document.getElementById("myPicture2").alt = picsNlinks[rNum2].pic;
document.getElementById("chglink2").href = picsNlinks[rNum2].link;
document.getElementById("myPicture3").src = picsNlinks[rNum3].pic;
document.getElementById("myPicture3").alt = picsNlinks[rNum3].pic;
document.getElementById("chglink3").href = picsNlinks[rNum3].link;
document.getElementById("myPicture4").src = picsNlinks[rNum4].pic;
document.getElementById("myPicture4").alt = picsNlinks[rNum4].pic;
document.getElementById("chglink4").href = picsNlinks[rNum4].link;
document.getElementById("myPicture5").src = picsNlinks[rNum5].pic;
document.getElementById("myPicture5").alt = picsNlinks[rNum5].pic;
document.getElementById("chglink5").href = picsNlinks[rNum5].link;
}
}
/*** The popitup function below takes three parameters which need to be passed to it from the onclicks. url is the page to link to (this.href will be whatever the href= value has been changed to by the script), nWwd is the width of the new window being opened, nWhg is the height of the new window. This function will center the new window on the users screen (approximately - the '60' in the y variable may need to be adjusted if toolbars or menubars or status bars or locationbars are changed to 'no'). This way you can change the size of the new window in different onclicks if wanted, or just make them all the same. ***/
function popitup(url,nWwd,nWhg)
{
var x = (screen.width-nWwd)/2;
var y = (screen.height-nWhg)/2-60;
window.open(url,"_blank","toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, width="+nWwd+", height="+nWhg+", left="+x+", top="+y);
}
</script>
<style type="text/css">
img {border:0;} /*** prevent blue border around linked images ***/
</style>
</head>
<body>
<div>
1<a href="defaultpage1.html" id="chglink1" onclick="popitup(this.href,600,500);return false;">
<img src="Back_of_Card-low.jpg" width="265" height="365" id="myPicture1" alt="angel image" /></a>
2<a href="defaultpage2.html" id="chglink2" onclick="popitup(this.href,600,500);return false;">
<img src="Back_of_Card-low.jpg" width="265" height="375" id="myPicture2" alt="angel image" /></a>
3<a href="defaultpage3.html" id="chglink3" onclick="popitup(this.href,600,500);return false;">
<img src="Back_of_Card-low.jpg" width="265" height="365" id="myPicture3" alt="angel image" /></a>
4<a href="defaultpage4.html" id="chglink4" onclick="popitup(this.href,600,500);return false;">
<img src="Back_of_Card-low.jpg" width="265" height="375" id="myPicture4" alt="angel image" /></a>
5<a href="defaultpage5.html" id="chglink5" onclick="popitup(this.href,600,500);return false;">
<img src="Back_of_Card-low.jpg" width="265" height="375" id="myPicture5" alt="angel image" /></a>
</div>
</body>
</html>