function doLogin() {
	if (document.getElementById('be_my_friend').style.display=='none') {
		document.getElementById('be_my_friend').style.display='block';
		document.getElementById('login_form').style.display='none';
		document.getElementById('login_panel').style.height = "111px";
		document.getElementById('sign_in').className = "sign_in";
	}else{
		document.getElementById('be_my_friend').style.display='none';
		document.getElementById('login_form').style.display='block';
		document.getElementById('login_panel').style.height = "240px";
		document.getElementById('sign_in').className = "sign_in_selected";
	}
}

function submitEnter() {
	var keycode; if (window.event) keycode = window.event.keyCode;  else if (e) keycode = e.which; else return true; if (keycode == 13) {document.getElementById('nav_login_user').submit(); document.getElementById('nav_login_submit').disabled = true;}else {return true;}
}

function newWindow(screenwidth,screenheight,url,scroll) {
	var winl = ((screen.width - (screenwidth)) / 2)-12;
	var wint = ((screen.height - (screenheight)) / 2)-20;
	
	winprops = 'height='+screenheight+',width='+screenwidth+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no';
	
	win = window.open("/" + url, 'littleewe_popup', winprops); win.focus();
}

function wallpaperOpen(size,id) {
	var winl = ((screen.width - (760)) / 2)-12;
	var wint = ((screen.height - (500)) / 2)-20;
	
	winprops = 'height=500,width=760,top='+wint+',left='+winl+',scrollbars=no,toolbar=no';
	
	win = window.open('/wallpapers/download/' + id + "/" + size, 'littleewe_wallpapers', winprops); win.focus();
}
function showOptions(win) {
	document.getElementById(win).style.display='block';	
}

function hideOptions(win) {
	document.getElementById(win).style.display='none';		
}

