	function openSendHotlineForm() {
		//config***********************************************************************************
		var validationDelayInMillis = 2000;
		var d = new Date();
		var ts = d.getMilliseconds();
		
		//Create error window*****************************************************************************
	    var errWindow = new Ext.Window({
	        title: '<span style="font-size:12px;">Invalid input!</span>',
	        width: 350,
	        height:'auto',
	        layout: 'fit',
	        plain:true,
	        bodyStyle:'padding:5px;',
	        buttonAlign:'center',
	        closeAction: 'hide',
	        html: '',
	
	        buttons: [{
	            text: 'Close',
	            handler: function(){errWindow.hide()},
	            scope: this
	        }]
	    });
		var errMsg = '';
		errWindow.on('show', function(){
			this.body.dom.innerHTML = "<div style='padding:10px;color:red;font-size:12px;'>" + errMsg + "</div>";
		});
		
	    var doSend = function() {
	    	var isVCodeValid = Ext.getCmp('request-form-vcode').isValid();
	    	var isMobileValid = Ext.getCmp('request-form-mobile').isValid();
	    	var isMobileCtryCodeValid = Ext.getCmp('request-form-mobile_ctry_code').isValid();
	    	if (!isVCodeValid || !isMobileValid || !isMobileCtryCodeValid) {
	    		errMsg = 'Some fields contain errors. Please correct them first.';
	    		errWindow.show();
	    		return;
	    	}
			Ext.getCmp('send-hotline-btn').disable();
			sendForm.getForm().submit({
				waitMsg:'Sending...', 
				reset: false, 
				failure: function(form, action) { 
					Ext.getCmp('send-hotline-btn').enable();
					var msg = action.result.msg;
					Ext.Msg.show({
						title: 'Failure', 
						msg: '<span style="color:red">'+msg+'</span>',
						buttons: Ext.Msg.OK,
						minWidth: 400
					});
				}, 
				success: function(form, action) {
					Ext.Msg.show({
						title: 'Success', 
						msg: "<span style='color:green'>The hotline number (+65)66997071 has been sent to " +
								"(+"+Ext.getCmp('request-form-mobile_ctry_code').getValue()+")" +
								+ Ext.getCmp('request-form-mobile').getValue() + "</span>",
						buttons: Ext.Msg.OK,
						minWidth: 400
					});
					Ext.getCmp('content-anchor-tip').destroy();
				} 
			});
	    }
	
		var sendForm = new Ext.FormPanel({
			url: '/RestaurantServlet?action=sendHotline',
	        labelWidth: 100, // label settings here cascade unless overridden
	        labelAlign:'left',
			layout:'column',
			items:[
	            {//******************************mobile no********************************************
	        		columnWidth:.53,
			        border: false,
	        		layout:'form',
	        		style:'padding-left:5px;',
	        		items:[
	        			{
	        				xtype:'numberfield',
			                fieldLabel: 'Mobile no',
		                    width: 40,
							maxLength: 3,
							allowBlank:false,
			                allowDecimals: false,
			                allowNegative: false,
							name: 'request-form-mobile_ctry_code',
			                id: 'request-form-mobile_ctry_code',
			                value:'65'
	        			}
	        		]
	            }
	            ,{
	            	columnWidth:.47,
			        border: false,
	            	layout: 'form',
	                labelWidth: 1,
	                items: [{
	                    xtype:'numberfield',
	                    width: 110,
	                    fieldLabel: '',
	                    labelSeparator: '',
	                    maxLength: 16,
						allowBlank:false,
		                allowDecimals: false,
		                allowNegative: false,
	                    id: 'request-form-mobile',
	                    name: 'request-form-mobile'
	                }]
	            }
	            ,{
	            	columnWidth:1,
			        border: false,
			        style:'line-height:1px;',
			        html:'&nbsp;'
	            }
	            ,{//******************************verification code********************************************
	        		columnWidth:.55,
			        border: false,
	        		style:'padding-left:5px;',
	        		layout:'form',
	        		items:[
	        			{
	        				xtype:'textfield',
			                fieldLabel: 'Verification code',
			                validationDelay: validationDelayInMillis,
			                allowBlank: false,
	        				width: 40,
	        				minLength: 4,
	        				minLengthText: 'Length must be 4.',
	        				maxLength: 4,
	        				maxLengthText: 'Length must be 4.',
	        				name: 'request-form-vcode',
			                id: 'request-form-vcode'
	        			}
	        		]
	            }
	            ,{
	        		columnWidth:.45,
			        border: false,
	        		items:[
	        			{
		                	xtype:'panel',
					        border: false,
		                	style:'font-size:12px;',
		                    html: '<img src="/ValidationJPGServlet?action=send_hotline&ts='+ts+'" width="110" height="23" align="top" border="0" />'
	        			}
	        		]
	            }
			]
	        ,keys: [{
	            key: Ext.EventObject.ENTER,
	            fn: doSend
	        }]
	        ,buttonAlign:'center'
			,buttons: [
				{
					id:'send-hotline-btn',
					text:'<b>Send</b>',
					handler:doSend
				}
			]
		});
		
		if (!Ext.getCmp('content-anchor-tip')) {
		    var toolTip = new Ext.ToolTip({        
		        id: 'content-anchor-tip',
		        target: 'send_hotline_to_mobile',
		        anchor: 'top',
		        width: 300,
		        autoHide: false,
		        closable: true,
		        html:null,
		        items:[
		        	sendForm
		        ]
		    });
		    toolTip.on('hide', function(){
				if (Ext.getCmp('content-anchor-tip')) {
					Ext.getCmp('content-anchor-tip').destroy();
				}
		    });
		    toolTip.on('show', function(){
		    	Ext.getCmp('request-form-mobile').focus();
		    });
		    toolTip.show();
		}
	}

