function reframe(h){
	if(h > document.documentElement.clientHeight){
		document.documentElement.childNodes[1].style.height = h+"px";
	} else {
		document.documentElement.childNodes[1].style.height = document.documentElement.clientHeight+"px";
	}
	window.focus();
}

function focused()
{
	window.focus();	
}

function hcc2007_DoFSCommand(command,args){
	if(command == 'getScrollHeight')
	{
		var scrollTop = document.documentElement.scrollTop;
		scrollTop = scrollTop/3;
		var height = document.documentElement.scrollHeight;
		var windowHeight = document.documentElement.clientHeight;
	
		//alert(scrollTop+windowHeight/2);
		return scrollTop;
	}
}


function getScrollPosition(){
	//var sh = document.documentElement.scrollTop+document.documentElement.clientHeight/2;
	var sh = document.documentElement.scrollTop+document.documentElement.clientHeight*.10;
	//alert(sh);
	return sh;
}

function init(){
	if(arguments.callee.doOnce){return;}
	arguments.callee.doOnce=true;
	var earl = document.location.toString();
	var s = (document.location.search||document.location.hash.replace('#','?')).toUpperCase();
	if (earl.indexOf('register') != -1)
	{
		s="?ENTRYPAGE=2";	
	}
	if (earl.indexOf('refer') != -1)
	{
		s = "?ENTRYPAGE=3";	
	}	
	if (earl.indexOf('photos') != -1)
	{
		s = "?ENTRYPAGE=4";	
	}
	var f = new Flash("/flash/hcc2008.swf"+(s||''),"100%","100%",8,true);
	if(f.insert()){
		//flash
		document.documentElement.style.height = "100%";
		document.documentElement.childNodes[1].style.height = "100%";
		document.documentElement.childNodes[1].style.background = "none";
	} else {
		//html
	}
	//setInterval(function(){window.focus()},100);//keep scrollbar in focus
	
}
if(document.addEventListener){document.addEventListener("DOMContentLoaded",init,null);}
window.onload=init;