{ 
	var _run; 
	if(navigator.userAgent.indexOf("Firebird")!=-1||navigator.userAgent.indexOf("Firefox")!=-1||navigator.appName=="Microsoft Internet Explorer") // if the browser is Firebird/Firefox or MSIE
	  {_run=false;} 
	else 
	  {_run= true;} 
	  
	if(_run == false) 
	{
		window.onscroll=function(){scrollR();} /* run the function scrollR() when the document is scrolled */
	} 
	else 
	{ 
		window.onload=function(){searchScroll()} /* when the document loads, run the searchScroll() function 1,000 times a second (because there is a setTimeout() function inside the searchScroll() function). */
	}

}

function scrollR()
{
  var left = (window.pageXOffset)?(window.pageXOffset):(document.documentElement)?document.documentElement.scrollLeft:document.body.scrollLeft;
  /* If window.pageXOffset is defined, set left to the pageXOffset of the current document. If it isn’t and document.documentElement is defined, set left to document.documentElement.scrollLeft. If document.documentElement and window.pageXOffset are both undefined, set the variable to document.body.scrollLeft */
  var top = (window.pageYOffset)?(window.pageYOffset):(document.documentElement)?document.documentElement.scrollTop:document.body.scrollTop;
  /* An explanation here: the variable “top” is going to represent one of three things: window.pageYOffset (if it is available, if it’s not, it represents document.documentElement.scrollTop. If document.documentElement is not available, it will represent document.body.scrollTop (sound familiar?). This is the variable we’ll use to determine the amount of pixels this document is scrolled from the top. It is important because it tells us where we should put the frame on the right. */
	if (top == 0 && document.body.scrollTop != 0)
		top = document.body.scrollTop;
		
	var h1 = document.body.scrollHeight;
	var h2 = parent.frames["MainFrame"].document.body.scrollHeight;
	var fator = 0;
	if(h1 != 0)
		fator = h2/h1+0.05;
    
	parent.frames["LeftFrame"].scrollTo(left,top); 
//	parent.frames["MainFrame"].scrollTo(left,top*fator); 
  /* Now scroll the left frame to the amount of pixels this document is from the left. If you scroll 3 pixels from the left (to the right) on this frame, the left document will be scrolled by exactly the same amount. This is how the frames are synchronized. */
} 

function searchScroll(){
	var left = (window.pageXOffset)?(window.pageXOffset):(document.documentElement)?document.documentElement.scrollLeft:document.body.scrollLeft;
	/* This is the same as was what we created earlier. Here, we set the variable (in pixels) indicating where the document has been scrolled from the left to the right. */
     var top = (window.pageYOffset)?(window.pageYOffset):(document.documentElement)?document.documentElement.scrollTop:document.body.scrollTop;
	/* Again, we’re setting the variable “top” to equal the amount of pixels the document is scrolled from the top of the window, and using it to calculate how far from the top the opposite frame should scroll. .*/
  	parent.frames["LeftFrame"].scrollTo(left,top); /* scroll the left frame to wherever this frame is scrolled to */
// 	parent.frames["MainFrame"].scrollTo(left,top); /* scroll the left frame to wherever this frame is scrolled to */
  	window.setTimeout("searchScroll();",1); /* run this function one time every millisecond, or 1,000 times a second */
}
	

