// JavaScript Document

// GOOGLE Analytics:

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-19484359-1']);
  _gaq.push(['_setDomainName', '.tamucc.edu']);
  _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);
  })();

/* OLD 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-16214794-1");
pageTracker._setDomainName(".tamucc.edu");
pageTracker._trackPageview();
} catch(err) {} */

/*****************************************/
/* SEARCH BOX 
// do not edit this function
/*****************************************/
// function to clear text from search box if default text exists
function clearSearch(){
	//if(document.getElementById('searchBox').value == "Search"){
		//document.getElementById('searchBox').value = "";
	//}
	document.getElementById('searchBox').style.backgroundImage = "none";
}

// function to add default text back if text box is blank
function addSearch(){
	//if(document.getElementById('searchBox').value == ""){
		//document.getElementById('searchBox').value = "Search";
	//}
	document.getElementById('searchBox').style.backgroundImage="url(images/googleLogo.gif)";
}
