﻿    
     
 //-----------------------------------------------------
 /*   START LAYOUT FOR REGISTRATION                    */
 //-----------------------------------------------------
var Layout_Reg = function () 
 {
    this._TargetLayer  = null;
    this.init = function()
            {
               this.dialog = new Ext.LayoutDialog('Recruiter_Reg_Panel', 
                { 
                    modal:false,
                    width:600,
                    height:600,
                    shadow:false,                    
                    proxyDrag: true,
                    resizable : false,
                    closable : true, 
                    autoScroll:true,
                    center: 
                    {
                        autoScroll:false,
                        tabPosition: 'top',
                        closeOnTab: true,
                        alwaysShowTabs: false,
                        resizeTabs:true
                    }
                });                
                
                this.dialog.addKeyListener(27, this.dialog.hide, this.dialog);
                //this.dialog.addButton('Show Results',this.dialog.hide, this.dialog);
                this.layout = this.dialog.getLayout();
                this.layout.beginUpdate();
                
                this.CVLpanel = new Ext.ContentPanel(
                        Ext.DomHelper.overwrite('divRecruiter_Reg_Form', {
                        tag: 'iframe',
                        Id: 'ifrReg',
                        frameBorder: 0,
                        width: "100%",
                        height: "650px",
                        src: "recruiter_registration.aspx?tp="+this._TargetLayer
                    }),{});

		        this.layout.add('center', new Ext.ContentPanel('divRecruiter_Reg_Form',{title: 'Recruiter Registration'}));             
                this.layout.endUpdate();
                this.dialog.show();
                };   // end initp           

this.hideDialog = function ()
 {
   this.dialog.hide();
  } 
  
  
  this.ShowDialog = function ()
 {
   this.dialog.show();
  }


} //end of  class
     
     
 //-----------------------------------------------------
 /*   END LAYOUT FOR REGISTRATION                     */
 //-----------------------------------------------------



function validateRecruiter(Userame, Password, oFrm)
{

    Ext.Ajax.request({
    url: 'recruiter/ApplicationFilter.aspx?RT=loginchecking',
    disableCaching: true,
    params: {
        username: Userame,
        password: Password
    },
        callback:function(options, success, response){
            if (success)
                {
                    var responseArray = parent.Ext.util.JSON.decode(response.responseText);
                    if (!responseArray.success)
                         alert(responseArray.msg);
                    else {
                    
                     //    location.href = "recruiter.aspx"
                         oFrm.submit();
                    }
                }
        },
        success: function(response, options) {},
        failure: function(response, options) {alert("We are currently experiencing a high volume of traffic and cannot process your request at this time. Please try again later or contact support@theeducationprofessionals.com for assistance." );}
    });
  
  
}