var popup = function (url, name, width, height, scrollbars)
{
	if (!window.focus)
	{ return true; }

	var href;

	if (typeof(url) == 'string')
	{ href = url; }
	else 
	{ href = url.href; }
	
	if (!width) 
	{ width = '500'; }
	if (!height)
	{ height = '400'; }
	
	if (!scrollbars || scrollbars == 'no') 
	{ scrollbars = 'no'; }
	else
	{ scrollbars = 'yes'; }

	window.open (href, name, 'width='+width+',height='+height+',scrollbars='+scrollbars);
	return false;
}
	

var getFormValues = function(formId) 
{
	var inputs = $('#'+formId+' input, #'+formId+' textarea, #'+formId+' select');

	var values = {};
	inputs.each(function(e, el) {
		values[el.name] = $(el).val();
	});
	return values;
};		

/* top nav hover links */ 
$(document).ready(function() {
	
	$('ul#topnav li').hover(function(e) {
		$(this).css('background-position', '0 38px');
		$(this).children('a').css('color', '#000');
	}, function(e) {
		$(this).css('background-position', '0 0');
		$(this).children('a').css('color', '#fff');
	});				
});	
