
//Pop-it menu- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

//	DOC's ABOUT US PIC
linkset[0]='<div class="menuitems"><span class="defttl">Archaeology<br></span><span class="defbox">Means nowt to you, Eh...?<br>Then hire the Doc and he\'ll sort it all out for you.</span></div>'

//	MITIGATION
linkset[1]='<div class="menuitems"><span class="defttl">Mitigation<br></span><span class="defbox">A proposal for reducing the overall effect of a development on archaeological remains. </span></div>'
linkset[1]+='<div class="menuitems"><a class="deflink" href="faq.htm#q11"><hr  color="#006600" noshade size=1><b>More info...</b><br><br></a></div>'

//	DESK TOP REPORTS
linkset[2]='<div class="menuitems"><span class="defttl">Desk-top Reports<br></span><span class="defbox">Often the first stage of a site investigation. Assesses the likelihood and possible location of archaeological remains, relying largely on research of the paper-based record of the site.<br></span></div>'
linkset[2]+='<div class="menuitems"><a class="deflink" href="faq.htm#q10"><hr  color="#006600" noshade size=1><b>More info...</b><br><br></a></div>'

//	DEFINITION TERMS example
linkset[3]='<div class="menuitems"><span class="defttl">Terminology<br></span><span class="defbox">Many definitions of terminology are provided throughtout this site - just point to words of interest and a definition box will appear.<br><br>Clicking <u><b>More info...</b></u> in the box will take you to the FAQs entry for a more detailed explanation.<br></span></div>'

//	EVALUATION
linkset[4]='<div class="menuitems"><span class="defttl">Evaluation<br></span><span class="defbox">Evaluation may be non-invasive (eg: geophysical survey, fieldwalking...) or invasive (eg: trial trenching)<br></span></div>'
linkset[4]+='<div class="menuitems"><a class="deflink" href="faq.htm#q16"><hr  color="#006600" noshade size=1><b>More info...</b><br><br></a></div>'

//	WATCHING BRIEFS
linkset[5]='<div class="menuitems"><span class="defttl">Watching Briefs<br></span><span class="defbox">On-site observation by an archaeologist during site preparation.<br></span></div>'
linkset[5]+='<div class="menuitems"><a class="deflink" href="faq.htm#q3"><hr  color="#006600" noshade size=1><b>More info...</b><br><br></a></div>'

//	ASSESSMENTS
linkset[6]='<div class="menuitems"><span class="defttl">Assessment<br></span><span class="defbox">Brings together all evidence and current knowledge about a site to determine its archaeological potential.<br></span></div>'
linkset[6]+='<div class="menuitems"><a class="deflink" href="faq.htm#q8"><hr  color="#006600" noshade size=1><b>More info...</b><br><br></a></div>'

//	EA and EIA
linkset[7]='<div class="menuitems"><span class="defttl">EA or EIA<br></span><span class="defbox">An <i>assessment</i> of the natural and human <i>environment</i> of a site (including archaeology and the historic landscape - &quot;Cultural Heritage&quot;) and of the potential <i>impact</i> of a development on the environment.  Usually required only for larger developments.<br></span></div>'

//	WSI
linkset[8]='<div class="menuitems"><span class="defttl">WSI<br></span><span class="defbox">A formal written specification for archaeological investigations, prepared for the approval of the planning authority in relation to a conditional grant of planning permission.<br></span></div>'

//	Section 106
linkset[9]='<div class="menuitems"><span class="defttl">Section 106 agreement<br></span><span class="defbox">A legal document agreed between, usually, the planning authority, land owner and developer, which sets out the obligations of the developer.  S106 agreements may require archaeological investigations to be undertaken.<br></span></div>'

//	Archaeological risk assessment
linkset[10]='<div class="menuitems"><span class="defttl">Archaeological risk assessment<br></span><span class="defbox">An assessment made for a client (developer or insurance company) of the potential for the existence of archaeological remains within a proposed development site, including an indication of the financial cost of dealing with any remains appropriately.<br></span></div>'

//	Historic buildings
linkset[11]='<div class="menuitems"><span class="defttl">Historic buildings<br></span><span class="defbox">Any standing buildings, or related structures which are considered to be of historical or architectural interest.  They may date from any time between the medieval period and the 20th century.  Some are &quot;Listed&quot; and given special planning protection.<br></span></div>'

//	Ancient Monuments
linkset[12]='<div class="menuitems"><span class="defttl">Ancient Monuments<br></span><span class="defbox">All archaeological sites, historic buildings and other structures may be termed &quot;ancient monuments&quot;.  However, the most important are given statutory protection as Scheduled Ancient Monuments (SAMs) to prevent disturbance or damage to them.  English Heritage deals with matters relating to SAMs.<br></span></div>'

//	Geophysical survey
linkset[13]='<div class="menuitems"><span class="defttl">Geophysical survey<br></span><span class="defbox">A type of preliminary field survey which can identify the presence of archaeological remains from variations in soil moisture or magnetic fields, without the need to disturb the ground.<br></span></div>'





//	ORIGINAL SCRIPT EXAMPLE 100
linkset[100]='<div class="menuitems"><a href="http://msnbc.com">MSNBC</a></div>'
linkset[100]+='<div class="menuitems"><a href="http://cnn.com">CNN</a></div>'
linkset[100]+='<div class="menuitems"><a href="http://abcnews.com">ABC News</a></div>'
linkset[100]+='<div class="menuitems"><a href="http://www.washingtonpost.com">Washington Post</a></div>'

////No need to edit beyond here

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers

function showmenu(e,which){

if (!document.all&&!document.getElementById&&!document.layers)
return

clearhidemenu()

menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj

if (ie4||ns6)
menuobj.innerHTML=which
else{
menuobj.document.write('<layer name=gui bgColor=#FFFFC9 width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
menuobj.document.close()
}

menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width
menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height
eventX=ie4? event.clientX : ns6? e.clientX : e.x
eventY=ie4? event.clientY : ns6? e.clientY : e.y

//Find out how close the mouse is to the corner of the window
var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX

//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.thestyle.top=ie4? document.body.scrollTop+eventY-menuobj.contentheight : ns6? window.pageYOffset+eventY-menuobj.contentheight : eventY-menuobj.contentheight
else
menuobj.thestyle.top=ie4? document.body.scrollTop+event.clientY : ns6? window.pageYOffset+eventY : eventY
menuobj.thestyle.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
}

function dynamichide(e){
if (ie4&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
if (ie4||ns6||ns4)
delayhide=setTimeout("hidemenu()",100)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

if (ie4||ns6)
document.onclick=hidemenu

