window.onload = loadData;

var myPix = new Array("website pix/1.jpg","website pix/2.jpg","website pix/3.jpg","website pix/6.jpg","website pix/7.jpg","website pix/8.jpg","website pix/9.gif","website pix/10.jpg","website pix/12.jpg","website pix/12.jpg","website pix/13.jpg","website pix/14.jpg","website pix/15.jpg","website pix/16.jpg","website pix/17.jpg","website pix/18.jpg","website pix/19.jpg","website pix/20.jpg","website pix/21.jpg","website pix/22.jpg","website pix/23.jpg","website pix/24.jpg","website pix/25.jpg","website pix/26.jpg","website pix/27.jpg","website pix/28.jpg","website pix/29.jpg","website pix/30.jpg","website pix/31.jpg","website pix/32.jpg","website pix/33.jpg","website pix/34.jpg","website pix/35.jpg","website pix/37.jpg","website pix/38.jpg","website pix/39.jpg","website pix/40.jpg","website pix/41.jpg","website pix/42.jpg");
var monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var dayNames = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
      
var thisPic = 0;
var radioWin = null;
var lyricWindow = null;
var songWindow = null;
var reflectWindow = null;
var requestWindow=null;
var IEWindow=null;
var msgWindow=null;
var homeWindow=null;
var thisPrayer=0;
var timerID = null;

var prayerNew = new Array(
"Prayers for Jackie while she is in the hospital, and for her friend Linda surrounding her in prayer.",
"Bless and strengthen all your disciples who are involved in healing ministries.",
"Protect and strengthen all the patients and families who are struggling with illness.",
"Praise God for answering prayer, for knowing us better than we do, and for guiding our footsteps to the path that should be taken.",
"Mary Ann Ernst for healing, and calm for her family.",
"Prayers for Margaret's mom  as she struggles with health concerns and quality of life issues.",
"Help us, O God, to make wise choices especially on the Sabbath day.  Keep our hearts focused on praising your holy name.",
"Please pray for a break through in Sonia's life. She needs a job to help with her finances.",
"PRAY FOR PEACE",
"Please surround Mary Barnes with loving arms of comfort as she suffers with shingles.  Keep her positive spirit strong.",
"Dear Lord, grant wisdom, serenity and compassion for Aaron and his family as they struggle with child custody issues in the courts.",
"Prayers of peace and comfort for the family of Irene Costello, who has entered eternal rest.  Thanks be to God.",
"Prayer for my son - that he may learn from his experience with cancer and follow his heart call to service to other cancer patients.",
"Holy God, place a healing hand on Gertrude Kiely.  Let her regain her strength to sing your praise again.",
"Precious Lord, thank you for the healing and comfort you have given to Lois Burns and her family.",
"Continuing prayer for Phyllis Reid.  Give her strength and hope, O God.  In the name of Jesus.",
"Please pray for Patricia Jerue and her family as she recovers from a stroke.",
"Please heal and strengthen little Kurtus' heart, O God.  Give his mother serenity as they wait for the doctors to diagnose his illness.",
"Comfort our sister Chris while she grieves the loss of her mother.",
"Thank you Jesus for being with Mildred during her recovery from her knee operation.  We rejoice as she regains her strength every day.",
"Bless Alexa and all recent graduates from high school and college.  Help them be wise and safe in the journeys that lie ahead.",
"Please pray for Viola DeLuca.  She is suffering from unrelenting pain.  Comfort her, O God, with your healing hand.",
"One of your children, O God, seeks wisdom, and prays that a choice that was recently made will not lead to death.",
"Lord God, be with the family of Kathy as they seek peace, comfort and understanding following her suicide.",
"Prayers for Kyle in Iraq."
);

