﻿// JScript File

function loadMenu()
{
    var menulist;
    //alert("asdf");
    //document.getElementById("dhtmlgoodies_menu").innerHTML="Hello";
    menulist="<ul id='sidebarmenu1' >"
//                        menulist+="<li><a href='#'>Study in UK</a></li>"
//                        menulist+="<li>.......................................</li>"                         
                        menulist+="<li style='border-bottom:dotted 1px #000000;' ><a href='uk.htm'>Study in UK<img src='images/right_arrow.gif' style='border:0px;' /></a>"
                             menulist+="<ul>"
                                menulist+="<li><a href='uk.htm' style='text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Why UK?</a>"                                    
                                menulist+="</li>"
                                menulist+="<li><a href='uk_Lifestyle.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Lifestyle</a>"                                     
                                menulist+="</li>"
                                menulist+="<li><a href='uk_cost.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Cost of Studing and Living</a>"                                    
                                menulist+="</li>"                               
                                menulist+="<li><a href='uk_University.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Universities</a>"                                                           
                                menulist+="</li>"  
                                menulist+="<li><a href='uk_accomodation.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Accomodation</a>"                                                           
                                menulist+="</li>" 
                                menulist+="<li><a href='uk_visas.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Visas</a>"                                                           
                                menulist+="</li>"  
                                menulist+="<li><a href='uk_working.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Working In UK</a>"                                                           
                                menulist+="</li>"      
                                menulist+="<li><a href='uk_apply.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> How To Apply</a>"                                                           
                                menulist+="</li>"                             
                            menulist+="</ul>"
                        menulist+="</li>"
                         menulist+="<li style='border-bottom:dotted 1px #000000;'><a href='usa.htm'>Study in USA<img src='images/right_arrow.gif' style='border:0px;' /></a>"
                             menulist+="<ul>"
                                menulist+="<li><a href='usa.htm' style=' border:0px; text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Why USA?</a>"                                    
                                menulist+="</li>"                                
                                menulist+="<li><a href='usa_education.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Education System</a>"                                                           
                                menulist+="</li>"
                                menulist+="<li><a href='usa_lifestyle.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Lifestyle</a>"                                     
                                menulist+="</li>"  
                                menulist+="<li><a href='usa_cost.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Cost of Studing and Living</a>"                                    
                                menulist+="</li>"  
                                menulist+="<li><a href='usa_inst.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Institutions</a>"                                                           
                                menulist+="</li>"                                 
                                menulist+="<li><a href='usa_admission.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Addmission Procedure</a>"                                                                                                                                                      
                                menulist+="</li>" 
                                menulist+="<li><a href='usa_visas.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Visas</a>"                                                           
                                menulist+="</li>"                              
                            menulist+="</ul>"
                        menulist+="</li>"
                        
                          menulist+="<li style='border-bottom:dotted 1px #000000;'><a href='why_canada.htm'>Study in Canada<img src='images/right_arrow.gif' style='border:0px;' /></a>"
                             menulist+="<ul>"
                                menulist+="<li><a href='why_canada.htm' style=' border:0px; text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Why Canada?</a>"                                    
                                menulist+="</li>"                                
                                menulist+="<li><a href='can_edu_sys.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Candidate Education System</a>"                                                           
                                menulist+="</li>"
                                menulist+="<li><a href='can_life.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Lifestyle</a>"                                     
                                menulist+="</li>"  
                                menulist+="<li><a href='can_cost.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Cost of Studing and Living</a>"                                    
                                menulist+="</li>"  
                                menulist+="<li><a href='can_insti.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Institutions</a>"                                                           
                                menulist+="</li>"                                 
                                menulist+="<li><a href='can_adm.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Addmission Requirements</a>"                                                                                                                                                      
                                menulist+="</li>" 
                                menulist+="<li><a href='can_visa.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Visas</a>"                                                           
                                menulist+="</li>"
                                menulist+="<li><a href='can_working.htm' style=' text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Working In Canada </a>"                                                           
                                menulist+="</li>"
                            menulist+="</ul>"
                        menulist+="</li>"
                         
                        menulist+="<li style='border-bottom:dotted 1px #000000;'><a href='aus.htm'>Study in Australia<img src='images/right_arrow.gif' style='border:0px;' /></a>"
                             menulist+="<ul>"
                                menulist+="<li><a href='aus.htm' style=' border:0px; text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Universities / Institutions</a>"                                    
                                menulist+="</li>"                                                                
                            menulist+="</ul>"
                        menulist+="</li>"
                        
                         menulist+="<li style='border-bottom:dotted 1px #000000;'><a href='http://www.iis.svkm.ac.in/' target='_blank'>UK Degree in India &nbsp;</a>"
                        menulist+="</li>"
                        
                        menulist+="<li style='border-bottom:dotted 1px #000000;'><a href='dubai.htm'>Study hospitality in Dubai &nbsp;</a>"
                        menulist+="</li>"
                        
                        menulist+="<li style='border-bottom:dotted 1px #000000;'><a href='emailsending.htm'>Email counselling &nbsp;</a>"
                        menulist+="</li>"
                        
                        menulist+="<li ><a href='uni_visit.htm'>University visit &nbsp;</a>"
                        menulist+="</li>"
                        
//                        menulist+="<li><a href='uk_courses.htm'>Courses<img src='images/right_arrow.gif' style='border:0px;' /></a>"
//                             menulist+="<ul>"
//                                menulist+="<li><a href='uk_courses.htm' style=' border:0px; text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Courses In UK</a>"                                    
//                                menulist+="</li>" 
//                                menulist+="<li><a href='usa_courses.htm' style=' border:0px; text-align:left;' ><img src='images/gray_dot.gif' style='border:0px;' /> Courses In USA</a>"                                    
//                                menulist+="</li>"                                                                 
//                            menulist+="</ul>"
//                        menulist+="</li>" 
                    menulist+="</ul>"
                   // alert(menulist);
    document.getElementById("smoothmenu2").innerHTML=menulist;
}

