/*
 * Ext JS Library 2.1
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */

function CreateWin_Themeblock(win,winTitle,tabThemeblock,tabActive)
{
    var winWidth = 640;
    var winHeight = 450;
	
	var strClose = 'Fermer'
	//This variable "strGLang_Close" can be set on the JS part of the local script to give the correct language string!
	
	try {
		if (strGLang_Close.length>0){
			strClose = strGLang_Close
		}
	} catch (err){}
	
    if(tabActive!=null)
    {
        tabThemeblock.setActiveTab(tabActive);
    }
    if(!win)
    {
		win = new Ext.Window({
            title: winTitle,
            layout:'fit',
            width:winWidth,
            height:winHeight,
            closeAction:'hide',
            plain: true,
            items: [tabThemeblock],
            buttons:
			[
				{
                    text: strClose,
					handler: function(){
						win.hide();
					}
				}
			]
		});
    }
    return win;
}
