/***********************************************
* Pop-it menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
* Script altered by Rady for www.frootejewelry.com
***********************************************/


var defaultMenuWidth="" //set default menu width.

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

linkset[0]=''
linkset[0]+='<a href="http://frootejewelry.com/about-philosophy.php"><img src="http://frootejewelry.com/layout/about_philosophy.jpg" border=0></a>'
linkset[0]+='<a href="http://frootejewelry.com/about-biography.php"><img src="http://frootejewelry.com/layout/about_biography.jpg" border=0></a>'
linkset[0]+='<a href="http://frootejewelry.com/about-seedoffroote.php"><img src="http://frootejewelry.com/layout/about_seed.jpg" border=0></a>'

linkset[1]='<img src="http://frootejewelry.com/layout/spacer.gif" height=1 width=106 >'
linkset[1]+='<a href="http://frootejewelry.com/updates-newdesigns.php"><img src="http://frootejewelry.com/layout/updates_newdesigns.jpg" border=0></a>'
linkset[1]+='<a href="http://frootejewelry.com/updates-site.php"><img src="http://frootejewelry.com/layout/updates_site.jpg" border=0></a>'
linkset[1]+='<img src="http://frootejewelry.com/layout/spacer.gif" height=1 width=120>'

linkset[2]='<img src="http://frootejewelry.com/layout/spacer.gif" height=1 width=185>'
linkset[2]+='<a href="http://frootejewelry.com/collections-island.php"><img src="http://frootejewelry.com/layout/collections_island.jpg" border=0></a>'
linkset[2]+='<a href="http://frootejewelry.com/collections-calypso.php"><img src="http://frootejewelry.com/layout/collections_calypso.jpg" border=0></a>'
linkset[2]+='<a href="http://frootejewelry.com/collections-tudor.php"><img src="http://frootejewelry.com/layout/collections_tudor.jpg" border=0></a>'
linkset[2]+='<a href="http://frootejewelry.com/collections-necklaces.php"><img src="http://frootejewelry.com/layout/collections_necklaces.jpg" border=0></a>'
linkset[2]+='<a href="http://frootejewelry.com/collections-earrings.php"><img src="http://frootejewelry.com/layout/collections_earrings.jpg" border=0></a>'
linkset[2]+='<a href="http://frootejewelry.com/collections-bracelets.php"><img src="http://frootejewelry.com/layout/collections_bracelets.jpg" border=0></a>'

linkset[3]='<img src="http://frootejewelry.com/layout/spacer.gif" height=1 width=275>'
linkset[3]+='<a href="http://frootejewelry.com/accolades-media.php"><img src="http://frootejewelry.com/layout/accolades_media.jpg" border=0></a>'
linkset[3]+='<a href="http://frootejewelry.com/accolades-facesoffroote.php"><img src="http://frootejewelry.com/layout/accolades_facesoffroote.jpg" border=0></a>'

linkset[4]='<img src="http://frootejewelry.com/layout/spacer.gif" height=1 width=376>'
linkset[4]+='<a href="http://frootejewelry.com/oohlala-sirens.php"><img src="http://frootejewelry.com/layout/oohlala_sirens.jpg" border=0></a>'
linkset[4]+='<a href="http://frootejewelry.com/oohlala/"><img src="http://frootejewelry.com/layout/oohlala_nehenehe.jpg" border=0></a>'

linkset[5]='<img src="http://frootejewelry.com/layout/spacer.gif" height=1 width=457>'
linkset[5]+='<a href="http://frootejewelry.com/contact-contactus.php"><img src="http://frootejewelry.com/layout/contact_contactus.jpg" border=0></a>'
linkset[5]+='<a href="http://frootejewelry.com/contact-policy.php"><img src="http://frootejewelry.com/layout/contact_policy.jpg" border=0></a>'
linkset[5]+='<a href="http://frootejewelry.com/jewelrycare.php"><img src="http://frootejewelry.com/layout/contact_jewelrycare.jpg" border=0></a>'


///// SCRIPT BELOW //////

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY

//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY


if (iecompattest().clientWidth<831)
menuobj.style.left=ie5? 216+"px" : 216+"px"
else
menuobj.style.left=ie5? (iecompattest().clientWidth/2)-207+"px" : (window.innerWidth/2)-199+"px"

//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? 150+"px" : 150+"px"
else
menuobj.style.top=ie5? 150+"px" : 150+"px"

menuobj.style.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.style.visibility="visible"
}

function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

if (ie5||ns6)
document.onclick=hidemenu





// preload images script


var myimages=new Array()
function preloadimages()
	{
	for (i=0;i<preloadimages.arguments.length;i++)
		{
		myimages[i]=new Image()
		myimages[i].src=preloadimages.arguments[i]
		}
	}
preloadimages( 'http://frootejewelry.com/layout/about_philosophy.jpg', 'http://frootejewelry.com/layout/about_biography.jpg', 'http://frootejewelry.com/layout/about_seed.jpg', 'http://frootejewelry.com/layout/updates_newdesigns.jpg', 'http://frootejewelry.com/layout/updates_site.jpg' , 'http://frootejewelry.com/layout/collections_calypso.jpg', 'http://frootejewelry.com/layout/collections_island.jpg' , 'http://frootejewelry.com/layout/collections_tudor.jpg' , 'http://frootejewelry.com/layout/collections_necklaces.jpg' , 'http://frootejewelry.com/layout/collections_earrings.jpg', 'http://frootejewelry.com/layout/collections_bracelets.jpg' , 'http://frootejewelry.com/layout/collections_sets.jpg' , 'http://frootejewelry.com/layout/accolades_print.jpg' , 'http://frootejewelry.com/layout/accolades_media.jpg', 'http://frootejewelry.com/layout/accolades_web.jpg' , 'http://frootejewelry.com/layout/accolades_facesoffroote.jpg' , 'http://frootejewelry.com/layout/oohlala_sirens.jpg' , 'http://frootejewelry.com/layout/oohlala_nehenehe.jpg' , 'http://frootejewelry.com/layout/contact_contactus.jpg' , 'http://frootejewelry.com/layout/contact_jewelrycare.jpg' )