function ResizeImage(th,w,h)
{
        var setX,setY;
        var y=th.height;
        var x=th.width;
        if (x>=y && x>w) 
        {
            var mod=x/w;
            //alert(mod);
            setX=x/mod;
            setY=y/mod;
            th.height=setY;
            th.width=setX;
        }
        else if (y>h) 
        {
            var mod=y/h;
            //alert(mod);
            setX=x/mod;
            setY=y/mod;
            th.height=setY;
            th.width=setX;    
         }
 }
 function displayDiv(_id,comment)
{
    if (document.getElementById(_id).style.display=='block')
    {
        document.getElementById(_id).style.display='none';
    }
    else
    {
        if (comment!='')
        {
            if (comment.length>15)
            {        
                document.getElementById(_id).style.display='block';
            }
            else
            {
                document.getElementById(_id).style.display='none';
            }
        }
        else
        {
            document.getElementById(_id).style.display='none';
        }
    }
}
function CheckPassWdLenth(passwd)
{
    var pass;
    pass=document.getElementById(passwd).value;
   // alert(pass.length);
    if ((pass.length < 4) || (pass.length > 16))
    {
        alert("Password must be greater than 4 and less than 16 characters."); 
        return false;  
    }    
    else
    {
        return true;
    }
}
function ClearDate(_id)
{
    document.getElementById(_id).value="";
}
function backtrcolor(e,flag)
{
    if (flag)
    {
        e.style.backgroundColor="#ffffcc";
    }
    else
    {
    e.style.backgroundColor="#fddd86";   
    }
}
function backtrcolorSandeshYear(e,flag)
{
    if (flag)
    {
        e.style.backgroundColor="#fdcc53";
    }
    else
    {
    e.style.backgroundColor="fdb330";   
    }
}
function backtrcolorSandeshMonth(e,flag)
{
    if (flag)
    {
        e.style.backgroundColor="#ffffcc";
    }
    else
    {
    e.style.backgroundColor="fdcc53";   
    }
}
function CheckCheckBoxColorFillYear(trid)
{
    //alert(document.getElementById(trid).style.backgroundColor);
    if (document.getElementById(trid).style.backgroundColor="#fdcc53")
    {        
        document.getElementById(trid).style.backgroundColor="#fdcc53";
    }  
    else
    {
        document.getElementById(trid).style.backgroundColor="fdb330";       
    }  
}

function CheckCheckBoxColorFillNoClickYear(trid)
{
    if (document.getElementById(trid).style.backgroundColor="#ffffcc")
    {        
        document.getElementById(trid).style.backgroundColor="#fdb330";
    }  
    else
    {
        document.getElementById(trid).style.backgroundColor="fdcc53";       
    } 
}
function CheckCheckBoxColorFillMonth(trid)
{
    //alert(document.getElementById(trid).style.backgroundColor);
    if (document.getElementById(trid).style.backgroundColor="#fffbcb")
    {        
        document.getElementById(trid).style.backgroundColor="#fffbcb";
    }  
    else
    {
        document.getElementById(trid).style.backgroundColor="fdcc53";       
    }  
}

function CheckCheckBoxColorFillNoClickMonth(trid)
{
    if (document.getElementById(trid).style.backgroundColor="#ffffcc")
    {        
        document.getElementById(trid).style.backgroundColor="#fdcc53";
    }  
    else
    {
        document.getElementById(trid).style.backgroundColor="fffbcb";       
    } 
}
function displayDivOpen(_id)
{  
    document.getElementById(_id).style.display ="block";          
}
function displayDivClose(_id)
{  
    document.getElementById(_id).style.display ="none";            
}