function hideMenu(e,id)
{
	e.className = 'cufon';
	document.getElementById(id).style.display = 'none';
}
						
function dropMenu(e,id)
{
	e.className = 'cufon selected';
	document.getElementById(id).style.display = '';
}
function hideTeaser(id)
{
	document.getElementById(id).style.display = 'none';
}
						
function dropTeaser(id)
{
	document.getElementById(id).style.display = '';
}
function clearAutoFill(el, val){if(el.value == val){el.value = '';}}
function setAutoFill(el, val){if(el.value == ''){el.value = val;}}

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();
});
};

jQuery(document).ready(function() {
jQuery('#mycarousel').jcarousel({
auto: 10,
scroll: 1,
animation: 1000,
wrap: 'circular',
initCallback: mycarousel_initCallback
});
});


function showonlyone(thechosenone) {
var newboxes = document.getElementsByTagName("div");
for(var x=0; x<newboxes.length; x++) {
name = newboxes[x].getAttribute("name");
if (name == 'newboxes') {
if (newboxes[x].id == thechosenone) {
newboxes[x].style.display = 'block';
}
else {
newboxes[x].style.display = 'none';
}
}
}
}

function switchClass(obj,strClassName) 
{
if(strClassName == 'teaser-box') hideTeaserBox(); else { normalTeaserBox(); }
document.getElementById('teaser-placeholder').style.display = '';
obj.className = strClassName;
} 

function hideTeaserBox()
{
	var e = document.getElementsByClassName('teaser-hover');
	for(var i = 0; i < e.length; i++)
	{
		e[i].style.display = 'none';
	}
}

function normalTeaserBox()
{


	var e = $(".teaser-box-hover");
		
		for(var i = 0; i < e.length; i++)
		{
			e[i].className = 'teaser-box';
		}
}
