// JavaScript Document

//Contents for Treatment Programs
var menu2=new Array()
menu2[0]='<a href="http://www.southcoastrecovery.com/program_sheet.html">Program Sheet</a>'
menu2[1]='<a href="http://www.southcoastrecovery.com/christian_track.html">Christian Track</a>'
menu2[2]='<a href="http://www.southcoastrecovery.com/dual_diagnoses_treatment.html">Dual Diagnoses</a>'
menu2[3]='<a href="http://www.southcoastrecovery.com/depression_treatment.html">Depression Treatment</a>'
menu2[4]='<a href="http://www.southcoastrecovery.com/post-traumatic-stress-disorder-treatment.html">PTSD Treatment</a>'
menu2[5]='<a href="http://www.southcoastrecovery.com/gay_lesbian_treatment.html">Gay &amp; Lesbian Program</a>'
menu2[6]='<a href="http://www.southcoastrecovery.com/interventions.html">Interventions</a>'
menu2[7]='<a href="http://www.southcoastrecovery.com/legal_alternative_sentencing.html">Legal Alternative Sentencing</a>'
menu2[8]='<a href="http://www.southcoastrecovery.com/protected_identity.html">Protected Identity</a>'
menu2[9]='<a href="http://www.southcoastrecovery.com/detox.html">Detox</a>'
menu2[10]='<a href="http://www.southcoastrecovery.com/alcohol_treatment.html">Alcohol Abuse</a>'
menu2[11]='<a href="http://www.southcoastrecovery.com/drug_rehab.html">Drug Rehab</a>'
menu2[12]='<a href="http://www.southcoastrecovery.com/oxycontin_treatment.html">Oxycontin Addiction</a>'
menu2[13]='<a href="http://www.southcoastrecovery.com/vicodin_treatment.html">Vicodin Addiction</a>'
menu2[14]='<a href="http://www.southcoastrecovery.com/heroin_treatment.html">Heroin Addiction</a>'
menu2[15]='<a href="http://www.southcoastrecovery.com/meth_treatment.html">Meth Addiction</a>'
menu2[16]='<a href="http://www.southcoastrecovery.com/cocaine_treatment.html">Cocaine Addiction</a>'
menu2[17]='<a href="http://www.southcoastrecovery.com/anabolic_steroid_treatment.html">Anabolic Steroids</a>'
menu2[18]='<a href="http://www.southcoastrecovery.com/opiate_treatment.html">Opiate Addiction</a>'
menu2[19]='<a href="http://www.southcoastrecovery.com/prescription_drug_treatment.html">Prescription Drug Addiction</a>'
menu2[20]='<a href="http://www.southcoastrecovery.com/valium_treatment.html">Valium Addiction</a>'
menu2[21]='<a href="http://www.southcoastrecovery.com/xanax_treatment.html">Xanax Addiction</a>'
menu2[22]='<a href="http://www.southcoastrecovery.com/american_indian_treatment.html">American Indian Treatment</a>'
menu2[23]='<a href="http://www.southcoastrecovery.com/military-addiction-treatment.html">Military Addiction Treatment</a>'
menu2[24]='<a href="http://www.southcoastrecovery.com/suboxone_treatment.html">Suboxone Treatment</a>'
menu2[25]='<a href="http://www.southcoastrecovery.com/soma_treatment.html">Soma Treatment</a>'
menu2[26]='<a href="http://www.southcoastrecovery.com/adderall_treatment.html">Adderall Treatment</a>'
menu2[27]='<a href="http://www.southcoastrecovery.com/marijuana_treatment.html">Marijuana Treatment</a>'
menu2[28]='<a href="http://www.southcoastrecovery.com/percocet_treatment.html">Percocet Treatment</a>'
menu2[29]='<a href="http://www.southcoastrecovery.com/opana-treatment.html">Opana Treatment</a>'
menu2[30]='<a href="http://www.southcoastrecovery.com/young-adult-treatment.html">Young Adult Treatment</a>'
menu2[31]='<a href="http://www.southcoastrecovery.com/learning_disabilities_and_drug_rehab.html">Learning Disabilities and Drug Rehab</a>'






