function resizeIframe( height ) {
  var iframe = document.getElementById( "adminFrame");
  iframe.setAttribute( "height", height );
}
// jQuery.rgcookie = function(name, value, options) {
    // if (typeof value != 'undefined') { 
        // options = options || {};
        // if (value === null) {
            // value = '';
            // options.expires = -1;
        // }
        // var expires = '';
        // if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            // var date;
            // if (typeof options.expires == 'number') {
                // date = new Date();
                // date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            // } else {
                // date = options.expires;
            // }
            // expires = '; expires=' + date.toUTCString(); 
        // }

        // var path = options.path ? '; path=' + (options.path) : '';
        // var domain = options.domain ? '; domain=' + (options.domain) : '';
        // var secure = options.secure ? '; secure' : '';
        // document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    // } else { 
        // var cookieValue = null;
        // if (document.cookie && document.cookie != '') {
            // var cookies = document.cookie.split(';');
            // for (var i = 0; i < cookies.length; i++) {
                // var cookie = jQuery.trim(cookies[i]);
                // if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    // cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    // break;
                // }
            // }
        // }
        // return cookieValue;
    // }
// };

jQuery(document).ready( function(){
    
  //jQuery('.loginElement > p > a').text('log out').show();
  jQuery('#toolbar').css('background','#ffffff');
  jQuery('.fieldNote, .fieldInstructions ').hide();
  jQuery('.fieldRow, .fieldBlock').css('padding','0px 2px 0px 0px');

  // callIn();
  // //form submit?
  // if ( jQuery('.button:id$=btnLogin')!=null ) jQuery('.button:id$=btnLogin').click( function() { 
    // jQuery.rgcookie("user", $('.username').val());
  // });
  
  // //alert(jQuery.rgcookie("user"));
  setTimeout("callAsc()",777);
});

// function load(elementId){  
  // setTimeout("callUp('"+elementId+"')",777);
// }

function callUp(elementId){
  jQuery('option').remove(':contains("Blog")');
  jQuery('option').remove(':contains("Donation")');
  jQuery('option').remove(':contains("Evite")');
  jQuery('option').remove(':contains("Calendar")');
  jQuery('option').remove(':contains("Event")');
  callIn();
}

function callAsc(){
  if (jQuery('#toolbar').length > 0 ) {
    jQuery('.dropdown').unbind('focus');
    jQuery('.dropdown').focus( function(){
      callUp(1);
    });
    setTimeout("callAsc()",250);
  }
}


// function callIn()
// {
  // jQuery('a:contains("Add Element")').each( function() {  
    // jQuery(this).attr('href', jQuery(this).attr('href') + '; load("'+ jQuery(this).parent().attr('id') + '");');  
  // });  
// }







