﻿/* color transfer articles */
function colorTransferArticles(objRef, state) {
	objRef.style.backgroundColor = (1 == state) ? '#171718' : '';
	return;
}




/* color transfer mini site */
function colorTransferMiniSite(objRef, state) {
	objRef.style.backgroundColor = (1 == state) ? '#222224' : '';
	return;
}




/* form clean fields */
        function clearField(field, txt)
        {
            if (field.value == txt)
            {
                field.value = "";
            }
        }

        function resetField(field, txt)
        {
            var cleanEmail = cleanString(field.value);
            if (cleanEmail == "")
            {
                field.value = txt;
            }
        }

        function cleanString(input)
        {
            var output = "";
            if (input.length > 0)
            {
                for(var i = 0; i < input.length ; i++)
                {
                    if (input.charAt(i) != " ")
                    {
                        output += input.charAt(i);
                    }
                }
            }
            return output;
        }




/* bookmark site */
function bookmarksite(title, url){
if (document.all)	
	window.external.AddFavorite(url, title);
else if (window.sidebar)
	window.sidebar.addPanel(title, url, "");
}




/* google analytics */
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27346155-1']);
  _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);
  })();
