 
// convert all characters to lowercase to simplify testing 
    var agt=navigator.userAgent.toLowerCase(); 

    // *** BROWSER VERSION *** 
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5. 
    var is_major = parseInt(navigator.appVersion); 
    var is_minor = parseFloat(navigator.appVersion); 

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection. 
    // If you want to allow spoofing, take out the tests for opera and webtv. 
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
                && (agt.indexOf('webtv')==-1)); 
    var is_nav2 = (is_nav && (is_major == 2)); 
    var is_nav3 = (is_nav && (is_major == 3)); 
    var is_nav4 = (is_nav && (is_major == 4)); 
    var is_nav4up = (is_nav && (is_major >= 4)); 
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) || 
                          (agt.indexOf("; nav") != -1)) ); 
    var is_nav5 = (is_nav && (is_major == 5)); 
    var is_nav5up = (is_nav && (is_major >= 5)); 

    var is_ie   = (agt.indexOf("msie") != -1); 
    var is_ie3  = (is_ie && (is_major < 4)); 
    var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) ); 
    var is_ie4up  = (is_ie  && (is_major >= 4)); 
    var is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); 
    var is_ie5up  = (is_ie  && !is_ie3 && !is_ie4); 

    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser 
    // or if this is the first browser window opened.  Thus the 
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable. 
    var is_aol   = (agt.indexOf("aol") != -1); 
    var is_aol3  = (is_aol && is_ie3); 
    var is_aol4  = (is_aol && is_ie4); 

    var is_opera = (agt.indexOf("opera") != -1); 
    var is_webtv = (agt.indexOf("webtv") != -1);




var bg_color = "0065A8";		//background color for tables
var chng_color = "#e77500";		//colour the cell changes to

var divider_gif = "images_skin/menudiv.gif";		//the gif you use to separate the cells


var wasak = new Array();
for (j=0;j<9;j++){			//remember to change the number to how many menus there are (eg 5 menus = j=0;j<5j++)
	wasak[j] = new Array()}

//menu 1

wasak[0][0]="Click for Graphical Menu+product_menu.html"
wasak[0][1]="B-Lite Blemish Cream+skin/blite/blite_cream.html"
wasak[0][2]="B-Lite Blemish Oil+skin/blite/index.html"
wasak[0][3]="Pallid Skin Lightning Tabs+skin/pallid/index.html"
wasak[0][4]="Beta Oil+skin/betaoil/index.html"
wasak[0][5]="SkinLite Blemish Cream+skin/skinlite_skin_lighteners/skin_lighteners.html"
wasak[0][6]="SkinLite Blemish Oil+skin/skinlite/skinlite_liquid.html"
wasak[0][7]="Avre Wrinkle Cream+skin/antiaging/anti_ageing.html"
wasak[0][8]="Avre Active Skin Toner+skin/toner_cleanser/index.html"
wasak[0][9]="Avre Active Skin Cleanser+skin/toner_cleanser/index.html"
wasak[0][11]="Tea Tree Oil Products+teatreeoil/index.html"
wasak[0][10]="Pimple Cream+skin/pimple_defence/index.html"



//menu 2


wasak[1][0]="Click for Graphical Menu+product_menu.html"
wasak[1][1]="Skin Lightening+skin/blite/blite_fadecream.html"
wasak[1][2]="Skin Lightening Tabs+skin/pallid/index.html"
wasak[1][3]="Freckle Fading+skin/blite/blite_cream.html"
wasak[1][4]="Anti-Aging+skin/antiaging/anti_ageing.html"
wasak[1][5]="Acne Scars+skin/betaoil/index.html"
wasak[1][6]="Wrinkles+skin/antiaging/anti_ageing.html"
wasak[1][7]="Acne - Pimples+teatreeoil/index.html"
wasak[1][8]="Skin Blemishes+skin/blite/blite_cream.html"
wasak[1][9]="Chloasma+skin/blite/blite_cream.html"
wasak[1][10]="Skin Toning+skin/toner_cleanser/index.html"
wasak[1][12]="Liver Spots - Age Spots+skin/blite/blite_rollon.html"
wasak[1][13]="Oily Skin+teatreeoil/teatreeoil_products.html"
wasak[1][11]="Skin Irritations+teatreeoil/teatreeoil_products.html"

//menu 3

wasak[2][0]="+"
wasak[2][7]="+"
wasak[2][2]="+"
wasak[2][3]="+"
wasak[2][4]="+"
wasak[2][5]="+"
wasak[2][6]="+"
wasak[2][1]="+"
wasak[2][8]="+"
wasak[2][9]="+"
wasak[2][10]="+"

//menu 4

wasak[3][0]="About Skin Index+misc/about_skincare/about_skincare.html"
wasak[3][1]="Skin Explained+misc/about_skincare/about_skin.html"
wasak[3][2]="Skin Conditions Info+skin_conditions/index.html"
wasak[3][3]="Chemical Peels+misc/about_skincare/chemical_peels.html"
wasak[3][4]="Dermatology Dictionary+misc/about_skincare/dermatology_dictionary.html"
wasak[3][5]="Cosmetic Ingredients+misc/about_skincare/cosmetic_ingredients.html"
wasak[3][6]="Skin and Diet+misc/about_skincare/skin_and_diet.html"


//menu 5

wasak[4][0]="Avre Contact Information+misc/bus/contactinfo.html"
wasak[4][1]="Avre Contact enquiry Form+secure/misc/contact.htm"
wasak[4][2]="Ordering Policy+secure/misc/shipping.html"
wasak[4][3]="Become an Avre Distributor+misc/bus/distinfo.html"
//menu 6

