//Prototype!
function ForgotPassword(){
Effect.toggle('ajax_forgot_password_wrapper', 'blind');
Effect.toggle('ajax_login_form_wrapper', 'blind');
}
var PathToImages = 'http://www.fdm.dk//sites/all/modules/propeople/ajax_search/images/';
var ImageLoader = '
';
function Hide() {
$('build_login_block').hide();
}
function checkInTxtField(evnt) {
if(this.value==this.defValue) this.value="";
}
function checkOutTxtField(evnt) {
if(this.value=="") {
this.value=this.defValue;
}
}
function applyInOutFields() {
var textFields = $$('.h5-login-box input[type=text]');
if(textFields) {
for(var i=0; i < textFields.length; i++) {
if (textFields[i].value.length > 0) {
textFields[i].defValue = textFields[i].value;
textFields[i].onfocus = checkInTxtField;
textFields[i].onblur = checkOutTxtField;
}
}
}
}
Event.observe( window, 'load', function () {
var loginform;
var forgotform;
function completeHandlerLogin(response) {
loginform['enable']();
result = new String(response.responseText);
if(result.match("error")) {
$('loading_wrapper_login').update('');
$('action-wrapper').show();
alert("Forkert brugernavn/adgangskode! Prøv venligst igen, eller benyt funktionen Glemt adgangskode i loginboksen. ");
}
else {
Hide();
top.window.location.reload();
}
}
function completeHandlerPass(response) {
forgotform['enable']();
result = new String(response.responseText);
if(result.match("error")) {
$('loading_wrapper_forgot').update('');
$('action-wrapper-forgot').show();
alert("Den indtastede e-mail er ikke i FDMs system. Prøv venligst igen med en anden e-mail-adresse eller ring til FDM salg og medlemsservice på telefon 70 13 30 40");
}
else {
Hide();
top.window.location.reload();
}
}
if($('thickbox_custom_link')) {
$('build_login_block').update('