/*****************************************************************************
Copyright (c) 2001 Thomas Brattli (webmaster@dhtmlcentral.com)

DHTML coolMenus - Get it at coolmenus.dhtmlcentral.com
Version 4.0_beta
This script can be used freely as long as all copyright messages are
intact.

Extra info - Coolmenus reference/help - Extra links to help files **** 
CSS help: http://192.168.1.31/projects/coolmenus/reference.asp?m=37
General: http://coolmenus.dhtmlcentral.com/reference.asp?m=35
Menu properties: http://coolmenus.dhtmlcentral.com/properties.asp?m=47
Level properties: http://coolmenus.dhtmlcentral.com/properties.asp?m=48
Background bar properties: http://coolmenus.dhtmlcentral.com/properties.asp?m=49
Item properties: http://coolmenus.dhtmlcentral.com/properties.asp?m=50
******************************************************************************/
//Menu object creation
oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

//Menu properties 
oCMenu.pxBetween=0
//Using the cm_page object to place the menu ----
oCMenu.fromLeft=0
oCMenu.fromTop=0
oCMenu.rows=1
oCMenu.menuPlacement=0
                                                             
oCMenu.offlineRoot="file:///E:\\www\\1way2God.net\\" 
oCMenu.onlineRoot="http://www.1way2god.net/" 
oCMenu.resizeCheck=1 
oCMenu.wait=1000 
oCMenu.fillImg="im_cm_fill.gif"
oCMenu.zIndex=0


//New properties in 4.06 - Set to open and/or close the menu onclick
//oCMenu.openOnClick=1
//oCMenu.closeOnClick=1

//Background bar properties
oCMenu.useBar=0

//Level properties - ALL properties have to be specified in level 0
oCMenu.level[0]=new cm_makeLevel()
oCMenu.level[0].width=200
oCMenu.level[0].height=20 
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=1
oCMenu.level[0].borderY=1
oCMenu.level[0].borderClass="clLevel0border"
oCMenu.level[0].offsetX=0
oCMenu.level[0].offsetY=0
oCMenu.level[0].rows=0
oCMenu.level[0].arrow=0
oCMenu.level[0].arrowWidth=0
oCMenu.level[0].arrowHeight=0
oCMenu.level[0].align="bottom"

//SUB LEVEL[1] PROPERTIES
oCMenu.level[1]=new cm_makeLevel()
oCMenu.level[1].width=oCMenu.level[0].width-2
oCMenu.level[1].height=22
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=1
oCMenu.level[1].borderY=1
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=0
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"
oCMenu.level[1].arrow="layout_images/menu_arrow.gif"
oCMenu.level[1].arrowWidth=31
oCMenu.level[1].arrowHeight=17



//SUB LEVEL[2] PROPERTIES
oCMenu.level[2]=new cm_makeLevel() 
oCMenu.level[2].width=oCMenu.level[1].width-2
oCMenu.level[2].height=20
oCMenu.level[2].regClass="clLevel2"
oCMenu.level[2].overClass="clLevel2over"
oCMenu.level[2].borderX=1
oCMenu.level[2].borderY=1
oCMenu.level[2].align="left" 
oCMenu.level[2].offsetX=0
oCMenu.level[2].offsetY=2
oCMenu.level[2].borderClass="clLevel2border"

/*SUB LEVEL[3] PROPERTIES */
oCMenu.level[3]=new cm_makeLevel() 
oCMenu.level[3].width=170
oCMenu.level[3].height=20
oCMenu.level[3].regClass="clLevel3"
oCMenu.level[3].overClass="clLevel3over"
oCMenu.level[3].borderX=1
oCMenu.level[3].borderY=1
oCMenu.level[3].align="left" 
oCMenu.level[3].offsetX=0
oCMenu.level[3].offsetY=10
oCMenu.level[3].borderClass="clLevel3border"


/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/

oCMenu.makeMenu('FOAJ','','&nbsp;&nbsp;&nbsp;&nbsp;Find Out About Jesus','sec1.html','',200,20,'','','menu0','','')
    oCMenu.makeMenu('sec1','FOAJ','Find Out About Jesus','sec1.html')
        oCMenu.makeMenu('gimd_01','sec1','God the Loving Creator','g1.html')
        oCMenu.makeMenu('gimd_02','sec1','Humankind in Rebellion','g2.html')
        oCMenu.makeMenu('gimd_03','sec1','Punishment for Rebellion','g3.html')
        oCMenu.makeMenu('gimd_04','sec1','God\'s Love in Salvation','g4.html')
        oCMenu.makeMenu('gimd_05','sec1','Trusting in Jesus','g5.html')
        oCMenu.makeMenu('gimd_06','sec1','Judgement and Eternity','g6.html')
    oCMenu.makeMenu('sec2','FOAJ','Take The Step Towards God','sec2.html')
    oCMenu.makeMenu('sec3','FOAJ','Grow Closer to God','sec3.html')
    oCMenu.makeMenu('talks','FOAJ','Talks on Jesus','talks.html')
        oCMenu.makeMenu('srmn_003','talks','The Good Life','srmn_003.html')
        oCMenu.makeMenu('srmn_002','talks','Three Dead Men','srmn_002.html')
        oCMenu.makeMenu('srmn_001','talks','Victory in Christ','srmn_001.html')

