persona.heyscore = {
	sendScore : function(){
			
			
			if(persona.s.cipher.length>0){
				var url = persona.intG.hostURL+'_heyscore/db_send.php?'+
				's='+_g.score.v;
				persona.dbCon(url,'script_heyscore_send_id');
			} else {
				// alert('Game currently running in demo mode! You have be logged in to submit score.');
				$('demoSign').style.display = 'block';
				setTimeout(function(){

					$('demoSign').style.display = 'none';

				},2000)
				
			}
			
			
	}, 
	updateLogin : function(){
		if(persona.s.cipher.length>0){
			var url = persona.intG.hostURL+'_heyscore/db_update_login.php?s=0';
			persona.dbCon(url,'script_update_login_id');
		} else {
			
		}
	},
	postGlobalMsg : function(topic){
		
		var tempHeader = $('global_header_input').value;
		var tempMessage = $('global_msg_input').value;
		

		var errorText = validate(tempHeader,'comment');
		errorText += validate(tempMessage,'comment'); 
		errorText += validate(topic,'comment'); 



		errorText = errorText.replace(/1/gi,'');

		var iWS = isWhitespace(tempMessage) + isWhitespace(tempHeader);
		if (iWS!=''){
			if (errorText.length == 0){
				

				

				var url = persona.intG.hostURL+'_heyscore/db_send_global_msg.php?'+
				'&topic='+topic+'&header='+tempHeader+'&msg='+tempMessage+'&pic='+_mp.picture.picture;

				persona.dbCon(url,'send_global_msg_id');
				
				$('global_send_button_id').style.display='none';
				$('global_send_button_sending_id').style.display='inline';

				//$('global_header_input').value = '';
				//$('global_msg_input').value = '';
				
			} else {
				persona.error('Client Side: ' + errorText);
			}
		}
		

	},
	keys : false,
	freeKeys : function(){
		persona.heyscore.keys = true;
		$('key_mole').style.display='none';
		$('play_mole').style.display='block';
		$('play_mole').style.style.zIndex="1000";
	//	console.log(persona.heyscore.keys);
	},
	lockKeys : function(){
		persona.heyscore.keys = false;
		$('key_mole').style.display='block';
		$('play_mole').style.display='none';
		$('play_mole').style.zIndex="1000";
	//	console.log(persona.heyscore.keys);
	}
};

// if(persona.heyscore.keys==true)
