
function getElementWithArguments(tag, keys, values, content) {
	var newElement = document.createElement(tag);
	keys.forEach(function(element, index, array) {
		newElement.setAttribute(element, values[index]);
	});
	if( content == null )
		return newElement;
	newElement.innerHTML = content;
	return newElement;
}

function _downloadImagen(url) {
	var img = getElementWithArguments('img', ['id', 'src'], ['pic', url]);
	document.getElementById('div-main').appendChild(img);
}