oCMenu.makeMenu('CR','','&nbsp;&nbsp;&nbsp;Christian Resources','sec4.html','',200,20,'','','menu1','','')
    oCMenu.makeMenu('bible','CR','The Holy Bible','bible.html','',180,20,'','','menu_4','menu_4_ovr','')
        oCMenu.makeMenu('bible_01','bible','An Introduction','introtobible.html')
        oCMenu.makeMenu('bible_02','bible','Using the Bible','usingbible.html')
        oCMenu.makeMenu('bible_03','bible','The Bible\'s Reliability','biblereliability.html')
        oCMenu.makeMenu('bible_04','bible','Various Translations','varioustrans.html')
        oCMenu.makeMenu('bible_05','bible','Get a Good Bible','getbible.html')
    oCMenu.makeMenu('nt','CR','The New Testament','nt.html','',180,20,'','','menu_4','menu_4_ovr','')
        oCMenu.makeMenu('nt_intro','nt','Introduction','ntsecintro.html')
        oCMenu.makeMenu('nt_gosp','nt','Gospels','nt.html#gospelsacts')
            oCMenu.makeMenu('nt_01','nt_gosp','Matthew','matthew.html')
            oCMenu.makeMenu('nt_02','nt_gosp','Mark','mark.html')
            oCMenu.makeMenu('nt_03','nt_gosp','Luke','luke.html')
            oCMenu.makeMenu('nt_04','nt_gosp','John','john.html')
        oCMenu.makeMenu('nt_05','nt','Acts','acts.html')
        oCMenu.makeMenu('nt_Pepis','nt','Pauline Epistles','nt.html#epistles')
            oCMenu.makeMenu('nt_06','nt_Pepis','Romans','romans.html')
            oCMenu.makeMenu('nt_07','nt_Pepis','1 Corinthians','1corinthians.html')
            oCMenu.makeMenu('nt_08','nt_Pepis','2 Corinthians','2corinthians.html')
            oCMenu.makeMenu('nt_09','nt_Pepis','Galatians','galatians.html')
            oCMenu.makeMenu('nt_10','nt_Pepis','Ephesians','ephesians.html')
            oCMenu.makeMenu('nt_11','nt_Pepis','Philippians','philippians.html')
            oCMenu.makeMenu('nt_12','nt_Pepis','Colossians','colossians.html')
            oCMenu.makeMenu('nt_13','nt_Pepis','1 Thessalonians','1thessalonians.html')
            oCMenu.makeMenu('nt_14','nt_Pepis','2 Thessalonians','2thessalonians.html')
            oCMenu.makeMenu('nt_15','nt_Pepis','1 Timothy','1timothy.html')
            oCMenu.makeMenu('nt_16','nt_Pepis','2 Timothy','2timothy.html')
            oCMenu.makeMenu('nt_17','nt_Pepis','Titus','titus.html')
            oCMenu.makeMenu('nt_18','nt_Pepis','Philemon','philemon.html')
        oCMenu.makeMenu('nt_Cepis','nt','Other Epistles','nt.html#epistles')
            oCMenu.makeMenu('nt_19','nt_Cepis','Hebrews','hebrews.html')
            oCMenu.makeMenu('nt_20','nt_Cepis','James','james.html')
            oCMenu.makeMenu('nt_21','nt_Cepis','1 Peter','1peter.html')
            oCMenu.makeMenu('nt_22','nt_Cepis','2 Peter','2peter.html')
            oCMenu.makeMenu('nt_23','nt_Cepis','1 John','1john.html')
            oCMenu.makeMenu('nt_24','nt_Cepis','2 John','2john.html')
            oCMenu.makeMenu('nt_25','nt_Cepis','3 John','3john.html')
            oCMenu.makeMenu('nt_26','nt_Cepis','Jude','jude.html')
        oCMenu.makeMenu('nt_27','nt','Revelation','revelation.html')
    oCMenu.makeMenu('theol','CR','Theology Explained','theology.html','',180,20,'','','menu_4','menu_4_ovr','')
        oCMenu.makeMenu('theol_god','theol','Concerning God','theology.html#thebibleongod')
            oCMenu.makeMenu('theol_01','theol_god','The Character of God','charofgod.html')
            oCMenu.makeMenu('theol_02','theol_god','The Trinity','trinity.html')
            oCMenu.makeMenu('theol_03','theol_god','God the Son','godtheson.html')
            oCMenu.makeMenu('theol_04','theol_god','God the Holy Spirit','godholyspirit.html')
        oCMenu.makeMenu('theol_man', 'theol','Concerning Mankind','theology.html#thebibleonmankind')
            oCMenu.makeMenu('theol_05','theol_man','Mankind Originally','mankindsorigin.html')
            oCMenu.makeMenu('theol_06','theol_man','Prayer','prayer.html')
            oCMenu.makeMenu('theol_07','theol_man','Death','death.html')
        oCMenu.makeMenu('theol_salv','theol','Concerning Salvation','theology.html#thebibleonsalvation')
            oCMenu.makeMenu('theol_08','theol_salv','The Atonement','atonement.html')
            oCMenu.makeMenu('theol_09','theol_salv','Predestination','predestination.html')
            oCMenu.makeMenu('theol_10','theol_salv','Conversion & Christian Life','conversion.html')
            oCMenu.makeMenu('theol_11','theol_salv','Justification','justification.html')
            oCMenu.makeMenu('theol_12','theol_salv','Adoption','adoption.html')
            oCMenu.makeMenu('theol_13','theol_salv','Sanctification','sanctification.html')
            oCMenu.makeMenu('theol_14','theol_salv','Glorification','glorification.html')
        oCMenu.makeMenu('theol_fut', 'theol','Concerning the Future','theology.html#thebibleonthefuture')
            oCMenu.makeMenu('theol_15','theol_fut','The Return of Christ','returnofchrist.html')
            oCMenu.makeMenu('theol_16','theol_fut','The Final Judgement','finaljudgement.html')
    oCMenu.makeMenu('ch','CR','Church History','churchhistory.html','',180,20,'','','menu_4','menu_4_ovr','')
        oCMenu.makeMenu('ch_stry','ch','Histories','churchhistory.html')
            oCMenu.makeMenu('ch_stry_01','ch_stry','Time of Jesus and Apostles','story_jesus_apostles.html')
            oCMenu.makeMenu('ch_stry_02','ch_stry','Time of the Church Universal','story_universalchurch.html')
        oCMenu.makeMenu('ch_evnt','ch','Events','churchhistory.html')
            oCMenu.makeMenu('ch_evnt_01','ch_evnt','Formation of the OT','otc.html')
            oCMenu.makeMenu('ch_evnt_02','ch_evnt','Formation of the NT','ntc.html')
        oCMenu.makeMenu('ch_bio','ch','Biographies','churchhistory.html')
            oCMenu.makeMenu('ch_bio_01','ch_bio','The Apostle Peter','bio_peter.html')
            oCMenu.makeMenu('ch_bio_02','ch_bio','The Apostle Paul','bio_paul.html')
            oCMenu.makeMenu('ch_bio_03','ch_bio','James (Brother of Jesus)','bio_jamesbrotherofjesus.html')
            oCMenu.makeMenu('ch_bio_04','ch_bio','(John) Mark','bio_mark.html')
            oCMenu.makeMenu('ch_bio_05','ch_bio','Ignatius of Antioch','bio_ignatius.html')
            oCMenu.makeMenu('ch_bio_06','ch_bio','Justin Martyr','bio_justinmartyr.html')
    oCMenu.makeMenu('PC','CR','Prayer Central','pc.html','',180,20,'','','menu_4','menu_4_ovr','')
        oCMenu.makeMenu('pc_intro', 'PC','Introduction','pc_intro.html')
        oCMenu.makeMenu('pc_approach', 'PC','Approaching Prayer','pc_approach.html')
        oCMenu.makeMenu('pc_theol', 'PC','Theology of Prayer','prayer.html')
        oCMenu.makeMenu('pc_content', 'PC','Content of Prayer','pc_carson.html')
        oCMenu.makeMenu('pc_support1w2g', 'PC','Pray for 1way2God.net','support1w2g.html')
    oCMenu.makeMenu('devs','CR','Devotionals','devotionals.html','',180,20,'','','menu_4','menu_4_ovr','')
        oCMenu.makeMenu('dev_01','devs','Devotion Plan (Table)','devtable.html')
        oCMenu.makeMenu('dev_02','devs','Devotion Bookmarks (PDF)','devbmarks.html')
        oCMenu.makeMenu('dev_03','devs','Devotional Messages','devmessages.html')
    oCMenu.makeMenu('mc','CR','Missionary Corner','mc.html','',180,20,'','','menu_4','menu_4_ovr','')
    oCMenu.makeMenu('thoughts','CR','Thoughts','thoughts.html','',180,20,'','','menu_4','menu_4_ovr','')
        oCMenu.makeMenu('tho_01','thoughts','Assurance in Salvation','tho_assurance.html')
        oCMenu.makeMenu('tho_02','thoughts','Joy in Christ','tho_joy.html')
        oCMenu.makeMenu('tho_03','thoughts','Abortion','tho_abortion.html')
    oCMenu.makeMenu('wmres','CR','WebMaster Resources','wmresources.html','',180,20,'','','menu_4','menu_4_ovr','')
        oCMenu.makeMenu('wmres_01', 'wmres','Hints and Tips','wmtips.html')
        oCMenu.makeMenu('wmres_02', 'wmres','RandomVerse','randomverse.html')
        oCMenu.makeMenu('wmres_03', 'wmres','Verse4Today','verse4today.html')
        oCMenu.makeMenu('wmres_04', 'wmres','Abortion Counter','tho_abortion_counter.html')
    oCMenu.makeMenu('other','CR','Other Resources','otherresources.html','',180,20,'','','menu_4','menu_4_ovr','')
        oCMenu.makeMenu('other_01', 'other','Good Books','otherresources.html#goodauthorsofbooks')
        oCMenu.makeMenu('other_02', 'other','Online Sermons','otherresources.html#goodonlinesermons')
        oCMenu.makeMenu('other_03', 'other','Other WebMaster Resources','otherresources.html#helpministeringontheinternet')
        oCMenu.makeMenu('other_04', 'other','Good General Christian Sites','otherresources.html#generalchristiansites')
        oCMenu.makeMenu('other_05', 'other','Bible Resources','otherresources.html#internetbibleresources')
        oCMenu.makeMenu('other_06', 'other','Christian Bookstores','otherresources.html#christianbookstores')
        oCMenu.makeMenu('other_07', 'other','Christian Distance Education','otherresources.html#christiandistanceeducation')
    oCMenu.makeMenu('orgs','CR','Christian Organisations','christorgs.html','',180,20,'','','menu_4','menu_4_ovr','')
      

