Content-Type: text/html
[% IF cookie %]Set-Cookie: [% cookie %][% END %]

<?xml version="1.0" encoding="utf-8" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-transitional.dtd">
<html xml:lang="[% iso639 = locale.match('^(.)(.)'); iso639.0; iso639.1 %]" xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
  
<link rel="icon" type="image/png" href="resources/images/favicon.png" />

<!-- Foundation css -->
<link rel="stylesheet" type="text/css" href="resources/foundation/css/normalize.css">
<link rel="stylesheet" type="text/css" href="resources/foundation/css/foundation.css">

<link href="resources/jquery.steps.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="resources/jquery-ui-1.11.1/jquery-ui.min.css" />
<link rel="stylesheet" type="text/css" href="resources/css/style.css" />

<script type="text/javascript" src="resources/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="resources/jquery-ui-1.11.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="resources/jquery.validate.1.13.0.min.js"></script>
<script type="text/javascript" src="resources/jquery.cookie-1.4.1.min.js"></script>
<script type="text/javascript" src="resources/jquery.steps.1.1.0.min.js"></script>

<SCRIPT TYPE="text/javascript"> 
<!--

  // To confirm on a link (A HREF)
  function request_confirm_link(my_url, my_message) {
    question = confirm(my_message);
    if (question !="0") {
         top.location = my_url;
    }
  }

function showhide(div){
    var oDiv = document.getElementById(div);
    if(oDiv.style.display == "none"){
        oDiv.style.display = "block";
    }else{
        oDiv.style.display = "none";
    }
}

function hide(div) {
    var oDiv = document.getElementById(div);
    oDiv.style.display = "none";
}

jQuery(function($){

    $.widget( "custom.combobox", {
        _create: function() {
            this.wrapper = $( "<span>" )
            .addClass( "custom-combobox" )
            .insertAfter( this.element );

            this.element.hide();
            this._createAutocomplete();
            this._createShowAllButton();
        },

        _createAutocomplete: function() {
            var selected = this.element.children( ":selected" ),
                value = selected.val() ? selected.text() : "";

            this.input = $( "<input>" )
                .appendTo( this.wrapper )
                .val( value )
                .attr( "title", "" )
                .addClass( "custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left error required" )
                .autocomplete({
                    delay: 0,
                    minLength: 0,
                    source: $.proxy( this, "_source" )
                })
                .tooltip({
                    tooltipClass: "ui-state-highlight"
            });

            this._on( this.input, {
                autocompleteselect: function( event, ui ) {
                    ui.item.option.selected = true;
                    this._trigger( "select", event, {
                        item: ui.item.option
                    });
                },
 
                autocompletechange: "_removeIfInvalid"
            });
        },

        _createShowAllButton: function() {
            var input = this.input,
            wasOpen = false;
    
            $( "<a>" )
                .attr( "tabIndex", -1 )
                .attr( "title", "Show All Items" )
                .tooltip()
                .appendTo( this.wrapper )
                .button({
                    icons: {
                        primary: "ui-icon-triangle-1-s"
                    },
                    text: false
                })
                .removeClass( "ui-corner-all" )
                .addClass( "custom-combobox-toggle ui-corner-right" )
                .mousedown(function() {
                    wasOpen = input.autocomplete( "widget" ).is( ":visible" );
                })
                .click(function() {
                    input.focus();
            
                    // Close if already visible
                    if ( wasOpen ) {
                    return;
                    }
            
                    // Pass empty string as value to search for, displaying all results
                    input.autocomplete( "search", "" );
                });
        },
        
        _source: function( request, response ) {
            var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
            response( this.element.children( "option" ).map(function() {
                var text = $( this ).text();
                if ( this.value && ( !request.term || matcher.test(text) ) )
                    return {
                        label: text,
                        value: text,
                        option: this
                    };
            }) );
        },
        
        _removeIfInvalid: function( event, ui ) {
 
            // Selected an item, nothing to do
            if ( ui.item ) {
                return;
            }

            // Search for a match (case-insensitive)
            var value = this.input.val(),
                valueLowerCase = value.toLowerCase(),
                valid = false;
            this.element.children( "option" ).each(function() {
                if ( $( this ).text().toLowerCase() === valueLowerCase ) {
                    this.selected = valid = true;
                    return false;
                }
            });
            
            // Found a match, nothing to do
            if ( valid ) {
                return;
            }
            
            // Remove invalid value
            this.input
                .val( "" )
                .attr( "title", value + " didn't match any item" )
                .tooltip( "open" );
            this.element.val( "" );
            this._delay(function() {
                this.input.tooltip( "close" ).attr( "title", "" );
            }, 2500 );
            this.input.autocomplete( "instance" ).term = "";
        },

        _destroy: function() {
            this.wrapper.remove();
            this.element.show();
        }
    });
});

//-->      
</SCRIPT>


<title> [% PROCESS 'templates/web/title.tt2.html' %] </title>

</head>

<body>
<div id="header">
	<ul>
		<li class="logo align-left"><a href="/accountmanager" title="[% conf.app_name %] home page"><img alt="eduGAIN logo" width="200" src="/resources/images/edugain_logo.png "/></a></li>
		<li>&nbsp;</li>
		<li class="logo align-right"><a href="http://www.geant.net" title="Géant home page" target="_blank"><img alt="GEANT logo" width="100" src="/resources/images/geant_logo_rgb_300dpi.jpg"/></a></li>
	</ul>
	<div class="title">
		<span class="hide-for-small"><h1>[% PROCESS 'templates/web/title.tt2.html' %]</h1></span>
	</div>
</div>


<div id="wrapper">
 
	<!--<div id="bandeau">
		<div class="logo">
			<img alt="GEANT logo" width="150" src="/resources/geant_logo_rgb_300dpi.jpg"/>
		</div>
	</div>-->     

  <div id="content">

[% IF errors %]
<div class="ui-widget">
[% PROCESS 'templates/web/errors.tt2.html' %]
</div>
[% ELSE %]


[% IF notifications %]
<div class="ui-widget">
[% PROCESS 'templates/web/notices.tt2.html' %]
</b></div>
[% END %] <!-- notifications -->

[% PROCESS 'templates/web/content.tt2.html' %]

[% END %] <!-- IF errors -->

<p>

[% IF dump %]
DUMP :<br>

 [% USE Dumper %]
 [% Dumper.dump_html(dump) %]
</p>
[% END %]

		<div>

<div id="footer">
	<div class="row align-center">
	<span>[% conf.app_name %] [% conf.version %]</span>
	</div>
</div>
		</div>
	</div>
</div>

            <script src="resources/foundation/js/foundation.min.js"></script>
			<script src="resources/foundation/js/foundation/foundation.tooltip.js"></script>
            <script>
                $(document).foundation();
            </script>   


</div>
</body>
</html>