/*
 * Coder By Yavuz MERCAN
 * Copyright(c) 2004-2008, Web Technology's
 * yavuz@yavuzmercan.com
 * 
 * http://www.yavuzmercan.com
 */


MyDesktop = new Ext.app.App({
	init :function(){
		Ext.QuickTips.init();
	},

	getModules : function(){
		return [
			new MyDesktop.HakkindaWindow(),
            new MyDesktop.HizmetWindow(),
            new MyDesktop.ReferansWindow(),
            new MyDesktop.BlogWindow(),
            new MyDesktop.ScriptWindow(),
			new MyDesktop.DownloadWindow(),
			new MyDesktop.iletisimWindow()
		];
	},

    getStartConfig : function(){
        return {
            title: 'Yavuz MERCAN',
            iconCls: 'user',
            toolItems: [{
                text:'Ayarlar',
                iconCls:'settings',
				handler:this.createWindow,
                scope:this
            },'-',{
                text:'Cikis',
				iconCls:'logout',
                handler:function(){ window.location = "tab/cikis.html"; },
                scope:this
            }]
        };
		
    }
});




MyDesktop.HakkindaWindow = Ext.extend(Ext.app.Module, {
    id:'hakkinda-win',
    init : function(){
        this.launcher = {
            text: '<b> Hakkinda </b>',
            iconCls:'bogus',
            handler : this.createWindow,
            scope: this,
            windowId:windowIndex
        }
    },

    createWindow : function(src){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('hakkinda-win');
        if(!win){
            win = desktop.createWindow({
			   id:'hakkinda-win',
                title:'..:: Hakkinda ::..    -  Mercan Web Desktop Internet Master',
                width:640,
                height:480,
                html : '<body style="background-color: #D4E6EA"><iframe src="tab/hakkinda.html" height="480" width="640" scrolling="no" name="hakkinda" border="0" frameborder="0"></iframe>',
                iconCls: 'bogus',
                shim:false,
                animCollapse:false,
                constrainHeader:true
            });
        }
        win.show();
    }
});



MyDesktop.HizmetWindow = Ext.extend(Ext.app.Module, {
    id:'hizmet-win',
    init : function(){
        this.launcher = {
            text: '<b> Hizmetler </b>',
            iconCls:'bogus',
            handler : this.createWindow,
            scope: this
        }
    },

    createWindow : function(){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('hizmet-win');
        if(!win){
            win = desktop.createWindow({
                id: 'hizmet-win',
                title:'..:: Hizmetler ::..    -  Mercan Web Desktop Internet Master',
                width:740,
                height:480,
                iconCls: 'bogus',
                shim:false,
                animCollapse:false,
                border:false,
                constrainHeader:true,

                layout: 'fit',
                items:
                    new Ext.TabPanel({
                        activeTab:0,

                        items: [{
                            title: 'Web Tasarim',
                            header:false,
                            html : '<body style="background-color: #D4E6EA"><iframe src="tab/design.html" height="480" width="740" scrolling="no" name="hakkinda" border="0" frameborder="0"></iframe>',
                            border:false
                        },{
							  title: 'Logo Tasarim',
                            header:false,
                            html : '<body style="background-color: #D4E6EA"><iframe src="tab/loading.html" height="480" width="740" scrolling="no" name="hakkinda" border="0" frameborder="0"></iframe>',
                            border:false
                        },{
                            title: 'Web Programciligi',
                            header:false,
                            html : '<body style="background-color: #D4E6EA"><iframe src="tab/webpro.html" height="480" width="740" scrolling="no" name="hakkinda" border="0" frameborder="2"></iframe>',
                            border:false
                        },{
                            title: 'Server Yonetimi',
                            header:false,
                            html : '<body style="background-color: #D4E6EA"><iframe src="tab/server.html" height="480" width="740" scrolling="no" name="hakkinda" border="0" frameborder="2"></iframe>',
                            border:false
                        },{
                            title: 'Web Alan & Domain',
                            header:false,
                            html : '<iframe src="tab/hosting.html" height="480" width="740" scrolling="no" name="hakkinda" border="0" frameborder="2"></iframe>',
                            border:false
						},{
                            title: 'Security System',
                            header:false,
                            html : '<iframe src="tab/security.html" height="480" width="740" scrolling="no" name="hakkinda" border="0" frameborder="2"></iframe>',
                            border:false
                        }]
                    })
            });
        }
        win.show();
    }
});


