var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos)
{
	if(pos=="random")
		{LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
		TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	
	if(pos=="center")
		{LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null)
		{LeftPosition=0;
		TopPosition=20}
	
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);
}


//HOME
var menuH=new Array()
menuH[0]='<a href="http://shinesandshimmers.com.au">HOME</a>'

//WHY US
var menuW=new Array()
menuW[0]='<a href="./shines-commitment.html">SS commitment</a>'
menuW[1]='<a href="./shines-concept.html">SS concept</a>'
menuW[2]='<a href="./clients-feedback.html">client feedback</a>'

//SERVICES
var menuS=new Array()
menuS[0]='<a href="./faq-technology.html">laser - IPL</a>'
menuS[1]='<a href="./clinical-facial.html">facials</a>'
menuS[2]='<a href="./face-treatments.html">cellulite therapy</a>'
menuS[3]='<a href="./body-treatments.html">wrinkle therapy</a>'
menuS[4]='<a href="./presor-therapy.html">pressor therapy</a>'
menuS[5]='<a href="./faq-skin-rejuv.html">skin rejuvenation</a>'
menuS[6]='<a href="./faq-vascular.html">vascular conditions</a>'
menuS[7]='<a href="./room-rental.html">lease a room</a>'
menuS[8]='<a href="./IPL-training.html">IPL training</a>'
menuS[9]='<a href="./cosmetic-tatoo.html">permanent make-up</a>'
menuS[10]='<a href="./intuitiveconsulting.html">intuitive</a>'
menuS[11]='<a href="./Acupuncture.html">acupuncture</a>'
menuS[12]='<a href="./bowen-therapy.html">bowen therapy</a>'
menuS[13]='<a href="./Naturopathy-Alison.html">naturopathy</a>'
menuS[14]='<a href="./counselling.html">counselling</a>'
menuS[15]='<a href="./bleaching.html">skin bleaching</a>'
menuS[16]='<a href="./analbleaching.html">anal bleaching</a>'
menuS[17]='<a href="./bum-facial.html">bum facial</a>'
menuS[18]='<a href="./massages.html">relaxation massages</a>'
menuS[19]='<a href="./baby-massage.html">infant massage</a>'
menuS[20]='<a href="./moles-removal.html">mole/spot removal</a>'
menuS[21]='<a href="./acnemelbourne.html">acne removal</a>'
menuS[22]='<a href="./anti-ageing.html">anti-ageing</a>'
//FAQs'<a href="./faq/faq_ipl_laser.html">laser - IPL</a>'
var menuF=new Array()
menuF[0]='<a href="./ipl-consultation.html">consultation *NEW*</a>'
menuF[1]='<a href="./contactus.html">contact us</a>'
menuF[2]='<a href="./links.html">links</a>'
menuF[3]='<a href="./clinical-studies.html">research</a>'


//SHOPPING
var menuSh=new Array()
menuSh[0]='<a href="./shopping.html">palladio</a>'
menuSh[1]='<a href="./products-saltlamp.html">salt crystal lamps</a>'
menuSh[2]='<a href="./order.html">order forms</a>'


var menuwidth='165px' //default menu width
var menubgcolor='red' //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="-500px"
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")+5
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
