var dir=0;
var inc=2;
var speed=10;

function startscroll(d){
	s=window.setInterval("scroll()", speed);
	dir=d;
}
function stopscroll(){
	window.clearInterval(s);
}
function scroll(){
	document.getElementById("textpanel").scrollTop+=dir*inc;
}

/* eolas workaround */
function printFlashObj(p,file,w,h,alt){
	document.write('<object type="application/x-shockwave-flash" data="'+p+file+'" width="'+w+'" height="'+h+'">');
	document.write('<param name="movie" value="'+p+file+'" />');
	document.write('<param name="menu" value="false" />');
	//document.write('<param name="wmode" value="transparent" />');
	//document.write('<param name="bgcolor" value="#CDD2D5" />');
	document.write('<param name="bgcolor" value="#91A0C7" />');
	
	if(alt!=null){
		document.write(alt);
	}else{
		document.write('<p><a href="http://www.adobe.com/go/getflash" title="Get Flash">Install flash to view this animation</a></p>');
	}
	document.write('</object>');
}

function link_popup(url){
	window.open(url);
}

function popUp(url,type,w,h) {
	w+=16;
	h+=100;
	var str="";
	switch(type){
		case "console":
			str="resizable,height="+h+",width="+w;
			break;
		case "fixed":
			str="status,height="+h+",width="+w;
			break;
		case "elastic":
			str="toolbar,menubar,scrollbars,resizable,location,height="+h+",width="+w;
			break;
	}
	window.open(url, 'newWin', str);
}