<!--
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
} // onclick="bookmarksite(document.title,document.location);return false;"

// toggle open close button
function toggle_visibility(id) {
   var e = document.getElementById(id);
   if(e.style.display == 'none')
	  e.style.display = 'block';
   else
	  e.style.display = 'none';
}

// droplist changer
function display(obj,id1,id2) {
	txt = obj.options[obj.selectedIndex].value;
	document.getElementById(id2).style.display = 'none';
	if ( txt.match(id1) ) {
		document.getElementById(id2).style.display = 'none';
	}
	if ( txt.match(id2) ) {
		document.getElementById(id2).style.display = 'block';
	}
} //  onchange="display(this,'','');"

// addthis customizer
var addthis_config = {ui_cobrand:"", ui_use_addressbook:"true", data_track_clickback:"true"}

// jquery
$(document).ready(function(){
	// color every other row
	$('.grid tr:odd').addClass('odd');
	// save onstate
	loc = location.href.substring(7);
	loc = loc.substring(loc.indexOf("/"));
	var i = loc.indexOf("#");
	if (i > -1) loc = loc.substring(0, i);
	var i = loc.indexOf("?");
	if (i > -1) loc = loc.substring(0, i);
    if (loc == '/' && !($("#nav a[href='" + loc + "']").length)) loc = "/index.php";
	$("#topnav a[href='" + loc + "']").addClass('on');
	// preload images
	$.fn.preload = function() {
		this.each(function(){
			$('<img/>')[0].src = this;
		});
	}
	$(['']).preload();
	// placeholder
	if(!$.support.placeholder) { 
      var active = document.activeElement;
      $(':text').focus(function () {
         if ($(this).attr('placeholder') != '' && $(this).val() == $(this).attr('placeholder')) {
            $(this).val('').removeClass('hasPlaceholder');
         }
      }).blur(function () {
         if ($(this).attr('placeholder') != '' && ($(this).val() == '' || $(this).val() == $(this).attr('placeholder'))) {
            $(this).val($(this).attr('placeholder')).addClass('hasPlaceholder');
         }
      });
      $(':text').blur();
      $(active).focus();
      $('form:eq(0)').submit(function() {
         $(':text.hasPlaceholder').val('');
      });
	}
});