var prayerArchive = new Array(
"Prayers for Henry K who is scheduled for knee replacement and has a history of kidney cancer.",
"Bless Linda Cunard and family at the loss of their husband and father.",
"Pray for Ed and Dorothy Ahrens.",
"Strengthen Joan Rauch, O God, as she recovers from kidney surgery.",
"Bless Anne Cuff, Lord Jesus, with love, insight, patience, and more love.",
"Prayers for the health of Hilary Stannard.",
"May Cynthia Legette also be blessed with good health, O Lord.",
"Please pray for Mary Thompson who has heart problems.",
"Please God, guide Tsehai Sophia Harewood in a path of light to great career options.",
"Help our churches to see Christ move in our life together, and in each heart.",
"Healing for Lois in Point Pleaseant Beach.",
"Lord, please renew Aleandre's mind, and set him free from drugs.",
"We pray for healing and health for Dan.",
"Give Dorothy strength in her legs for walking, O Lord.",
"O God, please provide a mission house for John and Kathryn as they seek to serve you in the inner city.",
"Bless the engagement of Trevor and Caryn with love.",
"Bless newly weds Anja and Brook with eternal love and a prosperous life together.",
"Please God, enter the heart of the landlord threatening to evict Betty's family because of a young son in a senior community.",
"Healing of Kate's female health problems.",
"Pray for Joyce who has cervical cancer, and Khama suffering from kidney failure.",
"May the health and financial problems of Liz and Dave King be blessed with healing and resolution.",
"Let there be healing in Coleman Cooper's body, O Lord.",
"Peace for my daughter, and for our soldiers.",
"Prayers for Rev. George Fischer.",
"Special prayers for the family of Deena who passed away.  Especially for her seven year old daughter, Gabby.",
"Healing for Tara Tchalabi.",
"Place a healing hand upon Marilus Rodriguez, O Lord.",
"Be present for healing in Mary Cully, blessed Savior.",
"Healing prayers are needed for Bart Sapp and John Nicholson.",
"Love and blessing to Peggy Arbuckler as she fights cancer.",
"Prayers for Ruth and Henry Smith.",
"Holy God, set Bobbi free from alcohol and mental issues, in your mercy.",
"Prayers for my son and church, O God.",
"Strengthen and heal 17 year old Timothy Frantz who has a recurrance of cancer after 2 1/2 of health.  In the name of Jesus!",
"Prayers for Judy at AUMC.",
"Give peace to Beverly, O God, and help her to see the blessings of life amid her panic attacks.",
"God, please strengthen the body of Ted Carson, and place a healing hand on Valorie Truesdell.",
"May God guide April D'Ambrosio.",
"O Lord, please help Kate complete her nursing program, pass the board exams, and find the place where you need her to be.",
"Pray for Helen Johnson and her son, Christopher, that they may continue to serve God.",
"Healing prayers for Cynthia Bagwell.",
"Prayers for an appointment for Lucy Martinez.",
"Be with Mary Greenberg, O Lord, as she undergoes chemotherapy.",
"Prayers of grace for unsaved family members.",
"Compassion and peace for Pastor Cynthia and the church she serves.  Grow Christ's love in each heart, O God.",
"Prayers for Pete as he seeks workman's compensation for a job related injury.",
"Lord, please bless Bill Hine Jr.",
"In your grace and mercy, O God, protect Edith Crammer as she undergoes cardia cathaterization.",
"Prayers for better health for our Local Pastor.",
"Please help Shawn Cooper complete her school work and ministries; and to be present for her family and church.",
"O Lord, please help all who seek employment to find a way to have the work of their hands be for your glory.",
"Prayers for Ravil Eduardo and Keila Terrero.",
"Protect and strengthen Doreetha Ferguson who struggles with cancer.",
"Be with Judy Tarin as she recovers from breast cancer, Gracious God.",
"Precious Jesus, please touch Joseph with wisdom and light and help him to put away drugs forever.",
"Prayers for Stella as the doctors seek to remove a tumor in her small intestines.",
"We give thanks for the care Lucille McAdams is receiving during her recovery as her caregiver gathers with others in prayer.",
"Grant your wisdom, O God, to R. Matthews as he struggles with the possibility of deportation.",
"Give Virgil a new mind in Christ, new friends, and a desire to be an example of Jesus to others.",
"In your mercy, O Lord, give Kim a change of heart and a pleasant attitude.",
"Thank you, blessed Lord, for receiving Dee Chase into your Kingdom.  We will miss your dedicated servant in your church.",
"Lord God, help us remember the true cost of war, the loss of human life, as we pray for peace.",
"Dear Lord, please give us the power of resurrection.  Roll away the heavy stones that enslave your love in our heart.  Set us free, O God.",
"Lift the Spirit of Hope in Ruby, O God, as she continues her fight with cancer.  Give her life beyond the year the doctor has stated.",
"Prayers for the people in Zimbabwe, and in all places where people suffer in the violence of a brutal regime.",
"Prayers of comfort for all of the families touched by the senseless violence at Virginia Tech.  Lord God, hold them close.",
"Please be with Mildred as she celebrates her 80th year of life, and recovers from knee surgery.  Bless her, Lord, with your love.",
"Lift up and sustain hope within Mahamed as he attains the certification necessary to immigrate into America from Ethiopia and Qatar.",
"Thank you, Jesus, for walking each day with all who seek to know the way of peace, true inner peace, in the world.",
"Prayers for Suzanne and Jamilla, and others who grieve the anniversary of the death of their loved one.",
"Please guide Jamie and her family as she continues her battle with cancer.  May they find their way to your light, Lord, amid the dark valley.",
"We give you thanks and praise, O God, for the servant heart of Tina, and all young people who reach out to others through UP WITH PEOPLE.",
"Comfort for the family of Rev. Robert Paine, who has entered eternal rest.  We thank you, Lord, for sharing your servant with us.",
"May God carry the family of JoBeth, shot to death by her husband.  Our tears and prayers are especially with her 7 month old daughter.",
"Lord, in your mercy, help us to grow the indwelling Christ to be the light of the world.",
"For Amanda - may you remain strong in your resolve to start a new chapter in your life, with just you and your daughter.",
"Strengthen my father, Roy Boyle, as he recovers his strength.  Give him hope, dear Lord, in the name of Jesus.",
"Lord Jesus strengthen Patricia's heart so that she will not need surgery.",
"Heavenly Father, comfort your loving servant Mary as she prepares her eternal journey, and hold her family in your love as they journey with her.",
"Prayers for Algerie as she endures the heartache of being separated from her grandson, Anthony.  Protect them, Lord, and reunite them soon.",
"Help us, O God, to restore the Sabbath day as a holy observance of grateful praise throughout our country - your gift to us.",
"Encourage and uphold young people who have chosen to be confirmed in the church as they claim the name of Christian.",
"Timothy, may you feel grace and love being sent out to you. May you hold them, and feel them cushion you.  Stay strong, your troubles will pass.",
"Thank you, precious Lord, for receiving Bob Leary into your Kingdom.  Please provide comfort to his family in their time of grief.",
"Prayers for Becky Puskas, a lifelong disciple of our Lord Jesus Christ.",
"Help us to keep the sacrament of marriage a holy dedication of one heart to another, in which you pour your blessing.",
"I thank you, Lord, for the gift of my senses.  May I use them all for your glory.",
"Precious Jesus, thank you for receiving Blanche into your Kingdom. Surround her with your love.",
"Prayers of comfort and peace for Ginny as she bears loneliness and the passing of dear friends.",
"Prayers for baby Ray as he is a joy for so many.",
"Merciful and healing God, be with Ruby.  In your abundant love, strengthen her body and help her feel the presence of your Holy Spirit.",
"God of all humanity, teach us to encourage and love one another as we journey through life.",
"O God, lift Steve and Sharon Lutz in grace, strength, and mercy as they struggle with illness and unanswered questions.",
"Precious Lord, help us to make you the number one priority in our life.",
"Loving and sustaining Lord, be with John Totin to center him in peace as he fights a spiritual warfare for his friend.",
"Please pray for Jane Smith and her family.",
"Heavenly Father, send your gift of courage and discernment to community leaders.  Grant them the wisdom to guide others in your light.",
"For those working with the sick and dying; that they continue to be instruments of peace, love and joy.",
"Strength and healing for Cathy. Keep her positive attitude strong to fight her illness.",
"Praise God for helping Serena to walk. Praise the steadfast love of God.",
"Mighty God, lift Ronald and give him strength to live with his ailments.  Fill him with hope, O Lord.",
"O Lord, thank you for your healing hand upon Rev. George Frederick, that he may continue to serve your holy name.",
"Prayers of encouragement and support for Phyllis Reid",
"Prayers for my 96 year old friend, Ethel Bethea.  May God give her strength to continue sharing the boldness of her faith.",
"Grant us the inner peace to feel at home in the thin places where we meet God face-to-face.",
"Heal broken hearts, O God, and guide your people through times of grief",
"Peace and comfort for the family of Ludavic Supreme, a true disciple who has entered into the Kingdom of God.",
"Help us to feel the presence of God in the midst of suffering",
"Father God, continue to use Chaplain Kelvin Ward in the Hospital.",
"Please pray for Margie and her family.",
"In your mercy, O Lord, relieve Cheryl of her pain.  Comfort her with your compassionate love.",
"Continuing prayers for Julie's family, and for all families still recovering in New Orleans.",
"Healing for Louise Yurinko",
"Heavenly Father, bless Serena Joy as she struggles to speak. Protect, strengthen, and grant wisdom to her parents as they care for her.",
"Gracious God, shelter the homeless",
"For families having to make difficult end of life decisions for their loved ones, grant them wisdom, peace, and compassion, O Lord.",
"Send your Spirit into your churches, O God",
"Lord Jesus, please protect and comfort Mycroft as he struggles with sickle cell anemia.",
"Feed Darfur, O Lord",
"For Beatrice as she prays earnestly for her son, and for all of her children.",
"Uphold Pastor Esther, O God, as she struggles with human authorities of the church.  Help her remember your call upon her life.",
"Precious Jesus, shine your light into our hearts",
"Pray for peace in Iraq",
"Heavenly Father, please bless this online prayer ministry with your grace",
"Prayers for a quick recovery for Bob Carhart, who had an operation on his knees.",
"Dear God, make us like little children",
"For Joey - to be released from the prison of addiction",
"Blessed Jesus, help the leaders of your church proclaim the truth of the Gospel boldly",
"Thank you, Lord, for guiding Lisa to a job she can enjoy, and in which she can share the gift of Christian friendliness",
"Pray for children in abusive situations",
"Dear God, help us to be careful and loving in all we say to and about others. Amen.",
"Healing for Ray",
"Bless couples who have been blessed with love, and who are seeking the blessing of God in marriage.",
"Prayers for the family of Fred Gmitter",
"Dear Lord heal us in a world that sometimes feels like there is a spiritual famine",
"Prayers for Alex Cahills - whose life is turning fast",
"For my son-in-law who is seeking direction from God for his career",
"Pray for Diane, who has a brain tumor",
"Prayers of strength and support for Bruce and Curt during their move to a new home",
"Lord Jesus, have mercy on us",
"Protect Bill Hargrove, champion of musicians, and heal his body",
"Heavenly Father, please strengthen the voice of Veronica so that she can praise your name with her song.",
"For Tim, that he finishes his time in the army with a healthy mind, body, and soul.",
"May the hand of the Lord touch people immigrating to this country, and the Holy Spirit fill them with peace, and joy",
"Please pray for Gary who has lymphoma.",
"Gracious God, enable the patients at Ancora Psychiatric Hospital to feel your loving comfort.",
"For Thomas - that all obstacles, sufferings, and difficult situations leave his life, and he be filled with happiness, peace, wealth, and success",
"Prayers for Lisa Marie that she might find her way back home.",
"May all pastors remember the day of their calling to serve God as a source of inspiration and gratitude.",
"Let Freddie Lee Howard receive a complete healing, O God, in your grace and mercy.",
"Heavenly father strengthen Robert and provide him with wisdom and peace as he adjusts to a new living situation.",
"Bring peace into our world through the lovingkindness of each of our hearts."
);

