// Sound Healling Tools JS



// PRELOAD IMAGES



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



// END PRELOAD








// Dropdown Menu Script


/***********************************************
* 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
***********************************************/

//Contents for images Menu

var sound_healingMenu=new Array()

sound_healingMenu[0]='<br>'

sound_healingMenu[1]='<a href="site.php?p=sound_healing&sp=listen"><img src="images/nav/subnav/listen.gif" alt="Listen" name="listen" width="115" height="21" border="0" id="listen" onMouseOver="MM_swapImage(\'listen\',\'\',\'images/nav/subnav/listen_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

sound_healingMenu[2]='<a href="site.php?p=sound_healing&sp=whats_new"><img src="images/nav/subnav/whats_new.gif" alt="What\'s New" name="whats_new" width="115" height="21" border="0" id="whats_new" onMouseOver="MM_swapImage(\'whats_new\',\'\',\'images/nav/subnav/whats_new_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

sound_healingMenu[3]='<a href="site.php?p=education"><img src="images/nav/subnav/education.gif" alt="Education" name="education" width="115" height="21" border="0" id="education" onMouseOver="MM_swapImage(\'education\',\'\',\'images/nav/subnav/education_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

sound_healingMenu[4]='<a href="site.php?p=sound_healing&sp=resources"><img src="images/nav/subnav/resources.gif" alt="Resources/Links" name="resources" width="115" height="21" border="0" id="resources" onMouseOver="MM_swapImage(\'resources\',\'\',\'images/nav/subnav/resources_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

sound_healingMenu[5]='<a href="site.php?p=sound_healing&sp=articles"><img src="images/nav/subnav/articles.gif" alt="Articles" name="articles" width="115" height="21" border="0" id="articles" onMouseOver="MM_swapImage(\'articles\',\'\',\'images/nav/subnav/articles_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

sound_healingMenu[6]='<a href="site.php?p=sound_healing&sp=reviews"><img src="images/nav/subnav/reviews.gif" alt="Reviews" name="reviews" width="115" height="21" border="0" id="reviews" onMouseOver="MM_swapImage(\'reviews\',\'\',\'images/nav/subnav/reviews_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'



var aboutMenu=new Array()

aboutMenu[0]='<br>'

aboutMenu[1]='<a href="site.php?p=about&sp=ohm"><img src="images/nav/subnav/ohm.gif" alt="ohm" name="ohm" width="115" height="21" border="0" id="ohm" onMouseOver="MM_swapImage(\'ohm\',\'\',\'images/nav/subnav/ohm_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

aboutMenu[2]='<a href="site.php?p=about&sp=tuning_forks"><img src="images/nav/subnav/tuning_forks.gif" alt="Tuning Forks" name="tuning_forks" width="115" height="21" border="0" id="tuning_forks" onMouseOver="MM_swapImage(\'tuning_forks\',\'\',\'images/nav/subnav/tuning_forks_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

aboutMenu[3]='<a href="site.php?p=about&sp=company"><img src="images/nav/subnav/company.gif" alt="Company" name="company" width="115" height="21" border="0" id="company" onMouseOver="MM_swapImage(\'company\',\'\',\'images/nav/subnav/company_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'



var productsMenu=new Array()

productsMenu[0]='<br>'

productsMenu[1]='<a href="site.php?p=products&sp=instructional_manual"><img src="images/nav/subnav/inst_manual.gif" alt="Instructional Manual and DVD" name="inst_manual" width="179" height="21" border="0" id="cd" onMouseOver="MM_swapImage(\'inst_manual\',\'\',\'images/nav/subnav/inst_manual_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

productsMenu[2]='<a href="site.php?p=products&sp=cds"><img src="images/nav/subnav/cd.gif" alt="CDs" name="cd" width="115" height="21" border="0" id="cd" onMouseOver="MM_swapImage(\'cd\',\'\',\'images/nav/subnav/cd_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

