﻿
/* ============================================================
* 
* Author        : NaveenKumar CN
* Created Date  : 03 November 2008
* Description   : Variables
*
* ============================================================*/

var currentIndex ;
var currentImg ;
var opacity = 0;
var contentLeft = new Array(60, 134, 203, 273, 347 );
var content = new Array(5);

// contents here
content[0] = "<div class=mainheading >“Welcome to the real world.” <br />"
             + "<span class=homeauthor> Morpheus </span></div>"
             + "<div class=homecontent>the world of enterprise software development seems to have turned into an endless "
             + "parade of high-end clients courted by networks of latte-sipping semi-independent "
             + "coders. But let's face it – designer labels and designer stubble are less important "
             + " to you than knowing that the solution you need is no longer 'just around the corner'.</div> "
             + "<div class=homecontent>a microsoft certified partner, simient is led by a core management team of "
             + "dedicated senior programmers. Bridging the gap between reality and possibility, we "
             + "get the job done on time and within budget by ensuring that the solution you want "
             + "and the solution you need really are one and the same thing. <span class=homecontentmore><a href=Welcome.aspx> More> </a></span>"
             + "</div><div style='height:20px;'>&nbsp;</div><div class='install'>"
             + "<img src='Image/installsilverlight.jpg' class='installImg' alt='Install Silverlight' onclick='window.open(\"http://www.microsoft.com/silverlight/install.aspx\")' "
             + "border='0' /></div>";


content[1] = "<div class=mainheading >“Why is it's that every time I think I know the answers,someone goes and changes the questions?” <span class=headingauthor>Special Agent Fox Mulder</span></div>"
             + "<br />" + "<div class=ceosubheader><a href=Ceo.aspx>INFORMATION FOR CEO'S AND DEPARTMENT HEADS</a></div>" 
             + "<div class=homecontent>leaders may well lead, but without access to accurate and up to date information, " 
             + " as well as streamlined and efficient systems, ‘getting on with it’ takes second "
             + " place to a seeming endless and confusing search for truth ‘out there. <span class=homecontentmore><a href=Ceo.aspx> More> </a></span></div>"
             + "<div style='height:42px;'>&nbsp;</div><div class='install'> "
             + "<img src='Image/installsilverlight.jpg' class='installImg' alt='Install Silverlight' onclick='window.open(\"http://www.microsoft.com/silverlight/install.aspx\")' "
             + "border='0' /></div>";
              
              
content[2] = "<div class=mainheading >“show me the money” <br />"
             + "<span class=cfoauthor> Jerry Maguire </span></div> <br /><br />"
             + "<div class=cfosubheader><a href=Cfo.aspx>INFORMATION FOR CFO'S AND FINANCIAL CONTROLLERS</a></div>" 
             + "<div class=homecontent>the bottom line is not a euphemism. When resources are not optimally deployed, or "
             + "critical data winds up lost in the waste land of an unreachable database, somebody, "
             + "somewhere, is losing money. But you're usually the only one losing sleep. <span class=homecontentmore><a href=Cfo.aspx> More></a> </span></div>"
             + "<div style='height:53px;'>&nbsp;</div><div class='install'> "
             + "<img src='Image/installsilverlight.jpg' class='installImg' alt='Install Silverlight' onclick='window.open(\"http://www.microsoft.com/silverlight/install.aspx\")' "
             + "border='0' /></div>";

content[3] = "<div class=mainheading >“I just can't do it cap'n ? I don't have the power!” "
             + "<span class=cioauthor>Scotty</span></div><br /><br />"
             + "<div class=ciosubheader><a href=Cio.aspx>INFORMATION FOR CIO'S AND IT MANAGERS</a></div>"
             + "<div class=homecontent>it doesn't matter how many times you try turning it off and turning it back on "
             + "again, sometimes the demands placed upon your systems are more than they can bear."
             + "The chair to keyboard interface, however, is not something you can eliminate – as "
             + "much as you might want to... <span class=homecontentmore> <a href=Cio.aspx>More> </a></span></div>"
             + "<div style='height:34px;'>&nbsp;</div><div class='install'> "
             + "<img src='Image/installsilverlight.jpg' class='installImg' alt='Install Silverlight' onclick='window.open(\"http://www.microsoft.com/silverlight/install.aspx\")' "
             + "border='0' /></div>";


