﻿// JScript File

/* This file is used for Find a Course functionality */


 function searchResult()
    {
        var varCourseTypeSelIndex= document.getElementById('dplCourseType').selectedIndex;
        var varCourseType = document.getElementById('dplCourseType').options[varCourseTypeSelIndex].text;
        
        var varCourseAreaSelIndex= document.getElementById('dplCourseArea').selectedIndex;
        var varCourseArea = document.getElementById('dplCourseArea').options[varCourseAreaSelIndex].text;
    /*
	    var x= document.frmAb.dplCourseArea.selectedIndex;
	    var valArea = document.frmAb.dplCourseArea.options[x].text;
	    var w = document.frmAb.dplCourseType.selectedIndex;
        var selCourse = document.frmAb.dplCourseType.options[w].text;
   */      
        if(varCourseType=='Undergraduate')
        {
	        switch (varCourseArea) 
	        {
            case "Bachelor of Arts": location.href = 'Admissions_UG_Prog.htm';
                            break;
            case "Bachelor of Commerce": location.href = 'Admissions_UG_Prog.htm';
                            break;
            case "Bachelor of Science": location.href = 'Admissions_UG_Prog.htm';
                            break;
            case "Bachelor of Computer Application": location.href = 'Admissions_UG_Prog.htm';
                            break;
            case "Bachelor of Business Management": location.href = 'Admissions_UG_Prog.htm';
                            break;
            case "Bachelor of Engineering": location.href = 'Admissions_UG_Prog.htm';
                            break;
            case "Bachelor of Media Studies": location.href = 'Admissions_UG_Prog.htm';
                            break;
            case "Bachelor of Interior Design": location.href = 'Admissions_UG_Prog.htm';
                            break;                
            default: alert('Sorry! Search Results Not Found');
            }
        }
        else if(varCourseType=='Postgraduate')
        {
	        switch (varCourseArea) 
	        {
            case "Master of Science (M.Sc)": location.href = 'Admissions_PG_Prog.htm';
                            break;
            case "Master of Arts (MA)": location.href = 'Admissions_PG_Prog.htm';
                            break;
            case "Master of Commerce (M.Com)": location.href = 'Admissions_PG_Prog.htm';
                            break;
            case "Master of Technology (M.Tech)": location.href = 'Admissions_PG_Prog.htm';
                            break;
            case "Master of Computer Application (MCA)": location.href = 'Admissions_PG_Prog.htm';
                            break;
            case "Master of Business Administration (MBA)": location.href = 'Admissions_PG_Prog.htm';
                            break;
            case "MS Engineering": location.href = 'Admissions_PG_Prog.htm';
                            break;
            case "Master of Technology (M.Tech) – Evening": location.href = 'Admissions_PG_Prog.htm';
                            break;
            case "Master of Visual Arts (MVA)": location.href = 'Admissions_PG_Prog.htm';			
                            break;
            case "MS Communication": location.href = 'Admissions_PG_Prog.htm';
                            break;
            case "Post Graduate Diploma (PG)": location.href = 'Admissions_PG_Prog.htm';
                            break;           
            default: alert('Sorry! Search Results Not Found');
            }
        }
		 else if(varCourseType=='Research Programmes')
        {
	        switch (varCourseArea) 
	        {
            case "Master of Philosophy": location.href = 'Admissions_Res_MPhil.htm';
                            break;
            case "Doctor of Philosophy": location.href = 'Admissions_Res_PhD.htm';
                            break;                 
            default: alert('Sorry! Search Results Not Found');
            }
        }
       
    }
    
    function setCourseArea()
    {
        var list  = document.getElementById('dplCourseArea');

          
            if(list.options.length > 0)
            {
                for(var i = list.options.length - 1; i >= 0; i--)
                {
                        list.remove(i);
                }
            }
         
        var obj = document.getElementById('dplCourseType');
        if((obj.options[obj.selectedIndex].value=='Undergraduate'))
        {
	list.options[list.options.length] = new Option('Bachelor of Arts ', 'BA');
	list.options[list.options.length] = new Option('Bachelor of Commerce', 'BCom');
	list.options[list.options.length] = new Option('Bachelor of Science', 'BSc');
            list.options[list.options.length] = new Option('Bachelor of Computer Application','BCA');

            list.options[list.options.length] = new Option('Bachelor of Business Management','BBM');
          
            list.options[list.options.length] = new Option('Bachelor of Engineering','BE');
                 
           list.options[list.options.length] = new Option('Bachelor of Media Studies','BMS');
            
            list.options[list.options.length] = new Option('Bachelor of Interior Design','BID');           

        }
       else if((obj.options[obj.selectedIndex].value=='Postgraduate'))
       {
	list.options[list.options.length] = new Option('Master of Science (M.Sc)', 'M Sc');
	list.options[list.options.length] = new Option('Master of Arts (MA)', 'MA');

            list.options[list.options.length] = new Option('Master of Commerce (M.Com)', 'M Com');

            list.options[list.options.length] = new Option('Master of Technology (M.Tech)', 'M Tech');
   
            list.options[list.options.length] = new Option('Master of Computer Application (MCA)', 'MCA');
   
           list.options[list.options.length] = new Option('Master of Business Administration (MBA)', 'MBA');
   
            list.options[list.options.length] = new Option('MS Engineering','MSE');
   
            list.options[list.options.length] = new Option('Master of Technology (M.Tech) – Evening','M Tech');
   
            list.options[list.options.length] = new Option('Master of Visual Arts (MVA)','MVA');
   
            list.options[list.options.length] = new Option('MS Communication','MSComm');
   
            list.options[list.options.length] = new Option('Post Graduate Diploma (PGD)','PGD');   
                
       }
	   else ((obj.options[obj.selectedIndex].value=='Research'))
       {
	list.options[list.options.length] = new Option('Master of Philosophy', 'MPhil');
	list.options[list.options.length] = new Option('Doctor of Philosophy', 'DPhil');            
                
       }
    }