//Contents for Alcohol Rehab
var menu3=new Array()
menu3[0]='<a href="http://www.southcoastrecovery.com/alcohol_rehab.html">Alcohol Rehab</a>'
menu3[1]='<a href="http://www.southcoastrecovery.com/detox.html">Alcohol Detox</a>'
menu3[2]='<a href="http://www.southcoastrecovery.com/alcohol_treatment.html">Alcohol Treatment</a>'
menu3[3]='<a href="http://www.southcoastrecovery.com/alcohol-rehab/alcohol-rehab-depression-and-alcoholism-treatment.html">Depression & Alcohol</a>'
menu3[4]='<a href="http://www.southcoastrecovery.com/dual_diagnoses_treatment.html">Dual Diagnoses & Alcohol</a>'
menu3[5]='<a href="http://www.southcoastrecovery.com/getting_sober.html">Getting Sober</a>'

//Contents for Drug Rehab
var menu4=new Array()
menu4[0]='<a href="http://www.southcoastrecovery.com/drug_rehab.html">Drug Rehab</a>'
menu4[1]='<a href="http://www.southcoastrecovery.com/detox.html">Drug Detox</a>'
menu4[2]='<a href="http://www.southcoastrecovery.com/oxycontin_treatment.html">Oxycontin Addiction</a>'
menu4[3]='<a href="http://www.southcoastrecovery.com/heroin_treatment.html">Heroin Addiction</a>'
menu4[4]='<a href="http://www.southcoastrecovery.com/meth_treatment.html">Meth Addiction</a>'
menu4[5]='<a href="http://www.southcoastrecovery.com/cocaine_treatment.html">Cocaine Addiction</a>'
menu4[6]='<a href="http://www.southcoastrecovery.com/vicodin_treatment.html">Vicodin Addiction</a>'
menu4[7]='<a href="http://www.southcoastrecovery.com/valium_treatment.html">Valium Addiction</a>'
menu4[8]='<a href="http://www.southcoastrecovery.com/xanax_treatment.html">Xanax Addiction</a>'
menu4[9]='<a href="http://www.southcoastrecovery.com/getting_sober.html">Getting Sober</a>'

//Contents for Detox Programs
var menu5=new Array()
menu5[0]='<a href="http://www.southcoastrecovery.com/alcohol-detox.html">Alcohol Detox</a>'
menu5[1]='<a href="http://www.southcoastrecovery.com/drug-detox.html">Drug Detox</a>'
menu5[2]='<a href="http://www.southcoastrecovery.com/rapid_drug_rehab.html">NTR Detox</a>'

//Contents for About Us
var menu7=new Array()
menu7[0]='<a href="http://www.southcoastrecovery.com/addiction_assessment.html">Addiction Assessment</a>'
menu7[1]='<a href="http://www.southcoastrecovery.com/top_5_oc_rehab_compared.html">Top OC Treatment Centers Compared</a>'
menu7[3]='<a href="http://www.southcoastrecovery.com/where_are_you_now.html">Where Are You Now?</a>'
menu7[4]='<a href="http://www.southcoastrecovery.com/the_way_to_go.html">The Way To Go</a>'
menu7[5]='<a href="http://www.southcoastrecovery.com/getting_sober.html">Getting Sober</a>'
menu7[6]='<a href="http://www.southcoastrecovery.com/a_drug_by_any_name.html">A Drug By Any Name</a>'
menu7[7]='<a href="http://www.southcoastrecovery.com/lifetime_recovery.html">Lifetime Recovery</a>'
menu7[8]='<a href="http://www.southcoastrecovery.com/making_a_difference.html">Making A Difference</a>'
menu7[9]='<a href="http://www.southcoastrecovery.com/schedule.html">Schedule</a>'
menu7[10]='<a href="http://www.southcoastrecovery.com/what_to_bring.html">What to Bring</a>'
menu7[11]='<a href="http://www.southcoastrecovery.com/Testimonials.html">Testimonials</a>'
menu7[12]='<a href="http://www.southcoastrecovery.com/staff.html">Staff</a>'
menu7[13]='<a href="http://www.southcoastrecovery.com/press_page.html">Press Page</a>'
menu7[14]='<a href="http://www.southcoastrecovery.com/partners_and_affiliations.html">Partners and Affiliations</a>'
menu7[15]='<a href="http://www.southcoastrecovery.com/video_gallery.html">Video Gallery</a>'
menu7[16]='<a href="http://www.southcoastrecovery.com/walkthrough.html">Walkthrough</a>'
menu7[17]='<a href="http://www.southcoastrecovery.com/southcoast_recovery_sitemap.html">Sitemap</a>'

var menuwidth='165px' //default menu width
var menubgcolor='#CCCCCC'  //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")
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