﻿// JScript File

function loadMenu()
{
    var menulist;
    //alert("asdf");
    //document.getElementById("dhtmlgoodies_menu").innerHTML="Hello";
    menulist="<ul id='sidebarmenu1' >"
                        menulist+="<li><a href='Index.aspx'>Home &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>"
                            
                        menulist+="</li>"  
                        menulist+="<li style='padding-bottom:1px;text-align:right;'><a href='AboutUs.aspx' >Who we are &nbsp;&nbsp;<img src='images/rightarrow.gif' style='border:0px;' /> </a>"
                             menulist+="<ul>"
                                menulist+="<li><a href='AboutUs.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >About AIAI </a>"                                    
                                menulist+="</li>"
                                menulist+="<li><a href='AIAITeam.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Team</a>"                                     
                                menulist+="</li>"
                                menulist+="<li><a href='PresidenceDesk.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Message from the President</a>"                                    
                                menulist+="</li>"                               
                                menulist+="<li><a href='AdvisoryBodies.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Advisory Bodies</a></li> "
                                menulist+="<li><a href='IPCCI.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Associates &nbsp;&nbsp;<img src='images/rightarrow.gif' style='border:0px;' /></a>"
//                                <img src='images/submenu.jpg'  alt='' border='0'/>
                                    menulist+="<ul>"                                        
                                        menulist+="<li><a href='IPCCI.aspx' style='padding:3px 5px 5px 10px; text-align:left;'>I.P.C.C.I </a>"                                    
                                        menulist+="</li>"
                                        menulist+="<li><a href='IMCCI.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >I.M.C.C.I</a>"                                     
                                        menulist+="</li>"
                                        menulist+="<li><a href='MOU.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Affiliations</a>"                                    
                                        menulist+="</li>"
                                        menulist+="<li><a href='YES.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >YES </a>"                                    
                                        menulist+="</li>"
//                                        menulist+="<li><a href='ICOFT.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >ICOFT </a>"                                    
//                                        menulist+="</li>"
                                   menulist+="</ul>"                                
                            menulist+="</li>"                                
                            menulist+="</ul>"
                        menulist+="</li>"
                        menulist+="<li style='padding-bottom:1px;'><a href='BusinessConnection.aspx'>What we can do for you? &nbsp;&nbsp;<img src='images/rightarrow.gif' style='border:0px;' /></a>"
                             menulist+="<ul>"
//                                menulist+="<li><a href='MembershipBenifits.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Membership and its benefits</a></li>"
//                                menulist+="<li><a href='MemberShip_Front.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Member registration </a></li>"                                
                              menulist+="<li><a href='ViewCurrentInq.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Business Connection &nbsp;&nbsp;<img src='images/rightarrow.gif' style='border:0px;' /></a>"                                
                                 menulist+="<ul>"                                        
                                       menulist+="<li><a href='ViewCurrentInq.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >View Current Enquiry</a></li>"
                                        menulist+="<li><a href='BusinessConnection.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Post Trade Enquiry</a></li>"                                        
                                   menulist+="</ul>"     
                              menulist+="</li>"   
                                menulist+="<li><a href='BussinessAdvocacy.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Business Advocacy</a></li>"                                                       
                               menulist+="<li><a href='DeligationDisp.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Delegation</a></li>"
//                                menulist+="<li><a href='BusinessNetwork.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Business Network </a></li>"
//                                menulist+="<li><a href='TradeInquiry.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Trade Inquiry</a></li>"
//                                menulist+="<li><a href='PageUnderConstruction.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Trade Promotion </a></li>"                                
                             menulist+="</ul> "
                        menulist+="</li>"
                        menulist+="<li style='padding-bottom:1px;'><a href='Events.aspx' >Events &nbsp;&nbsp;<img src='images/rightarrow.gif' style='border:0px;' /></a>"
                                    menulist+="<ul>"                                        
                                       menulist+="<li><a href='Events.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Upcomming Events</a></li>"
                                        menulist+="<li><a href='PastEvents.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Past Events</a></li>"
                                        menulist+="<li><a href='PhotoGallery.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Photo Gallery </a></li>"                                        
                                   menulist+="</ul>"                                
                       menulist+="</li>"          
                        menulist+="<li style='padding-bottom:1px;'><a href='MembershipBenifits.aspx'>Membership &nbsp;&nbsp;<img src='images/rightarrow.gif' style='border:0px;' /></a>"
                             menulist+="<ul>"
                                menulist+="<li><a href='MembershipBenifits.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Members benefits</a></li>"
                                menulist+="<li><a href='MemberShip_Front.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Member registration </a></li>"                               
                             menulist+="</ul> "
                        menulist+="</li>"
                        menulist+="<li style='padding-bottom:1px;'><a href='SagarGarden.aspx'>Our initiatives &nbsp;&nbsp;<img src='images/rightarrow.gif' style='border:0px;' /></a>"
                            menulist+="<ul>"
                                menulist+="<li><a href='SagarGarden.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Sagar Upvan</a></li>"                                                                                                    
//                                menulist+="<li><a href='PageUnderConstruction.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >AIC</a></li>"                                
                            menulist+="</ul> "
                        menulist+="</li>"
                        menulist+="<li style='padding-bottom:1px;'><a href='NewsPage.aspx?NEWSTYPE=AIAI'>News and Press Corner &nbsp;&nbsp;<img src='images/rightarrow.gif' style='border:0px;' /></a>"
                            menulist+="<ul>"
                                menulist+="<li><a href='NewsPage.aspx?NEWSTYPE=AIAI' style='padding:3px 5px 5px 10px; text-align:left;' >AIAI Views</a></li>"
                                menulist+="<li><a href='NewsPage.aspx?NEWSTYPE=GENERAL' style='padding:3px 5px 5px 10px; text-align:left;' >Notice Board</a></li>"
                                menulist+="<li><a href='AIAI_NewsLetter.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >AIAI Newsletter</a></li>"
                                menulist+="<li><a href='PressRelease.aspx' style='padding:3px 5px 5px 10px; text-align:left;' >Press Releases</a></li>"
                            menulist+="</ul>"
                        menulist+="</li>"   
                        menulist+="<li><a href='PageUnderConstruction.aspx'>Resources &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>"
                           
                        menulist+="</li>"                     
                        menulist+="<li><a href='ContactUs.aspx'>Contact Us &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>"
                            
                        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";            
}