
//Jewellery menu
var menu1=new Array()
menu1[0]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?didProd=1303&idcategory=6&page=1">Bracelets</a>'
menu1[1]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?didProd=1000&idcategory=28&page=1">Diamond Studs</a>'
menu1[2]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?didProd=1000&idcategory=20&page=1">Earrings</a>'
menu1[3]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?didProd=1000&idcategory=11">Eternity Bands</a>'
menu1[4]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?didProd=1000&idcategory=13&page=1">Fashion Rings</a>'
menu1[5]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?didProd=1000&idcategory=3&page=1">Necklaces</a>'
menu1[6]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?didProd=1000&idcategory=8">Pearls</a>'
menu1[7]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?didProd=1000&idcategory=2&page=1">Pendants</a>'
menu1[8]='<a href="http://www.classiccreations.com/shopping/pc/viewPrdcat.asp?didProd=1000&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?didProd=1000&idcategory=9&page=1">Engagement Rings</a>'

// engagement rings
var menu8=new Array()
menu8[0]='<a href="http://www.classiccreations.com/shopping/pc/viewCategories.asp?pageStyle=h&idCategory=61">Watch Winders</a>'
menu8[1]='<a href="http://www.classiccreations.com/shopping/pc/viewCategories.asp?pageStyle=h&idCategory=60">Leather Goods</a>'
menu8[2]='<a href="http://www.classiccreations.com/shopping/pc/viewCategories.asp?pageStyle=h&idCategory=54">Pens</a>'
menu8[3]='<a href="http://www.classiccreations.com/shopping/pc/viewCategories.asp?pageStyle=h&idCategory=62">Money Clips</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[0]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=4">Baume &amp; Mercier</a>'
menu4[1]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=14">Bedat &amp; Co.</a>'
menu4[2]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=22">Bell &amp; Ross</a>'
menu4[3]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=9">Coach</a>'
menu4[4]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=3">Concord</a>'
menu4[5]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=2">Corum</a>'
menu4[6]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=10">Ebel</a>'
menu4[7]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=17">Franc Vila</a>'
menu4[8]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=16">Frederique Constant</a>'
menu4[9]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=19">Gucci</a>'
menu4[10]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=5">Montblanc</a>'
menu4[11]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=23">Movado</a>'
menu4[12]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=21">Perrelet</a>'
menu4[13]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=7">Sauro</a>'
menu4[14]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=6">Swiss Army</a>'
menu4[15]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=11">TechnoMarine</a>'
menu4[16]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=15">Tissot</a>'
menu4[17]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=18">TW Steel</a>'
menu4[18]='<a href="http://www.classiccreations.com/shopping/pc/viewbrand.asp?IDBrand=24">Zenith</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>'

//logout account menu
var menu7=new Array()
menu7[0]='<a href="http://www.classiccreations.com/shopping/pc/login.asp?lmode=1">Account Details</a>'
menu7[1]='<a href="http://www.classiccreations.com/shopping/pc/CustviewPast.asp">Previous Orders</a>'
menu7[2]='<a href="http://www.classiccreations.com/shopping/pc/ggg_manageGRs.asp">Gift Registry</a>'

//logout account menu
var menu9=new Array()
menu9[0]='<div align=center id=VolusionLiveChat style="background-color:#e3e3e3;"><a href=http://www.volusion.com/livechat_software.asp>Free Live Chat</a></div><script defer type=text/javascript src=https://livechat.volusion.com/script.aspx?id=384210></script>'


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=-100
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+115 : window.pageXOffset+window.innerWidth+115 // had to change this to +115 for long menu
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+115 : window.pageYOffset+window.innerHeight+115
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;
}

//Script to load random images for the watch brand companies on the main page

var theImages = new Array()

