
	
	if (0){
		var url = './forum/ucp.php?i=pm&amp;mode=popup';
		window.open(url.replace(/&amp;/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400');
	}

function find_username(url)	{
	popup(url, 760, 570, '_usersearch');
	return false;
}
window.onload = function()	{
	for (var i = 0; i < onload_functions.length; i++)		{
		eval(onload_functions[i]);
	}
}

window.onunload = function()	{
	for (var i = 0; i < onunload_functions.length; i++)		{
		eval(onunload_functions[i]);
	}
}

  function inputFocus() {
	document.getElementById('search-input').style['background'] = 'white';
  }

  function inputBlur() {
	var queryInput = document.getElementById('search-input');
	if (!queryInput.value) {
	  queryInput.style['background'] = 'white url(http://www.google.com/coop/images/google_custom_search_watermark.gif) no-repeat 0% 50%';
	}
  }
$(document).ready(function () {
    $(".username").autocomplete( {
			minLength: 2,
			source: "/auto_suggestion.php",
            select: function(event,ui){ 
                $(this).val(ui.item.value);
                if($(this).parent().children(".username").length == 1){
                    $(this).parent().submit();
                }
            }            
			} );
    $("#login_link").click(function() {
	  $('#loginbox').fadeToggle();
		return false;
	});
	$("#dl_category").change(function () { 
		if($("#dl_category").val() == "Single Map"){
			$("#hdr_file").show();
			$("#dat_file").text("DAT File:");
		}else{
			$("#hdr_file").hide();
			$("#dat_file").text("File (see above if over 2 MB):");
		
		}	
	});
});  

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-398868-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);
  })();
  
