function getSrcElement(e)
{   
	//returns element that raised the event e
	if (e !=null && typeof(e.srcElement)!='undefined')
	   return e.srcElement;
	else if (e)
	   return e.target;
	else
	   return null;
}

function loadFrameset(url)
{
	document.location = url;
}

function checkUploadForm()
{
	document.getElementById('formUpload').submit();
}

function showImagePreview(img)
{
	var final = img.replace('/image-','/preview-');
	//popWin = window.open(final,'nav_win','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,left=200,top=100');
	document.location = final;
}

function activateUpload(){
	var chkobj = document.getElementById('chkActivUpload');
	var theUploader = document.getElementById('contestImage');
	theUploader.disabled = (chkobj.checked?false:true);
}