/****************************************************************************
* scripts.js
* Common JavaScript functions: initialization, text-scroller, window-opener
* author: a.fehn@design-aspekt.com | date: 2003-03-10
*
* produced by design aspekt
* http://design-aspekt.com
***************************************************************************/

// if your not 'index' go to 'index' ;-) 
//if (top.window.name != "{name}") top.location.href = "index.php"

//______________________________________________________________________
//TEXTSCROLLER
//You set the width and height of the divs inside the style tag, you only have to
//change the divCont, Remeber to set the clip the same as the width and height.
//If you want it to move faster you can set this lower:
var speed=50
//Sets variables to keep track of what's happening
var loop, timer
//Makes the object go up

function goDown(move){
	if(this.y>-this.scrollHeight+clipWindow.clipHeight){
		this.moveIt(0,this.y-move)
			if(loop) setTimeout(this.obj+".down("+move+")",speed)
	}
}
//Makes the object go down
function goUp(move){
	if(this.y<0){
		this.moveIt(0,this.y-move)
		if(loop) setTimeout(this.obj+".up("+move+")",speed)
	}
}
//Calls the scrolling functions. Also checks whether the page is loaded or not.
function scroll(speed){
	if(loaded){
		loop=true;
		if(speed>0) scrolltext.down(speed)
		else scrolltext.up(speed)
	}
}
//Stops the scrolling (called on mouseout)
function noScroll(){
	loop=false
	if(timer) clearTimeout(timer)
}

//______________________________________________________________________
// opens new window
function popup(url) {
	var w = 400; var h = 500;
	l = Math.round(screen.width/2) - Math.round(w/2);
	t = Math.round(screen.height/2) - Math.round(h/2);
	if (screen.height<h) { h = (screen.height-80);}
	owin = open(url,'popup','toolbar=0,status=0,scrollbars=1,width='+w+',height='+h+',resizable=1,top='+t+',left='+l);
	owin.focus();
}
function openwin(url,w,h,r,s) {
	if (screen.height<h) { h = (screen.height-80);}
	owin = open(url,'','toolbar=0,status=1,scrollbars='+s+',width='+w+',height='+h+',resizable='+r+',top=0,left=0');
	owin.focus();
}