content[4] = "<div class=mainheading >”i'm so confused”  <br />"
             + "<span class=tbaauthor>Vinnie Barbarino</span></div><br />"
             + "<div class=homecontent>attempting to implement change across an entire organisation can be a daunting task "
             + "- and the most effective solution to biting off more than you can chew is certainly "
             + "not 'just chew faster'.??<br /><br />With experience as both clients and vendors, simient will "
             + "bridge the gap between what you know and what you need – because only hamsters "
             + "should spend all day on a treadmill getting nowhere [and at least they get a "
             + "straw-lined box to sleep in].<span class=homecontentmore> <a href=Tba.aspx>More> </a> </span></div>"
             + "<div style='height:22px;'>&nbsp;</div><div class='install'>"
             + "<img src='Image/installsilverlight.jpg' class='installImg' alt='Install Silverlight' onclick='window.open(\"http://www.microsoft.com/silverlight/install.aspx\")' "
             + "border='0' /></div>";


  
/* ============================================================
* 
* Author        : NaveenKumar CN
* Created Date  : 03 November 2008
* Description   : Load First Tab
*
* ============================================================*/
function LoadHeader()
{
    try
    {
        if ( !isInstalled )
        {
            var index = 0 ;
            ClearContent( index );
            currentIndex = index;
            for( var i=0 ; i < 5; i++ )
            {
                if ( i != index )
                {
                    document.getElementById("imgHeader_" + i).style.display = "none";
                }
                else
                {
                    document.getElementById("imgHeader_" + i).style.display = "";
                    currentImg = document.getElementById("imgHeader_" + i);
                }
            }
            
            ShowImage( );
            
        }
        
    }
    catch( exc )
    {
        alert( "Exception Occured.\r\nMethod : LoadHeader()\r\nDetails : " + exc.message );
    }
}

/* ============================================================
* 
* Author        : NaveenKumar CN
* Created Date  : 03 November 2008
* Description   : Load Selected Tab
*
* ============================================================*/
function ChangeImage( index )
{
    try
    {
        ClearContent( index );
        currentIndex = index;
        for( var i=0 ; i < 5; i++ )
        {
            if ( i != index )
            {
                document.getElementById("imgHeader_" + i).style.display = "none";
            }
            else
            {
                document.getElementById("imgHeader_" + i).style.display = "";
                currentImg = document.getElementById("imgHeader_" + i);
            }
        }
        ShowImage( );
    }
    catch( exc )
    {
        alert( "Exception Occured.\r\nMethod : ChangeImage()\r\nDetails : " + exc.message );
    }
}

/* ============================================================
* 
* Author        : NaveenKumar CN
* Created Date  : 03 November 2008
* Description   : Load Selected Tab Content
*
* ============================================================*/
function LoadContent( index )
{
    try
    {
        
        document.getElementById("dvContent").innerHTML = content[index];
        document.getElementById("dvContent").style.left = contentLeft[index]+ "px";
        document.getElementById("dvContent").style.position = "absolute";
        document.getElementById("dvContent").style.top = "30px";
        document.getElementById("dvContent").style.width =  "510px";
        document.getElementById("dvContent").style.height = "303px";
        
    }
    catch( exc )
    {
        alert( "Exception Occured.\r\nMethod : LoadContent()\r\nDetails : " + exc.message );
    }
}

/* ============================================================
* 
* Author        : NaveenKumar CN
* Created Date  : 03 November 2008
* Description   : Clear Selected Tab Content
*
* ============================================================*/
function ClearContent( index )
{
    try
    {
        document.getElementById("dvContent").innerHTML = "";
        
        
    }
    catch( exc )
    {
        alert( "Exception Occured.\r\nMethod : ClearContent()\r\nDetails : " + exc.message );
    }
}

/* ============================================================
* 
* Author        : NaveenKumar CN
* Created Date  : 03 November 2008
* Description   : Show Animation
*
* ============================================================*/
function ShowImage()
{
    try
    {
        var img = currentImg;
        var time = 60;
        
        if ( opacity >= 9 )
        {
            img.style["opacity"]  = "10";
            img.style["-moz-opacity"] = "10" ;    
            img.style["filter"] =  "alpha(opacity=100)";
            opacity = 0;
            LoadContent( currentIndex );
            return;
        }
        
        opacity +=1;
        img.style["opacity"]  = "." + opacity;
        img.style["-moz-opacity"] = "." + opacity ;    
        img.style["filter"] =  "alpha(opacity="+ opacity * 10 +")";
        setTimeout("ShowImage()",time);
    }
    catch( exc )
    {
        alert( "Exception Occured.\r\nMethod : ShowImage()\r\nDetails : " + exc.message );
    }
}
