YAHOO.util.CrossFrame.onMessageEvent.subscribe(
    function (type, args, obj) {
        var message = args[0];
        var domain = args[1];
    }
);

function getHeight() {
	if (document.body.scrollHeight && navigator.appVersion.indexOf("Win") != -1) {
		return document.body.scrollHeight;
	// body.scrollHeight gets the correct value on WIN IE6, but non on MAC
		}
	else if (document.documentElement.scrollHeight) {
		return document.documentElement.scrollHeight;
		//alert('documentElement.scrollHeight' + document.documentElement.scrollHeight);
		}
	else if (document.documentElement.offsetHeight) {
		//alert('documentElement.offsetHeight' + document.documentElement.offsetHeight);
			return document.documentElement.offsetHeight;
		}
	}

function getDocHeight() {
	return getHeight();
}

var prevDHeight = 0;
var constantRep = 0;

function resizeIframe() {
	//alert(getDocHeight() + " vs " + prevDHeight);
	if(getDocHeight() > prevDHeight) {
		constantRep = 0;
		prevDHeight = getDocHeight();
		YAHOO.util.CrossFrame.send("http://www.reddeerfestivaloftrees.ca/scripts/proxy/",
                           "parent",
                           String(getDocHeight()+20));	
	} else {
		if(++constantRep==30) {
			clearInterval(timerID);	
		}
	}

}
