var winscroll;
var autoChageSTO = null;

window.addEvent('domready', function() {
	if($('global_nav'))
		FancyExample = new SlideList($E('ul', 'global_nav'), {
        	transition: Fx.Transitions.backOut, 
			duration: 700, 
			onClick: function(ev, item) { /*ev.stop();document.location.href=item.href;*/ }
		});
		
	new SmoothScroll({ duration: 1500 });
	
	/* Tips 1 */
	var Tips1 = new Tips($$('.Tips1'));
	
	/* Tips 2 */
	var Tips2 = new Tips($$('.feature-tip'), {
		initialize:function(){
			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 300, wait: false}).set(0);
		},
		onShow: function(toolTip) {
			this.fx.start(1);
		},
		onHide: function(toolTip) {
			this.fx.start(0);
		}
	});
	
	/* Tips 3 */
	var Tips3 = new Tips($$('.Tips3'), {
		showDelay: 400,
		hideDelay: 400,
		fixed: true
	});
	
	/* Tips 4 */
	var Tips4 = new Tips($$('.Tips4'), {
		className: 'custom'
	});
}); /*end dom-ready*/

window.addEvent('load', function () {
	if($('feature_buttons')) {
		slidingtabs = new SlidingTabs('feature_buttons', 'slider_wrap', {activationEvent: 'mouseover', startingSlide: 0, automatic: true});
		// this sets up the previous/next buttons, if you want them
	}
	if($('feature_buttons2')) {
		slidingtabs2 = new SlidingTabs('feature_buttons2', 'slider_wrap2');		
		// this sets up the previous/next buttons, if you want them
		//$('previous').addEvent('click', slidingtabs2.previous.bind(slidingtabs2));
		//$('next').addEvent('click', slidingtabs2.next.bind(slidingtabs2));
	}
});

function Social_Load() { 
	var d=document; if(d.images){ if(!d.Social) d.Social=new Array();
	var i,j=d.Social.length,a=Social_Load.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.Social[j]=new Image; d.Social[j++].src=a[i];}}
}

function schnipp() { 
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function schnupp(n, d) { 
	var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=schnupp(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function schnapp() { 
	var i,j=0,x,a=schnapp.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=schnupp(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



var newwindow;
function poptastic(url) {
	newwindow=window.open(url,'CNBC European Business','height=700,width=500');
	if (window.focus) {newwindow.focus()}
}
            
function poptastic2(url) {
	newwindow=window.open(url,'CNBC European Business','height=700,width=500,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}

var message = "Print this Page";
function printpage() {
	window.print();  
}