function not_the_author(currentUser){
	
	if ($('userID').get('value') == 1) {
		
		$('not-the-author-link').setStyle("display", "none");
		$('not-author-loader').setStyle("display", "");
		$('userID').set('value', 0);

		setTimeout(function(){
			
			$('author').set('readonly', '');
			$('author').set('value', '');
			$('author').setStyle('color', '#000');
			$('not-author-loader').setStyle("display", "none");
			$('not-the-author-link').set('text', 'I am the author');
			$('not-the-author-link').setStyle("display", "");

		}, 1000);
		
	} else {
		
		$('not-the-author-link').setStyle("display", "none");
		$('not-author-loader').setStyle("display", "");
		$('userID').set('value', 1);

		setTimeout(function(){
			
			$('author').set('readonly', 'readonly');
			$('author').set('value', currentUser);
			$('author').setStyle('color', '#999');
			$('not-author-loader').setStyle("display", "none");
			$('not-the-author-link').set('text', 'I am not the author');
			$('not-the-author-link').setStyle("display", "");

		}, 1000);
		
	}
	
}

function check_versions(){
	
	lower = $('lowerValue').get('value');
	
	higher = $('higherValue').get('value');
	
	if (lower > higher) {
		
		$('higherValue').set('value', lower);
		
	}
	
}

function show_optional(){
	
	$('optional').setStyle('display', '');
	
}

function hide_optional(){
	
	$('optional').setStyle('display', 'none');
	
}

function show_emailInfo(){
	
	$('email-info').setStyle('display', '');
	
}

function hide_emailInfo(){
	
	$('email-info').setStyle('display', 'none');
	
}

function approve_plugin(id){
	
	approved = $("approvedStatus-" + id).get('value');
	
	if (approved == 1) {
		
		status = 0;
		
	} else {
		
		status = 1;
		
	}
	
	new Request.JSON({
		secure: false,
		url: baseurl + 'ajax/plugins/approve.php?id=' + id + '&status=' + status
	}).send();
	
}

function forgot_pwd(){
	
	login = $('login-form');
	forgot = $('forgot-pwd-form');
	
	if (login.getStyle('display') == 'none') {
		
		forgot.setStyle('display', 'none');
		login.setStyle('display', '');
		
	} else {
		
		login.setStyle('display', 'none');
		forgot.setStyle('display', '');
		
	}
	
}

function reset_pwd(){
	
	if ($('email-to-reset').get('value') == '') {
		
		$('email-to-reset').focus();
		
	} else {
		
		new Request.JSON({
			secure: false,
			url: baseurl + 'ajax/reset/pwd.php',
			data: {

				email: $('email-to-reset').get('value')

			}
		}).send();
		
	}
	
}

function submit_download(){
	
	return new Request.JSON({
		secure: false,
		async: false,
		url: baseurl + 'ajax/download/hit.php'
	}).send();
	
}