window.onload=function(){
	hideSatisfaction();
	windowResized();
	xAddEventListener(window,'resize',windowResized,true);
}
function windowResized(){
	var iX=(xClientWidth()-xWidth('oFlyingLayer1')+420+12)/2;
	xLeft('oFlyingLayer1',iX);
	xLeft('oFlyingLayer2',iX);
	xLeft('oSatisfaction',iX-10);
	xGetElementById('oSatisfaction').style.display='';

	var iY=50;//xTop('oFlyingLayer1');
	xMoveTo('oShadowTable',iX-12,iY-6);
}
var satisfactionTimer=null;
function showLayer(i){
	if(i==2){
		if(satisfactionTimer!=null){
			clearTimeout(satisfactionTimer);
			satisfactionTimer=null;
		}
		showSatisfaction();
	}else{
		satisfactionTimer=setTimeout(hideSatisfaction,15000);
	}
}
function showSatisfaction(){
	xGetElementById('oFlyingLayer1').style.display='none';
	xGetElementById('oFlyingLayer2').style.display='';
	var w=xWidth('oFlyingLayer2');
	xWidth('ombreN',w-6);
	xWidth('ombreS',w-6);
	var h=xHeight('oFlyingLayer2');
	xHeight('ombreW',h-6);
	xHeight('ombreE',h-6);
}
function hideSatisfaction(){
	xGetElementById('oFlyingLayer1').style.display='';
	xGetElementById('oFlyingLayer2').style.display='none';
	var w=xWidth('oFlyingLayer1');
	xWidth('ombreN',w-6);
	xWidth('ombreS',w-6);
	var h=xHeight('oFlyingLayer1');
	xHeight('ombreW',h-6);
	xHeight('ombreE',h-6);
}