var stopscrollC1,stopscrollC2,stopscrollC3,stopscrollC4,stopscrollC5;

function bb(id1,id2,pos,w,h){
	try{
		if(pos==1){stopscrollC1=false}
		if(pos==2){stopscrollC2=false}
		if(pos==3){stopscrollC3=false}
		if(pos==4){stopscrollC4=false}
		if(pos==5){stopscrollC5=false}
		//stopscrollC = false;
		scrollElemC = document.getElementById(id1);
		with(scrollElemC){
			style.width     = w;
			style.height    = h;
			style.overflow  = 'hidden';
			noWrap          = true;
		}
		if(pos==1){scrollElemC.onmouseover = new Function('stopscrollC1 = true');scrollElemC.onmouseout  = new Function('stopscrollC1 = false');}
		if(pos==2){scrollElemC.onmouseover = new Function('stopscrollC2 = true');scrollElemC.onmouseout  = new Function('stopscrollC2 = false');}
		if(pos==3){scrollElemC.onmouseover = new Function('stopscrollC3 = true');scrollElemC.onmouseout  = new Function('stopscrollC3 = false');}
		if(pos==4){scrollElemC.onmouseover = new Function('stopscrollC4 = true');scrollElemC.onmouseout  = new Function('stopscrollC4 = false');}
		if(pos==5){scrollElemC.onmouseover = new Function('stopscrollC5 = true');scrollElemC.onmouseout  = new Function('stopscrollC5 = false');}
		//scrollElemC.onmouseover = new Function('stopscrollC = true');
		//scrollElemC.onmouseout  = new Function('stopscrollC = false');
		var preTopC     = 0; 
		currentTopC = 0; 
		var stoptimeC   = 0;
		var leftElemC = document.getElementById(id2);
		scrollElemC.appendChild(leftElemC.cloneNode(true));
		//alert("'"+id1+"','"+eachh+"','"+num+"',"+currentTopC+","+stopscrollC+"");
		setTimeout("init_srolltextC('"+id1+"',"+currentTopC+","+pos+","+h+")",1000)
	}catch(e) {alert(e.message)}
}

function init_srolltextC(id1,currentTopC,pos,h){
	
	var scrollElemC = document.getElementById(id1);
	scrollElemC.scrollTop = 0;
	setInterval("scrollUpC('"+id1+"',"+currentTopC+","+pos+","+h+")",50);
}

function scrollUpC(id1,currentTopC,pos,h){
	var scrollElemC = document.getElementById(id1);
	//if(stopscrollC) return;
	if(pos==1){if(stopscrollC1) return;}
	if(pos==2){if(stopscrollC2) return;}
	if(pos==3){if(stopscrollC3) return;}
	if(pos==4){if(stopscrollC4) return;}
	if(pos==5){if(stopscrollC5) return;}
	currentTopC += 1;
	if(currentTopC == (h+1)) {
		stoptimeC += 1;
		currentTopC -= 1;
		if(stoptimeC == 100) {
			currentTopC = 0;
			stoptimeC = 0;
		}
	}
	else{
		preTopC = scrollElemC.scrollTop;
		scrollElemC.scrollTop += 1;
		if(preTopC == scrollElemC.scrollTop){
			scrollElemC.scrollTop = 0;
			scrollElemC.scrollTop += 1;
		}
	}
}