/*##############################################################################
#
# File:		$Source: /Library/CVS/www.sc85.de/sc85/jscript/sc_compact.js,v $
#			$Id: sc_compact.js,v 1.1 2003/05/17 18:44:15 hank Exp $
# Language:	Javascript
# Author:	Henning Verbeek
# Info:		SC Compact Java script routines
#
# Revision History:
# $Log: sc_compact.js,v $
# Revision 1.1  2003/05/17 18:44:15  hank
# Initial import.
#
#
################################################################################
*/

//Specify the marquee's width (in pixels)
var marqueewidth=242

//Specify the marquee's height
var marqueeheight=150

//Specify the marquee's scroll speed (larger is faster)
var speed=2

//Specify the marquee contents
var marqueecontents='<center><font size=+1 face=arial,verdana><b>sc</b> <i>compact</i></font></center>'+newsmarquee

if (document.all)
	document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')

function regenerate(){
	window.location.reload()
}

function regenerate2(){
	if (document.layers){
		setTimeout("window.onresize=regenerate",450)
		intializemarquee()
	}
}

function intializemarquee(){
	document.cmarquee01.document.cmarquee02.top=marqueeheight
	document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
	document.cmarquee01.document.cmarquee02.document.close()
	thelength=document.cmarquee01.document.cmarquee02.document.height
	scrollit()
}

function scrollit(){
	if (document.cmarquee01.document.cmarquee02.top>=(thelength*(-1) + 20)){
		document.cmarquee01.document.cmarquee02.top-=speed
		setTimeout("scrollit()",100)
	} else {
		document.cmarquee01.document.cmarquee02.top=marqueeheight
		scrollit()
	}
}

window.onload=regenerate2

