var statusErrors 				= new StatusErrors();
var xmlHttpObject 				= new XMLHttpObject();
var showPopup 					= new ShowPopup();
var loadingTemplatesWithAjax	= new LoadingTemplatesWithAjax();
var changedFieldValues			= new ChangedFieldValues();
var formControl					= new FormControl();
var debugWindow 				= new DebugWindow();
var saveFormWithAjax			= new SaveFormWithAjax(popup);

projectInit = function() {	
	try {
		var IE = (document.all) ? true : false;
		/*
		setFormEvents();
	
		var counter 				= inputlisteners.length;
		for (i = 0; i < counter; i++){
			// loop door form
			// als formel.type=file ==> createlistener
			createListener(inputlisteners[i], divlisteners[i]);
		}
		*/
		var formcounter				= document.forms.length;
	
		for (i = 0; i < formcounter; i++){
			var form				= document.forms[i];
			var numel				= form.elements.length;
			for(j = 0; j < numel; j++){
				var el				= form.elements[j];				
				switch(el.type){
					case 'textarea':
						if(window.location.href.indexOf('popupguestbookentry') == -1){
							if(IE) {
								el.attachEvent("onmouseout"	, stripTags);
								el.attachEvent("onblur"	, stripTags);							
							} else {
								el.addEventListener("mouseout",stripTags, true);
								el.addEventListener("blur",stripTags, true);							
							}
						}
						break;
					case 'text':
						if(IE) {
							el.attachEvent("onmouseout"	, stripTags);
							el.attachEvent("onblur"	, stripTags);
						} else {
							el.addEventListener("mouseout",stripTags, true);
							el.addEventListener("blur",stripTags, true);
						}
						if (el.id.match('phone') || el.id.match('mobile')){
							if(IE) {
								el.attachEvent("onmouseout"	, checkPhone);
								el.attachEvent("onblur"	, checkPhone);
							} else {
								el.addEventListener("mouseout",checkPhone, true);
								el.addEventListener("blur",checkPhone, true);
							}
						} else if(el.id.match('mail')){
							if(IE) {
								el.attachEvent("onmouseout"	, checkMail);
								el.attachEvent("onblur"	, checkMail);
							} else {
								el.addEventListener("mouseout", checkMail, true);
								el.addEventListener("blur", checkMail, true);
							}
						}
						break;
				}
			}			
		}
	} catch(e) {
		
		
	}

}

init = function() {

}

initCB = function() {


}

function openWindowNS (url ,name, width, height) {
	leftPosition 		= (screen.width-width)/2;
	topPosition 		= (screen.height-height)/2;
	winprops 			= 'width='+ width +',height='+ height +',left='+leftPosition +',top='+topPosition +', toolbar=no,titlebar=no,statusbar=no,locationbar=no,resizable=no,scrollbars=no'
	wnd 				= window.open (url, 'name', winprops)
	wnd.focus()
}

