﻿var banners = ["banner1.jpg", "banner2.jpg", "banner3.jpg", "banner4.jpg", "banner5.jpg", "banner6.jpg"];
var bannerno = banners[Math.floor(Math.random()*banners.length)];

function newImage(arg) 
{
	if (document.images) 
	{
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}


function changeImagesArray(array) 
{
	if (preloadFlag == true) 
	{
		var d = document; var img;
		for (var i=0; i<array.length; i+=2) 
		{
			img = null; var n = array[i];
			if (d.images) 
			{
			    img = d.images[n];
            }
			if (!img && d.getElementById) 
			{
			    img = d.getElementById(n);
            }
			if (img) 
			{
			    img.src = array[i+1];
            }
		}
	}
}


function changeImages() 
{
	changeImagesArray(changeImages.arguments);
}


var preloadFlag = false;
function preloadImages() 
{
	if (document.images) 
	{
	    pre_Headerperson = newImage('App_Themes/ShowMgr/Images/' +  bannerno);
	    pre_HeaderLogo = newImage('App_Themes/ShowMgr/Images/Showmgr_logo.jpg');
	    pre_Compatibility = newImage('App_Themes/ShowMgr/Images/compatibility.jpg');
	    pre_ClientCol = newImage('App_Themes/ShowMgr/Images/clientcolbg.gif');
	    pre_nav_solutions_over = newImage('App_Themes/ShowMgr/Images/nav_solutions_over_index.jpg');
		pre_nav_technology_over = newImage('App_Themes/ShowMgr/Images/nav_technology_over_index.jpg');
		pre_nav_services_over = newImage('App_Themes/ShowMgr/Images/nav_services_over_index.jpg');
		pre_nav_demo_over = newImage('App_Themes/ShowMgr/Images/nav_demo_over_index.jpg');
		pre_nav_company_over = newImage('App_Themes/ShowMgr/Images/nav_company_over_index.jpg');
		pre_nav_login_over = newImage('App_Themes/ShowMgr/Images/nav_login_over_index.jpg');
		pre_features_realtime_over = newImage('App_Themes/ShowMgr/Images/features_realtime_over.jpg');
		pre_features_accountability_ove = newImage('App_Themes/ShowMgr/Images/features_accountability_ove.jpg');
		pre_features_communication_over = newImage('App_Themes/ShowMgr/Images/features_communication_over.jpg');
		pre_tech_features_over = newImage('App_Themes/ShowMgr/Images/tech_features_over.jpg');
		pre_tech_demo_over = newImage('App_Themes/ShowMgr/Images/tech_demo_over.jpg');
		pre_nav_crewmgr_over = newImage('App_Themes/ShowMgr/Images/nav_crewmgr_over.jpg');
		pre_nav_venuemgr_over = newImage('App_Themes/ShowMgr/Images/nav_venuemgr_over.jpg');
		pre_nav_vendormgr_over = newImage('App_Themes/ShowMgr/Images/nav_vendormgr_over.jpg');
		pre_nav_journeymgr_over = newImage('App_Themes/ShowMgr/Images/nav_journeymgr_over.jpg');
		pre_contact_sales_over = newImage('App_Themes/ShowMgr/Images/ContactUsSalesOver.jpg');
		pre_contact_support_over = newImage('App_Themes/ShowMgr/Images/ContactUsSupportOver.jpg');
		pre_contact_training_over = newImage('App_Themes/ShowMgr/Images/ContactUsTrainingOver.jpg');
		preloadFlag = true;
	}	
}

function SetHeaderImage()
{
    //var banners = ["banner1.jpg", "banner2.jpg", "banner3.jpg", "banner4.jpg", "banner5.jpg", "banner6.jpg"];
    //document.getElementById("imgHeader").src = "App_Themes/ShowMgr/Images/" + banners[Math.floor(Math.random()*banners.length)];
    document.getElementById("imgHeader").src = pre_Headerperson.src;//"App_Themes/ShowMgr/Images/" + bannerno;
}

function RotateQuote()
{
    var Quotes = new Array();
    var ClientName = new Array();; 
    
    Quotes[0] = "ShowMgr.com enables us to build event Showbook templates and manage comprehensively all the business elements of our production process. With ShowMgr.com’s ability to reduce redundancies and provide tighter integration of our budget, operations, payroll and travel information, we are able to allocate capital and existing resources more efficiently to core production functions."
    ClientName[0]="- Glenn Adamo, Vice President, Media Operations – NFL";
    Quotes[1] = "As a customer for 8 years, we rely on ShowMgr.com to provide us with an integrated collaborative platform that minimizes duplication of effort and enables sharing and distribution of our production information."
    ClientName[1]="- Jerry Steinberg, Vice President, Field Operations – Fox Sports";
    Quotes[2] = "ShowMgr.com has been more than a vendor, they have been a partner, listening to our needs and guiding us when we need it.  It is refreshing to work with a company that believes in the success of its customers as much as in itself."
    ClientName[2]="- Tom Sahara, Senior Director, Operations & IT – Turner Sports";
    Quotes[3] = "With ShowMgr.com’s ability to streamline our workflow process and provide tighter integration of our budget, operations, inventory management and travel information, we will be able to build our business more efficiently. Now, the ability to manage our process will equal our ability to produce award winning programming."
    ClientName[3]="- John Denison, General Manager, Time Warner Cable";
    Quotes[4] = "Oh my gosh, I’ve got to tell you, you are 10 times better than your competitors, so easy, and constantly surprising me with great tools and functionality. The cross checks and the travel section…wow. Great system, such a time saver, and so accurate."
    ClientName[4]="- Daniel Dailey, Turner Sports";
    Quotes[5] = "ShowMgr.com’s workflow management software exemplifies the power of the BlackBerry platform by giving mobile users access to valuable information during the broadcast, production and post-production process."
    ClientName[5]="- Jeff McDowell, Vice President, Global Alliances, Research In Motion";
    Quotes[6] = "By mapping the broadcast services that are used in each stadium, we can provide valuable information that will benefit the stadiums and the television production companies that broadcast the games, - regarding ShowMgr.com’s venue portal."
    ClientName[6]="- Kerry Goodson, Executive Director, Stadium Managers Association";
    Quotes[7] = "You make me proud. I appreciate all of the great tools ShowMgr.com offers,  I've asked for things in the past and pretty soon the functionality is out there. Great work."
    ClientName[7]="- Wayne Moss, Crewer, FSN Northwest, Liberty Sport Media";
    
    var SelectedNumber = Math.floor(Math.random()*Quotes.length);
  
    document.getElementById('divClientQuote').innerHTML = '"' + Quotes[SelectedNumber] + '"';
    document.getElementById('divClientName').innerHTML = ClientName[SelectedNumber];
    
    setTimeout("RotateQuote()", 10000)

}