//Random-loading images
theImages[0] = 'http://www.classiccreations.com/shopping/pc/images/watch0.jpg'  
theImages[1] = 'http://www.classiccreations.com/shopping/pc/images/watch1.jpg'  
theImages[2] = 'http://www.classiccreations.com/shopping/pc/images/watch2.jpg'  
theImages[3] = 'http://www.classiccreations.com/shopping/pc/images/watch3.jpg'  
theImages[4] = 'http://www.classiccreations.com/shopping/pc/images/watch4.jpg'  
theImages[5] = 'http://www.classiccreations.com/shopping/pc/images/watch5.jpg'  
theImages[6] = 'http://www.classiccreations.com/shopping/pc/images/watch6.jpg'  
theImages[7] = 'http://www.classiccreations.com/shopping/pc/images/watch7.jpg'  
theImages[8] = 'http://www.classiccreations.com/shopping/pc/images/watch8.jpg'  
theImages[9] = 'http://www.classiccreations.com/shopping/pc/images/watch9.jpg'  

var j = 0
var p = theImages.length;
var preBuffer = new Array()

for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));

function showImage(){
if(whichImage==0){
document.write('<a href ="http://www.classiccreations.com/shopping/pc/viewprdcat.asp?didProd=1000&idCategory=51"><img src="'+theImages[whichImage]+'" border="0" width="306" height="142" alt="View Our Brands"  /></a>');
}
else if(whichImage==1){
document.write('<a href ="http://www.classiccreations.com/shopping/pc/viewprdcat.asp?didProd=1000&idCategory=51"><img src="'+theImages[whichImage]+'" border="0" width="306" height="142" alt="View Our Brands"  /></a>');
}
else if(whichImage==2){
document.write('<a href ="http://www.classiccreations.com/shopping/pc/viewprdcat.asp?didProd=1000&idCategory=51"><img src="'+theImages[whichImage]+'" border="0" width="306" height="142" alt="View Our Brands"  /></a>');
}
else if(whichImage==3){
document.write('<a href ="http://www.classiccreations.com/shopping/pc/viewprdcat.asp?didProd=1000&idCategory=51"><img src="'+theImages[whichImage]+'" border="0" width="306" height="142" alt="View Our Brands" /></a>');
}
else if(whichImage==4){
document.write('<a href ="http://www.classiccreations.com/shopping/pc/viewprdcat.asp?didProd=1000&idCategory=51"><img src="'+theImages[whichImage]+'" border="0" width="306" height="142" alt="View Our Brands" /></a>');
}
else if(whichImage==5){
document.write('<a href ="http://www.classiccreations.com/shopping/pc/viewprdcat.asp?didProd=1000&idCategory=51"><img src="'+theImages[whichImage]+'" border="0" width="306" height="142" alt="View Our Brands" /></a>');
}
else if(whichImage==6){
document.write('<a href ="http://www.classiccreations.com/shopping/pc/viewprdcat.asp?didProd=1000&idCategory=51"><img src="'+theImages[whichImage]+'" border="0" width="306" height="142" alt="View Our Brands" /></a>');
}
else if(whichImage==7){
document.write('<a href ="http://www.classiccreations.com/shopping/pc/viewprdcat.asp?didProd=1000&idCategory=51"><img src="'+theImages[whichImage]+'" border="0" width="306" height="142" alt="View Our Brands" /></a>');
}
else if(whichImage==8){
document.write('<a href ="http://www.classiccreations.com/shopping/pc/viewprdcat.asp?didProd=1000&idCategory=51"><img src="'+theImages[whichImage]+'" border="0" width="306" height="142" alt="View Our Brands" /></a>');
}
if(whichImage==9){
document.write('<a href ="http://www.classiccreations.com/shopping/pc/viewprdcat.asp?didProd=1000&idCategory=51"><img src="'+theImages[whichImage]+'" border="0" width="306" height="142" alt="View Our Brands"  /></a>');
}
}

 function showLayer(layerName)
        {
            if (document.getElementById) // Netscape 6 and IE 5+
            {
                var targetElement = document.getElementById(layerName);
                targetElement.style.visibility = 'visible';
            }
        }


        function hideLayer(layerName)
        {
            if (document.getElementById) 
            {
                var targetElement = document.getElementById(layerName);
                targetElement.style.visibility = 'hidden';
				document.showimage.visibility='hide'
            }
        }



