// JavaScript Document

<!-- Google Analytics Code
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
	var pageTracker = _gat._getTracker("UA-7729332-1");
	pageTracker._trackPageview();
} catch(err) {}

<!-- switches between inline-block (visible with area blocked out) and none (completely hides element) -->
function autoHide(item){
  var itemElementStyle=document.getElementById(item).style;
  if (itemElementStyle.display=="inline-block"){
   itemElementStyle.display="none";
   }
  else {
   itemElementStyle.display="inline-block";
   }
}
  
<!-- forces visibility in inline-block in an items style's display settings -->
function autoOn(item){
	var itemElementStyle=document.getElementById(item).style;
	itemElementStyle.display="inline-block";
}

<!-- Javascript TextArea Character Limit -->
function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}

function checkCheckbox(chkbx) {
  document.getElementById(chkbx).checked = true;
}

<!-- Disfunctional Other Select to enable box function -->
function ifOtherSelect(item,item2){
	if (document.iPhone_Contact.device[10].selected) {
		document.getElementById(item2).style.display="inline-block";
	} else {
		document.getElementById(item2).style.display="none";
	}
}
function getCurrentURL() {
	return document.location.href;
}

<!-- iPhone Page Auto-Hider of Address Bar -->

addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);

function hideURLbar(){
window.scrollTo(0,1);
}

