
function initInfotextHandling(){
}

function openInfotext(url){
}


function initFieldHighlighting(){
/*
var tagNames = Array("INPUT","TEXTAREA");
	for(var a = 0;a < tagNames.length; a++){
		var objs = document.getElementsByTagName(tagNames[a]);
		for(var b = 0;b < objs.length; b++){
			if((objs[b].type.toUpperCase() == "TEXT" &&  objs[b].tagName.toUpperCase() == "INPUT") || objs[b].tagName.toUpperCase() == "TEXTAREA"){ 
				if(!objs[b].className || objs[b].className == "calenderfield"){
					objs[b].className = "inputText";
				}

				objs[b].onblur = changeFieldHighlightInactive;
				objs[b].onfocus = changeFieldHighlightActive;
			}
		}
	}
*/
}

function changeFieldHighlightInactive(){
	this.className = this.className.replace(/inputTextHIGHLIGHT/g,"");
}
function changeFieldHighlightActive(){
	this.className = this.className.replace(/inputTextHIGHLIGHT/g,"") + " inputTextHIGHLIGHT";
}

function processResizeEvents(){
}

function processBodyClickEvents(eve){
	var target = (eve && eve.target) || (event && event.srcElement); 

	if(target.Instanz &&target.Instanz.check)
		return false;

	if(target.className == "Fsc"){
		//alert(target.previousSibling.value);
		//new calAssistent().init(target,target.previousSibling);
	}else{
		if(!isAssistentLayer(target) && assistent){
			document.getElementsByTagName("BODY")[0].removeChild(assistent);
			assistent = null;
		}
	}
}


function initPage(eve){
	if(document.all){
		initFieldHighlighting();
	}
	iconReplacement();
}

function iconReplacement(){
	var tagNames = Array("IMG");
	for(var a = 0;a < tagNames.length; a++){
		var objs = document.getElementsByTagName(tagNames[a]);
		for(var b = 0;b < objs.length; b++){

			if(objs[b].src.match("info.gif$")){
				objs[b].src="../../../forms_v2/StaticContent/Images/IconInfo2.gif";
			}else if(objs[b].src.match("error.gif$")){
				objs[b].src="../../../forms_v2/StaticContent/Images/IconError2.gif";
			}else if(objs[b].src.match("dateicon.gif$")){
				objs[b].src="../../../forms_v2/StaticContent/Images/calIcon.gif";
				objs[b].style.marginLeft = "3px";
			}else if(objs[b].src.match("star.gif$")){
				objs[b].src="../../../forms_v2/StaticContent/Images/Star.gif";
			}
		}
	}
}
function jumpErrorfield(id){
}

function getAbsolutePosition(obj){
}

function findLabel(id){
}

function showError(id,msg){
}
function hideError(id){
}


function addBlock(obj){
}

function moveBlock(obj,direction){
}

function deleteBlock(obj){
}

function redrawBlockButtons(obj){
}

function renameFiledNames(obj){
}

document.onclick = processBodyClickEvents;

function disbleEnterSubmit(obj) {

	try{
		if(!obj){
			if(event){
				obj = event;
			}else{
				obj = null;
			}
		}

		// aktuelles Element ermitteln
		var node = null;
		if(obj.srcElement){
			node = obj.srcElement;
		}else if(obj.target){
			node = obj.target;
		}

		if(obj.keyCode == 13){
			// Enter wurde betätigt

			if(node.type == "text")
				return false;
		}

	}catch(ex){
	}
}

document.onkeypress = disbleEnterSubmit; 

function formsInitBRZ(obj){
	if(window.vappinit)
		window.vappinit();

	initPage(obj);

}