productsMenu[3]='<a href="site.php?p=products&sp=tuning_forks"><img src="images/nav/subnav/tuning_forks.gif" alt="Tuning Forks" name="tuning_forks" width="115" height="21" border="0" id="tuning_forks" onMouseOver="MM_swapImage(\'tuning_forks\',\'\',\'images/nav/subnav/tuning_forks_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

productsMenu[4]='<a href="site.php?p=products&sp=activators"><img src="images/nav/subnav/activators.gif" alt="Activators" name="activators" width="115" height="21" border="0" id="activators" onMouseOver="MM_swapImage(\'activators\',\'\',\'images/nav/subnav/activators_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

productsMenu[5]='<a href="site.php?p=products&sp=instructional_chart"><img src="images/nav/subnav/instructional_chart.gif" alt="Instructional Chart" name="instructional_chart" width="138" height="21" border="0" id="instructional_chart" onMouseOver="MM_swapImage(\'instructional_chart\',\'\',\'images/nav/subnav/instructional_chart_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

productsMenu[6]='<a href="site.php?p=products&sp=ohm_crystal_bowls"><img src="images/nav/subnav/ohm_cb.gif" alt="Ohm Crystal Bowls" name="ohm_cb" width="138" height="23" border="0" id="ohm_cb" onMouseOver="MM_swapImage(\'ohm_cb\',\'\',\'images/nav/subnav/ohm_cb_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

productsMenu[7]='<a href="site.php?p=products&sp=singing_bowls"><img src="images/nav/subnav/ohm_sb.gif" alt="Singing Bowls" name="ohm_sb" width="131" height="23" border="0" id="ohm_sb" onMouseOver="MM_swapImage(\'ohm_sb\',\'\',\'images/nav/subnav/ohm_sb_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

productsMenu[8]='<a href="site.php?p=products&sp=the_extra_mile"><img src="images/nav/subnav/the_extra_mile.gif" alt="The Extra Mile" name="the_extra_mile" width="115" height="23" border="0" id="the_extra_mile" onMouseOver="MM_swapImage(\'the_extra_mile\',\'\',\'images/nav/subnav/the_extra_mile_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

productsMenu[9]='<a href="site.php?p=products&sp=catalog"><img src="images/nav/subnav/catalog.gif" alt="Catalog" name="catalog2" width="115" height="23" border="0" id="catalog2" onMouseOver="MM_swapImage(\'catalog2\',\'\',\'images/nav/subnav/catalog_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'








var marjorieMenu=new Array()

marjorieMenu[0]='<br>'

marjorieMenu[1]='<a href="site.php?p=marjorie_de_muynck&sp=biography"><img src="images/nav/subnav/biography.gif" alt="Biography" name="biography" width="115" height="21" border="0" id="ohm" onMouseOver="MM_swapImage(\'biography\',\'\',\'images/nav/subnav/biography_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

marjorieMenu[2]='<a href="site.php?p=marjorie_de_muynck&sp=influences"><img src="images/nav/subnav/influences.gif" alt="Influences" name="influences" width="115" height="21" border="0" id="influences" onMouseOver="MM_swapImage(\'influences\',\'\',\'images/nav/subnav/influences_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

marjorieMenu[3]='<a href="site.php?p=marjorie_de_muynck&sp=chronology"><img src="images/nav/subnav/chronology.gif" alt="Chronology" name="chronology" width="115" height="21" border="0" id="chronology" onMouseOver="MM_swapImage(\'chronology\',\'\',\'images/nav/subnav/chronology_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'


var healthcareMenu=new Array()

healthcareMenu[0]='<br>'

healthcareMenu[1]='<a href="site.php?p=healthcare&sp=table_massage"><img src="images/nav/subnav/table_massage.gif" alt="Table Massage" name="table_massage2" width="115" height="21" border="0" id="table_massage2" onMouseOver="MM_swapImage(\'table_massage2\',\'\',\'images/nav/subnav/table_massage_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

healthcareMenu[2]='<a href="site.php?p=healthcare&sp=onsite_chair_massage"><img src="images/nav/subnav/onsite_chair_massage.gif" alt="On Site Massage" name="onsite_chair_massage" width="155" height="21" border="0" id="onsite_chair_massage" onMouseOver="MM_swapImage(\'onsite_chair_massage\',\'\',\'images/nav/subnav/onsite_chair_massage_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

