function init() {
	setPageTitle("Inter BEE 2008");
	
	dhtmlHistory.initialize();
	dhtmlHistory.addListener(callExternalInterface);
	
	if (window.addEventListener)
	        /** DOMMouseScroll is for mozilla. */
	        window.addEventListener('DOMMouseScroll', wheel, false);
	/** IE/Opera. */
	window.onmousewheel = document.onmousewheel = wheel;
}

function callExternalInterface() {
	if (thisMovie("interBEEExternal").callbackLocation) {
		thisMovie("interBEEExternal").callbackLocation(dhtmlHistory.getCurrentLocation());
	} else {
		return true;
	}
}

function thisMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}

function setLocation(newLocation) {
	dhtmlHistory.add(newLocation);
}

function getLocation() {
	return dhtmlHistory.getCurrentLocation();
}

function getPageTitle() {
	return document.title;
}

function setPageTitle(PageTitle) {
	document.title = PageTitle;
}

function pageBack() {
	history.back();
}

function getLocation() {
	return dhtmlHistory.getCurrentLocation();
}

function getReferer() {
	return document.referrer;
}

function wheel(event){
        var delta = 0;
        if (!event) /* For IE. */
                event = window.event;
        if (event.wheelDelta) { /* IE/Opera. */
                delta = event.wheelDelta/120;
                /** In Opera 9, delta differs in sign as compared to IE.
                 */
                if (window.opera)
                        delta = -delta;
        } else if (event.detail) { /** Mozilla case. */
                /** In Mozilla, sign of delta is different than in IE.
                 * Also, delta is multiple of 3.
                 */
                delta = -event.detail/3;
        }
        if (event.preventDefault)
                event.preventDefault();
	event.returnValue = false;
	
	thisMovie("interBEEExternal").mouseWheelEvent(delta);
}

window.onload = init;

