var loggingIn = false;

login = function(r){
	var fuellogin = r.evalJSON();
	if(fuellogin.login){
		$('pass').value = '';
		switchLogin(true);
		if(String(document.location).indexOf('mywobbler')>0) document.location = document.location;
	} else {
		new Effect.Appear('wronglogin', {duration:.3});
	}
	enableInputs(['user','pass']);
	loggingIn = false;
};

checkGetOut = function(){
	var loc = String(document.location);
	if(loc.indexOf('mywobbler')>=0||loc.indexOf('myprofile')>=0||loc.indexOf('upload')>=0){
		setTimeout(function(){document.location='./';},1000);
	}
};

