﻿function initiation()
{
    //switchSayings();  
    HomeAnimation(1);
    HomePortfolio(1);
}


function switchSayings() 
{
    var sayings = new Array(); 
    
    sayings[0] = "Solid Structure"; 
    sayings[1] = "Elegant Design";
    sayings[2] = "Loads Fast"; 
    sayings[3] = "User Friendly Websites";
    sayings[4] = "State of the Art Technology";
    sayings[5] = "Data Management Systems";
    sayings[6] = "New Zealand Staff & Servers";
    sayings[7] = "Friendy & Supportive Staff";
    sayings[8] = "Website Design Company";
    sayings[9] = "Website Applications";
    sayings[10] = "Website Marketing Company";
    sayings[11] = "Tried & Tested Throughly";
    sayings[12] = "Latest & Trendy Styles";
         
    
    var randomNumber = Math.floor(Math.random()*11)
    
    document.getElementById("pHeaderQuotes").innerHTML = sayings[randomNumber];
            
    //document.getElementById("pHeaderQuotes2").innerHTML = sayings[randomNumber];
    
    setTimeout('switchSayings()',2000);
}


function mouseOverBackPics(id, url)
{
    document.getElementById(id).style.backgroundImage = "url("+url+")";
}

function mouseOutBackPics(id, url)
{
    document.getElementById(id).style.backgroundImage = "url("+url+")";
}

function HomeAnimation(order) 
{  
    var milisecs = 4000;

    if(order === 1)
    {
        document.getElementById('divHomeAnimation').style.backgroundImage = "url(Themes/Images/Graphics/HomeAnimation/Design.jpg)";
        
        document.getElementById('pHomeAnimation').innerHTML = "Web Design";
//        document.getElementById('pHomeAnimation').style.color = "#4D7CC1";
        document.getElementById('aHomeAnimation').href= "Packages.aspx";
        
        setTimeout('HomeAnimation(2)',milisecs);
    }    
    
    if(order === 2)
    {
        document.getElementById('divHomeAnimation').style.backgroundImage = "url(Themes/Images/Graphics/HomeAnimation/Applications.jpg)";

        document.getElementById('pHomeAnimation').innerHTML = "<span style='font-size:13pt; font-weight: bold'>Web Applications</span>";
//        document.getElementById('pHomeAnimation').style.color = "White";
        document.getElementById('aHomeAnimation').href= "Services.aspx";

        setTimeout('HomeAnimation(3)',milisecs);
    }    
    
    if(order === 3)
    {
        document.getElementById('divHomeAnimation').style.backgroundImage = "url(Themes/Images/Graphics/HomeAnimation/Marketing.jpg)";

        document.getElementById('pHomeAnimation').innerHTML = "Web Marketing";
//        document.getElementById('pHomeAnimation').style.color = "#4D7CC1";
        document.getElementById('aHomeAnimation').href= "WebSiteMarketingCompany.aspx";

        setTimeout('HomeAnimation(1)',milisecs);
    }  
    
//    if(order === 4)
//    {
//        document.getElementById('divHomeAnimation').style.backgroundImage = "url(http://localhost:50166/Preeden/Themes/Images/Graphics/HomeAnimation/FinancilaRewards.jpg)";
//        
//        document.getElementById('pHomeAnimation').innerHTML = "Rewards";
//        /*document.getElementById('pHomeAnimation').style.color = "Navy";*/
//        document.getElementById('aHomeAnimation').href= "ContactUs.aspx";
//        
//        setTimeout('HomeAnimation(1)',milisecs);
//    }  
}

