function $_(n) {
	if(!n) return false;
	if(!document.getElementById(n)) return false;

	return document.getElementById(n)
}


function captcha(_this) {
	var src = _this.src.split('?');
	_this.src = src[0] + '?' + Math.random();
}


var input = {
	file: function(_this, id) {
		var file = _this.value.split("\\");
		file = file[file.length-1];
		var html = '<a href="#:delete" onclick="input.reset(\'' + _this.id + '\'); $(\'#' + id + '\').html(\'\'); this.blur(); return false;"></a>' + file;
		$('#' + id).html(html);
	},
	
	reset: function(id) {
		var o = $_(id);
		if (o.type == 'file') {
			o.parentNode.innerHTML = o.parentNode.innerHTML;
		} else {
			o.value = '';
		}
	}
}







