<!-- js_raiffeisen_at_b.js - start -->
<!--


function sendgeneratedform(formname) {
 
//alert(document.getElementsByName(formname)[0].name);
top.document.getElementsByName(formname)[0].action = targetfeature;
top.document.getElementsByName(formname)[0].target = "_top";
	

}

function loginValues(fieldname, fieldpassword, defaultValue, option, optionValue) {
	
	//Clears the defaultvalue of the field 'fieldname';
	//if option is 'pass' the type is changed to 'password';
	//if option is 'maxlength' maxlength is set to 'optionValue;
		document.getElementById(fieldname).value = "";
		
		if (option == 'pass')
		{
			document.getElementById(fieldname).style.display = "none";
			document.getElementById(fieldpassword).style.display = "block";
			document.getElementById('pwdinput').focus();
		}
		else if (option== 'maxlength')
		{
			document.getElementById(fieldname).maxLength = optionValue;
		}
}


/*
 * jQuery Cookie
 */
jQuery.cookie = function (key, value, options) {
    
    // key and at least value given, set cookie...
    if (arguments.length > 1 && String(value) !== "[object Object]") {
        options = jQuery.extend({}, options);

        if (value === null || value === undefined) {
            options.expires = -1;
        }

        if (typeof options.expires === 'number') {
            var days = options.expires, t = options.expires = new Date();
            t.setDate(t.getDate() + days);
        }
        
        value = String(value);
        
        return (document.cookie = [
            encodeURIComponent(key), '=',
            options.raw ? value : encodeURIComponent(value),
            options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
            options.path ? '; path=' + options.path : '',
            options.domain ? '; domain=' + options.domain : '',
            options.secure ? '; secure' : ''
        ].join(''));
    }

    // key and possibly options given, get cookie...
    options = value || {};
    var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
    return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
};

jQuery(document).ready(function(){

/*
 * hidden dialog settings & cookie
 */
	$(".hiddenDialog").dialog({
		bgiframe: true,
		modal: true,
		autoOpen: false,
		draggable: false,
		resizable: false,
		width: 520,
		minHeight: 300,
		maxHeight: 600,
		buttons: {
			"Ok": function(){
				$(this).dialog("close");
				$.cookie($(this).attr("id"),"accepted", {path:'/'});
			}
		},
		open: function(event, ui) {
			 $(this).closest('.ui-dialog').find('.ui-dialog-titlebar-close').hide();			 
		},
		title: "Hinweis",
		closeOnEscape: false
	});
	if($(".hiddenDialog").attr("id") && ($.cookie($(".hiddenDialog").attr("id"))!="accepted")){
		$(".hiddenDialog").dialog("open");
	}
});


//-->
<!-- js_raiffeisen_at_b.js - end -->