function HomePortfolio(order) {
    var milisecs = 4000;

    if (order === 1) {
        document.getElementById('divHomePortfolio').style.backgroundImage = "url(Themes/Images/Portfolio/Home/4albanycountrybnb.co.nz.png)";

        document.getElementById('pHomePortfolio').innerHTML = "albanycountrybnb.co.nz";
        //document.getElementById('pHomePortfolio').style.color = "#4D7CC1";
        document.getElementById('aHomePortfolio').href = "Portfolio.aspx";

        setTimeout('HomePortfolio(2)', milisecs);
    }

    if (order === 2) {
        document.getElementById('divHomePortfolio').style.backgroundImage = "url(Themes/Images/Portfolio/Home/3pumpseal.co.nz.png)";

        document.getElementById('pHomePortfolio').innerHTML = "pumpseal.co.nz";
        //document.getElementById('pHomePortfolio').style.color = "#4D7CC1";
        document.getElementById('aHomePortfolio').href = "Portfolio.aspx";

        setTimeout('HomePortfolio(3)', milisecs);
    }

    if (order === 3) {
        document.getElementById('divHomePortfolio').style.backgroundImage = "url(Themes/Images/Portfolio/Home/2autometrix.co.nz.png)";

        document.getElementById('pHomePortfolio').innerHTML = "autometrix.co.nz";
        //document.getElementById('pHomePortfolio').style.color = "#4D7CC1";
        document.getElementById('aHomePortfolio').href = "Portfolio.aspx";

        setTimeout('HomePortfolio(4)', milisecs);
    }

    if (order === 4) {
        document.getElementById('divHomePortfolio').style.backgroundImage = "url(Themes/Images/Portfolio/Home/1relieftransport.co.nz.png)";

        document.getElementById('pHomePortfolio').innerHTML = "relieftransport.co.nz";
        //document.getElementById('pHomePortfolio').style.color = "#4D7CC1";
        document.getElementById('aHomePortfolio').href = "Portfolio.aspx";

        setTimeout('HomePortfolio(5)', milisecs);
    }

    if (order === 5) {
        document.getElementById('divHomePortfolio').style.backgroundImage = "url(Themes/Images/Portfolio/Home/0healthwealth.co.nz.png)";

        document.getElementById('pHomePortfolio').innerHTML = "healthwealth.co.nz";
        //document.getElementById('pHomePortfolio').style.color = "#4D7CC1";
        document.getElementById('aHomePortfolio').href = "Portfolio.aspx";

        setTimeout('HomePortfolio(6)', milisecs);
    }

    if (order === 6) {
        document.getElementById('divHomePortfolio').style.backgroundImage = "url(Themes/Images/Portfolio/Home/4albanycountrybnb.co.nzSEO.png)";

        document.getElementById('pHomePortfolio').innerHTML = "albanycountrybnb.co.nz on Google";
        //document.getElementById('pHomePortfolio').style.color = "#4D7CC1";
        document.getElementById('aHomePortfolio').href = "Portfolio.aspx";

        setTimeout('HomePortfolio(7)', milisecs);
    }

    if (order === 7) {
        document.getElementById('divHomePortfolio').style.backgroundImage = "url(Themes/Images/Portfolio/Home/3pumpseal.co.nzSEO.png)";

        document.getElementById('pHomePortfolio').innerHTML = "pumpseal.co.nz on Google";
        //document.getElementById('pHomePortfolio').style.color = "#4D7CC1";
        document.getElementById('aHomePortfolio').href = "Portfolio.aspx";

        setTimeout('HomePortfolio(8)', milisecs);
    }

    if (order === 8) {
        document.getElementById('divHomePortfolio').style.backgroundImage = "url(Themes/Images/Portfolio/Home/2autometrix.co.nzSEO.png)";

        document.getElementById('pHomePortfolio').innerHTML = "autometrix.co.nz on Google";
        //document.getElementById('pHomePortfolio').style.color = "#4D7CC1";
        document.getElementById('aHomePortfolio').href = "Portfolio.aspx";

        setTimeout('HomePortfolio(9)', milisecs);
    }

    if (order === 9) {
        document.getElementById('divHomePortfolio').style.backgroundImage = "url(Themes/Images/Portfolio/Home/1relieftransport.co.nzSEO.png)";

        document.getElementById('pHomePortfolio').innerHTML = "relieftransport.co.nz on Google";
        //document.getElementById('pHomePortfolio').style.color = "#4D7CC1";
        document.getElementById('aHomePortfolio').href = "Portfolio.aspx";

        setTimeout('HomePortfolio(10)', milisecs);
    }

    if (order === 10) {
        document.getElementById('divHomePortfolio').style.backgroundImage = "url(Themes/Images/Portfolio/Home/0healthwealth.co.nzSEO.png)";

        document.getElementById('pHomePortfolio').innerHTML = "healthwealth.co.nz on Google";
        //document.getElementById('pHomePortfolio').style.color = "#4D7CC1";
        document.getElementById('aHomePortfolio').href = "Portfolio.aspx";

        setTimeout('HomePortfolio(1)', milisecs);
    } 
}