function loadData() {
	getPageTitle();
	choosePic();
	loadPrayers(prayerNew, "newp");
}

function getPageTitle() {
	document.getElementById("getPageName").innerHTML = document.title;
}

function customDateString(oneDate) {
    var theDay = dayNames[oneDate.getDay()];
    var theMonth = monthNames[oneDate.getMonth()];
    var theYear = oneDate.getFullYear();
    return theDay + ", " + theMonth + " " + oneDate.getDate() + 
       ", " + theYear;
}

function dayPart(oneDate) {
   var theHour = oneDate.getHours();
   if (theHour < 6 )
      return "tonight";
   if (theHour < 12)
      return "this morning";
   if (theHour < 18)
      return "this afternoon";
   return "this evening";
}

function choosePic() {
	thisPic = Math.floor((Math.random() * myPix.length));
	document.getElementById("myPicture").src = myPix[thisPic];
	
	rotatePictures();
}

function rotatePictures() {
	thisPic++;
	if(thisPic==myPix.length) {
		thisPic = 0;
	}
	document.getElementById("myPicture").src = myPix[thisPic];
	
	setTimeout("rotatePictures()", 10*1000);
}

function loadPrayers(thisList, listType) {
	prayerList=thisList;
	thisType=listType;
	clearTimeout(timerID);
	thisPrayer= Math.floor((Math.random() * prayerList.length));
	if(thisType=="newp") {
		document.getElementById("newp").innerHTML="You are reading New Prayers";
		document.getElementById("oldp").innerHTML=" ";
	}
	else {
		document.getElementById("oldp").innerHTML="You are reading Prayer Archive";
		document.getElementById("newp").innerHTML=" ";
	}
	rotatePrayers();
}

