function showPic(id, img, wi){

  var body = document.getElementsByTagName("body")[0]; 
  var div  = $('f'+id); 
  var tmp  = Position.cumulativeOffset(div);
  
  var html = ''
            +'<div id="backgrounder">&nbsp;</div>'
            +'<div id="fotoH" style="top:'+tmp[1]+'px; left:'+tmp[0]+'px;">'
            +'<div id="picH">'
            +'<a style="color:red; display:block;text-align:right;margin-right:15px;" '
            +'href="javascript:close()" title="Dieses Fenster schliessen">Fenster schliessen</a>'
            +'  <img src="../upload/image/big/'+img+'" alt="" />'
            +'</div>'
            +'  <div id="inhalt"></div>'
            +'</div>'; 

   var form = ''
             +'<fieldset><legend>Eigenen Beitrag schreiben</legend>'
             +'<form id="myForm">'
             +'<div class="row">'
             +'  <div class="left">Titel: </div>'
             +'  <div class="right"><input type="text" name="text_titel" id="text_titel" /></div>'
             +'</div>'
             +'<div class="row">'
             +'  <div class="left">Text: </div>'
             +'  <div class="right"><textarea id="text_text" name="text_text"></textarea></div>'
             +'</div>'  
             +'<div class="row">'
             +'  <div class="left"></div>'
             +'  <div class="right"><input type="button" style="clear:both;" onClick="send(this)" value="Beitrag speichern" /></div>'
             +'</div>'              
             +'</form>'  
             +'</fieldset> ' 

                 
   new Insertion.Bottom(body, html); 
  
    var opt = {
	  method: 'post', 
	  postBody: 'id='+id,
      onSuccess: function(t){
      	
          if(t.responseText != 'false'){
          	
          $('inhalt').innerHTML = t.responseText+form; 
          	
          }else{
          	
          	alert('Es gab einen Fehler, die Kommentare zu diesem Foto können nicht angezeigt werden.')
          	
          }
      	
      },
      onFailure: function(t) {alert('Error ' + t.status + ' -- ' + t.statusText + "\n"+t.responseText);}
    }
    new Ajax.Request('../function/get_text.php', opt);  	

}


function change_cat(obj){
	
	var value = obj.value;
	window.location.href= '../function/set_cat.php?id='+value;
	return; 
}

function change_ecat(obj){
	
	var value = obj.value;
	window.location.href= '../function/set_cat.php?id='+value+'&e=1';
	return; 
}

function close(){
	
	
	$('backgrounder').remove();
	$('fotoH').remove();
	
}