function NavigateThrough (event)
{
	if (!document.getElementById) return;
	if (window.event) event = window.event;
	if (event.ctrlKey)
	{
		var link = null;
		var href = null;
		switch (event.keyCode ? event.keyCode : event.which ? event.which : null)
		{
			case 0x25:
				link = document.getElementById ('PrevLink');
				break;
			case 0x27:
				link = document.getElementById ('NextLink');
				break;
			case 0x26:
				link = document.getElementById ('UpLink');
				break;
			case 0x28:
				link = document.getElementById ('DownLink');
				break;
			case 0x24:
				href = '/';
				break;
		}

		if (link && link.href) document.location = link.href;
		if (href) document.location = href;
	}			
}
document.onkeydown = NavigateThrough;

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

function addHidden(form, fieldName) {
	var inp1 =  document.createElement("input");
	inp1.setAttribute("type","hidden");
	inp1.setAttribute('name',fieldName);
	inp1.setAttribute("value","1");
	form.appendChild(inp1);

}
