/***********************************************
* Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var arrText = new Array();
arrText[0] = "<img src='i/icons/stonehenge.jpg' alt='' /><h1>Stonehenge</h1>The world heritage site, Stonehenge, is probably the most important prehistoric monument in the whole of Britain and has attracted visitors from early times. It stands as a timeless monument to the people who built it. Some 82 massive bluestones from the Preseli mountains, in south-west Wales were transported to the site in astonishing journey which covered nearly 240 miles.";
arrText[1] = "<img src='i/icons/bath.jpg' alt='' /><h1>Bath</h1>Bath is a unique city; its hot springs, Roman Baths, splendid Abbey and Georgian stone crescents have attracted visitors for centuries. Around Britain's only hot spring, the Romans built a magnificent temple and bathing complex that still flows with natural hot water.<br /><br />As well as the Romans, Jane Austen knew Bath well making her home in the city from 1801 to 1806.";
arrText[2] = "<img src='i/icons/oxford.jpg' alt='' /><h1>Oxford</h1>Oxford is the most famous university in the world. The sites and architectural treasures are almost too numerous to mention - they include The Bodleian Library, The Ashmolean Museum, The Botanic Gardens and Christ Church Cathedral, to mention but a few.<br /><br />Boat trips or punting on the River Thames, entertaining guided walking tours and open-top bus tours take in the city's architecture and introduce Oxford's heritage.";
arrText[3] = "<img src='i/icons/cotswolds.jpg' alt='' /><h1>The Cotswolds</h1>The Cotswolds is an area of outstanding natural beauty popular with visitors from all over the world. The Cotswolds are well-known for gentle hillsides ('wolds'), sleepy villages and for being so 'typically English'.<br /><br />Home to Prince Charles and many other \"royals\", Sir Winston Churchill and Shakespeare the Cotswolds is a patchwork quilt of fields dotted by delightful villages and small market towns and villages.";
arrText[4] = "<img src='i/icons/blenheim.jpg' alt='' /><h1>Blenheim Palace</h1>Blenheim Palace, known as 'Britain's Greatest Palace', is a world heritage site. The Palace is home to the 11th Duke of Marlborough and is also the birthplace of Sir Winston Churchill.<br /><br />Set in 2100 acres of beautiful parkland landscaped by 'Capability' Brown, the exquisite Baroque Palace is a \"must see\" destination for all visitors to the area.";
arrText[5] = "<img src='i/icons/stratford.jpg' alt='' /><h1>Stratford</h1>Stratford-upon-Avon, the birthplace of William Shakespeare, is steeped in culture and history. Set in the beautiful rural countryside, on the banks of the river Avon, it is one of the most important tourist destinations in the UK. Places to visit include Shakespeare's houses and the Royal Shakespeare Company Theatre which has a full programme of performances throughout 2009.";


var offsetxpoint=-60 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=arrText[thetext]
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20

var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetxpoint+"px"

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

document.onmousemove=positiontip