// <![CDATA[

//////////////////////////////////////////////////////
// NEWS SCROLL
//////////////////////////////////////////////////////

$(document).ready(function(){
	$('#box_news .news').cycle({
	fx: 'scrollVert',
	prev: '#box_news a.prev',
	next: '#box_news a.next',
	timeout: 10000
	});
});
$(document).ready(function(){
	$("#box_news a.prev").hover(function() {$(this).stop().animate({"opacity": "0.80"}, "fast");},function() {$(this).stop().animate({"opacity": "0.0"}, "fast");});
	$("#box_news a.next").hover(function() {$(this).stop().animate({"opacity": "0.80"}, "fast");},function() {$(this).stop().animate({"opacity": "0.0"}, "fast");}); 
});

//////////////////////////////////////////////////////
// TOGGLE
//////////////////////////////////////////////////////

$(document).ready(function(){
	$('#toggle div.content').hide();
	$('#toggle a.title').toggle(function(){
		$(this).addClass('selected');
		}, function () {
		$(this).removeClass('selected');
	});
	$('#toggle a.title').click(function(){
		$(this).next('#toggle div.content').slideToggle('fast');
	});
});

//////////////////////////////////////////////////////
// ACCORDION
//////////////////////////////////////////////////////

$(document).ready(function() {
        $('#accordion').accordion({
        header: 'a.title',
        autoheight:false
        });
});

//////////////////////////////////////////////////////
// A FOCUS BLUR FIX
//////////////////////////////////////////////////////

onload = function(){
	a_tags=document.getElementsByTagName('a')
	for (i=0;i<a_tags.length;i++) {
		a_tags[i].onfocus=blur_links
	}
}
function blur_links() {
	this.blur()
}

//////////////////////////////////////////////////////
// FORM SUBMIT
//////////////////////////////////////////////////////

function FormSubmit(formularname) {
	var formular = document.forms[formularname];
	formular.submit();
}

//////////////////////////////////////////////////////
// FORM VALUE
//////////////////////////////////////////////////////

function FormValue(Typ,FormName,FeldName,Wert){
	switch(Typ){
	case 'onfocus' :
		var formular = document.forms[FormName].elements[FeldName];
		if(formular.value == Wert){
		formular.value = '';
		}
		//formular.style.color='#242424';
	break;
	case 'onblur' :
		var formular = document.forms[FormName].elements[FeldName];
		if(formular.value == ''){
		formular.value = Wert;
		//formular.style.color='#666666';
		}
	break;
	}
}

//////////////////////////////////////////////////////
// TOGGLE BOX
//////////////////////////////////////////////////////

function toggle(DivID){
	var ToggleObj = document.getElementById(DivID);
	if (ToggleObj.style.display == 'block') {
		ToggleObj.style.display = "none";
	} else {
		ToggleObj.style.display = "block";
	}
}

//////////////////////////////////////////////////////
// BOOKMARK
//////////////////////////////////////////////////////

function bookmark(title,url){
	// firefox
	if (window.sidebar){
	window.sidebar.addPanel(title, url, "");
	}
	// opera
	else if(window.opera && window.print){
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
	}
	// ie
	else if(document.all){
	window.external.AddFavorite(url, title);
	}
}

// ]]>
