function updateStatus()
	{
		loaded++;
		document.getElementById("loadStatusDiv").innerHTML="Loaded "+loaded+ " Images of Total "+total;
		if(loaded==total)
			document.getElementById("loadStatusDiv").innerHTML="";
	}
function updateImage(id,e)
	{
		//alert(e.srcElement.id);
		if(e.srcElement)
			{
				current=e.srcElement.id.replace("imgThump","");
			}
		else
			{
				current=e.target.id.replace("imgThump","");
			}
		loadImage(id);
	}
function loadImage(id)
	{
		
	document.getElementById("galImage").src="layin/contend/gallery/"+id+"d.jpg";
	//frameemail.contentWindow.document.getElementById('txtimgid').value=id;
	//frameComment.contentWindow.document.getElementById('txtimgid').value=id;	
	
	//frameComment.contentWindow.document.getElementById('sectionform').style.display="inline";
	//frameComment.contentWindow.document.getElementById('sectionresult').style.display="none";
	

	//frameemail.contentWindow.document.getElementById('sectionform').style.display="inline";
	//frameemail.contentWindow.document.getElementById('sectionresult').style.display="none";
	
	//frametitleview.src="codelib/html/titleview.php?picid="+id;
	//framecommentview.src="codelib/html/commentsview.php?picid="+id;
	
	
	document.getElementById("statusLoad").style.display="inline";
	}
	
function loadNextImage()
	{
		
		current++;
		if(current==total)
			current=0;
		
		loadImage(document.getElementById('imgThump'+current).title);
	}
	
function loadPrevImage()
	{
		current--;
		if(current<0)
			current=total-1;
		loadImage(document.getElementById('imgThump'+current).title);
	}
	
function updateLoad()
	{
		document.getElementById("statusLoad").style.display="none";
	}