// -- http://www.eyefi.nl --
// -- +31 (0)20 4 279 919 --
// -- W.G.Plein 369, 1054 SG Amsterdam , The Netherlands --
// -- thanks to T. Brattli --
function eyefi_checkBrowser(){
	this.ver=navigator.appVersion; this.dom=document.getElementById?1:0;
	this.mac=(this.ver.indexOf("PPC")!= -1)?1:0; this.win=(this.ver.indexOf("Win")!= -1)?1:0;
	this.ie=(this.ver.indexOf("MSIE")!= -1 && this.dom && parseInt(this.ver) >= 4)?1:0;
	this.saf=(this.mac && !this.ie)?1:0; this.ns=(this.dom && !this.ie)?1:0; 
	this.ns=(this.ns || this.saf);	this.eyefi=(this.ie || this.ns);
	return this;
}
eyefi=new eyefi_checkBrowser();
function eyefi_obj(obj,nest){ 
  if(!eyefi.eyefi) { alert('Old browser'); }
  if(nest != '') {
	nest = document.getElementById(nest);
  }
  this.evnt=document.getElementById(obj); this.css=this.evnt.style; this.ref=document;
  this.x=parseInt(this.css.left)||this.css.pixelLeft||this.evnt.offsetLeft||0;
  this.y=parseInt(this.css.top)||this.css.pixelTop||this.evnt.offsetTop||0;
  this.w=this.evnt.offsetWidth||this.css.clip.width||this.ref.width||this.css.pixelWidth||0; 
  this.h=this.evnt.offsetHeight||this.css.clip.height||this.ref.height||this.css.pixelHeight||0;
  this.c=0; //Clip values
  this.obj = obj + "Object"; eval(this.obj + "=this");
  // extra non standard functions:
  this.newsLeft=gonewsLeft; // news ticker function
  return this;
}
eyefi_obj.prototype.moveIt = function(x,y){	this.x=x;this.y=y; this.css.left=x+"px";this.css.top=y+"px"; }
eyefi_obj.prototype.moveBy = function(x,y){ this.css.left=this.x+=x+"px"; this.css.top=this.y+=y+"px"; }
eyefi_obj.prototype.showIt = function(){this.css.visibility="visible";}
eyefi_obj.prototype.hideIt = function(){this.css.visibility="hidden";}
eyefi_obj.prototype.bg = function(color){ this.css.backgroundColor=color; }
eyefi_obj.prototype.writeIt = function(text){this.evnt.innerHTML=text;}
eyefi_obj.prototype.clipTo = function(t,r,b,l,setwidth){ 
	this.ct=t; this.cr=r; this.cb=b; this.cl=l;
	if(t<0)t=0;if(r<0)r=0;if(b<0)b=0;if(b<0)b=0;
	this.css.clip="rect("+t+","+r+","+b+","+l+")";
	if(setwidth){this.css.pixelWidth=this.css.width=r;this.css.pixelHeight=this.css.height=b;}
}
eyefi_obj.prototype.clipBy = function(t,r,b,l,setwidth){ this.clipTo(this.ct+t,this.cr+r,this.cb+b,this.cl+l,setwidth); }
// ************ code for newsticker ************** */
var scroller, newsloop; // do not change
var newsconTent=0; // do not change
var newsspeed    = 30; // speed of scrolling
var rollStop     = 449; // width of ticker
var rollHeight   = 28; // height of ticker

function gonewsLeft(){ 
	if(newsloop) { 		
		if(this.x>-newsconTent){ this.moveIt(this.x-1,0); }
		else if (this.x<=newsconTent){ this.moveIt(0,0); }
	}
}
function allInit() {
	// code for newsticker - DO NOT CHANGE -
	nCont=new eyefi_obj('newsCont');
	nText=new eyefi_obj('newsText','newsCont');
	nText.moveIt(0,0);
	if (rollStop>=(nText.w/2)) { newsconTent=(nText.w/2); }
	else { newsconTent=(nText.w/2); }
	nCont.showIt();
	nText.showIt();	
	newsloop=true;	
	scroller = setInterval('nText.newsLeft()',newsspeed);
}