healthcareMenu[3]='<a href="site.php?p=healthcare&sp=chiropractors"><img src="images/nav/subnav/chiropractors.gif" alt="Chiropractors" name="chiropractors" width="115" height="21" border="0" id="chiropractors" onMouseOver="MM_swapImage(\'chiropractors\',\'\',\'images/nav/subnav/chiropractors_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

healthcareMenu[4]='<a href="site.php?p=healthcare&sp=acupuncturists"><img src="images/nav/subnav/acupuncturists.gif" alt="Acupuncturists" name="acupuncturists" width="115" height="21" border="0" id="acupuncturists" onMouseOver="MM_swapImage(\'acupuncturists\',\'\',\'images/nav/subnav/acupuncturists_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'

healthcareMenu[5]='<a href="site.php?p=healthcare&sp=music_therapists"><img src="images/nav/subnav/music_therapists.gif" alt="Music Therapists" name="music_therapists" width="115" height="21" border="0" id="music_therapists" onMouseOver="MM_swapImage(\'music_therapists\',\'\',\'images/nav/subnav/music_therapists_over.gif\',1)" onMouseOut="MM_swapImgRestore()"></a>'




//////////////////////////
//Contents for NEW Menu///
/////////////////////////





var sound_healing_newMenu=new Array()

sound_healing_newMenu[0]='<br>'

sound_healing_newMenu[1]='<a href="site.php?p=sound_healing&sp=listen" class="nav_new_dd">Listen</a><br>'

sound_healing_newMenu[2]='<a href="site.php?p=sound_healing&sp=whats_new" class="nav_new_dd">What\'s&nbsp;New?</a><br>'

sound_healing_newMenu[3]='<a href="site.php?p=education" class="nav_new_dd">Education</a><br>'

sound_healing_newMenu[4]='<a href="site.php?p=sound_healing&sp=resources" class="nav_new_dd">Resources/Links</a><br>'

sound_healing_newMenu[5]='<a href="site.php?p=sound_healing&sp=articles" class="nav_new_dd">Articles</a><br>'

sound_healing_newMenu[6]='<a href="site.php?p=sound_healing&sp=reviews" class="nav_new_dd">Reviews</a><br>'

sound_healing_newMenu[7]='<br>'



var about_newMenu=new Array()

about_newMenu[0]='<br>'

about_newMenu[1]='<a href="site.php?p=about&sp=ohm" class="nav_new_dd">Ohm</a><br>'

about_newMenu[2]='<a href="site.php?p=about&sp=tuning_forks" class="nav_new_dd">Tuning&nbsp;Forks</a></a><br>'

about_newMenu[3]='<a href="site.php?p=about&sp=company" class="nav_new_dd">Guiding&nbsp;Principles</a></a><br>'

about_newMenu[4]='<a href="site.php?p=about&sp=company" class="nav_new_dd">Company</a></a><br>'

about_newMenu[5]='<br>'



var products_newMenu=new Array()

products_newMenu[0]='<br>'

products_newMenu[1]='<a href="site.php?p=products&sp=instructional_manual" class="nav_new_dd">Book/DVD</a><br>'

products_newMenu[2]='<a href="site.php?p=products&sp=instructional_chart" class="nav_new_dd">Tuning&nbsp;Fork&nbsp;Chart</a><br>'

products_newMenu[3]='<a href="site.php?p=products&sp=tuning_forks" class="nav_new_dd">Ohm&nbsp;Tuning&nbsp;Forks</a><br>'

products_newMenu[4]='<a href="site.php?p=products&sp=activators" class="nav_new_dd">Tuning&nbsp;Forks&nbsp;Activators</a><br>'

products_newMenu[5]='<a href="site.php?p=products&sp=cds" class="nav_new_dd">Sound&nbsp;Healing&nbsp;CDs</a><br>'