MyDesktop.ReferansWindow = Ext.extend(Ext.app.Module, {
    id:'referans-win',
    init : function(){
        this.launcher = {
            text: '<b> Referanslar </b>',
            iconCls:'bogus',
            handler : this.createWindow,
            scope: this
        }
    },

    createWindow : function(){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('referans-win');
        if(!win){
            win = desktop.createWindow({
                id: 'referans-win',
                title:'..:: Referanslar ::..    -  Mercan Web Desktop Internet Master',
                width:815,
                height:480,
                iconCls: 'bogus',
                shim:false,
                animCollapse:false,
                border:false,
                constrainHeader:true,

                layout: 'fit',
                items:
                    new Ext.TabPanel({
                        activeTab:0,

                        items: [{
                            title: '-= 2005 =-',
                            header:false,
                            html : '<iframe src="tab/2005.html" height="480" width="815" scrolling="yes" name="hakkinda" border="0" frameborder="0"></iframe>',
                            border:false
                        },{
                            title: '-= 2006 =-',
                            header:false,
                            html : '<iframe src="tab/2006.html" height="480" width="815" scrolling="no" name="hakkinda" border="0" frameborder="2"></iframe>',
                            border:false
                        },{
                            title: '-= 2007 =-',
                            header:false,
                            html : '<iframe src="tab/2007.html" height="480" width="815" scrolling="no" name="hakkinda" border="0" frameborder="2"></iframe>',
                            border:false
						},{
                            title: '-= 2008 =-',
                            header:false,
                            html : '<iframe src="tab/2008.html" height="480" width="815" scrolling="no" name="hakkinda" border="0" frameborder="2"></iframe>',
                            border:false
						},{
                            title: '-= 2009 =-',
                            header:false,
                            html : '<iframe src="tab/2009.html" height="480" width="815" scrolling="no" name="hakkinda" border="0" frameborder="2"></iframe>',
                            border:false
                         },{
                            title: '-= 2010 =-',
                            header:false,
                            html : '<iframe src="tab/2010.asp" height="480" width="815" scrolling="no" name="hakkinda" border="0" frameborder="2"></iframe>',
                            border:false

                        }]
                    })
            });
        }
        win.show();
    }
});


var windowIndex = 0;

MyDesktop.BlogWindow = Ext.extend(Ext.app.Module, {
    id:'blog-win',
    init : function(){
        this.launcher = {
            text: '<b> Projelerim </b>',
            iconCls:'bogus',
            handler : this.createWindow,
            scope: this,
            windowId:windowIndex
        }
    },

    createWindow : function(src){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('blog-win');
        if(!win){
            win = desktop.createWindow({
			   id:'blog-win',
                title:'..:: Projelerim ::..    -  Mercan Web Desktop Internet Master',
                width:800,
                height:520,
                html : '<iframe src="tab/proje.htm" height="515" width="780" scrolling="1" name="hakkinda" border="0" frameborder="0"></iframe>',
                iconCls: 'bogus',
                shim:false,
                animCollapse:false,
                constrainHeader:true
            });
        }
        win.show();
    }
});


MyDesktop.ScriptWindow = Ext.extend(Ext.app.Module, {
    id:'script-win',
    init : function(){
        this.launcher = {
            text: '<b> Pc Yazilim </b>',
            iconCls:'bogus',
            handler : this.createWindow,
            scope: this,
            windowId:windowIndex
        }
    },

    createWindow : function(src){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('script-win');
        if(!win){
            win = desktop.createWindow({
			   id:'script-win',
                title:'..:: Bilgisayar Yazilimlari ::..    -  Mercan Web Desktop Internet Master',
                width:640,
                height:480,
                html : '<iframe src="pcindir/download.asp" height="480" width="640" scrolling="no" name="hakkinda" border="0" frameborder="0"></iframe>',
                iconCls: 'bogus',
                shim:false,
                animCollapse:false,
                constrainHeader:true
            });
        }
        win.show();
    }
});

MyDesktop.DownloadWindow = Ext.extend(Ext.app.Module, {
    id:'download-win',
    init : function(){
        this.launcher = {
            text: '<b> Web Yazilim </b>',
            iconCls:'bogus',
            handler : this.createWindow,
            scope: this,
            windowId:windowIndex
        }
    },

    createWindow : function(src){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('download-win');
        if(!win){
            win = desktop.createWindow({
			   id:'download-win',
                title:'..:: Web Yazilimlari ::..    -  Mercan Web Desktop Internet Master',
                width:640,
                height:480,
                html : '<iframe src="webindir/download.asp" height="480" width="640" scrolling="no" name="hakkinda" border="0" frameborder="0"></iframe>',
                iconCls: 'bogus',
                shim:false,
                animCollapse:false,
                constrainHeader:true
            });
        }
        win.show();
    }
});

MyDesktop.iletisimWindow = Ext.extend(Ext.app.Module, {
    id:'iletisim-win',
    init : function(){
        this.launcher = {
            text: '<b> Iletisim </b>',
            iconCls:'bogus',
            handler : this.createWindow,
            scope: this
        }
    },

    createWindow : function(){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('iletisim-win');
        if(!win){
            win = desktop.createWindow({
                id: 'iletisim-win',
                title:'..:: Iletisim ::..    -  Mercan Web Desktop Internet Master',
                width:450,
                height:450,
                iconCls: 'bogus',
                shim:false,
                animCollapse:false,
                border:false,
                constrainHeader:true,

                layout: 'fit',
                items:
                    new Ext.TabPanel({
                        activeTab:0,

                        items: [{
                            title: 'Bize Yazin',
                            header:false,
                            html : '<body style="background-color: #D4E6EA"><iframe src="tab/iletisim.asp" height="480" width="740" scrolling="no" name="hakkinda" border="0" frameborder="0"></iframe>',
                            border:false
                        },{
                            title: 'Bilgi Alma Formu',
                            header:false,
                            html : '<body style="background-color: #D4E6EA"><iframe src="tab/bilgi.asp" height="480" width="740" scrolling="no" name="hakkinda" border="0" frameborder="2"></iframe>',
                            border:false
                        },{
                            title: 'Oneri & Istek',
                            header:false,
                            html : '<body style="background-color: #D4E6EA"><iframe src="tab/oneri.asp" height="480" width="740" scrolling="no" name="hakkinda" border="0" frameborder="2"></iframe>',
                            border:false
                        }]
                    })
            });
        }
        win.show();
    }
});
