/*
 * WARNING
 * This script is a part of the Alan API 13 Series CLR, which is protected by international
 * and intellectual property laws.
 *
 * The Alan API is Copyrighted. Copyright (c) 1998-2008 by The TAG2000 International LLC 
 * Holdings Company. All Rights Reserved.
 * Alan API est garanti les droits d'auteur. Garantissez les droits d'auteur le (c) 1998-2008 de
 * copyright d'Alan api SSAPI par TAG2000 International LLC Holdings Company. Tous droits reserves.
 * Das Alan API wird Urheberrecht gesichert. Sichern Sie (c) 1998-2008 durch TAG2000 International 
 * LLC Holdings Company Urheberrecht. Alle Rechte vorbehalten.
 * El Alan API copyrighted. Copyright el (c) 1998-2008 por Los TAG2000 International LLC Holdings 
 * Company. Todos los derechos reservados.
 *
 */

//=====================================================================//
// swapimg.js
// Library for image swapping
// Part of the Alan API 13 Series CSAPI
// 
// Copyright © 2001-2009 Aytan Internet Services, a business unit of
// The TAG2000 International LLC Holdings Company. All Rights Reserved.
//=====================================================================//

var pname = new Array();
var pname2 = new Array();

function swapImg(imageName)
{
    //document.images['uwelcome'].src = pname[imageName].src;
    //document.getElementById('splash').style.backgroundImage = pname[imageName];
    
    // Works on Firefox
    //document.getElementById('splash').setAttribute("style","background-image: url(images/corpsplash/corpwelcomeaytan.png)");
    document.getElementById('splash').style.backgroundImage = "url(" + pname[imageName] + ")";
}

function preloadImg(imageName)
{
	pname[imageName] = new Image(980,272);
	pname[imageName].src = "images/corpsplash/corpwelcome_" + imageName + ".png";
	pname[imageName] = "images/corpsplash/corpwelcome_" + imageName + ".png";
}

function preloadHeaderImg() {
    pname2[0] = new Image(980, 467);
    pname2[0].src = "images/2010header/headerbg.jpg";
    pname2[0] = "images/2010header/headerbg.jpg";
    pname2[1] = new Image(6, 467);
    pname2[1].src = "images/2010header/Header.jpg";
    pname2[1] = "images/2010header/Header.jpg";
    pname2[2] = new Image(5, 266);
    pname2[2].src = "images/2010header/footerbg.jpg";
    pname2[2] = "images/2010header/footerbg.jpg";
}