var contactValidator = $("form#contectForm").validate(); function sendRegistration(title, content) { document.trovarit_erpkalk_wizard.submit(); /*if ($('#trovarit_erpkalk_wizard').valid()) { document.registerForm.submit(); } else { infoDialog(title,content,150); }*/ } function sendDCRegistration() { if ($('#downloadcenterRegisterForm').valid()) { blockScreen(); var zielgruppe = $('input[name=inputDCZielgruppe]:checked').val(); if ($('#inputDCZielgruppeSonstiges').val().length > 0) { zielgruppe = $('#inputDCZielgruppeSonstiges').val(); } var zweck = ""; $('input[name=inputDCZweck]:checked').each(function(i) { zweck = zweck + $(this).val()+";"; }); if ($('#inputDCZweckSonstiges').val() != "") { zweck = zweck + $('#inputDCZweckSonstiges').val()+";"; } var herkunft = ""; $.getJSON("http://www.it-matchmaker.com/erp-calculator/ajaxip.php?callback=?", function (data) { herkunft = data.IP; $.getJSON("http://www.it-matchmaker.com/erp-calculator/dataform.php?callback=?", { inputDCTitle: $('#inputDCTitle').val(), inputDCFirstName: $('#inputDCFirstName').val(), inputDCName: $('#inputDCName').val(), inputDCCompany: $('#inputDCCompany').val(), inputDCStreet: $('#inputDCStreet').val(), inputDCPLZ: $('#inputDCPLZ').val(), inputDCCity: $('#inputDCCity').val(), inputDCEMail: $('#inputDCEMail').val(), inputDCTelefon: $('#inputDCTelefon').val(), inputDCPosition: $('#inputDCPosition').val(), inputDCLand: $('#inputDCLand').val(), inputDCZielgruppe: zielgruppe, inputDCZweck: zweck, key : trovarit_kalk_key, ip : herkunft, page: "register_complete" }, function(data1) { userID = $.base64Decode(data1); //loadPage("calculate_form"); thanksForRegistration(); $("#trovarit_erpkalk_intro").hide(); $('html,body').animate({scrollTop: 0}, 500); /**weiter**/ } ); }); } else { alert("Bitte füllen Sie alle Pflichtfelder aus bevor Sie fortfahren."); } } function loadPage(type) { //type = (type == null ? "register" : 0); blockScreen(); $.getJSON("http://www.it-matchmaker.com/erp-calculator/dataform.php?callback=?",{page:type,md5:md5}, function(data){ $("#trovarit_erpkalk_app").html($.base64Decode(data)); if (type == "register") { initValidation(); unblockScreen(); } else if (type == "calculate_form") { $.getScript("http://www.it-matchmaker.com/core/jscripts/jquery.tooltip.js", function(){ $('.trovarit_erpkalk_tooltip').Tooltip({showURL: false,id: "trovarit_erpkalk_tooltip",showBody: "; "}); unblockScreen(); } ); } } ); } function blockScreen() { if (!isScreenBlocked) { isScreenBlocked = true; $.blockUI( { message: '
Bitte warten...
', css: { border: '3px solid #ddd', width: '200px', left: (jQuery(window).width() - 200) /2 + 'px' }, overlayCSS: { backgroundColor: '#000' }, baseZ: 10000 }); } } function unblockScreen() { $.unblockUI(); isScreenBlocked = false; } function clearRadio() { if ($.trim($('#inputDCZielgruppeSonstiges').val()).length > 0) { $('input[name=inputDCZielgruppe]:checked').attr("checked", false); } } function clearSonstige() { $('#inputDCZielgruppeSonstiges').val(""); } function initValidation() { jQuery.validator.addMethod("zielgruppe", function(value, element) { if (($.trim($('#inputDCZielgruppeSonstiges').val()).length > 0) || ($('input[name=inputDCZielgruppe]:checked').length == 1)) { $("#trovarit_dc_zielgruppe").removeClass("trovarit_validation_error"); $("#inputDCZielgruppeSonstiges").removeClass("trovarit_validation_error"); $('input[name=inputDCZielgruppe]').removeClass("trovarit_validation_error"); return true; } else { $("#trovarit_dc_zielgruppe").addClass("trovarit_validation_error"); return false; } }, " "); jQuery.validator.addMethod("zweck", function(value, element) { if (($.trim($('#inputDCZweckSonstiges').val()).length > 0) || ($('input[name=inputDCZweck]:checked').length > 0)) { $("#trovarit_dc_zweck").removeClass("trovarit_validation_error"); $("#inputDCZweckSonstiges").removeClass("trovarit_validation_error"); $('input[name=inputDCZweck]').removeClass("trovarit_validation_error"); return true; } else { $("#trovarit_dc_zweck").addClass("trovarit_validation_error"); $("#inputDCZweckSonstiges").addClass("trovarit_validation_error"); return false; } }, " "); jQuery.validator.addMethod("agbRequired", function(value, element) { if ($('input[name=inputDCAGB]:checked').length > 0) { $("#trovarit_dc_agb").removeClass("trovarit_validation_error"); return true; } else { $("#trovarit_dc_agb").addClass("trovarit_validation_error"); return false; } }, " "); $("#downloadcenterRegisterForm").validate({ meta: "validate", errorClass: "trovarit_validation_error", errorPlacement: function(error, element) { } }); } function openCalcLegalInfo(title, showTextWithID, isDatenschutz) { blockScreen(); $("#trovarit_erpkalk_dialog_content").html(""); $.getJSON("http://www.it-matchmaker.com/erp-calculator/dialog_legal_info.php?callback=?", {"showTextWithID" : showTextWithID, "isDatenschutz" : isDatenschutz}, function(data) { $("#trovarit_erpkalk_dialog_content").html($.base64Decode(data)).dialog({ close: function (event, ui) { $("#trovarit_erpkalk_dialog_content").dialog("destroy"); }, resizable: false, height: 555, width: 700, modal: true, bgiframe: true, title: title }); unblockScreen(); }) }