oCMenu.makeMenu('ATS','','&nbsp;&nbsp;About This Site','sec5.html','',200,20,'','','menu2','','')
    oCMenu.makeMenu('home','ATS','Home & Search','sec6.html','','','','','','','','left')
    oCMenu.makeMenu('ats0','ATS','About This Site','sec5.html','','','','','','','','left')
        oCMenu.makeMenu('ats1','ats0','About This Site','sec5.html','','','','','','','','right')
        oCMenu.makeMenu('ats2','ats0','Statement of Faith','statementoffaith.html','','','','','','','','right')
        oCMenu.makeMenu('ats3','ats0','Contact Details','contact.html','','','','','','','','right')
        oCMenu.makeMenu('ats4','ats0','Support 1way2God.net','support1w2g.html','','','','','','','','right')
        oCMenu.makeMenu('ats5','ats0','Link to 1way2God.net','linkto1w2g.html','','','','','','','','right')
        oCMenu.makeMenu('ats6','ats0','References Used','refsused.html','','','','','','','','right')
    oCMenu.makeMenu('email','ATS','Contact Me','contact.html','','','','','','','','left')


//Leave this line - it constructs the menu
oCMenu.construct()            


//Extra code to find position:
function findPos(num){
  //alert(num)
  if(bw.ns4){   //Netscape 4
    x = document.layers["layerMenu"+num].pageX
    y = document.layers["layerMenu"+num].pageY
  }else{ //other browsers
    x=0; y=0; var el,temp
    el = bw.ie4?document.all["divMenu"+num]:document.getElementById("divMenu"+num);
    if(el.offsetParent){
      temp = el
      while(temp.offsetParent){ //Looping parent elements to get the offset of them as well
        temp=temp.offsetParent; 
        x+=temp.offsetLeft
        y+=temp.offsetTop;
      }
    }
    x+=el.offsetLeft
    y+=el.offsetTop
  }
  //Returning the x and y as an array
  return [x,y]
}
function placeElements(){
  //Changing the position of ALL top items:
  pos = findPos(0)
  oCMenu.m["FOAJ"].b.moveIt(pos[0],pos[1])
  pos = findPos(1)
  oCMenu.m["CR"].b.moveIt(pos[0],pos[1])
  pos = findPos(2)
  oCMenu.m["ATS"].b.moveIt(pos[0],pos[1])
  
  //Setting the fromtop value
  oCMenu.fromTop = pos[1]
}
placeElements()
//Setting it to re place the elements after resize - the resize is not perfect though..
oCMenu.onafterresize="placeElements()"

