/***********************************************
-
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="/health/pureaire.asp" class="menu">Air Purifiers</a>'
menu1[1]='<a href="/health/bp.asp" class="menu">Blood Pressure</a>'
menu1[2]='<a href="/health/bfm/omron_bf306.asp" class="menu">Body Fat Monitors</a>'
menu1[3]='<a href="/health/circu_booster_multi.asp" class="menu">Circulation Booster</a>'
menu1[4]='<a href="/health/detox.asp" class="menu">Detox</a>'
menu1[5]='<a href="/health/digital_thermometers.asp" class="menu">Digital Thermometers</a>'
menu1[6]='<a href="/health/eco.asp" class="menu">Eco-Friendly Products</a>'
menu1[7]='<a href="/health/eye_care.asp" class="menu">Eye Care</a>'
menu1[8]='<a href="/health/health_supplements_multi.asp" class="menu">Health Supplements</a>'
menu1[9]='<a href="/health/health_patches.asp" class="menu">Health Patches</a>'
menu1[10]='<a href="/health/heat_pad/multi.asp" class="menu">Heat Pads</a>'
menu1[11]='<a href="/health/bug_geroff.asp" class="menu">Insect Repellent</a>'
menu1[12]='<a href="/health/magnetic_therapy.asp" class="menu">Magnetic Therapy</a>'
menu1[13]='<a href="/health/massage_therapy.asp" class="menu">Massage Therapy</a>'
menu1[14]='<a href="/health/maternity_child_care.asp" class="menu">Maternity and Child Care</a>'
menu1[15]='<a href="/health/medical_conditions.asp" class="menu">Medical Conditions</a>'
menu1[16]='<a href="/health/menstrual_cups.asp" class="menu">Menstrual Cups</a>'
menu1[17]='<a href="/health/migraine_relief.asp" class="menu">Migraine Relief</a>'
menu1[18]='<a href="/health/perfect_hand_protectant.asp" class="menu">Personal Protection</a>'
menu1[19]='<a href="/health/personal_screening.asp" class="menu">Personal Screening</a>'
menu1[20]='<a href="/health/respiratory_therapy.asp" class="menu">Respiratory Therapy</a>'
menu1[21]='<a href="/health/sexual_health.asp" class="menu">Sexual Health</a>'
menu1[22]='<a href="/health/skin_analyser.asp" class="menu">Skin Analyser</a>'
menu1[23]='<a href="/health/sound_therapy.asp" class="menu">Sound Therapy</a>'
menu1[24]='<a href="/health/kalo/nowquit.asp" class="menu">Stop Smoking</a>'
menu1[25]='<a href="/health/snoreeze.asp" class="menu">Stop Smoking</a>'
menu1[26]='<a href="/health/alternative_therapy.asp" class="menu">Tens</a>'
menu1[27]='<a href="/health/zen_chi.asp" class="menu">Zen Chi</a>'

//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="/beauty/abluo_nat.asp" class="menu">Abluo Natural Products</a>'
menu2[1]='<a href="/beauty/age_defying.asp" class="menu">Age Defying</a>'
menu2[2]='<a href="/beauty/aloe_vera_set.asp" class="menu">Aloe Vera Set</a>'
menu2[3]='<a href="/beauty/beauty_kits.asp" class="menu">Beauty Kits</a>'
menu2[4]='<a href="/health/detox/body_wraps.asp" class="menu">Body Wraps</a>'
menu2[5]='<a href="/beauty/hair_loss_treatment.asp" class="menu">Hair Loss Treatment</a>'
menu2[6]='<a href="/beauty/slimming.asp" class="menu">Slimming</a>'
menu2[7]='<a href="/beauty/tanning.asp" class="menu">Tanning Products</a>'
menu2[8]='<a href="/beauty/tooth_care.asp" class="menu">Tooth Care</a>'

//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="/fitness/calorie_counters.asp" class="menu">Calorie Counters</a>'
menu3[1]='<a href="/fitness/conditioning/dance_hoop.asp" class="menu">Dance Hoop</a>'
menu3[2]='<a href="/fitness/electro_muscle_stimulators.asp" class="menu">Electro Muscle Stimulators</a>'
menu3[3]='<a href="/fitness/gymnatube_resistive_exercise_tube.asp" class="menu">Exercise Tube</a>'
menu3[4]='<a href="/fitness/expand_a_lung.asp" class="menu">Expand-A-Lung</a>'
menu3[5]='<a href="/fitness/conditioning/funkey_hula.asp" class="menu">Funkey Hula</a>'
menu3[6]='<a href="/fitness/pilates.asp" class="menu">Pilates</a>'
menu3[7]='<a href="/fitness/powerbreathe_multi.asp" class="menu">POWERbreathe</a>'
menu3[8]='<a href="/fitness/yoga/relax_kids/relax_kids.asp" class="menu">Relax Kids</a>'
menu3[9]='<a href="/fitness/respiratory_training.asp" class="menu">Respiratory Training</a>'
menu3[10]='<a href="/fitness/step_counters.asp" class="menu">Step Counters</a>'
menu3[11]='<a href="/fitness/yoga.asp" class="menu">Yoga</a>'
menu3[12]='<a href="/fitness/youbreathe/youbreathe.asp" class="menu">YouBreathe</a>'

//Contents for menu 4
var menu4=new Array()
menu4[0]='<a href="/safety/laddermates.asp" class="menu">Laddermate</a>'
menu4[1]='<a href="/safety/smoke_alarms.asp" class="menu">Smoke Alarms</a>'

var menuwidth='140px' //default menu width
var menubgcolor='#47989B'  //menu bgcolor
var disappeardelay=250  //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 windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
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



	function Pop(url,intW,intH) {
		window.open(url,'complexPop','width=' + intW + ',height=' + intH + ',scrollbars=no,status=no,toolbar=no,menubar=no')
	}

	var flag = false;
	
	function imageLoad() {  
		if (document.images) {
			img1on = new Image(); img1on.src = "/img/nav/health_on.gif";
			img2on = new Image(); img2on.src = "/img/nav/fitness_on.gif";
			img3on = new Image(); img3on.src = "/img/nav/safety_on.gif";
			img4on = new Image(); img4on.src = "/img/nav/consult_on.gif";
			img5on = new Image(); img5on.src = "/img/nav/fire_on.gif";
			img6on = new Image(); img6on.src = "/img/nav/commercial_on.gif";
			img7on = new Image(); img7on.src = "/img/nav/about_on.gif";
			img8on = new Image(); img8on.src = "/img/nav/buying_on.gif";
			img9on = new Image(); img9on.src = "/img/nav/help_on.gif";
			img10on = new Image(); img10on.src = "/img/nav/contact_on.gif";
			img11on = new Image(); img11on.src = "/img/nav/training_on.gif";
			
			img12on = new Image(); img12on.src = "/img/top_bar/health_on.gif";
			img13on	= new Image(); img13on.src = "/img/top_bar/beauty_on.gif";
			img14on	= new Image(); img14on.src = "/img/top_bar/fitness_on.gif";
			img15on	= new Image(); img15on.src = "/img/top_bar/safety_on.gif";
			img16on	= new Image(); img16on.src = "/img/top_bar/commercial_on.gif";
			//alert("contact");
			return (flag = true);
		}
	}

	if (document.images) {   

			img1off = new Image(); img1off.src = "/img/nav/health.gif";
			img2off = new Image(); img2off.src = "/img/nav/fitness.gif";
			img3off = new Image(); img3off.src = "/img/nav/safety.gif";
			img4off = new Image(); img4off.src = "/img/nav/consult.gif";
			img5off = new Image(); img5off.src = "/img/nav/fire.gif";
			img6off = new Image(); img6off.src = "/img/nav/commercial.gif";
			img7off = new Image(); img7off.src = "/img/nav/about.gif";
			img8off = new Image(); img8off.src = "/img/nav/buying.gif";
			img9off = new Image(); img9off.src = "/img/nav/help.gif";
			img10off = new Image(); img10off.src = "/img/nav/contact.gif";
			img11off = new Image(); img11off.src = "/img/nav/training.gif";
			
			img12off = new Image(); img12off.src = "/img/top_bar/health.gif";
			img13off = new Image(); img13off.src = "/img/top_bar/beauty.gif";
			img14off = new Image(); img14off.src = "/img/top_bar/fitness.gif";
			img15off = new Image(); img15off.src = "/img/top_bar/safety.gif";
			img16off = new Image(); img16off.src = "/img/top_bar/commercial.gif";
	}


	function rollIn(imgName) {
		if (document.images && (flag == true)) {
			document[imgName].src = eval(imgName + "on.src");
		}
	}

	function rollOut(imgName) { 
		if (document.images){
			document[imgName].src = eval(imgName + "off.src");
		}
	}
	
	function windowOpener(item) {
	msgWindow = window.open("", "displayWindow", "menubar=no,scrollbars=yes,status=no,width=250,height=550")
	msgWindow.document.write ('<HEAD><TITLE>Product&nbsp;Information<\/TITLE>');
	msgWindow.document.write('<LINK rel="stylesheet" type="text/css" href="/easyshopmaker/easyshopmaker.css">');
	msgWindow.document.write ('<\/HEAD>');
	if (item.indexOf('http') != -1) {
	msgWindow.document.write('<body bgcolor=#FFFFFF>');
	} else {
	msgWindow.document.write('<body bgcolor=#FFFFFF onblur="window.close()" onclick="window.close()">');
	}msgWindow.document.write('<font face=arial size=2 color=#000000 class=esm_ip_font>'+item+'');
	msgWindow.document.write('<HR>Click&nbsp;to&nbsp;close&nbsp;this&nbsp;window<\/font>');
	msgWindow.document.write('<p><center><a href="Javascript:window.close()"><font face=arial size=2 color=#000000>Back</font></a>');
	msgWindow.document.write('<br><font face=arial size=1 color=#000000 class=esm_ip_font>Salveo: The UKs Leading Health, Safety &amp; Fitness Store<\/font><br>');
	msgWindow.document.write('<\/body><\/html>')
	msgWindow.document.close();
	msgWindow.focus();
	}
	
	function vat(amount) {
	
		amount = amount / 1.175;	
	
	// rounds number to X decimal places, defaults to 2
		var X = 2;
		amount = Math.round(amount*Math.pow(10,X))/Math.pow(10,X);
   // returns the amount in the .99 format
		return (amount == Math.floor(amount)) ? amount + '.00' : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);
	}
	
    function vatb(amount) {
	
		amount = amount / 1.05;	
	
	// rounds number to X decimal places, defaults to 2
		var X = 2;
		amount = Math.round(amount*Math.pow(10,X))/Math.pow(10,X);
   // returns the amount in the .99 format
		return (amount == Math.floor(amount)) ? amount + '.00' : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);
	}

	

