// JavaScript Document

/***********************************************
* 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
***********************************************/

var defaultMenuWidth="150px" //set default menu width.

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

var auto_val = 112
var val_x = 542
var val_y = 177.5

var val_x1 = 654
var val_y1 = 177.5

var val_x2 = 654
var val_y2 = 195.5

var val_x3 = 654
var val_y3 = 213.5

var m1 = 1;
var m2 = 2;
var m3 = 3;
var m4 = 4;
var m5 = 5;


linkset[0]='<a href="galleryawardsceremony.php">Awards Ceremony</a>'
linkset[0]+='<a href="galleryopeningceremony.php">Opening Ceremony</a>'
linkset[0]+='<a href="stand1.php">Expo Stands 1</a>'
linkset[0]+='<a href="stand2.php">Expo Stands 2</a>'
linkset[0]+='<a href="stand3.php">Expo Stands 3</a>'

linkset[1]='<a href="instore_media.htm" onMouseout="delayhidemenu()">Instore World</a>'


linkset[1]+='<a href="#" onMouseover="showmenu3(event,linkset[2], auto_val, val_x, val_y)">Media Services</a>'

linkset[2]='<a href="#"  onMouseover="showmenu4(event,linkset[3], auto_val, val_x1, val_y1),hide56()">Brand Awareness</a>'
linkset[2]+='<a href="#"  onMouseover="showmenu5(event,linkset[4], auto_val, val_x2, val_y2),hide46()">Brand Promotion</a>'
linkset[2]+='<a href="#"  onMouseover="showmenu6(event,linkset[5], auto_val, val_x3, val_y3),hide45()">Brand Sampling</a>'

linkset[3]='<a href="products_shopperstopper.htm">Shopper Stopper</a>'
linkset[3]+='<a href="products_shelfvision.htm"  >Shelf Vision</a>'
linkset[3]+='<a href="products_bannerad.htm">Banner Ad</a>'
linkset[3]+='<a href="products_brand illuminator.htm">Brand Illuminator</a>'
linkset[3]+='<a href="products_trolleyad.htm">Trolley Ad</a>'
linkset[3]+='<a href="products_basketad_wrap-around.htm" >Basket Ad Wrap-Around</a>'
linkset[3]+='<a href="products_floortalk.htm" >Floor Talk</a>'
linkset[3]+='<a href="products_fridgetalk.htm">Fridge Talk</a>'
linkset[3]+='<a href="products_shelfilluminator.htm" >Shelf Illuminator</a>'
linkset[3]+='<a href="products_showcase.htm" >Showcase</a>'
linkset[3]+='<a href="products_shelftalk.htm" >Shelf Talk</a>'

linkset[4]='<a href="products_coupondirect.htm" >Coupon Direct</a>'
linkset[4]+='<a href="products_icm.htm" >ICM</a>'
linkset[4]+='<a href="products_takeone.htm" >Take One</a>'
linkset[4]+='<a href="products_infodirect.htm"  >Info Direct</a>'
linkset[4]+='<a href="products_shelftalk.htm" >Shelf Talk</a>'

linkset[5]='<a href="products_showcasetester.htm" >Showcase Tester</a>'
linkset[5]+='<a href="products_trolleyad.htm">Trolley Ad</a>'
////No need to edit beyond here


function clearee()
{
document.getElementById('popitmenu2').style.visibility = 'hidden';
	document.getElementById('popitmenu3').style.visibility = 'hidden';
	document.getElementById('popitmenu4').style.visibility = 'hidden';
	document.getElementById('popitmenu5').style.visibility = 'hidden';
	document.getElementById('popitmenu6').style.visibility = 'hidden';
}



function hide56()
{

document.getElementById('popitmenu5').style.visibility = 'hidden';
document.getElementById('popitmenu6').style.visibility = 'hidden';


}

function hide46()
{document.getElementById('popitmenu4').style.visibility = 'hidden';
document.getElementById('popitmenu6').style.visibility = 'hidden';}

function hide45()
{document.getElementById('popitmenu4').style.visibility = 'hidden';
document.getElementById('popitmenu5').style.visibility = 'hidden';}

function hideme()
{
document.getElementById('popitmenu').style.visibility = 'hidden';
	document.getElementById('popitmenu2').style.visibility = 'hidden';
	document.getElementById('popitmenu3').style.visibility = 'hidden';
	document.getElementById('popitmenu4').style.visibility = 'hidden';
	document.getElementById('popitmenu5').style.visibility = 'hidden';
	document.getElementById('popitmenu6').style.visibility = 'hidden';
}

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
{
	//document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)" style="left:500px;top:500px;z-index:1000000000;width:0;height:0;background-color:#CCCCCC;" ></div>');
	document.write('<div id="popitmenu2"></div>');
	
	
	document.write('<div id="popitmenu3"  ></div>');
	document.write('<div id="popitmenu4" ></div>');
	document.write('<div id="popitmenu5" ></div>');
	document.write('<div id="popitmenu6" ></div>');
}

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth, pos_x, pos_y){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.style.left= pos_x
menuobj.style.top= pos_y
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
menuobj.style.visibility="visible"
}

function showmenu2(e,which, optWidth, pos_x, pos_y){
if (!document.all&&!document.getElementById)
return
menuobj2=ie5? document.all.popitmenu2 : document.getElementById("popitmenu2")
menuobj2.innerHTML=which
menuobj2.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj2.contentwidth=menuobj2.offsetWidth
menuobj2.contentheight=menuobj2.offsetHeight
menuobj2.style.left= pos_x
menuobj2.style.top= pos_y
menuobj2.style.visibility="visible"

}

function showmenu3(e, which, optWidth, pos_x, pos_y){
if (!document.all&&!document.getElementById)
return

menuobj3=ie5? document.all.popitmenu3 : document.getElementById("popitmenu3")
menuobj3.innerHTML=which
menuobj3.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj3.contentwidth=menuobj3.offsetWidth
menuobj3.contentheight=menuobj3.offsetHeight
menuobj3.style.left= pos_x
menuobj3.style.top= pos_y
menuobj3.style.visibility="visible"

}

function showmenu4(e, which, optWidth, pos_x, pos_y){
if (!document.all&&!document.getElementById)
return
menuobj4=ie5? document.all.popitmenu4 : document.getElementById("popitmenu4")
menuobj4.innerHTML=which
menuobj4.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj4.contentwidth=menuobj4.offsetWidth
menuobj4.contentheight=menuobj4.offsetHeight
menuobj4.style.left= pos_x
menuobj4.style.top= pos_y
menuobj4.style.visibility="visible"

}

function showmenu5(e, which, optWidth, pos_x, pos_y){
if (!document.all&&!document.getElementById)
return
menuobj5=ie5? document.all.popitmenu5 : document.getElementById("popitmenu5")
menuobj5.innerHTML=which
menuobj5.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj5.contentwidth=menuobj5.offsetWidth
menuobj5.contentheight=menuobj5.offsetHeight
menuobj5.style.left= pos_x
menuobj5.style.top= pos_y
menuobj5.style.visibility="visible"

}

function showmenu6(e, which, optWidth, pos_x, pos_y){
if (!document.all&&!document.getElementById)
return
menuobj6=ie5? document.all.popitmenu6 : document.getElementById("popitmenu6")
menuobj6.innerHTML=which
menuobj6.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj6.contentwidth=menuobj6.offsetWidth
menuobj6.contentheight=menuobj6.offsetHeight
menuobj6.style.left= pos_x
menuobj6.style.top= pos_y
menuobj6.style.visibility="visible"

}


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="hidden"
}




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