
//Jewellery menu
var menu1=new Array()
menu1[0]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?idproduct=56&idcategory=6&page=1">Bracelets</a>'
menu1[1]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?idproduct=884&idcategory=20&page=1">Diamond Studs</a>'
menu1[2]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?idproduct=218&idcategory=20&page=1">Earrings</a>'
menu1[3]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?idproduct=232&idcategory=11">Eternity Bands</a>'
menu1[4]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?idproduct=1301&idcategory=13&page=1">Fashion Rings</a>'
menu1[5]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?idproduct=1029&idcategory=3&page=1">Necklaces</a>'
menu1[6]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?idproduct=1069&idcategory=8">Pearls</a>'
menu1[7]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?idproduct=24&idcategory=2&page=1">Pendants</a>'
menu1[8]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?idproduct=32&idcategory=10&page=1">Wedding Bands</a>'

// engagement rings
var menu2=new Array()
menu2[0]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?idproduct=316&idcategory=9&page=1">Engagement Rings</a>'

//Loose diamonds
var menu3=new Array()
menu3[0]='<a href="http://www.classiccreations.com/shopping/pc/viewCategories.asp?pageStyle=h&idCategory=5">Loose Diamonds</a>'

//watches updated as per jordan Augu 2010
var menu4=new Array()
menu4[1]='<a href="http://www.classiccreations.com/shopping/pc/showsearchresults.asp?IDBrand=14&iPageSize=15">Bedat &amp; Co.</a>'
menu4[2]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=4&iPageSize=15">Baume &amp; Mercier</a>'
menu4[3]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=9&iPageSize=15">Coach</a>'
menu4[4]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=3&iPageSize=15">Concord</a>'
menu4[5]='<a href="http://www.classiccreations.com/shopping/pc/showsearchresults.asp?IDBrand=2&iPageSize=15">Corum</a>'
menu4[6]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=10&iPageSize=15">Ebel</a>'
menu4[7]='<a href="http://www.esqswiss.com/" target="_blank">ESQ</a>'
menu4[8]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=17&iPageSize=15">Franc Vila</a>'
menu4[9]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=16&iPageSize=15">Frederique Constant</a>'
menu4[10]='<a href="http://www.gucci.com" target="_blank">Gucci</a>'
menu4[11]='<a href="http://www.juicycouture.com" target="_blank">Juicy Couture</a>'
menu4[12]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=8&iPageSize=15">Lancaster</a>'
menu4[13]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=5&iPageSize=15">Mont Blanc</a>'
menu4[14]='<a href="http://www.movado.com/" target="_blank">Movado</a>'
menu4[15]='<a href="http://www.classiccreations.com/shopping/pc/showsearchresults.asp?IDBrand=7&iPageSize=15">Sauro</a>'
menu4[16]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=6&iPageSize=15">Swiss Army</a>'
menu4[17]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=1&iPageSize=15">TAGHeuer</a>'
menu4[18]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=11&iPageSize=15">TechnoMarine</a>'
menu4[19]='<a href="http://www.classiccreations.ca/shopping/pc/showsearchresults.asp?IDBrand=15&iPageSize=15">Tissot</a>'

//login
var menu5=new Array()
menu5[0]='<a href="http://www.classiccreations.com/shopping/pc/Checkout.asp?cmode=1">Login</a>'

//contact
var menu6=new Array()
menu6[0]='<a href="http://www.classiccreations.com/shopping/pc/contact.asp">Contact Us</a>'


var menuwidth='135px' //default menu width
var menubgcolor='#E3E3E3'  //menu bgcolor
var disappeardelay=350  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //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=-500
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)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


////  SHOW tool tip type MENU
function showTipBox(layerName,imgName){
 img = getImage(imgName);
 TipBoxTop = getImagePageTop(img); // TIP BOX TOP POSITION
 TipBoxLeft =  getImagePageLeft(img); // TIP BOX LEFT POSITION
if (NS4 || IE4) {
 if (timeOn != null) {
 clearTimeout(timeOn)
 hideLayer(onLayer)
 }
 if (NS4 || IE4) {
 eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="'+layerVis+'"');
 eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top="'+TipBoxTop+'"');
 eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left="'+TipBoxLeft+'"');
 } 
 onLayer = layerName
 }
}

 window.onerror = null;
 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 var NS4 = (bName == "Netscape" && bVer >= 4);
 var OPR = (bName == "Opera" && bVer >=8);
 var FFX = (bName == "FireFox" && bVer >=1);
 var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
 var NS3 = (bName == "Netscape" && bVer < 4);
 var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
 var menuActive = 0
 var menuOn = 0
 var onLayer
 var timeOn = null // LAYER SWITCHING CODE
if (NS4 || IE4 ) {
 if (navigator.appName == "Netscape"){
 layerStyleRef="layer.";
 layerRef="document.layers";
 styleSwitch="";
layerVis="show";
layerHid="hide";
 }else
{
 layerStyleRef="layer.style.";
 layerRef="document.all";
 styleSwitch=".style";
layerVis="visible";
layerHid="hidden";
 }
}// HIDE MENU
function hideLayer(layerName){
 if (menuActive == 0) {
 if (NS4 || IE4) {
 eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="'+layerHid+'"');
 }
 }
}// TIMER FOR TIP BOX MOUSE OUT
function linkTimer() {
 timeOn = setTimeout("btnOut()",500)
}// MOUSE OUT
function btnOut(layerName) {
 if (menuActive == 0) {
 hideLayer(onLayer)
 }
}// GET IMAGE 
function getImage(name) {
  if (NS4) {
    return findImage(name, document);
  }
  if (IE4)
    return eval('document.all.' + name);
  return null;
}

function findImage(name, doc) {
  var i, img;
  for (i = 0; i < doc.images.length; i++)
    if (doc.images[i].name == name)
      return doc.images[i];
  for (i = 0; i < doc.layers.length; i++)
    if ((img = findImage(name, doc.layers[i].document)) != null) {
      img.container = doc.layers[i];
      return img;
    }
  return null;
}

function getImagePageLeft(img) {
  var x, obj;
  if (NS4) {
    if (img.container != null)
      return img.container.pageX + img.x;
    else
      return img.x;
  }
  if (IE4) {
    x = 0;
    obj = img;
    while (obj.offsetParent != null) {
      x += obj.offsetLeft;
      obj = obj.offsetParent;
    }
    x += obj.offsetLeft;
    return x;
  }
  return -1;
}

function getImagePageTop(img) {
  var y, obj;
  if (NS4) {
    if (img.container != null)
      return img.container.pageY + img.y;
    else
      return img.y;
  }
  if (IE4) {
    y = 0;
    obj = img;
    while (obj.offsetParent != null) {
      y += obj.offsetTop;
      obj = obj.offsetParent;
    }
    y += obj.offsetTop;
    return y;
  }
  return -1;
}

