function toggle(thisthing) {
	
	var thisone = document.getElementById(thisthing);
		
	if (thisone.style.display != "block") {
				
		thisone.style.display = "block";		

	} else {
				
		thisone.style.display = "none";
		
	}
	
	
}

function init() {
	
	// Create the clocks
	
	
}

// langnav.js - andrew holloway

// Global vars


function init_lang() {
	
	/* First, clear all the contents of the second and third box
	 * then, remove the highlight from any of the boxes, to some area
	 * of the page.
	 */
	
	document.langform.result.disabled=true;
	document.langform.langPick.disabled=true;
	document.langform.phrase.disabled=false;
	
	
	
	// reset indexes and values
	document.langform.phrase.selectedIndex = -1;
	document.langform.langPick.selectedIndex = -1;
	
	// reset display boxes
	document.langform.phrase_select.value = "";
	document.langform.lang_select.value = "";
	document.getElementById('result').innerHTML = "";
}


function activatePhrase() {
	
	
	var phrases = document.langform.phrase.options;
	var index = document.langform.phrase.selectedIndex;
	
	// display the text in the box below it
	document.langform.phrase_select.value = phrases[index].text; //Text
	
	// and make it not disabled
	document.langform.langPick.disabled=false;
	
	setText(document.getElementById('result'));
}


function activateLanguage() {
	
	
	var phrases = document.langform.langPick.options;
	var indexVal = document.langform.langPick.selectedIndex;
	
	// display the text in the box below it
	document.langform.lang_select.value = phrases[indexVal].text; //Text
	
	setText(document.getElementById('result'));
}

function setText(targetCont) {
	
	// Translation is the options from the result set 
	var translation = document.langform.resultset.options;
	
	var idxlangPick = document.langform.langPick.selectedIndex;
	var idxlangform = document.langform.phrase.selectedIndex;
	
	
	// indexVal is the concatenation of the two indexes (add one to indexes since they start at zero)
	var indexVal = "" + (document.langform.langPick.options[idxlangPick].value) + (document.langform.phrase.options[idxlangform].value);
	
	// Now, print the text, where the option has value  of indexVal
		
	for (var i = 0; i < translation.length; i++) { 
		
		if (translation[i].value == indexVal) {
			
			if (translation[i].text != "") {
				targetCont.innerHTML = translation[i].innerHTML;
				return;
			}
				
				
		}		 
		
	}
	
	targetCont.innerHTML = 'Not Entered Yet.Contribute! <br />	E-mail booc0mtaco [at] comcast [dot] net';

	
}

/************ Clock functions 8**************/

function jsClock(gmtTimeDiff, location) {
	  // Copyright 1999 - 2001 by Ray Stott
  // Modified for Time zone, and location display by Andrew Holloway , 2006  // OK to use if this copyright is included  // Script available at http://www.crays.com/jsc
       var time = new Date();
   var gmtMS = time.getTime() + (time.getTimezoneOffset() * 60000 + gmtTimeDiff * 3600000);   var gmtTime =  new Date(gmtMS);
   var day = gmtTime.getDate();
   var month = gmtTime.getMonth() + 1;
   var year = gmtTime.getFullYear();   var hour = gmtTime.getHours();   var minute = gmtTime.getMinutes();   var second = gmtTime.getSeconds();   var temp = "" + month + "/" + day + "/" + year + " @ ";
   
   temp += ((hour < 10) ? "0" : "") + hour;   temp += ((minute < 10) ? ":0" : ":") + minute;   temp += ((second < 10) ? ":0" : ":") + second;   
   document.getElementById(location).value = temp;   setTimeout("jsClock("+gmtTimeDiff+", \""+ location +"\")", 1000);
   }  

