function showhide( name ){
	var el = document.getElementById(name);
	el.style.display = (el.style.display == 'block') ? 'none' : 'block';
}

function killPost( id ){
	if(confirm('are you sure you want to delete  this post?')){
		location = "?killpost="+id;
		}else{
			//do nothing
		}
}

function killtag( id, name ){
	if(confirm('are you sure you want to delete \''+name+'\' ?')){
		location = "?killtag="+id;
		}else{
			//do nothing
		}
}

function killimage( id, postid){
	if(confirm('are you sure you want to delete this image ?')){
		location = '?killimage='+id+'&postid='+postid	;
		}else{
			//do nothing
		}
	
}

function showimage( id ){

	location='?image='+id;
}

function addLink( name, url, id){
	var elname = document.getElementById(name).value;
	 document.getElementById(name).value = 'name';
	var elurl = document.getElementById(url).value;
	document.getElementById(url).value = 'http://...';
	var el = document.getElementById(id);
	el.value += '<a href="'+elurl+'" >'+elname+'</a> ';
}

function addtag( form, tag){
	var elform  = document.getElementById(form);
	elform.value += tag+' ';
}

