﻿var path = 'http://' + document.domain + '/';
var SSLpath = 'https://' + document.domain + '/';
var WIpath = 'http://www.wellpeople.com/';
var Editpath = 'admin/';

var MaxQuote = 8;
var currentHP = 0;
var currentM = 0;
var twond = '';

var TheSections = new Array("", "Section 1", "Section 2", "Section 3", "Section 4", "Section 5", "Section 6", "Section 7", "Section 8", "Section 9", "Section 10", "Section 11", "Section 12"); 
var TheQuote = new Array("“an invaluable program”", "“A great, time-tested tool.”", "“I highly recommend this program.”", "“puts the ‘health’ back into<br/>health care”", "“should be part of every<br/> coach’s tool box”", "“tool to create sustainable<br/>lifestyle change”", "“valuable program for better living”", "“a foundational wellness tool”");
var TheQuoteAuthor = new Array("Larry Dossey, MD", "Martin Rossman, MD", "James Gordon, MD", "Kent W. Peterson, MD, FACPM", "Patrick Williams, PhD, MCC", "Dean Edell, MD", "William Thar, MD, MPH", "Stanford Research Institute");
var sectionBorderColor = new Array("","FF00FF", "0000FF", "FF0000", "008000", "FF4500", "F3AE0C", "008080", "94E21D", "afafff", "FF8000", "000080", "8000FF");

TheSections[1] = 'Wellness is like a bridge supported by two piers - the principles of self-responsibility and love are fundamental to the wellness process.'; 
TheSections[2] = 'Breathing is a primary energy input and plays a key role in promoting relaxation, centering the mind, calming emotions, and increasing vitality.';
TheSections[3] = 'Sensing enables us to effectively navigate our environment through the experience of light, heat, touch, sound, odor, taste, and movement.'; 
TheSections[4] = 'Eating fresh, whole foods in moderation is a primary means of nourishing ourselves and providing energy to support optimal living.'; 
TheSections[5] = 'Moving is a basic expression of our life energy - maintaining a balance of movement and rest is essential to our health and wellbeing.'; 
TheSections[6] = 'The expression of feeling - fear, sadness, anger, joy - serves to motivate both thought and action and acts as an internal guidance system.'; 
TheSections[7] = 'Our thinking can be our best friend or greatest enemy. Being mindful of our thinking enables us to make positive choices for personal wellbeing.'; 
TheSections[8] = 'Balancing work and play supports our personal health and wellbeing and gives us the energy live optimally and perform at a high level.'; 
TheSections[9] = 'Communicating allows us to share our internal reality of thoughts and feelings with others, allowing us to convey our wants and needs.'; 
TheSections[10] = 'Intimacy is a major component in our health and happiness. The foundation of intimacy is trust, whether a friend, relative, or love interest.'; 
TheSections[11] = 'The search for meaning involves basic questions: Who am I? Why am I here? Addressing these questions encourages a balanced life.';
TheSections[12] = 'Transcending is an experience of flow, of being fully awake and engaged in the present moment, connecting us to a deeper reality.';

var _gaq = _gaq || [];					  

_gaq.push(['_setAccount', 'UA-3949505-3']);
_gaq.push(['_trackPageview']);	  
(function() 
		{
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;	
    		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 
    		var s = document.getElementsByTagName('script')[0]; 
			s.parentNode.insertBefore(ga, s); 					
	  	}
	)();	

function showWellness(which,parm,parm1)
{
	var newwinname = '_' + which;
    var opts = 'menubar=0,location=0,status=0,scrollbars=1,toolbar=0,width=800,height=560';
    var LinkURL = path + 'Wellness_Information.aspx?PageType='+ which +'&p1=' + parm + '&p2=' + parm1;
    thiswin = window.open(LinkURL, newwinname, opts);
    thiswin.focus();
}

function showWellnessInfo(which, parm, parm1) {
    var newwinname = '_' + which;
    var LinkURL = '';
    var opts = '';

    switch (which) {
        case 'send':
            opts = 'menubar=1,location=0,status=0,scrollbars=1,toolbar=0,width=790,height=436';
            LinkURL = '/prgm/Send_Wellness_to_a_friend.aspx';
            break;

        case 'zzz':
            opts = 'menubar=1,location=1,status=1,scrollbars=1,toolbar=1,resizable=1,width=804,height=600';
            LinkURL = path + Editpath + 'Editing.asp?tbv=' + parm + '&pkValue=' + parm1;
            break;
    }

    thiswin = window.open(LinkURL, newwinname, opts);
    thiswin.focus();
}


function ShowSectionText(Slice,Language){
    //This is the MouseOver Event
    var section = Slice.replace("Slice", "");
    section = section.replace("of12", "");
    //alert(sectionBorderColor(section));
    
    if (twond != 'z') {
        document.getElementById('TheLady').style.backgroundImage = "";
        document.getElementById('TheLady').style.borderColor = "teal";
        //document.getElementById('TheLady').style.backgroundColor = '#' + sectionBorderColor[section] ;
//        document.getElementById('TheLady').style.borderColor = '#'+sectionBorderColor[section]; // "teal";


    }
    else {
        document.getElementById('cellText').style.borderWidth = "1px";
        document.getElementById('cellText').style.visibility = 'visible';
        document.getElementById('FlashWheel').style.zIndex = 7;
    }
    
    document.getElementById('clickInfo').style.visibility = 'visible';
    document.getElementById('TheText').innerHTML = TheSections[section];
        
}

function ViewSection(Slice,Language){
 //This is the MouseClick Event
    //alert('s:' + twond);
    var section = Slice.replace("Slice", "");
    section = section.replace("of12", "");

    window.location = '/Wellness_Dimensions.aspx#Sec' + section;
  }

function HideSectionText(Slice,Language){
    //This is the MouseOut Event
    if (twond != 'z') {
        document.getElementById('TheLady').style.backgroundImage = "url('/images/HP/Wellness_Woman.jpg')";
        document.getElementById('TheLady').style.borderColor = "#ffffff";
        document.getElementById('TheLady').style.backGroundColor = "#ffffff";

    }
    else {
        document.getElementById('cellText').style.borderWidth = "0px";
        document.getElementById('cellText').style.visibility = 'hidden';
        document.getElementById('FlashWheel').style.zIndex = 3;
    }
    document.getElementById('clickInfo').style.visibility = 'hidden';
    document.getElementById('TheText').innerHTML = '';
 }

