/* START OF FILE */
/* FILENAME: chakra_yoga_health_holistic_spirituality_psychology.js */
/* Javascript for HELM website */


function checkUser(x)
{
	checkScreen();

}


// end checkUser()



function checkScreen()
{


var whichScreen;
var whichBrowser;

/* get browser name */
var navName = navigator.appName;

/* get screen resolution */

if (screen.width < 1024) {

 whichScreen = "800 x 600 design";

}
else {
 
 whichScreen = "1024 x 768 design";
 
}
theMsg = "Send " + navName + "\n" + whichScreen;

} //end checkScreen()


/* ------------------------------------------------------ */



function swapIdentity()
{
var c = document.getElementById('statex').value;


if( c == 0 )
	{
		document.identity_switch.src = "images/chakra_yoga_switch_existence.jpg";
		document.switchy.src = "images/toggle_Self.jpg";
		document.getElementById('statex').value = 1;
	}
	
	if( c == 1 )
	{
		document.identity_switch.src = "images/chakra_yoga_switch_individual.jpg";
		document.switchy.src = "images/toggle_individual.jpg";
		document.getElementById('statex').value = 0;
	} 
		

} 

/* ------------------------------------------------------ */

function checkForm()
{
 var x = document.forms["ContactForm"]["password"].value

 if (x != "spirit" || x == null || x == "")
 {
	alert("Incorrect Password! Password must be completed in lowercase letters");
	return false;
 }

 return true;
}

function checkForm1() {
 
 var sendForm = 1;

 var count = ContactForm.elements.length;
 for (x=0; x < count; x++) {
  var dataLine = ContactForm.elements[x].value;
  var asterixCheck = dataLine.indexOf("*");
  if (dataLine == "") {
   theElement = ContactForm.elements[x].getAttribute("name");
    if (theElement == "telephone") {
    

    }
    else {

    sendForm = 2;
    break;
   }
  }
  else {
   if ( asterixCheck != -1 ) {
   theElement = ContactForm.elements[x].getAttribute("name");
   sendForm = 3;
   break;
   }
  }
 
 } // end for x
 
 if ( sendForm == 1 ) {
   ContactForm.submit();
 }
 if ( sendForm == 2) {
   alert("Please complete the " + theElement + " input field and resubmit the form.");
 }
 if ( sendForm == 3 ) {
   alert("Please remove the asterix from the " + theElement + " input field and resubmit the form.");
 }



} // end checkForm(formName)


/* ------------------------------------------------------ */


/* start turn dial gointense() */


function gointense() {
 
 numb = document.all.jane.liz.value;
 theimage = document.getElementById('dial');
 if (numb==1) {
 
 theimage.src="images/chakra_yoga_connection_half.gif";
 
 }
 if (numb==2) {
 
 theimage.src="images/chakra_yoga_connection_full.gif";
 
 }
 if (numb==3) {
 
 theimage.src="images/chakra_yoga_connection_off.gif";
 
 }
 
 if (numb==3) {
 document.all.jane.liz.value="0";
 }
 
 document.all.jane.liz.value++;
 }
 
function printTop() {
document.write("<td style=\"padding-left: 10; padding-right: 10\" valign=\"top\" align=\"left\">");
printNavigator();
printBanner();

}

function printpr()
{

  link = document.getElementById("normal");
  link.href = "helm_print.css";

}


/* end turn dial gointense() */

function whichVice()
{
var obj = document.getElementById("virtue");
var x=document.getElementById("vice").selectedIndex;
var y=document.getElementById("vice").options;
obj.selectedIndex = y[x].index;
alert("Index: " + y[x].index + " is " + y[x].text);

var t=document.getElementById('vvTable').rows[1].cells;
t[0].innerHTML=y[x].text;

}


function whichVirtue()
{
var obj = document.getElementById("vice");
var x=document.getElementById("virtue").selectedIndex;
var y=document.getElementById("virtue").options;
obj.selectedIndex = y[x].index;
alert("Index: " + y[x].index + " is " + y[x].text);

}