products_newMenu[6]='<a href="site.php?p=products&sp=ohm_crystal_bowls" class="nav_new_dd">Ohm&nbsp;Crystal&nbsp;Bowls</a><br>'

products_newMenu[7]='<a href="site.php?p=products&sp=singing_bowls" class="nav_new_dd">Ohm&nbsp;Singing&nbsp;Bowls</a><br>'

products_newMenu[8]='<a href="site.php?p=products&sp=the_extra_mile" class="nav_new_dd">The&nbsp;Extra&nbsp;Mile</a><br>'

products_newMenu[9]='<a href="site.php?p=products&sp=catalog" class="nav_new_dd">Catalog</a><br>'

products_newMenu[10]='<br>'






var marjorie_newMenu=new Array()

marjorie_newMenu[0]='<br>'

marjorie_newMenu[1]='<a href="site.php?p=marjorie_de_muynck&sp=biography" class="nav_new_dd">Biography</a><br>'

marjorie_newMenu[2]='<a href="site.php?p=marjorie_de_muynck&sp=credentials" class="nav_new_dd">Credentials</a><br>'

marjorie_newMenu[3]='<br>'


var healthcare_newMenu=new Array()

healthcare_newMenu[0]='<br>'

healthcare_newMenu[1]='<a href="site.php?p=healthcare&sp=acupuncturists" class="nav_new_dd">Acupuncturists</a><br>'

healthcare_newMenu[2]='<a href="site.php?p=healthcare&sp=table_massage" class="nav_new_dd">Massage&nbsp;Therapists</a><br>'

healthcare_newMenu[3]='<a href="site.php?p=healthcare&sp=music_therapists" class="nav_new_dd">Music&nbsp;Therapists</a><br>'

healthcare_newMenu[3]='<br>'


		
var menuwidth='200px' //default menu width
var menubgcolor='#FFFFFF'  //menu bgcolor
var disappeardelay=100  //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






// END DD MENU






// Validate Email Address


function validEmail(email) {
invalidChars = " /:,;"

if (email == "") {						// cannot be empty
	return false
}
if (email == "Your Email") {						// cannot have original text
	return false
}
for (i=0; i<invalidChars.length; i++) {	// does it contain any invalid characters?
	badChar = invalidChars.charAt(i)
	if (email.indexOf(badChar,0) > -1) {
		return false
	}
}
atPos = email.indexOf("@",1)			// there must be one "@" symbol
if (atPos == -1) {
	return false
}
if (email.indexOf("@",atPos+1) != -1) {	// and only one "@" symbol
	return false
}
periodPos = email.indexOf(".",atPos)
if (periodPos == -1) {					// and at least one "." after the "@"
	return false
}
if (periodPos+3 > email.length)	{		// must be at least 2 characters after the "."
	return false
}
return true
}



function submitIt(emailForm) {


// check to see if the Terms of Use have been accepted
if ( ( document.pract_access_form.terms[0].checked == false ) )
{
alert ( "You MUST agree to the Terms of Use" );
return false;

		
}

// check to see if the email's valid
if (!validEmail(emailForm.email.value)) {
alert("You MUST enter a valid email address")
emailForm.email.focus()
emailForm.email.select()
return false
}

// If we made it to here, everything's valid, so return true
return true
}




function submitIt2(emailForm) {

// check to see if the email's valid
if (!validEmail(emailForm.email.value)) {
alert("You MUST enter a valid email address")
emailForm.email.focus()
emailForm.email.select()
return false
}

// If we made it to here, everything's valid, so return true
return true
}




// End Validate




// POP UP SCRIPT

var popupWin = null;
function popUp(myURL,myWindowName,w,h,scroll,menu){
var myLeft = ((screen.width-w)/2)-5; 
var myTop = ((screen.height-h)/2)-5;
var settings='height='+h+',width='+w+',top='+myTop+',left='+myLeft+',scrollbars=yes,resizable=no,menu='+menu 
popupWin=window.open(myURL,myWindowName,settings);   
if(parseInt(navigator.appVersion) >= 4){popupWin.focus();}
}



