function onBlur(el) {
	if(el.value =='') {
		el.value= el.defaultValue;
		}
}
function onFocus(el) {
	if(el.value == el.defaultValue) {
		el.value= '';
		}
}

var busy = false;

function refresh_project(project){

	project = encodeURIComponent(project);
	
	if(busy == false){
		
		busy = true;
		
		if(project != "overview")
			var post_link = 'ajax/project_box.php?item='+project;
		else	
			var post_link = 'ajax/project_overview.php';
			
		$.post(post_link,{contentType: "application/x-www-form-urlencoded;charset=ISO-8859-15",
},function(data){
			
			if(!$('#project_helper').html()){
				
				$('#project_helper').html(data);
				$('#project_helper').css('z-index',100);
				$('#project_helper_2').css('z-index',99);
				$('#project_helper').fadeIn('slow',function(){
					
					$('#project_helper_2').hide();
					$('#project_helper_2').html("");
					busy = false;
					
				});
				
			}else{
			
				$('#project_helper_2').html(data);
				$('#project_helper_2').css('z-index',100);
				$('#project_helper').css('z-index',99);
				$('#project_helper_2').fadeIn('slow',function(){
					
					$('#project_helper').hide();
					$('#project_helper').html("");
					busy = false;
					
				});
				
			}
			
		});
	
	}
	
}

function show_services(target){
			
	if(busy == false){
		
		busy = true;
		
		$.post('ajax/services.php',function(data){		
			
			if(!$('#project_helper').html()){
				
				$('#project_helper').html(data);
				$('#project_helper').css('z-index',100);
				$('#project_helper_2').css('z-index',99);
				$('#project_helper').fadeIn('slow',function(){
					
					$('#project_helper_2').hide();
					$('#project_helper_2').html("");

					window.location.hash = target;
					busy = false;
					
				});
				
			}else{
			
				$('#project_helper_2').html(data);
				$('#project_helper_2').css('z-index',100);
				$('#project_helper').css('z-index',99);
				$('#project_helper_2').fadeIn('slow',function(){
					
					$('#project_helper').hide();
					$('#project_helper').html("");
					
					window.location.hash = target;
					busy = false;
					
				});
				
			}
			
		});	
	
	}
	
}
