var initPage = function() {


};
var showLogin = function() {
Sexy.prompt('Indtast dit password','' , {
	'password': true, 
  	'onComplete': function(returnvalue) {
      	if(returnvalue) {
			var req = new Request({
						'method': 'get',
						'url': '/',
						'data': { 'aaction' : 'login','login' : returnvalue },
						'onComplete': function(response) { 
							if (response=='fejl') {
								Sexy.error('Forkert Password');	
							} else {
								window.location.reload();
							}
						}
					}).send();
		}
    }
  });	
}

window.addEvents({
				 	'domready' : function(e) {
						if ($('contentPage')) {
							$('contentPage').focus();
								$('contentPage').addEvent('keyup',function(evt) {
														
									 if( evt.key == 'l' && evt.shift) {
										 showLogin();
									} 
						});
						} else {
							$('shopPage').focus();
								$('shopPage').addEvent('keyup',function(evt) {
														
									 if( evt.key == 'l' && evt.shift) {
										 showLogin();
									} 
						});
						}
					
						initPage();	
					},
					'keydown' : function(evt) {
						
						 if( evt.key == 'l' && evt.shift) {
							 
							 showLogin();
						} 	
					}
				 });

