// JavaScript Document

function searchbox (){
	$("#searchtxt").val(">");
}

function fixImmediacy(){
	//dman 5.2 stips body attributes
	$('body').attr('id','home');
};

function cols(){
	//$("#residents, #vistors, #businesses").equalizeCols();
};

function sidebar(){
	$("#sidebar1,#innercontent, #sidebar2").equalizeCols();
};

function dropshadow(){
	$("div.dropshadow").wrap("<div class='wrap1'><div class='wrap2'>" +
   	"<div class='wrap3'></div></div></div>");
};

function wireUpButtons(){
		$('#go1').click(function(){					
				//alert($('#residentsSelect option:selected').val());
				document.location.href=$('#residentsSelect option:selected').val();	
				//have to do this to stop the post back which occurs
				return false;
		});	
		$('#go2').click(function(){					
				document.location.href=$('#visitorsSelect option:selected').val();									
				return false
		});	
		$('#go3').click(function(){					
				document.location.href=$('#businessSelect option:selected').val();									
				return false;
		});			

};

function wireUpSelects(){
	
	$('#residentsSelect').change(function(){
			document.location.href=$('#residentsSelect option:selected').val();	
			//have to do this to stop the post back which occurs
			return false;
	});
	
	$('#visitorsSelect').change(function(){
			document.location.href=$('#visitorsSelect option:selected').val();	
			//have to do this to stop the post back which occurs
			return false;
	});
	
	$('#businessSelect').change(function(){
			document.location.href=$('#businessSelect option:selected').val();	
			//have to do this to stop the post back which occurs
			return false;
	});
	
	
	
}

// Remove | from top menu list above search text box
// Remove | from legal notice.
function fixPipe() {
	$('#mastersearch/ul/li:eq(2)').addClass('none');
	$('ul#footer/li:eq(2)').addClass('none');
}

// Cmetrix ratings code
function goRatingStars() 
	  {	   
  		document.write('<div class="page-rate">');
		document.write('   <ul class="rating">');
		document.write('      <li><a href="javascript:goRating(393);" title="Very Poor (1 Star)" class="one-star">Very Poor</a></li>');
		document.write('      <li><a href="javascript:goRating(392);" title="Poor (2 Stars)" class="two-stars">Poor</a></li>');
		document.write('      <li><a href="javascript:goRating(391);" title="OK (3 Stars)" 	class="three-stars">OK</a></li>');
		document.write('      <li><a href="javascript:goRating(390);" title="Good (4 Stars)" class="four-stars">Good</a></li>');
		document.write('      <li><a href="javascript:goRating(389);" title="Excellent (5 Stars)" class="five-stars">Excellent</a></li>');
		document.write('   </ul>');
		document.write('</div>');
	  }

function goRatingStars_Form() 
	  {	   
		document.write('<form id="cmxcssform" action="http://www.cssgov.com/web/survey/formproc.aspx" method="post">');
		document.write('   <input type="hidden" name="selected" value="1" />');
		document.write('   <input type="hidden" name="AccessKey" value= "1l0R95ebKs2PT5hWPkfUb6ylmzOhsM/wJBrmwMa9eXwkwslsf2P9CA=="    />');
		document.write('</form>');
	  }

function goRating(idNum) 
	  {	  
		var myFormetric = document.getElementById("cmxcssform");
		myFormetric.selected.value = idNum;
		myFormetric.submit();
	  }