function rotatePrayers() {
	thisPrayer++;
	if(thisPrayer==prayerList.length) {
		thisPrayer = 0;
	}
	document.getElementById("prayers").innerHTML=prayerList[thisPrayer];

	timerID=setTimeout("rotatePrayers()", 8*1000);
}

function nextPrayer() {
	thisPrayer++;
	if(thisPrayer==prayerList.length) {
		thisPrayer = 0;
	}
	document.getElementById("prayers").innerHTML=prayerList[thisPrayer];
	clearTimeout(timerID);
	timerID=setTimeout("rotatePrayers()", 8*1000);
}

function prevPrayer() {
	thisPrayer--;
	if(thisPrayer<0) {
		thisPrayer = prayerList.length-1;
	}
	document.getElementById("prayers").innerHTML=prayerList[thisPrayer];
	clearTimeout(timerID);
	timerID=setTimeout("rotatePrayers()", 8*1000);
}

function closeWin(thisWindow){
	if (thisWindow!= null){
		if(!thisWindow.closed)
			thisWindow.close();
	}
}

function goHome(url) {
	closeWin(homeWindow);
	var settings="";
	settings="toolbar=yes,location=yes,directories=yes,"+
	"status=yes,menubar=yes,scrollbars=yes,"+
	"resizable=yes";
	
	homeWindow = window.open(url, 'homeWin', settings);
}

