function updateName(str){

	$('linkGraveStone').innerHTML = genitive(str) + ' Grabstein';

}

function genitive(str){
	
	var lastLetter = str.substr(str.length-1, 1);
	if(lastLetter == "s" || lastLetter == "z" || lastLetter == "x"){
		return str+'\'';
	} else {
		return str+'\s';
	}
}

function showDiv(div){

	$($('divDisplay').value).hide();

	Element.removeClassName($F('divDisplay')+'Nav', 'active');
	Element.addClassName(div+'Nav', 'active');

	$(div).show();

	$('divDisplay').value = div;
}


function scrollDiv(strId,intSpd) {

	if ( objScrll=document.getElementById(strId) ) {
		var top = parseInt(objScrll.style.top);
		if ( (intSpd>0) ? (top<0) : (top>parseInt(objScrll.parentNode.style.height)-objScrll.offsetHeight) ) 
			objScrll.style.top = (top + intSpd) +"px";
		eval( 'tvar' + strId +'= setTimeout("scrollDiv(\''+ strId +'\',' + intSpd + ')",50)' );
		if (objSelf=scrollDiv.arguments[2]) 
			objSelf.onmouseup = objSelf.onmouseout = new Function('fx','clearTimeout(tvar' + strId + ')');
	}
}

function graveDelete(GID){
	
	check = confirm("Sind Sie sich absolut sicher, dass Sie dieses Grab auflösen wollen?\nEine bereits entrichtete Grabgebühr kann nicht rückerstattet werden.             \n\n");
	if (check == true){
		var success	= function(t){graveDeleteComplete(t, GID);}
		var failure	= function(t){graveDeleteFailed(t, GID);}
		var url = 'process.php';
		var pars = 'do=graveDelete&GID='+GID;
		var myAjax = new Ajax.Request(url, {method:'post', postBody:pars, onSuccess:success, onFailure:failure});				
	}
}

function graveDeleteComplete(t, GID){
		
	Effect.DropOut('grave'+GID);
	
}
	
	
	