/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
* ** Modified to have another div in the menu to allow for more complex styling
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1.push('<a href="neurosurgeons.php" class="bold">Neurosurgeons</a>');
menu1.push('<a href="physiatrists.php" class="bold">Physiatrists</a>');
menu1.push('<a href="nppractitioners.php" class="bold">Non-Physician Practitioners</a>');
menu1.push('<a href="p-Gieringer.php" class="bold">Physical Therapists</a>');



//Contents for menu 2, and so on
var menu2=new Array()
menu2.push('<h5>Appointments</h5>');
menu2.push('<a href="PI-appointments1a.php">How to be referred to LNSA</a>');
menu2.push('<a href="PI-appointments1a.php">Which physician will you see?</a>');
menu2.push('<a href="PI-appointments1a.php">Making your appointment</a>');
menu2.push('<a href="PI-appointments-officevisits.php">Office visits</a>');
menu2.push('<a href="PI-appointments-officevisits.php">Second opinion</a>');


menu2.push('<h5>Patient Forms & Surveys</h5>');
menu2.push('<a href="PI-patient-registration.php">Patient registration forms</a>');
menu2.push('<a href="PI-patient-online_surveys.php">Online surveys</a>');


menu2.push('<a href="contact.php" class="boldCaps">Office information</a>');


menu2.push('<h5>Details regarding treatment</h5>');
menu2.push('<a href="PI-treatment-exam-diagnosis.php">Examination and testing</a>');
menu2.push('<a href="PI-treatment-exam-diagnosis.php">Diagnosis</a>');
menu2.push('<a href="PI-treatment-confidentiality.php">Confidentiality</a>');
menu2.push('<a href="PI-treatment-alternatives.php">Treatment alternatives</a>');
menu2.push('<a href="PI-treatment-alternatives.php">When surgery is required</a>');


menu2.push('<a href="PI-prescription-refill.php" class="boldCaps">Prescription refill</a>');


menu2.push('<a href="PI-costs-billing.php" class="boldCaps">Cost Information</a>');


menu2.push('<a href="PI-participating-Insurances.php" class="boldCaps">Participating Insurances</a>');


menu2.push('<a href="PI-support_groups.php" class="boldCaps">Support groups</a>');


var menu3=new Array()
menu3.push('<h5>Conditions & Procedures</h5>');
menu3.push('<a href="cpbrain.htm">Brain</a>');
menu3.push('<a href="cpspine.htm">Spine</a>');
menu3.push('<a href="cpother.htm">Other</a>');
menu3.push('<h5>Featured Specialities & Services</h5>');
menu3.push('<a href="neurospinecenter.php">The NeuroSpine Center</a>');
menu3.push('<a href="CenterForSpineCare.php">The Center for Spine Care</a>');
menu3.push('<a href="physicaltherapy.php">Physical Therapy</a>');
menu3.push('<a href="electromyography.php">Electromyography(EMG)</a>');


var menu5=new Array()
menu5.push('<a href="mainoffice.htm" class="bold">Main office</a>');
menu5.push('<a href="campusoffice.htm" class="bold">Campus office</a>');



var menu6=new Array()
menu6.push('<a href="news-listings.php?dt=3" class="bold">Testimonials</a>');
menu6.push('<a href="news-listings.php?dt=1" class="bold">Published Articles</a>');
menu6.push('<a href="news-listings.php?dt=6" class="bold">Public Educational Sessions</a>');
menu6.push('<a href="news-listings.php?dt=4" class="bold">About The Physicians</a>');
menu6.push('<a href="news-listings.php?dt=2" class="bold">Archives</a>');


// Conditions
var menu7=new Array()
menu7.push('<h5>Conditions</h5>')
menu7.push('<a href="PM-conditions-Carpal-Tunnel-Syndrome.php">Carpal Tunnel</a>');
menu7.push('<a href="PM-conditions-Cervical-Facet-Disease.php">Cervical Facet Disease</a>');
menu7.push('<a href="PM-conditions-Cervical-Radicular-Irritation.php">Cervical Radicular Irritation</a>');
menu7.push('<a href="PM-conditions-Chronic-Pain.php">Chronic Pain</a>');
menu7.push('<a href="PM-conditions-Diabetic-Peripheral-Neuropathy.php">Diabetic Peripheral Neuropathy</a>');
menu7.push('<a href="PM-conditions-Disc-Related-Pain.php">Disc Related Pain</a>');
menu7.push('<a href="PM-conditions-Lumbar-Facet-Disease.php">Lumbar Facet Disease</a>');
menu7.push('<a href="PM-conditions-Lumbar-Radicular-Irritation.php">Lumbar Radicular Irritation</a>');
menu7.push('<a href="PM-conditions-Muscular-Pain.php">Muscular Pain</a>');
menu7.push('<a href="PM-conditions-Muscular-Piriformis-Syndrome.php">Muscular (Pirirformis) Pain</a>');
menu7.push('<a href="PM-conditions-Nerve-Entrapment.php">Nerve Entrapment</a>');
menu7.push('<a href="PM-conditions-Occipital-Neuralgia.php">Occipital Neuralgia</a>');
menu7.push('<a href="PM-conditions-SI-Sacroiliac-Joint-Problems.php">SI -Sacroiliac Joint Pain</a>');
menu7.push('<a href="PM-conditions-Thoracic-Facet-Disease.php">Thoracic Facet Disease</a>');



