function upload_file(id)
{
	document.getElementById('image['+id+']').src = '/images/gallery/loading.gif';
	//document.getElementById('image['+id+']').style.border = '0px solid #7BBFFF';
}


function scrape_image_details()
{
	for(var i=0; i < parent.document.getElementById('row_count').value-1; i++)
	{
		document.getElementById('details['+i+']').value = document.getElementById('tempdetails['+i+']').value;
		document.getElementById('desc['+i+']').value = document.getElementById('description['+i+']').value;
	}
	return true;
}

function textareaismaxlength(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : "";
	if (obj.getAttribute && obj.value.length>mlength) obj.value=obj.value.substring(0,mlength);
	var display=document.getElementById(obj.id + '_counter').innerHTML = '' + obj.value.length + ' / ' + obj.getAttribute("maxlength");
}

function checkedterms()
{
	terms = document.getElementById('tandc').checked;
	if(terms == false)
	{
		document.getElementById('tandcerror').innerHTML = "<div style='font-weight: bold; color: red;margin:5px; padding:5px; width:600px; background:#FFE7E7'>You must agree to the terms and conditions above to continue.</div>";
	}
	return terms;
}