


/*** 


stand-alone js file.


**/





//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="" 


oCMenu.onlineRoot="http://www.bayonpearnik.com" 


oCMenu.resizeCheck=1 


oCMenu.wait=1000 


oCMenu.fillImg="cm_fill.gif"


oCMenu.zIndex=0





//Background bar properties


oCMenu.useBar=0





//Level properties - ALL properties have to be spesified in level 0


oCMenu.level[0]=new cm_makeLevel() //Add this for each new level


oCMenu.level[0].width="93"


oCMenu.level[0].height=25 


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"



//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this

oCMenu.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)

oCMenu.level[1].width=188

oCMenu.level[1].height=25

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"





//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to spesify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this

oCMenu.level[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)

oCMenu.level[2].width=188

oCMenu.level[2].height=25

oCMenu.level[2].offsetX=0

oCMenu.level[2].offsetY=0

oCMenu.level[2].regClass="clLevel2"

oCMenu.level[2].overClass="clLevel2over"

oCMenu.level[2].borderClass="clLevel2border"








/******************************************


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('top0','','Cambodia','/Cambodia/index.html')
  oCMenu.makeMenu('sub00','top0','A Brief History','/Cambodia/ABriefHistory.html','','188','25')

  oCMenu.makeMenu('sub01','top0','Why Visit Cambodia?','/Cambodia/index.html#WhyCambodia','','188','25')


 oCMenu.makeMenu('sub02','top0','When To Visit Cambodia','/Cambodia/index.html#WhenToVisit','','188','25')


 oCMenu.makeMenu('sub03','top0','Visa & Travel Information','/Cambodia/TravelInformation.html','','188','25')

   oCMenu.makeMenu('sub030','sub03','Cambodia By Air','/Cambodia/TravelInformation.html#ByAir','','188','25')

   oCMenu.makeMenu('sub031','sub03','Cambodia By Land','/Cambodia/TravelInformation.html#ByLand','','188','25')

   oCMenu.makeMenu('sub032','sub03','Visa Renewal','/Cambodia/TravelInformation.html#VisaRenewal','','188','25')


 oCMenu.makeMenu('sub04','top0','Transportation Around Cambodia','/Cambodia/TransportationAroundCambodia.html','','188','25')


 oCMenu.makeMenu('sub05','top0','Other Useful Information','/Cambodia/OtherInformation.html','','188','25')

   oCMenu.makeMenu('sub050','sub05','Medical','/Cambodia/OtherInformation.html#Medical','','188','25')

   oCMenu.makeMenu('sub051','sub05','Money & Banks','/Cambodia/OtherInformation.html#Money','','188','25')		

   oCMenu.makeMenu('sub052','sub05','Women, Gay, Disabled & Senior Travelers','/Cambodia/OtherInformation.html#WGDST','','188','35')		

   oCMenu.makeMenu('sub053','sub05','Public Transport In Towns','/Cambodia/OtherInformation.html#PublicTransport','','188','25')		

   oCMenu.makeMenu('sub054','sub05','Communications','/Cambodia/OtherInformation.html#Communications','','188','25')		

   oCMenu.makeMenu('sub055','sub05','Media','/Cambodia/OtherInformation.html#Media','','188','25')		

   oCMenu.makeMenu('sub056','sub05','Food & Drinks','/Cambodia/OtherInformation.html#Food','','188','25')		

   oCMenu.makeMenu('sub057','sub05','Watch Out!','/Cambodia/OtherInformation.html#WatchOut','','188','25')		


 oCMenu.makeMenu('sub06','top0','Map of Cambodia','/Cambodia/Maps/index.html','','188','25')

	  	  	  	  	  	  


	


oCMenu.makeMenu('top1','','Phnom Penh','/Cambodia/PhnomPenh/index.html')
	oCMenu.makeMenu('sub11','top1','What To See','/Cambodia/PhnomPenh/WhatToSee.html','','188','25')

               oCMenu.makeMenu('sub110','sub11','Riverfront & Cruises','/Cambodia/PhnomPenh/WhatToSee.html#RiverfrontCruises','','188','25')
               oCMenu.makeMenu('sub111','sub11','Royal Palace & Silver Pagoda','/Cambodia/PhnomPenh/WhatToSee.html#RoyalPalace','','188','25')
               oCMenu.makeMenu('sub112','sub11','National Museum','/Cambodia/PhnomPenh/WhatToSee.html#NationalMuseum','','188','25')
               oCMenu.makeMenu('sub113','sub11','Tuol Sleng Genocide Museum','/Cambodia/PhnomPenh/WhatToSee.html#TuolSleng','','188','25')
               oCMenu.makeMenu('sub114','sub11','Independence Monument','/Cambodia/PhnomPenh/WhatToSee.html#IndependenceMonument','','188','25')
               oCMenu.makeMenu('sub115','sub11','Wat Phnom','/Cambodia/PhnomPenh/WhatToSee.html#WatPhnom','','188','25')
               oCMenu.makeMenu('sub116','sub11','Wat Ounalom','/Cambodia/PhnomPenh/WhatToSee.html#WatOunalom','','188','25')
               oCMenu.makeMenu('sub117','sub11','Central Market','/Cambodia/PhnomPenh/WhatToSee.html#CentralMarket','','188','25')
               oCMenu.makeMenu('sub118','sub11','Russian Market','/Cambodia/PhnomPenh/WhatToSee.html#RussianMarket','','188','25')
        oCMenu.makeMenu('sub12','top1','Local Travel Tips & Costs','/Cambodia/PhnomPenh/LocalTravelCosts&Tips.html','','188','25')


	oCMenu.makeMenu('sub13','top1','Getting To & From Phnom Penh','/Cambodia/PhnomPenh/GettingTo&From.html','','188','25')

        oCMenu.makeMenu('sub14','top1','Trips Around Phnom Penh','/Cambodia/PhnomPenh/TripsAroundPhnomPenh.html','','188','25')

          oCMenu.makeMenu('sub140','sub14','Killing Fields Of Choeung ek','/Cambodia/PhnomPenh/TripsAroundPhnomPenh.html#KillingFields','','188','25')

          oCMenu.makeMenu('sub141','sub14','Oudong','/Cambodia/PhnomPenh/TripsAroundPhnomPenh.html#Oudong','','188','25')

          oCMenu.makeMenu('sub142','sub14','Phnom Chisor','/Cambodia/PhnomPenh/TripsAroundPhnomPenh.html#PhnomChisor','','188','25')

          oCMenu.makeMenu('sub143','sub14','Tonle Bati','/Cambodia/PhnomPenh/TripsAroundPhnomPenh.html#TonleBati','','188','25')

          oCMenu.makeMenu('sub144','sub14','Angkor Borei','/Cambodia/PhnomPenh/TripsAroundPhnomPenh.html#AngkorBorei','','188','25')

          oCMenu.makeMenu('sub145','sub14','Kompong Louang','/Cambodia/PhnomPenh/TripsAroundPhnomPenh.html#KompongLouang','','188','25')

               oCMenu.makeMenu('sub15','top1','Accommodation','/Cambodia/PhnomPenh/Accommodation.html','','188','25')

               oCMenu.makeMenu('sub16','top1','Restaurants','/Cambodia/PhnomPenh/Restaurants.html','','188','25')


	oCMenu.makeMenu('sub17','top1','Bars & Nightclubs','/Cambodia/PhnomPenh/Bars&Nightclubs.html','','188','25')

               oCMenu.makeMenu('sub170','sub17','Street 51 (The Strip)','/Cambodia/PhnomPenh/Bars&NightclubsStreet51.html','','188','25')
               oCMenu.makeMenu('sub171','sub17','Sisowath Quay (Riverfront)','/Cambodia/PhnomPenh/Bars&NightclubsSisowathQuay.html','','188','25')
               oCMenu.makeMenu('sub172','sub17','Street 104','/Cambodia/PhnomPenh/Bars&NightclubsStreet104.html','','188','25')
	oCMenu.makeMenu('sub18','top1','Other Useful Information','/Cambodia/PhnomPenh/OtherInformation.html','','188','25')

          oCMenu.makeMenu('sub180','sub18','Emergency Telephone Numbers','/Cambodia/PhnomPenh/OtherInformation.html','','188','25')

          oCMenu.makeMenu('sub181','sub18','Banks','/Cambodia/PhnomPenh/OtherInformation.html#banks','','188','25')

          oCMenu.makeMenu('sub182','sub18','Medical','/Cambodia/OtherInformation.html#Medical','','188','25')

          oCMenu.makeMenu('sub183','sub18','Bookshops','/Cambodia/PhnomPenh/OtherInformation.html#bookshops','','188','25')

          oCMenu.makeMenu('sub184','sub18','Communications','/Cambodia/OtherInformation.html#Communications','','188','25')

          oCMenu.makeMenu('sub185','sub18','Media','/Cambodia/OtherInformation.html#Media','','188','25')

        oCMenu.makeMenu('sub19','top1','Map of Phnom Penh','/Cambodia/maps/index.html','','188','25')


      oCMenu.makeMenu('top2','','Siem Reap','/Cambodia/SiemReapAngkorWat/index.html')


	oCMenu.makeMenu('sub20','top2','The Kingdom of Angkor','/Cambodia/SiemReapAngkorWat/TheKingdomOfAngkor.html')

        oCMenu.makeMenu('sub21','top2','The Angkor Temples To Visit','/Cambodia/SiemReapAngkorWat/TheAngkorTemplesToVisit.html')


	oCMenu.makeMenu('sub23','top2','Travel Information')

	 oCMenu.makeMenu('sub231','sub23','Itineraries','/Cambodia/SiemReapAngkorWat/Itineraries.html')

	 oCMenu.makeMenu('sub232','sub23','Travel Costs - Angkor Temples','/Cambodia/SiemReapAngkorWat/TravelCostsAndTipsAroundAngkorTemples.html')

	 oCMenu.makeMenu('sub233','sub23','Trips In & Around Siem Reap','/Cambodia/SiemReapAngkorWat/TripsInAndAroundSiemReapAndAngkor.html')

	 oCMenu.makeMenu('sub234','sub23','Local Travel Costs','/Cambodia/SiemReapAngkorWat/OtherInformation.html#LocalTravelCosts')

	 oCMenu.makeMenu('sub235','sub23','Getting To & From Siem Reap','/Cambodia/SiemReapAngkorWat/GettingToAndFromSiemReap.html')
         oCMenu.makeMenu('sub236','sub23','Books on Angkor','/Cambodia/SiemReapAngkorWat/TheKingdomOfAngkor.html#books')

	oCMenu.makeMenu('sub24','top2','Restaurants','/Cambodia/SiemReapAngkorWat/Restaurants.html')

	oCMenu.makeMenu('sub25','top2','Bars & Nightclubs','/Cambodia/SiemReapAngkorWat/BarsAndNightClubs.html')
	oCMenu.makeMenu('sub26','top2','Accommodation','/Cambodia/SiemReapAngkorWat/Accommodation.html')

        oCMenu.makeMenu('sub27','top2','Other Useful Information','/Cambodia/SiemReapAngkorWat/OtherInformation.html','','188','25')

          oCMenu.makeMenu('sub270','sub27','Emergency Telephone Numbers','/Cambodia/SiemReapAngkorWat/OtherInformation.html','','188','25')

          oCMenu.makeMenu('sub271','sub27','Banks','/Cambodia/SiemReapAngkorWat/OtherInformation.html','','188','25')

          oCMenu.makeMenu('sub272','sub27','Medical','/Cambodia/SiemReapAngkorWat/OtherInformation.html','','188','25')

          oCMenu.makeMenu('sub273','sub27','Bookshops','/Cambodia/SiemReapAngkorWat/OtherInformation.html#bookshops','','188','25')

          oCMenu.makeMenu('sub274','sub27','Communications','/Cambodia/OtherInformation.html#Communications','','188','25')

          oCMenu.makeMenu('sub275','sub27','Media','/Cambodia/OtherInformation.html#Media','','188','25')

          oCMenu.makeMenu('sub276','sub27','General Advice','/Cambodia/SiemReapAngkorWat/index.html','','188','25')


       oCMenu.makeMenu('sub28','top2','Map of Siem Reap','/Cambodia/maps/index.html','','188','25')



      oCMenu.makeMenu('top3','','Sihanoukville','/Cambodia/Sihanoukville/index.html')	
         oCMenu.makeMenu('sub30','top3','The Sihanoukville Beaches','/Cambodia/Sihanoukville/TheSihanoukvilleBeaches.html')

         oCMenu.makeMenu('sub31','top3','Beaches Outside Of Town','/Cambodia/Sihanoukville/BeachesOutsideOfTown.html')
         oCMenu.makeMenu('sub32','top3','Other Useful Information','/Cambodia/Sihanoukville/OtherInformation.html')
          oCMenu.makeMenu('sub321','sub32','Emergency Telephone Numbers','/Cambodia/Sihanoukville/OtherInformation.html#emergency','','188','25')

          oCMenu.makeMenu('sub322','sub32','Banks','/Cambodia/Sihanoukville/OtherInformation.html#banks','','188','25')

          oCMenu.makeMenu('sub323','sub32','Medical','/Cambodia/Sihanoukville/OtherInformation.html#comm','','188','25')

          oCMenu.makeMenu('sub324','sub32','Bookshops','/Cambodia/Sihanoukville/OtherInformation.html#books','','188','25')

          oCMenu.makeMenu('sub325','sub32','Communications','/Cambodia/OtherInformation.html#Communications','','188','25')

          oCMenu.makeMenu('sub326','sub32','Media','/Cambodia/OtherInformation.html#Media','','188','25')

          oCMenu.makeMenu('sub327','sub32','Shopping','/Cambodia/Sihanoukville/OtherInformation.html#shop','','188','25')

         oCMenu.makeMenu('sub33','top3','Sihanoukville Sites','/Cambodia/Sihanoukville/SihanoukvilleSites.html')
         oCMenu.makeMenu('sub34','top3','Nearby Attractions','/Cambodia/Sihanoukville/NearbyAttractions.html')
         oCMenu.makeMenu('sub35','top3','Scuba Diving, Island Tours','/Cambodia/Sihanoukville/OtherInformation.html')
         oCMenu.makeMenu('sub36','top3','Local Travel Costs & Tips','/Cambodia/Sihanoukville/LocalTravelCostsAndTips.html')
         oCMenu.makeMenu('sub37','top3','Getting To & From Sihanoukville','/Cambodia/Sihanoukville/GettingTo&From.html')
         oCMenu.makeMenu('sub38','top3','Restaurants & Bars','/Cambodia/Sihanoukville/RestaurantsAndBars.html')
         oCMenu.makeMenu('sub39','top3','Accommodation','/Cambodia/Sihanoukville/Accommodation.html')
         oCMenu.makeMenu('sub301','top3','Map of Sihanoukville','/Cambodia/maps/index.html')                  


oCMenu.makeMenu('top4','','Other Towns','/Cambodia/Ratanakiri/index.html')

         oCMenu.makeMenu('sub40','top4','Ratanakiri','/Cambodia/Ratanakiri/index.html')

          oCMenu.makeMenu('sub401','sub40','Getting To Banlung','/Cambodia/Ratanakiri/index.html#Banlung')
          oCMenu.makeMenu('sub402','sub40','Getting Around','/Cambodia/Ratanakiri/index.html#GettingAround')
          oCMenu.makeMenu('sub403','sub40','What To Do','/Cambodia/Ratanakiri/WhatToDo.html')
          oCMenu.makeMenu('sub404','sub40','Accomodation','/Cambodia/Ratanakiri/Accomodation.html')
          oCMenu.makeMenu('sub405','sub40','Restaurants','/Cambodia/Ratanakiri/Restaurants.html')
          oCMenu.makeMenu('sub406','sub40','Banks & Money','/Cambodia/Ratanakiri/index.html#Banks')
          oCMenu.makeMenu('sub407','sub40','Internet & Telephones','/Cambodia/Ratanakiri/index.html#Internet')
          oCMenu.makeMenu('sub408','sub40','What To Buy','/Cambodia/Ratanakiri/index.html#WhatToBuy')
          oCMenu.makeMenu('sub409','sub40','Markets & Shopping','/Cambodia/Ratanakiri/index.html#shops')

         oCMenu.makeMenu('sub41','top4','Kampot & Kep','/Cambodia/Kampot/index.html')

          oCMenu.makeMenu('sub410','sub41','Getting To Kampot','/Cambodia/Kampot/index.html#toKampot')

          oCMenu.makeMenu('sub411','sub41','Getting Around Kampot','/Cambodia/Kampot/index.html#aroundKampot')

            oCMenu.makeMenu('sub412','sub41','What To See in Kampot & Kep','/Cambodia/Kampot/WhatToSee.html')

        oCMenu.makeMenu('sub413','sub41','Kampot Money','/Cambodia/Kampot/index.html#Money')

          oCMenu.makeMenu('sub414','sub41','Kampot Communications','/Cambodia/Kampot/index.html#comm')

          oCMenu.makeMenu('sub415','sub41','Kampot Accommodation','/Cambodia/Kampot/Accommodation.html')

          oCMenu.makeMenu('sub416','sub41','Kampot Restaurants','/Cambodia/Kampot/Restaurants.html')

          oCMenu.makeMenu('sub417','sub41','Map of Kampot','/Cambodia/maps/index.html')
          oCMenu.makeMenu('sub418','sub41','Kep','/Cambodia/Kep/index.html')
          oCMenu.makeMenu('sub419','sub41','Getting to Kep','/Cambodia/Kep/index.html#get')
          oCMenu.makeMenu('sub4101','sub41','Kep Crabs','/Cambodia/Kep/index.html#crab')
          oCMenu.makeMenu('sub4102','sub41','Kep Accommodation','/Cambodia/Kep/index.html#Accom')

oCMenu.makeMenu('top5','','Bayon Links','/Cambodia/Links/index.html')
         oCMenu.makeMenu('sub50','top5','NGO Related Links','/Cambodia/Links/ngo.html')

         oCMenu.makeMenu('sub51','top5','Cambodia','/Cambodia/Links/index.html')

         oCMenu.makeMenu('sub52','top5','Phnom Penh','/Cambodia/Links/index.html#pp')

         oCMenu.makeMenu('sub53','top5','Siem Reap','/Cambodia/Links/index.html#sr')

         oCMenu.makeMenu('sub54','top5','Sihanoukville','/Cambodia/Links/index.html#snooky')

         oCMenu.makeMenu('sub55','top5','Kampot','/Cambodia/Links/index.html#kamp')



oCMenu.makeMenu('top6','','Contact Us','/Cambodia/ContactUs/index.html')
         oCMenu.makeMenu('sub60','top6','Bayon Pearnik Magazine','/Cambodia/ContactUs/index.html')

         oCMenu.makeMenu('sub61','top6','BayonPearnik.com','/Cambodia/ContactUs/index.html#bpcom')

         oCMenu.makeMenu('sub62','top6','Online Advertising','/Cambodia/ContactUs/index.html#bpcom')

         oCMenu.makeMenu('sub63','top6','Technical Inquiries','mailto:webmaster@bayonpearnik.com')



oCMenu.makeMenu('top7','','Home','http://www.bayonpearnik.com/')



//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["top0"].b.moveIt(pos[0],pos[1])


  pos = findPos(1)


  oCMenu.m["top1"].b.moveIt(pos[0],pos[1])


  pos = findPos(2)


  oCMenu.m["top2"].b.moveIt(pos[0],pos[1])


  pos = findPos(3)


  oCMenu.m["top3"].b.moveIt(pos[0],pos[1])


  pos = findPos(4)


  oCMenu.m["top4"].b.moveIt(pos[0],pos[1])


  pos = findPos(5)


  oCMenu.m["top5"].b.moveIt(pos[0],pos[1])


  pos = findPos(6)


  oCMenu.m["top6"].b.moveIt(pos[0],pos[1])


  pos = findPos(7)


  oCMenu.m["top7"].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()"

