var currentX=-1;
function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  currentX = scrOfY 
  setFooter();

  /*if(currentX==-1 || currentX != scrOfY ){
  	 currentX = scrOfY  // Top a göre haraket ediyor kucukken birden buyutuldugunde scrofY degismedigi icin script calısmıyor bu case içersinde
	 setFooter();
	 
  }*/
  
}

function startScrollingDetector(){
	setFooter();
}

<!--
		function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
		function getWindowWidth() {
			var windowWidth = 0;
			if (typeof(window.innerWidth) == 'number') {
				windowWidth = window.innerWidth;
			}
			else {
				if (document.documentElement && document.documentElement.clientWidth) {
					windowWidth = document.documentElement.clientWidth;
				}
				else {
					if (document.body && document.body.clientWidth) {
						windowWidth = document.body.clientWidth;
					}
				}
			}
			return windowWidth;
		}		
		
		function setFooter(){
			
			var sfooterheight;
			 if( typeof( window.pageYOffset ) == 'number' ) {
			    //Netscape compliant
			    scrOfY = window.pageYOffset;
			    sfooterheight=37;
			  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			    //DOM compliant
			    scrOfY = document.body.scrollTop;
			    sfooterheight=20;
			  } else {
			    //IE6 standards compliant mode
			    scrOfY = document.documentElement.scrollTop;
			    sfooterheight=20;
			  }
			  var windowHeight = getWindowHeight();
			  var footerElement = document.getElementById('iframefooter');	
			  var footerheight;
			  if(getWindowWidth()>1024)
			  	footerheight = 20;
			  	else
			  	footerheight = sfooterheight;
			  	
			  	var sayfaID = window.location + "";
			  	
			  	sayfaID = sayfaID.split("/");
			  	
			  	if (sayfaID[sayfaID.length-1]=='1640.aspx')
			  		footerheight = footerheight + 15
			  	
			  footerElement.style.position = 'absolute';
			  footerElement.style.top = (windowHeight + scrOfY - footerheight) + 'px';
			  footerElement.style.width = (getWindowWidth() - 25 ) + 'px';
			  footerElement.style.display = 'block';
			  
			  //alert("ekran uzunlugu" + windowHeight);
			  //alert("footer ın durumu" + footerElement._x);
			  
		}
		
		
		window.onresize = function() {
		  setFooter();
		}

		window.onscroll = function()
		{
		  setFooter();
		}		
		//-->
		
		