	function goLogin() {
		var f = document.forms['multi_form'];
		var b = 0;
		var t;

		t = f.logfirstName.value;		
		b = b + validate('empty', t, 'logfirstName', 'input', 'err_input');
				
		t = f.loglastName.value;
		b = b + validate('empty', t, 'loglastName', 'input', 'err_input');
		
		t = f.logemail.value;
		b = b + validate('email', t, 'logemail', 'input', 'err_input');
		
		t = f.logpass.value;
		b = b + validate('empty', t, 'logpass', 'input', 'err_input');
		
		if (b==0) {			
			document.location.href=getLink(1);
		} else {
			alert(globalwarning);
		}
	}
	
	function goForgotten() {
		var f = document.forms['multi_form'];
		var b = 0;
		var t;

		t = f.fgtfirstName.value;
		b = b + validate('empty', t, 'fgtfirstName', 'input', 'err_input');
				
		t = f.fgtlastName.value;
		b = b + validate('empty', t, 'fgtlastName', 'input', 'err_input');
		
		t = f.fgtemail.value;
		b = b + validate('email', t, 'fgtemail', 'input', 'err_input');
		
		if (b==0) {			
			document.location.href=getLink(2);
		} else {
			alert(globalwarning);
		}
	}
	
	function goRegister() {
		var f = document.forms['multi_form'];
		var b = 0;
		var t;
		t = f.company.value;
		b = b + validate('empty', t, 'company', 'input', 'err_input');

		t = f.salutation.value;
		b = b + validate('client', t!='-1', 'salutation', 'combo', 'err_combo');

		t = f.firstName.value;
		b = b + validate('empty', t, 'firstName', 'input', 'err_input');

		t = f.lastName.value;
		b = b + validate('empty', t, 'lastName', 'input', 'err_input');

		t = f.address.value;
		b = b + validate('empty', t, 'address', 'input', 'err_input');

		t = f.zipcode.value;
		b = b + validate('empty', t, 'zipcode', 'input', 'err_input');

		t = f.city.value;
		b = b + validate('empty', t, 'city', 'input', 'err_input');

		t = f.country.value;		
		b = b + validate('client', t!='-1', 'country', 'combo', 'err_combo');

		t = f.phone.value;
		b = b + validate('phone', t, 'phone', 'input', 'err_input');

		t = f.email.value;
		b = b + validate('email', t, 'email', 'input', 'err_input');

		if (b==0) {			
			document.location.href=getLink(3);
		} else {
			alert(globalwarning);
		}
	}
	
	function fNull(aName) {		
		try {
			return urlEncode(document.getElementById(aName).value);
		} catch(e) {
			return ""
		}		
	}	
	
	function urlEncode(aString) {
		var s;
		try {
			s = aString.replace("+", "%2b");
			s = s.replace("-", "%2d");
			s = s.replace("@", "%40");
			s = s.replace("&", "%26");
			s = s.replace("'", "%27");
		} catch (e) {
			s = ""
		}
		return s;		
	}
	
	function getLink(mfa) {		
		var s;
		s = 'http://my-itdaily.net/base/ext_log_reg.asp?mfa=' + mfa + '&emp=' + emp + '&mypage=' + myp;
		if (mfa==1) {
			s += '&logfirstName=' + fNull("logfirstName");
			s += '&loglastName=' + fNull("loglastName");
			s += '&logemail=' + fNull("logemail");
			s += '&logpass=' + fNull("logpass");
		}
		if (mfa==2) {
			s += '&fgtfirstName=' + fNull("fgtfirstName");
			s += '&fgtlastName=' + fNull("fgtlastName");
			s += '&fgtemail=' + fNull("fgtemail");
		}
		if (mfa==3) {
			s += '&company=' + fNull("company");
			s += '&jfunction=' + fNull("jfunction");
			s += '&salutation=' + fNull("salutation");
			s += '&lastName=' + fNull("lastName");
			s += '&firstName=' + fNull("firstName");
			s += '&jobTitle=' + fNull("jobTitle");
			s += '&address=' + fNull("address");
			s += '&zipcode=' + fNull("zipcode");
			s += '&city=' + fNull("city");
			s += '&country=' + fNull("country");
			s += '&phone=' + fNull("phone");
			s += '&email=' + fNull("email");
		}
		return s;
	}
	
	function goUnvalidate()	{
		try {			var x = document.forms['multi_form'].elements;
			for (var i=x.length-1; i>=0;--i) {
				if (x[i].type=="text" || x[i].type=="password") { x[i].className = "input"; }
				if (x[i].type=="select-one") { x[i].className = "combo"; }
			}
		} catch(e) {}	}
	
	function goClear()	{
		try {			var x = document.forms['multi_form'].elements;
			for (var i=x.length-1; i>=0;--i) {
				if (x[i].type=="text" || x[i].type=="password") { x[i].value = ""; }
				if (x[i].type=="select-one") { x[i].value = "-1"; }
				if (x[i].type=="checkbox" || x[i].type=="radio") { x[i].checked=false; }
			}
		} catch(e) {}	}
	
	function getTab(tabid) {
		try {
			var o;
			for (var i=0;i<=maxTabs;i++) {
				o = document.getElementById("tab_" + i);
				if (i==tabid) {
					o.style.display="inline";
				} else {
					o.style.display="none";
				}
			}
			o = document.getElementById("intro");
			if (tabid==0) {
				o.style.display="none";
			} else {
				o.style.display="inline";
			}
			goUnvalidate();
		} catch(e) {}
	}
	
	function getTabAfterConf(tabid) {
		try {
			document.getElementById('confBox').style.display='none';
			getTab(tabid);
		} catch(e) {}
	}
	
	function openPage(href) {
		try {
			window.open(href);
		} catch(e) {}
	}