// Procedures
var menu8=new Array()
menu8.push('<h5>Procedures</h5>')
menu8.push('<a href="PM-procedures-Cervical-Epidural-Steroid-Injection.php">Cervical Epidural Steroid Injection</a>');
menu8.push('<a href="PM-procedures-Cervical-Facet-Joint-Injections.php">Cervical Facet Joint Injections</a>');
menu8.push('<a href="PM-procedures-Cervical-Medial-Branch-Block-Injections.php">Cervical Medial Branch Block Injections</a>');
menu8.push('<a href="PM-procedures-Cervical-Radiofrequency-Ablation.php">Cervical Radiofrequency Ablation</a>');
menu8.push('<a href="PM-procedures-Discogram.php">Discogram</a>');
menu8.push('<a href="PM-procedures-Lumbar-Epidural-Steroid-Injection.php">Lumbar Epidural Steroid Injection</a>');
menu8.push('<a href="PM-procedures-Lumbar-Facet-Joint-Injections.php">Lumbar Facet Joint Injections</a>');
menu8.push('<a href="PM-procedures-Lumbar-Medial-Branch-Block-Injections.php">Lumbar Medial Branch Block Injections</a>');
menu8.push('<a href="PM-procedures-Sacroiliac-Joint-Injection.php">Sacroiliac Joint Injection</a>');
menu8.push('<a href="PM-procedures-Pirformis-Injection.php">Pirformis Injection</a>');
menu8.push('<a href="PM-procedures-Spinal-Cord-Stimulator.php">Spinal Cord Stimulator</a>');
menu8.push('<a href="PM-procedures-Spinal-Cord-Stimulator-Trial.php">Spinal Cord Stimulator Trial</a>');
menu8.push('<a href="PM-procedures-Thoracic-Facet-Joint-Injections.php">Thoracic Facet Joint Injections</a>');
menu8.push('<a href="PM-procedures-Thoracic-Medial-Branch-Block-Injections.php">Thoracic Medial Branch Block Injections</a>');
menu8.push('<a href="PM-procedures-Trigger-Point-Injections.php">Trigger Point Injections</a>');


/*
oCMenu.makeMenu("top5","","","appointments.htm","",111,30,"images/faq.gif","images/faq_on.gif");
	oCMenu.makeMenu("sub50","top5","Appointments","appointments.htm");
	oCMenu.makeMenu("sub51","top5","Insurance","insurance.htm");
	oCMenu.makeMenu("sub52","top5","Locations/Directions","locations.htm");
	oCMenu.makeMenu("sub53","top5","Neurosurgery","neurosurgery.htm");
//	oCMenu.makeMenu("sub54","top5","Neurology","neurology.htm");
	oCMenu.makeMenu("sub55","top5","Physiatry","physiatry.htm");
	oCMenu.makeMenu("sub56","top5","Referrals","referrals.htm");
	oCMenu.makeMenu("sub57","top5","Support Groups","faqsupportgroups.htm");
	oCMenu.makeMenu("sub58","top5","Related Health Links","faqRelatedLinks.htm");
//	oCMenu.makeMenu("sub58","top5","Stroke","stroke.htm");
	
oCMenu.makeMenu("top6","","","news-desperatepain.htm","",111,30,"images/news.gif","images/news_on.gif");
*/

var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //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 id="dropmenuinnerdiv"></div></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){
	// skip this, just show the menu where it should be
	return 0;
	
	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){
	var dropmenuinnerobj=document.getElementById? document.getElementById("dropmenuinnerdiv") : dropmenuinnerdiv
	if (ie4||ns6)
		dropmenuinnerobj.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)
}

function forcehidemenu() {
	clearhidemenu();
	hidemenu();
}

if (hidemenu_onclick=="yes")
	document.onclick=hidemenu;
