Ext.QuickTips.init();Ext.form.Field.prototype.msgTarget="side";Ext.ns("DJIndexes.widget.data.UBSHandbookForm");DJIndexes.widget.UBSHandbookForm=Ext.extend(Ext.FormPanel,{minWidth:"350",maxWidth:"500",defaultConfig:{url:"/DataProxy/HandbookForm.cfc",method:"post",baseParams:{method:"webToCase",formType:"lead"},hiddenFields:[{xtype:"hidden",name:"lead_source",value:"Web"}],additionalParams:[{name:"00N60000001ManW",value:"UBS Handbook Download"}],container:"contact-form",buttonAlign:"center",monitorValid:true,monitorPoll:1000,frame:true,autoHeight:true,collapsible:false,preventBodyReset:true,title:"Handbook Request Form",defaultType:"textfield",bodyStyle:{fontFamily:"Arial",fontSize:".8em",padding:"10px"},defaults:{width:350,invalidText:"This field is required",allowBlank:true}},constructor:function(b,a){this.cls="widget";DJIndexes.widget.UBSHandbookForm.superclass.constructor.call(this,Ext.apply(this.defaultConfig,a));this.add([{fieldLabel:"First Name",name:"first_name",allowBlank:false},{fieldLabel:"Last Name",name:"last_name",allowBlank:false},{fieldLabel:"Email Address",name:"email",vtype:"email",allowBlank:false},{fieldLabel:"Company Name",name:"company",allowBlank:false},{fieldLabel:"Job Title",name:"title"},{fieldLabel:"Street Address",name:"street"},{fieldLabel:"City",name:"city"},{fieldLabel:"State/Province",name:"state"},{fieldLabel:"Zip",name:"zip"},{fieldLabel:"Country",name:"country"},{fieldLabel:"Phone",name:"phone"},{xtype:"label",html:'<h1>License Agreement</h1><p>IMPORTANT! CAREFULLY READ THE FOLLOWING LICENSE AGREEMENT. BY CLICKING ON THE &quot;I ACCEPT&quot; ICON, YOU ARE CONSENTING TO BE BOUND BY AND ARE BECOMING A PARTY TO THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, YOU ARE NOT AUTHORIZED TO ACCESS OR USE THE DOW JONES-UBS COMMODITY INDEX<span class="sm">&#8480;</span> HANDBOOK.</p><p>By clicking &quot;I accept&quot; on the button below, you (the &quot;User&quot;) agree that:</p><ol><li>The Dow Jones-UBS Commodity Index<span class="sm">&#8480;</span> Handbook (the &quot;Handbook&quot;) is confidential, proprietary, and contains trade secrets, and shall not be disclosed or transmitted, in whole or in part, to any other person. User is permitted to access it solely for informational purposes.</li><li>The limited permission being granted to User pursuant to this Agreement extends only to a single copy of the Handbook. No further copies of the Handbook, in whole or in part, may be made by User.</li><li>None of Dow Jones & Company, Inc. (&quot;Dow Jones&quot;), UBS Securities LLC (&quot;UBS&quot;), UBS AG (&quot;UBS AG&quot; and, together with UBS, the &quot;UBS Entities&quot;) or any of their respective subsidiaries or affiliates makes any representation or warranty, express or implied, regarding the Dow Jones-UBS Commodity Index<span class="sm">&#8480;</span> (the &quot;Index&quot;) or the Handbook, including, without limitation, to the owners of, or counterparties to, any security or transaction involving the Index or any member of the public regarding the advisability of investing in securities or commodities generally or in transactions involving the Index particularly. Except for any applicable affiliate relationship, the only relationship of Dow Jones, the UBS Entities or any of their respective subsidiaries or affiliates to an authorized issuer or counterparty in respect of the Index is the licensing of certain trademarks, trade names and service marks and the licensing of the Index, which is determined, composed and calculated by Dow Jones in conjunction with UBS without regard to any person, entity or product involving the Index. Each of the UBS Entities and its affiliates and their respective officers, directors and employees may have positions or engage in transactions in securities or other financial instruments based on or indexed or otherwise related to the Index or modified versions of the Index.</li><li>The Handbook is not intended, and should not be construed, as an offer to sell, or a solicitation of an offer to purchase, any securities or other financial instruments.</li><li>Except as may be agreed in a separate license agreement, no authorization is conferred upon User to issue, market, promote, sell, or otherwise offer any information, security or product based upon or derived, in whole or part, from the Index or the Handbook. Information about obtaining such a license is available from UBS (phone: (203) 719-1157; email: Christopher.Yeagley@ubs.com).</li><li>User acknowledges that all rights in the Index and Handbook are the property of UBS, UBS AG and/or Dow Jones. User shall not remove legends, notices, or markings from copies of the Handbook.</li><li>This limited permission may be revoked at any time and shall be automatically revoked if User violates any of the terms and conditions set forth above.</li></ol><p>By clicking &quot;I accept,&quot; the User becomes a party to an agreement governed by the laws of the State of New York, United States of America.</p>'}]);this.add(this.hiddenFields);try{var d="";Ext.each(this.additionalParams,function(e){d+=e.name+"="+e.value+"|"});if(d){this.add({xtype:"hidden",name:"params",value:d})}}catch(c){}this.addButton({id:"btn-submit",text:"I ACCEPT",type:"submit",scale:"medium",disabled:true,handler:function(){this.form.submit()},scope:this});this.addButton({id:"btn-reset",text:"Reset",type:"reset",scale:"medium",handler:function(){this.form.reset()},scope:this});this.on("clientvalidation",this.validate,this);this.on("beforeaction",this.showProgress,this);this.on("actioncomplete",this.handleFormSubmission,this);this.on("actionfailed",this.handleFormSubmission,this);this.render(b||Ext.get(this.defaultConfig.container))},validate:function(c,b){var a="btn-submit";if(b){Ext.getCmp(a).enable()}else{Ext.getCmp(a).disable()}},showProgress:function(){Ext.MessageBox.show({wait:true,animate:true,minWidth:this.minWidth,maxWidth:this.maxWidth,icon:Ext.MessageBox.INFO,title:"Processing",msg:"Please wait while we process your request."})},handleFormSubmission:function(b,a){if(a.result){if(a.result.success){this.form.reset();Ext.MessageBox.show({minWidth:this.minWidth,maxWidth:this.maxWidth,title:"Thank you",msg:"Thank you for your request. Click OK to download the file.",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO,fn:function(){window.open("http://www.djindexes.com/mdsidx/downloads/ubs/DJUBSCI_handbook.pdf")}})}}else{Ext.MessageBox.show({minWidth:this.minWidth,maxWidth:this.maxWidth,title:"An error has occurred",msg:"An error occurred while submitting your request, please try again.",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING})}}});