function mycarousel_initCallback(carousel) {
    jQuery('.jcarousel-control a').bind('click', function() {
		carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
		carousel.stopAuto();
        return false;
    });
};

$(document).ready(
	function(){
		
		$('#mycarousel').jcarousel({
			animation: 1250,
	        auto: 8,
			vertical: true,
	        scroll: 1,
			wrap: 'last',
			initCallback: mycarousel_initCallback,
			 // This tells jCarousel NOT to autobuild prev/next buttons
	        buttonNextHTML: null,
	        buttonPrevHTML: null
	    });
	}
);


function openWindow(url, w, h, name)
{

	var winl = (screen.width-w)/2;var wint = (screen.height-h)/2;
	var settings  ='height='+h+',';
	settings +='width='+w+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=no,';
	settings +='resizable=no,';
	settings +='menubar=no,';
	settings +='location=no,';
	settings +='status=no';
	popupWin = window.open(url, name, settings);
}

function openWindowScroll(url, w, h, name)
{

	var winl = (screen.width-w)/2;var wint = (screen.height-h)/2;
	var settings  ='height='+h+',';
	settings +='width='+w+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=yes,';
	settings +='resizable=no,';
	settings +='menubar=no,';
	settings +='location=no,';
	settings +='status=no';
	popupWin = window.open(url, name, settings);
}
