/***********************************************
* 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 Vacation Properties menu 1
var menu1=new Array()
menu1[0]='<a href="http://www.wrenbeachrentals.com/vacation_properties/seacrest101/seacrest101.htm">Seacrest 101</a>'
menu1[1]='<a href="http://www.wrenbeachrentals.com/vacation_properties/sandpipers_nest/sandpipers_nest.htm">Sandpipers Nest</a>'
menu1[2]='<a href="http://www.wrenbeachrentals.com/vacation_properties/sea_watch/sea_watch.htm">Seawatch</a>'
menu1[3]='<a href="http://www.wrenbeachrentals.com/vacation_properties/water_colors/water_colors.htm">Water Colors</a>'
//menu1[4]='<a href="http://www.wrenbeachrentals.com/vacation_properties/marshview/marshview.htm">Marshview</a>'
menu1[5]='<a href="http://www.wrenbeachrentals.com/vacation_properties/sandcastle/sandcastle.htm">Sand Castle</a>'
//menu1[6]='<a href="http://www.wrenbeachrentals.com/vacation_properties/endlessview/endlessview.htm">Endless View</a>'
menu1[7]='<a href="http://www.wrenbeachrentals.com/vacation_properties/almost_heaven/almost_heaven.htm">Almost Heaven</a>'
menu1[8]='<a href="http://www.wrenbeachrentals.com/vacation_properties/turtle_cay/turtle_cay.htm">Turtle Cay</a>'
menu1[9]='<a href="http://www.wrenbeachrentals.com/vacation_properties/ocean-b/ocean-b.htm">Ocean Breeze</a>'
menu1[10]='<a href="http://www.wrenbeachrentals.com/vacation_properties/captains-cottage/captains-cottage.htm">Captain\'s Cottage</a>'
menu1[11]='<a href="http://www.wrenbeachrentals.com/vacation_properties/seacrest102/seacrest102.htm">Seacrest 102</a>'
menu1[12]='<a href="http://www.wrenbeachrentals.com/vacation_properties/oceanblue/oceanblue.htm">Ocean Blue</a>'
menu1[13]='<a href="http://www.wrenbeachrentals.com/vacation_properties/sandytoes/sandytoes.htm">Sandy Toes</a>'


//Contents Guest Book for menu 2
var menu2=new Array()
menu2[0]='<a href="http://www.rentors.org/guestbook.cfm?pid=122903&culturename=en-US" target="_blank">Seacrest 101</a>'
menu2[1]='<a href="http://www.rentors.org/guestbook.cfm?pid=177&culturename=en-US" target="_blank">Sandpipers Nest</a>'
menu2[2]='<a href="http://www.rentors.org/guestbook.cfm?pid=106799&culturename=en-US" target="_blank">Seawatch</a>'
menu2[3]='<a href="http://www.rentors.org/guestbook.cfm?pid=61433&culturename=en-US" target="_blank">Water Colors</a>'
//menu2[4]='<a href="http://www.rentors.org/guestbook.cfm?pid=251183&culturename=en-US" target="_blank">Marshview</a>'
menu2[5]='<a href="http://www.homeawayconnect.com/guestbook.cfm?pid=322194&culturename=en-US" target="_blank">Sand Castle</a>'
//menu2[6]='<a href="https://www.homeawayconnect.com/guestbook.cfm?pid=372023" target="_blank">Endless View</a>'
menu2[7]='<a href="https://www.homeawayconnect.com/guestbook.cfm?pid=396695" target="_blank">Almost Heaven</a>'
menu2[8]='<a href="https://www.homeawayconnect.com/guestbook.cfm?pid=340031" target="_blank">Turtle Cay</a>'
menu2[9]='<a href="https://www.homeawayconnect.com/guestbook.cfm?pid=462763" target="_blank">Ocean Breeze</a>'
menu2[10]='<a href="https://www.homeawayconnect.com/guestbook.cfm?pid=441224" target="_blank">Captain\'s Cottage</a>'
menu2[11]='<a href="http://www.homeawayconnect.com/guestbook.cfm?pid=460394&culturename=en-US" target="_blank">Seacrest 102</a>'
menu2[12]='<a href="https://www.homeawayconnect.com/guestbook.cfm?pid=407791" target="_blank">Ocean Blue</a>'
menu2[13]='<a href="https://www.homeawayconnect.com/guestbook.cfm?pid=528461" target="_blank">Sandy Toes</a>'


		
var menuwidth='165px' //default menu width
var menubgcolor='#aacbf6'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="no" //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)
}



function Mouseoverfun2(tt, event) {
	
	dropdownmenu(tt, event, menu2, '150px')
	MM_swapImage('guest','','http://www.wrenbeachrentals.com/images/guestbook-over.jpg',2)
	return false;
}
function Mouseoverfun3(tt, event) {
	
	dropdownmenu(tt, event, menu1, '150px')
	MM_swapImage('vacation','','http://www.wrenbeachrentals.com/images/properties-over.jpg',1)
	return false;
}


  function doout() {
  onMouseOut=MM_swapImgRestore()
  delayhidemenu()
  
  }
  
  

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


