var scrollH=0;	
	
function popUpPictureLarge(divId,imgsrc,element)
	{
	if(document.getElementById(divId).style.display == "")
	{
		document.getElementById(divId).style.display = "none";
	}
	else
	{
		document.getElementById(divId).style.width="";
		document.getElementById(divId).style.height="";
		document.getElementById(divId).style.left="";
		document.getElementById(divId).style.top="";
		
		document.getElementById('imgFullSize').src = imgsrc;
		var imgHeight = document.getElementById('imgFullSize').height;
		var imgWidth = document.getElementById('imgFullSize').width;
		imgWidth=imgWidth+50;
		imgHeight=imgHeight+70;
		
		gapX=0;gapY=0;
		/*posX = element.offsetLeft
		posY = element.offsetTop;*/
		posX = 120;
		posY = 108;
		width = element.clientWidth;
		if(!width){
		     width = element.offsetWidth;
		 }
		 TheElement = element.offsetParent;
		 while(TheElement != null){
			 posX += TheElement.offsetLeft
			 posY += TheElement.offsetTop;
			 TheElement = TheElement.offsetParent;
		 }
		 posX += gapX;
		 posY += gapY;
		 document.getElementById(divId).style.left=posX+'px';
		document.getElementById(divId).style.top=posY+'px';
		document.getElementById(divId).style.width=imgWidth+'px';
		document.getElementById(divId).style.height=imgHeight+'px';
		
		document.getElementById(divId).style.display = "";
		
	}
	} 

function popUpCommentPictureLarge(divId,imgsrc,element)
	{
	if(document.getElementById(divId).style.display == "")
	{
		document.getElementById(divId).style.display = "none";
	}
	else
	{
		document.getElementById(divId).style.width="";
		document.getElementById(divId).style.height="";
		document.getElementById(divId).style.left="";
		document.getElementById(divId).style.top="";
		
		document.getElementById('imgCommFullSize').src = imgsrc;
		var imgHeight = document.getElementById('imgCommFullSize').height;
		var imgWidth = document.getElementById('imgCommFullSize').width;
		imgWidth=imgWidth+50;
		imgHeight=imgHeight+70;
		
		
		document.getElementById(divId).style.left=100+'px';
		document.getElementById(divId).style.top=scrollH+50+'px';
		document.getElementById(divId).style.width=imgWidth+'px';
		document.getElementById(divId).style.height=imgHeight+'px';
		
		document.getElementById(divId).style.display = "";
		
	}
	}

function scrollingDetector(){	 // detect scroll browser event and change position of loading banner
 var currentDocHeight=0;
 var currentDocWidth=0;
	if (navigator.userAgent.indexOf("Firefox") > -1)
	{
		currentDocHeight=window.pageYOffset;
		currentDocWidth=window.pageXOffset;
		scrollH= currentDocHeight;
		
	}
	else
	{
		//alert(document.body.scrollLeft);
		currentDocHeight=document.documentElement.scrollTop;
		currentDocWidth=document.documentElement.scrollLeft;
		scrollH= currentDocHeight;
	}
	
	
	//document.getElementById('flink').innerHTML = currentDocHeight+" , "+currentDocWidth;
	
}

setInterval("scrollingDetector()", 1000);




