//<!--
preLoad('nav_more', 4,'images/');
preLoad('nav_portfolio', 4,'images/');
preLoad('nav_contact', 4,'images/');

function init()
{
}

function preLoad(imageName, imageLength, imagePath, imageType) 
{
    if (document.images) 
    {
        if (imagePath == null) 
        {
            imagePath = "images/";
        }
        if (imageType == null) 
        {
            imageType = "gif";
        }
        
        if (imageLength == null) 
        {
            eval(imageName + " = new Image()");
            eval(imageName + ".src = \"" + imagePath + imageName + "."+imageType+"\"");
        } 
        else
        {
            for (var i=0; i < imageLength; i++)
            {
                eval(imageName + "_0" + i + " = new Image()");
                eval(imageName + "_0" + i + ".src = \"" + imagePath + imageName + "_0" + i + "."+imageType+"\"");
            }
        }
    }
}
 
function swapImg(sImageName,sNewImage,sStatus)
{
 
 if(sStatus != null)
 {
  window.status = sStatus;
 }
 else
 {
  window.status = ''
 }
 document.images[sImageName].src = eval(sNewImage + ".src");
}

function changeClass(oElem, sID, sClass, sColor)
{
	oElem.bgColor=sColor;
	document.getElementById(sID).className = sClass;
}

// This function is for randomizing the main ad on index.html

var theImages = new Array() // do not change this

theImages[0] = 'images/ad_deeppockets.jpg'
theImages[1] = 'images/ad_makethingswork.jpg'
theImages[2] = 'images/ad_bratwurst.jpg'
theImages[3] = 'images/ad_takebath.jpg'
theImages[4] = 'images/ad_freshideas.jpg'
theImages[5] = 'images/ad_simple.jpg'


// No need to mess with dis stuff

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<a href="more.html"><img src="'+theImages[whichImage]+'"border="0" width="517" height="258"></a>');
}


//-->

