function showHelp(element, windowname, helpref) {
    var helpwindow = new Ext.Window({
        title: windowname
        ,width:500
        ,height:300
        ,minWidth: 300
        ,minHeight: 200
        ,layout: 'fit'
        ,plain:true
        ,buttonAlign:'right'
        ,modal:false
        //,animateTarget:element
        ,constrain: true
        ,animCollapse:true
        ,autoScroll:true
        ,closeAction:'hide'
        ,closable: false
        ,items: new Ext.TabPanel({
                    autoLoad:{
                       //url: '/vcv/helptext/popup.do?property='+helpref
                       url: '/vcv/vcv/tiles/help.jsp'
                       ,timeout: 5
                       ,text: 'Loading...'
                    }
                    ,timeout: 5
                    ,deferredRender:false
                    ,border:false
                    ,autoScroll:true
                })
        ,buttons: [{
            text: 'Ok'
            ,handler: function(){
                helpwindow.hide();
                // Under firefox and IE7 we need to show the advertisements again.
                if (!Ext.isIE6) {
                    showElementsToHide();
                }
             }
         }]
    });
    helpwindow.show();
    // Under firefox and IE7 the advertisement blocks the helppopup. Make it hidden.
    if (!Ext.isIE6) {
        hideElementsToHide();
    }
}

function hideElementsToHide() {
    var elementstohide = Ext.query(".hideonpopup");
    Ext.each(elementstohide, function(the_element) {
        Ext.get(the_element).hide();
    }, this);
}
function showElementsToHide() {
    var elementstohide = Ext.query(".hideonpopup");
    Ext.each(elementstohide, function(the_element) {
        Ext.get(the_element).show();
    }, this);
}

