//Hier Einstellungen für delay und Schrittweite
var delay = 20;
var step = 20;

var initstop = 0;
var tq;
var height1;
function togglequick(){
	initstop = 1;
	if(document.getElementById){
		obj1=document.getElementById("quicklinksall");
		obj2=document.getElementById("quicklinksbutton");
		obj3=document.getElementById("quicklinksbuttonimg");
	}
	if(document.all && !document.getElementById){
		obj1=document.all["quicklinksall"];
		obj2=document.all["quicklinksbutton"];
		obj3=document.all["quicklinksbuttonimg"];
	}
	height1 = obj1.offsetHeight;
	if(tq !== 1){
		obj2.style.marginTop = "1px";
		setTimeout('slidequick(-1)',delay);
		obj3.src = "fileadmin/templates/tpl_main/sonstige/ql_auf.gif";
	}
	else{
		obj2.style.marginTop = "-1px";
		setTimeout('slidequick(1)',delay);
		obj3.src = "fileadmin/templates/tpl_main/sonstige/ql_zu.gif";
	}
	if(tq !== 1){tq = 1} else tq = 0;
}

function starttogglequick(){
if(initstop !== 1){	
	initstop = 1;
	togglequick();
}
}


function slidequick(dir){
	x = 0;
	ende = 0;
	if(parseInt(obj1.style.marginTop)){
		x = parseInt(obj1.style.marginTop);
	}
	tstep = step;	
	if(x*-1 > height1-step && dir == -1){
		tstep = height1+x;
		ende = 1;
	}
	if(x*-1 < step && dir == 1){
		tstep = x * -1;
		ende = 1;
	}
	obj1.style.marginTop = x+dir*tstep+"px";
	if(ende == 0){
		sqstring = 'slidequick('+dir+')';
		setTimeout(sqstring,delay);
	}
}
function change_site(formname,fieldname) {
	var iIndex = document.forms[formname].elements[fieldname].selectedIndex;
	window.location.href =	document.forms[formname].elements[fieldname].value;
}

