var height = 0;

jQuery(document).ready(function() {
								
	height = $(".homeSurvey").height(); 
	
	$("#homeNews").css("height", height);
	$("#scrollbar").css("height", height);
	$("#scrollbar_indent").css("height", height-22);
	
    $('#tpslides')
//	.before('<div id="morehandle">')
	.cycle({
    fx:      'custom', 
    cssBefore: {  
        left: 115,  
        top:  175,  
        width: 0,  
        height: 0,  
        opacity: 1, 
        zIndex: 1 
    }, 
    animOut: {  
        opacity: 0  
    }, 
    animIn: {  
        left: 0,  
        top: 0,  
        width: '100%',  
        height: 300  
    }, 
    cssAfter: {  
        zIndex: 0 
    }, 
    delay: -3000 ,
	pager:  '#morehandle'
	});
});


function scroll_homeNews(i){ 
 i = i*(height-4);
  with(document.getElementById('homeNews')){
    var pos = scrollTop+i;
    if(pos<0)pos=0;
    else if(pos>=scrollHeight) pos=scrollHeight-1;
    scrollTop=pos;
  }
}