function prayersongRadio(url,width,height) {
	closeWin(radioWin);
	var settings="";
	settings="toolbar=no,location=no,directories=no,"+
	"status=no,menubar=no,scrollbars=no,"+
	"resizable=yes,left=50,top=100,width="+width+",height="+height;
	
	radioWin = window.open(url, 'radioWin', settings);
}

function openLyrics(url, width, height){
	
	closeWin(lyricWindow);
	
	var settings="";
	settings="toolbar=no,location=no,directories=no,"+
	"status=no,menubar=no,scrollbars=no,"+
	"resizable=yes,left=50,top=100,width="+width+",height="+height;
	
	lyricWindow = window.open(url, 'lyricWin', settings);
	lyricWindow.focus();
	
}

function openReflections(url, width, height){
	
	closeWin(reflectWindow);
	
	var settings="";
	settings="toolbar=no,location=no,directories=no,"+
	"status=no,menubar=no,scrollbars=yes,"+
	"resizable=yes,left=50,top=100,width="+width+",height="+height;
	
	reflectWindow= window.open(url, 'reflectWin', settings);
	reflectWindow.focus();
	
}

function openPrayerRequest(url, width, height){
	
	closeWin(requestWindow);
	var settings="";
	
	var settings="";
	settings="toolbar=no,location=no,directories=no,"+
	"status=no,menubar=no,scrollbars=yes,"+
	"resizable=yes,left=377,top=150,width="+width+",height="+height;
	
	requestWindow= window.open(url, 'reflectWin', settings);
	requestWindow.focus();
	
}

function openMsgWindow(url, width, height){
	
	closeWin(msgWindow);
	var settings="";
	
	var settings="";
	settings="toolbar=no,location=no,directories=no,"+
	"status=no,menubar=no,scrollbars=yes,"+
	"resizable=yes,left=377,top=150,width="+width+",height="+height;
	
	msgWindow= window.open(url, 'msgWin', settings);
	msgWindow.focus();
	
}

function alertWindow(message) {
	alert(message);
}

function checkForIE(url, width, height){
	var settings="";
	
	var settings="toolbar=no,location=no,directories=no,"+
	"status=no,menubar=no,scrollbars=yes,"+
	"resizable=no,left=400,top=150,width="+width+",height="+height;
	
	var msie = msieversion();
	if(msie> 0) {
		alert("Please use 'Email Prayer Request' - Internet Explorer does not support 'Prayer Request Form' - IE version #" +msie);
		
		closeWin(IEWindow);
		openIEWindow("http://www.prayersong.net/emailPrayer.htm",250,350);
		return true;
	}
	return false;
}

