﻿function calcHeight(){
	elem = document.getElementById("contentFrame")
	function setMe(){
		theHeight = elem.contentWindow.document.body.scrollHeight
		elem.height = theHeight
	}
	
	setMe()
	
}


function scrollPinkFrame(){
	var ME = this	
	var interval
	var LastScrollTop = 0
	var htmlTAG = document.getElementsByTagName("HTML")[0]
	
	function checkPoz(){
		newScrolltop = htmlTAG.scrollTop + document.body.scrollTop  
		myCurrentTop = ME.offsetTop  
		var tmp = ((newScrolltop-myCurrentTop) /1.3)
		myNewPosition = newScrolltop- tmp
		
		if(newScrolltop>130)myNewPosition-=35
		//console.clear()
		//console.log(myNewPosition)
		
		ME.style.top = parseInt(myNewPosition).toString() + "px"
		
	}
	
	interval = setInterval(checkPoz, 80)
	
	
	
}
//document.domain="mouse.co.il";