// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults


function gls_Redirect( url )    { window.location = url }
function gls_ComboGetSel( obj )	{ return $(obj).value }

function gls_ShowHide( obj )		{ $(obj).style.display = $(obj).style.display == 'none' ? '' : 'none' }

function gls_SendDownloadInfo( item_id, udownload_id )
{
	var uname = $( item_id + '-user_name' ).value
	var ucompany = $( item_id + '-user_company' ).value
	var uemail = $( item_id + '-user_email' ).value
	var query = Object.toQueryString( { name: uname, company: ucompany, email: uemail, download_id: udownload_id } )
	new Ajax.Request( '/downloads/notify?' + query )
}