function openIEWindow(url,width,height) {
	closeWin(IEWindow);
	
	var settings="";
	settings="toolbar=no,location=no,directories=no,"+
	"status=no,menubar=no,scrollbars=yes,"+
	"resizable=yes,left=500,top=300,width="+width+",height="+height;
	
	IEWindow= window.open(url, 'IEWindow', settings);
	IEWindow.focus();
}

function msieversion() {
      var ua = window.navigator.userAgent
      var msie = ua.indexOf ( "MSIE " )

      if ( msie > 0 )      // If Internet Explorer, return version number
         return parseInt (ua.substring (msie+5, ua.indexOf (".", msie )))
      else                 // If another browser, return 0
         return 0
}

function openSong(url, width, height){
	
	closeWin(songWindow);
	
	var settings="";
	settings="toolbar=no,location=no,directories=no,"+
	"status=no,menubar=no,scrollbars=yes,"+
	"resizable=yes,left=50,top=100,width="+width+",height="+height;
	
	songWindow= window.open(url, 'songWin', settings);
	songWindow.focus();
	
}

//Contents for menu 1
var resources=new Array()
	resources[0]='<a href="http://www.prayersong.net/resources.htm">Overview</a>'	
	resources[2]='<a href="http://www.prayersong.net/albums.htm">Albums</a>'
	resources[3]='<a href="http://www.prayersong.net/waterVideos.htm">Videos</a>'
	resources[4]='<a href="http://www.prayersong.net/song books.htm">Songbooks</a>'	
	resources[5]='<a href="http://www.prayersong.net/orchestrations.htm">Orchestrations</a>'
	resources[6]='<a href="http://www.prayersong.net/workshops.htm">Workshops</a>'

	
var listen=new Array()
	listen[0]='<a href="http://www.prayersong.net/songmovies.htm">Movies</a>'
	listen[1]='<a href="http://www.prayersong.net/calltoprayer.htm">Call to Prayer (CD 1)</a>'
	listen[2]='<a href="http://www.prayersong.net/onthemount.htm">On the Mount (CD2)</a>'
	listen[3]='<a href="http://www.prayersong.net/singingiam.htm">Singing I AM (CD 3)</a>'
	listen[4]='<a href="http://www.prayersong.net/throughthecross.htm">Through the Cross (CD 4)</a>'
	listen[5]='<a href="http://www.prayersong.net/weston.htm">Flute Meditations</a>'
	listen[6]='<a href="http://www.prayersong.net/waterVideos.htm">Water Meditations</a>'
	
var prayer=new Array()
	prayer[0]='<a href="http://www.prayersong.net/prayercenter.htm">Prayer Center</a>'
	prayer[1]='<a href="http://www.prayersong.net/prayForPeace.htm">Pray For Peace</a>'
	prayer[2]='<a href="http://www.prayersong.net/liturgies.htm">Liturgies</a>'
	prayer[3]='<a href="http://www.prayersong.net/sundaybulletin.htm">Worship Bulletin</a>'
	prayer[4]='<a href="http://www.prayersong.net/prayercircle.htm">Prayer Circle</a>'
	prayer[5]='<a href="http://www.prayersong.net/special message.htm">Special Message</a>'
	
var action=new Array()
	action[0]='<a href="http://www.prayersong.net/links.htm">Faith In Action</a>'
	action[1]='<a href="http://www.prayersong.net/nodcc.htm">Help A Child</a>'	
	action[2]='<a href="http://www.prayersong.net/freegifts.htm">Free Gifts</a>'
	action[3]='<a href="http://www.prayersong.net/churches.htm">Find A Church</a>'
	
var about=new Array()
	about[0]='<a href="http://www.prayersong.net/prayersong.htm">About PrayerSong</a>'
	about[1]='<a href="http://www.prayersong.net/about.htm">About Frederick</a>'
	about[2]='<a href="http://www.prayersong.net/classicalworks.htm">Classical Music</a>'

var menuwidth='160px' //default menu width
var menubgcolor='CCCCFF'  //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="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

