function initPulldownMenuForNode(elementOrId) {
	// for IE only!
	if (document.all && document.getElementById) {
		if (typeof(elementOrId) == "string")
			elementOrId = document.getElementById(elementOrId);

		elementOrId.onmouseover = function() {
			this.className += " hover";
		}
		elementOrId.onmouseout=function() {
			this.className = this.className.replace(" hover", "");
		}

	}
}

function initPulldownMenu(elementOrId) {
	// for IE only!
	if (document.all && document.getElementById) {
		if (typeof(elementOrId) == "string")
			elementOrId = document.getElementById(elementOrId);
		for (i = 0; i < elementOrId.childNodes.length; i++) {
			node = elementOrId.childNodes[i];
			if (node.nodeName == "LI") {
				node.onmouseover = function() {
					this.className += " hover";
				}
				node.onmouseout=function() {
					this.className = this.className.replace(" hover", "");
				}
			} else {
				initPulldownMenu(node);
			}
		}
	}
}



// Div ausblenden

function hideElementById(elemId) { Effect.Fade(elemId,{ duration: 1.0 }) }
/*function hideElementById(elemId) { document.getElementById(elemId).style.display = "none"; }*/
function hideVisibleElementById(elemId) {document.getElementById(elemId).style.visibility = "hidden"; }


// Div anzeigen

function showElementById(elemId) { Effect.Appear(elemId,{ duration: 1.0 }) }
/*function showElementById(elemId) { document.getElementById(elemId).style.display = "block"; }*/
function showVisibleElementById(elemId) {  document.getElementById(elemId).style.visibility = "visible"; }

// Divs austauschen

function toggleElementsById(oldElemId, newElemId) { hideElementById(oldElemId); showElementById(newElemId)}
function toggleVisibleElementsById(oldElemId, newElemId) { hideVisibleElementById(oldElemId); showVisibleElementById(newElemId)}

function ajanlat_sub(){

	var x = document.getElementById('ajanlatkeres');
	var max = 7;
	var kotelezo = new Array();
	var nincs = 0;
	var jelszohiba = 0;

	kotelezo[0] = 0;
	kotelezo[1] = 1;
	kotelezo[2] = 0;
	kotelezo[3] = 0;
	kotelezo[4] = 1;
	kotelezo[5] = 1;
	kotelezo[6] = 1;

	for (var c=0;c<max;c++){
		if(!(x.elements[c].value) && kotelezo[c]){
			nincs = 1;
		}
	}

	if (nincs){
		alert('Nincs minden szükséges mező kitöltve!');
	}

	else{
		x.submit();
	}

}

function link(link){
	window.location= link;
}
