// JavaScript Document
// Created on monday 05.05.08
// (c) etone intermedia GmbH 2008

function $(id){
	return document.getElementById(id);	
}

var ids = new Array();
function setStatus(id) {
	if (ids[id]) {}
	else {
		ids[id] = false;
	}
	if (ids[id] == false) {$(id).style.display = 'block';ids[id] = true;}
	else {$(id).style.display = 'none'; ids[id] = false;}
}

function openActiveFolderClosePrevious(foldOut,foldIn,parentElement) {
	$(foldOut).style.display = 'block';
	$(foldIn).style.display = 'none';
	
	if (parentElement == "folderKFZ_Holder") {
		$(parentElement).style.background = "url('img/doppelklammer_vert.gif') left 8px no-repeat";
		$('folderPrivate_Holder').style.background = "url('img/doppelklammer_hor.gif') left center no-repeat";
	}
	else if (parentElement == "folderPrivate_Holder") {
		$(parentElement).style.background = "url('img/doppelklammer_vert.gif') left 8px no-repeat";
		$('folderKFZ_Holder').style.background = "url('img/doppelklammer_hor.gif') left center no-repeat";
	}
}
function hoverImage(imgID,left,top,display, fix) {
	if(fix){ 
		$(imgID).className = "fix";
	}
	
	if($(imgID).className == "fix"){
		$(imgID).style.display = 'block';		
	} else {
		top = top - ($(imgID).height/2);
		left = left - $(imgID).width;
		$(imgID).style.left = left +"px";
		$(imgID).style.top = top +"px";
		$(imgID).style.display = display;
	}
}

function clickHDITarifrechner(lkElement, hrefLink, imgID, left, top, fix){
	hoverImage(imgID, left, top, 'block', fix);
	hoverImage('ajax_loading', left, top, 'block', fix);
	document.getElementById('content').style.opacity = '0.3';
	document.getElementById('content').style.filter = 'alpha(opacity=30)';
	setTimeout(function(){
			window.location.href = hrefLink;
	}, 3000);
}

function openInfo(File) {
	infoFenster = window.open(File,"","width=480,height=250,left=100,top=200,toolbar=no,status=no,scrollbars=no,location=no,resizeable=no,dependent=yes");
	infoFenster.focus();
	
}

function openInfoLarge(File) {
	infoFensterLarge = window.open(File,"","width=950,height=500,left=10,top=30,toolbar=no,status=no,scrollbars=yes,location=no,resizeable=yes,dependent=yes");
	infoFensterLarge.focus();
	
}