var _moving=new Array()
_moving[0]=true

function stopTicker(id){
	_moving[id]=false
}
function startTicker(id){
	_moving[id]=true
}
function MoveTicker(){
	for(var i = 1 ; i <= sumOfTicker ;i++){
		if(!_moving[i]) continue
		try{
			var obj1=document.all['Ticker1'+i]
			var obj2=document.all['Ticker2'+i]
			var style1=obj1.style
			var style2=obj2.style
			style1.top = style1.pixelTop - 1;
			style2.top = style2.pixelTop - 1;
			(style1.pixelTop < (-obj1.clientHeight)) ? style1.top = obj1.clientHeight : "" ;
			(style2.pixelTop < (-obj2.clientHeight)) ? style2.top = obj2.clientHeight : "";
		}catch(e){}
	}		
}
function InitMainSpans(){
	//return 
	var body_height=(document.body.scrollHeight>document.body.offsetHeight)?document.body.scrollHeight:document.body.offsetHeight
	
	try{
		body_height=body_height-Number(document.all['header_part'].offsetHeight)
	}catch(e){}
	try{
		body_height=body_height-Number(document.all['footer_part'].offsetHeight)
	}catch(e){}
	try{
		body_height=body_height-Number(document.all['upper_bar_part'].offsetHeight)
	}catch(e){}
	try{
		body_height=body_height-Number(document.all['footer_logos'].offsetHeight)
	}catch(e){}
	
	if(!isnull(document.all['right_part']) && document.all['right_part'].offsetHeight>body_height)
		body_height=document.all['right_part'].offsetHeight
	if(!isnull(document.all['left_part']) && document.all['left_part'].offsetHeight>body_height)
		body_height=document.all['left_part'].offsetHeight
	if(!isnull(document.all['central_part']))
		document.all['central_part'].style.height=body_height-20
}
function InitPos(){
	for(var i = 1 ; i <= sumOfTicker ;i++){
		_moving[i]=true
		try{
			document.all['Ticker1'+i].style.top = 0;
			document.all['Ticker2'+i].style.top = document.all['Ticker2'+i].clientHeight;
			document.all['Ticker1'+i].style.bottom = 0 - (document.all['Ticker1'+i].clientHeight - document.body.offsetHeight);
			document.all['Ticker2'+i].style.bottom = 0 - (document.all['Ticker1'+i].clientHeight - document.body.offsetHeight) - document.all['Ticker2'+i].clientHeight;	
		}
		catch(e){}
	}
	setInterval("MoveTicker()",50);
	
}
function InitExtra(){}

window.onload = function()
{
	//window.location.replace()
	try{
		
		InitMainSpans()
		InitPos()
		InitExtra()
	}
	catch(e){}	
}	

