/*
 * Ext JS Library 2.0.1
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * gathered sakrist
 *
 * vladimir@injoit.com 
 *
 * http://injoit.com
 */

function extshow() {

Ext.onReady(function(){

    Ext.QuickTips.init();

    // turn on validation errors beside the field globally
    Ext.form.Field.prototype.msgTarget = 'side';
    
    
    var bd = Ext.getBody();

var corp = new Ext.data.SimpleStore({
    fields: ['name',4],
   // data : Ext.exampledata.states // from states.js
    data : [['logo'], ['booklet'], ['business card'], ['corporate ID'], ['poster'], ['outdoor advertisement']],
    name: 'name'
	                             
});



    var tab = new Ext.FormPanel({
        method: 'POST',
	url : 'index.php',
	labelAlign: 'top',
        title: 'Get A Quote',
        bodyStyle:'padding:5px',
        width: 600,
        items: [{
            layout:'column',
            border:false,
            items:[{
                columnWidth:.5,
                layout: 'form',
                border:false,
                items: [{
                    xtype:'textfield',               	
                    fieldLabel: 'Full Name',
                    name: 'Full_Name',
                    anchor:'95%'
                }, {
                    xtype:'textfield',
                    fieldLabel: 'Phone / Fax',
                    name: 'Phone_Fax',
                    anchor:'95%'
                }]
            },{
                columnWidth:.5,
                layout: 'form',
                border:false,
                items: [{
                    xtype:'textfield',
                    fieldLabel: 'Organization / Position',
                    name: 'Organization_Position',
                    anchor:'95%'
                },{
                    xtype:'textfield',
                    fieldLabel: 'Email',
                    name: 'Email',
                    vtype:'email',
                    anchor:'95%'
                }]
            }]
        },{
            xtype:'tabpanel',
            plain:true,
            activeTab: 0,
            height:400,
            defaults:{bodyStyle:'padding:10px;float:right'},
            items:[{
                title:'Design',
                layout:'column',
                defaults: {width: 230},
		border: false,
                //defaultType: 'textfield',
            items:[{
                columnWidth:.5,
                layout: 'form',
                border:false,

                items: [
		    new Ext.form.ComboBox({
		        store: corp,
		        displayField:'name',
		        fieldLabel: 'What is your need',
		        mode: 'local',
			//name: 'What_is_your_need',
		        triggerAction: 'all',
		        emptyText:'Select an answer...',
		        selectOnFocus:true
		    })
              	,{             
                    fieldLabel: 'Product / services description',
                    name: 'Product_services_description',
                    xtype:'textfield',
		    anchor:'95%'
                },{
                    fieldLabel: 'Type of information',
                    name: 'Type_of_information',
                    xtype:'textfield',
		    anchor:'95%'
                }, {
                    fieldLabel: 'Color range',
                    name: 'Color_range',
                    xtype:'textfield',
		    anchor:'95%'
                },{
                    fieldLabel: 'Design examples',
                    name: 'Design_examples',
                    value: 'show us the designs you like',
		    xtype:'textfield',
		    anchor:'95%'
		    
                },{
                    fieldLabel: 'Existing corporate ID elements',
                    name: 'Existing_corporate_ID_elements',
                    xtype:'textfield',
		    anchor:'95%'
		}]
		
		},{
		
                columnWidth:.5,
                layout: 'form',
                border:false,
		defaults: {width: 270},
                items: [{
                    fieldLabel: 'Competitors / Partners',
                    name: 'Competitors_Partners',
                    xtype:'textfield',
                },{
                    fieldLabel: 'Comments',
                    name: 'Comments',
                    xtype:'textfield',
		    anchor:'95%'
                }]
	    }]
            },{
	    
	    
	    defaults: {width: 230},
            title:'Web-Design',
            layout:'column',
            border:false,
            items:[{
                columnWidth:.5,
                layout: 'form',
                border:false,
                items: [{
		    xtype:'textfield',
		    fieldLabel: 'Existing web site address',
                    name: 'Existing_web_site_address',
                    value: '',
		    anchor:'95%'
                },{
		    xtype:'textfield',               	
                    fieldLabel: 'Planned domain name',
                    name: 'Planned_domain_name',
		    anchor:'95%'
                },{
		    xtype:'textfield',               	
                    fieldLabel: 'Product / Services description',
                    name: 'Product_Services_description',
		    anchor:'95%'
                },{
		    xtype:'textfield',               	
                    fieldLabel: 'Type of information',
                    name: 'Type_of_information',
		    anchor:'95%'
                },{
		    xtype:'textfield',               	
                    fieldLabel: 'Color range',
                    name: 'Web-Design_Color_range',
		    anchor:'95%'
                },{
		    xtype:'textfield',               	
                    fieldLabel: 'Website examples',
                    name: 'Website_examples',
                    value: 'show us the websites you like',
                    anchor:'95%'
                }]
            },{
                columnWidth:.5,
                layout: 'form',
                border:false,
                items: [{
		    xtype:'textfield',               	
                    fieldLabel: 'Existing corporate ID elements',
                    name: 'Existing_corporate_ID_elements',
                    anchor:'95%'
    		},{
		    xtype:'textfield',               	
                    fieldLabel: 'Site structure',
                    name: 'Site_structure',
                    anchor:'95%'
                },{
		    xtype:'textfield',               	
                    fieldLabel: 'Competitors / partners',
                    name: 'Competitors_partners',
                    anchor:'95%'
                },{
		    xtype:'textfield',               	
                    fieldLabel: 'Comments',
                    name: 'Web-design_Comments',
                    anchor:'95%'
                },
		    new Ext.form.Checkbox({
		    name: 'Web-design_Support',
		    fieldLabel: 'Support',
		    hideLabels:true
		    }) 
		]
            }]
			
            },{
                title:'Software Development',
                layout:'form',
                defaultType: 'textfield',
                defaults: {width: 230},
                items: [{
                    fieldLabel: 'What is your need',
                    name: 'What_is_your_need',
                    value: 'software, script ...'
                },{
                    fieldLabel: 'Developing environment',
                    name: 'Developing_environment'
                },{
                    fieldLabel: 'Technologies',
                    name: 'Technologies'
                },{
                    fieldLabel: 'Database',
                    name: 'Database'
                },{
                    fieldLabel: 'Execution terms',
                    name: 'Execution_terms'
                },{
                    fieldLabel: 'Details',
                    name: 'Details'
                },
		    new Ext.form.Checkbox({
		    name: 'Software_Development_Support',
		    fieldLabel: 'Support',
		    hideLabels:true
		    }) 
		]
            },{
                title:'SEO',
                layout:'column',
                defaults: {width: 230},
		border:false,

                items:[{
                columnWidth:.5,
                layout: 'form',
                border:false,
                items: [{
		    xtype:'textfield',
                    fieldLabel: 'Describe your business',
                    name: 'Describe_your_business',
                    value: 'i.e. what are you selling, what type of services do you provide etc.',
		    anchor:'95%'
                },{
		    xtype:'textfield',
                    fieldLabel: 'Who are your potential customers',
                    name: 'Who_are_your_potential_customers',
		    anchor:'95%'
                },{
		    xtype:'textfield',
                    fieldLabel: 'Geography of your business',
                    name: 'Geography_of_your_business',
		    value: 'If true, please specify them',
		    anchor:'95%'
                },{
		    xtype:'textfield',
                    fieldLabel: 'Describe the aim of your website promotion',
                    name: 'Describe_the_aim_of_your_website_promotion',
		    value: 'i.e. increase sales, receive more traffic, achieve more long-term projects, etc.',
		    anchor:'95%'
                },{
		    xtype:'textfield',
                    fieldLabel: 'Can you specify some keywords for website',
                    name: 'Can_you_specify_some_keywords_for_website',
		    anchor:'95%'
                },{
		    xtype:'textfield',
                    fieldLabel: 'Do you have server statistics scripts installed',
                    name: 'Do_you_have_server_statistics_scripts_installed',
		    value: 'i.e. Awstats, Webalizer etc.',
		    anchor:'95%'
                },{
		    xtype:'textfield',
                    fieldLabel: 'Can you provide FTP access to your website',
                    name: 'Can_you_provide_FTP_access_to_your_website',
		    anchor:'95%'
                }]
            },{
                columnWidth:.5,
                layout: 'form',
                border:false,
		
                items: [{
		    xtype:'textfield',
                    fieldLabel: 'Can you provide access to control panel of your website',
                    name: 'Can_you_provide_access_to_control_panel_of_your_website',
		    anchor:'95%'
                },{
		    xtype:'textfield',
                    fieldLabel: 'How can we monitor your sales or another goals achievement',
                    name: 'How_can_we_monitor_your_sales_or_another_goals_achievement',
		    value: 'please dont sign anything if you havent selected Off-page optimization or PPC campaign',
		    anchor:'95%'
                },{
		    xtype:'textfield',
                    fieldLabel: 'What is your monthly budget',
                    name: 'What_is_your_monthly_budget',
		    anchor:'95%'
                },
		new Ext.form.Checkbox({
		    name: 'Seo_-_Audit',
		    fieldLabel: 'SEO - Audit',
		    hideLabels:true
		}),
		new Ext.form.Checkbox({
		    name: 'On_-_page_optimization',
		    fieldLabel: 'On - page optimization',
		    hideLabels:true
		}),    
		new Ext.form.Checkbox({
		    name: 'Off_-_page_optimization',
		    fieldLabel: 'Off - page optimization',
		    hideLabels:true
		}),
		new Ext.form.Checkbox({
		    name: 'PPC_campaign_setup_and_maintenance',
                    fieldLabel: 'PPC campaign setup and maintenance',
                    name: 'fax',
		    hideLabels:true
		})
                ]
            }]
            },{
                cls:'x-plain',
                title:'FeedBack',
                layout:'fit',
                items: {
                    xtype:'htmleditor',
		    name: 'feedback',
                    id:'bio2',
                    fieldLabel:'FeedBack'
                }
            }]
        }],
	
    buttons: [{
    	    text: 'Send',
    	    handler: function(){
	    if (tab.getForm().isValid()) {
	          tab.getForm().submit();
	        // Ext.MessageBox.alert('Sending...', 'Sending...');
		 //document.getElementById("getaqoute").innerHTML = " ";
		 hide(1);
	    } else {
	          Ext.MessageBox.alert('Errors', 'Please fill in fields before saving..');
	    }
				     
	}
    },{
	text: 'Close',
    	handler: function(){
	    hide(0);
	}
    }]
			      
    });
        tab.render(document.getElementById("getaquote"));
});

}