wasak[5][0]="Item1+link1.html"
wasak[5][1]="Item2+link2.html"
wasak[5][2]="Item3+link3.html"
wasak[5][3]="Item4+link4.html"
wasak[5][4]="Item5+link5.html"
wasak[5][5]="Item6+link6.html"

//menu 7

wasak[6][0]="Item1+link1.html"
wasak[6][1]="Item2+link2.html"
wasak[6][2]="Item3+link3.html"
wasak[6][3]="Item4+link4.html"
wasak[6][4]="Item5+link5.html"
wasak[6][5]="Item6+link6.html"

//menu 8

wasak[7][0]="Item1+link1.html"
wasak[7][1]="Item2+link2.html"
wasak[7][2]="Item3+link3.html"
wasak[7][3]="Item4+link4.html"
wasak[7][4]="Item5+link5.html"
wasak[7][5]="Item6+link6.html"

function makeLayer(){

//this function makes layers for Netscape

arg=makeLayer.arguments;
whatDiv = arg[0]
DivLeft=arg[1]
x=arg[2]

layerstyle="drop"

theDiv="<layer id=\"" +whatDiv+ "\" visibility=HIDE left=" +DivLeft+ " top=60 bgcolor=" +bg_color+ " width=150 onmouseover=\"showMenu('','document.layers[\\'"+ whatDiv +"\\']')\" onMouseout=\"hideMenu('','document.layers[\\'"+ whatDiv +"\\']')\"><layer id=topline bgcolor=\"#0083de\"><img src='img/shaddow.gif' width=150 height=4></LAYER>";

theTop = 3

for (var i=0; i < wasak[x].length; i++)
{
getPlus = wasak[x][i].indexOf("+");
urlName = wasak[x][i].substring(0, getPlus);
urlAdrs = wasak[x][i].substring(getPlus +1, wasak[x][i].length)
theDiv +="<layer id=" +i+whatDiv+ "bgcolor=" +bg_color+ " top=\"" +theTop+ "\" onMouseover=\"this.bgColor='" +chng_color+ "' \" onMouseout=\"this.bgColor='#0083de'\" width=150 height=15><a class='drop' href=/" +urlAdrs+ ">&nbsp;" +urlName+ "</a></layer>";
theTop = theTop+15
theDiv +="<layer id=underline bgcolor=\"#0083de\" top=\"" +theTop+ "\"><img src=" +divider_gif+ " width=150 height=2></LAYER>";
theTop = theTop+3
}
theDiv += "<layer id=theend></layer></layer>"



document.write(theDiv);
}

//document.getElementById('" +whatDiv+ "'))

function makeDiv(){

//this function makes Divs for IE



arg=makeDiv.arguments;
x=arg[2]
whatDiv=arg[0]
DivLeft=arg[1]

theDiv="<div id=\"" +whatDiv+ "\" style=\" visibility:hidden; position:absolute; top:190px; left:" +DivLeft+ "px; background-color:" +bg_color+ "\" onMouseover=\"showMenu('" +whatDiv+ "','',document.getElementById('" +whatDiv+ "'))\"; onMouseout=\"hideMenu('" +whatDiv+ "','',document.getElementById('" +whatDiv+ "'))\";><div id=topline bgcolor=" +bg_color+ "><img src='img/shaddow.gif' width=150 height=4></div>";

theTop=3

for (var i=0; i < wasak[x].length; i++)
{
getPlus = wasak[x][i].indexOf("+");
urlName = wasak[x][i].substring(0, getPlus);
urlAdrs = wasak[x][i].substring(getPlus +1, wasak[x][i].length)

theDiv +="<div id=" +i+whatDiv+ "bgcolor=" +bg_color+ " top=\"" +theTop+ "\" onMouseover=\"this.style.backgroundColor='" +chng_color+ "';\" onMouseout=\"this.style.backgroundColor='" +bg_color+ "';\" width=150 height=21><a class='drop' href=" +urlAdrs+ ">&nbsp;" +urlName+ "</a></div>";
theTop = theTop+22
theDiv +="<div id=underline bgcolor=" +bg_color+ " top=\"" +theTop+ "\"><img src=" +divider_gif+ " width=150 height=2></div>";
theTop = theTop+3
}
theDiv += "<div id=theend bgcolor=" +bg_color+ " top=" +theTop+ " height=5></div></div>"


document.write(theDiv);
}


function showMenu(){

//makes the divs or layers appear when you do onmouseover on the buttons or on the div itself

if(is_ie4up)
{
arg=showMenu.arguments
DivId=eval(arg[0])
if(DivId.style.visibility=='hidden'){DivId.style.visibility = 'visible'}
}
else if(is_nav5 || is_opera)
{
arg=showMenu.arguments
DivId=eval(arg[2])
if(DivId.style.visibility=='hidden'){DivId.style.visibility = 'visible'}
}
else
{
args = showMenu.arguments;
DivID = eval(args[1]);
if (DivID) if(DivID.visibility=='hide'){DivID.visibility = 'show';}
}
}

function hideMenu(){

//does the opposite of showMenu

if(is_ie4up)
{
arg=hideMenu.arguments
DivId=eval(arg[0])
if(DivId.style.visibility=='visible'){DivId.style.visibility = 'hidden'}
}
else if(is_nav5)
{
arg=hideMenu.arguments
DivId=eval(arg[2])
if(DivId.style.visibility=='visible'){DivId.style.visibility = 'hidden'}
}
else
{
args = hideMenu.arguments;
DivID = eval(args[1]);
if (DivID) if(DivID.visibility=='show'){DivID.visibility = 'hide';}
}
}

