function GroupDelegate(id) {
var objLink = document.getElementById(id);
Lightbox.prototype.start(objLink);
}
function d(text, ee){
if(!$("debug")) document.body.insert("<div id='debug'></div>");

$("debug").show();
if(!ee){
$("debug").update(text);
}else{
$("debug").insert(text);
}
$("debug").setStyle({
position: "absolute",
left: "0px",
top: "0px",
backgroundColor: "#000000",
color: "#ffffff",
zIndex: "111111",
padding: "1px",
paddingRight: "3px",
paddingLeft: "2px"
});
}

function updateValues(e,pkat){
var e = $(e);

$('loading_animation').show();
new Ajax.Request('/ajax/get_attributes.php?pkat='+pkat,{
method:"post",
postBody:e.serialize(),
asynchronous:true,
evalScript:true,
onSuccess:function(t){
$('vals').update(t.responseText);
$('loading_animation').hide();
},
onFailure:function(t){
$('vals').update('Error ' + t.status + ' -- ' + t.statusText);
}
});
}

function updatePerson(e,pkat){
var e = $(e);
$('loading_animation').show();
new Ajax.Request('/ajax/get_persons.php?pkat='+pkat,{
method: "post",
postBody: e.serialize(),
asynchronous: true,
evalScript: true,
onSuccess: function(t){
	$('persons').update(t.responseText);
	$('loading_animation').hide();
},
onFailure: function(t){
	$('persons').update('Error ' + t.status + ' -- ' + t.statusText);
}
});
}

function parseMouseOvers(){
var classSelector = "RollOverHighlight";
var elements = document.getElementsByClassName(classSelector);
if(elements.length > 0){
for(i in elements){
elements[i].onmouseover = function(){
$(this).setStyle({backgroundColor: '#eee'});
}
elements[i].onmouseout = function(){
$(this).setStyle({background: 'none'});
}
}
}
}
