	var backgroundImages   = new Array();

	backgroundImages[0]    = new Array();
	backgroundImages[0][0] = "images/bg.jpg";


	backgroundImages[1]    = new Array();
	backgroundImages[1][0] = "images/afrobotsbg.jpg";


	backgroundImages[2]    = new Array();
	backgroundImages[2][0] = "images/asherbg.jpg";


	backgroundImages[3]    = new Array();
	backgroundImages[3][0] = "images/cortebg.jpg";


	backgroundImages[4]    = new Array();
	backgroundImages[4][0] = "images/darkmanbg.jpg";


	backgroundImages[5]    = new Array();
	backgroundImages[5][0] = "images/majicbg.jpg";


	backgroundImages[6]    = new Array();
	backgroundImages[6][0] = "images/melaniebg.jpg";

	backgroundImages[7] = new Array();
	backgroundImages[7][0] = "images/markybg.jpg";

	backgroundImages[8] = new Array();
	backgroundImages[8][0] = "images/rayJbg.jpg";

	backgroundImages[9] = new Array();
	backgroundImages[9][0] = "images/shontellebg.jpg";

	backgroundImages[10] = new Array();
	backgroundImages[10][0] = "images/webstarbg.jpg";



	function randomImage(collection) {

//		collection[i][0]  = image src

		this.collection   = collection;
		this.unitCount    = this.collection.length - 1;

		this.randomNumber = randomize(0,this.unitCount);
		this.src          = this.collection[this.randomNumber][0];


		function randomize(x, y) {

        		var range = y - x + 1;
			return Math.floor(Math.random() * range) + x;

		}


	}



	var backgroundImage = new randomImage(backgroundImages);
//	backgroundImage.src



var bg_im;
var mw = 1920;
var mh = 1200;
var ratio = mw/mh;

function updateSize()
{
        if (typeof bg_im == "undefined")
               bg_im = document.getElementById("bg_container");
        var size = getWinsize();
        if (size.h > (size.w / ratio))
        {
               bg_im.style.width = Math.ceil(size.h*ratio) + "px"
               margin = "0 0 0 "+ Math.round((size.w-(size.h*ratio))/2) +"px";
               bg_im.style.margin = margin;   
        }
        else
        {
                       bg_im.style.width ="100%";
                       bg_im.style.margin = "0";      
        }
}

function getWinsize()
{
        var _obj = new Object();
        if( typeof( window.innerWidth ) == "number" ) 
        {
        //Non-IE
               _obj.w = window.innerWidth;
               _obj.h = window.innerHeight;
        }         
        else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
        {
    //IE 6+ in 'standards compliant mode'
               _obj.w = document.documentElement.clientWidth;
               _obj.h = document.documentElement.clientHeight;        
        } 
        else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
        {
    //IE 4 compatible
        _obj.w = document.body.clientWidth;
        _obj.h = document.body.clientHeight;
        }
        return _obj;
}


