
///////////////////////////////////////////////////////////////////
// Site Specific  JavaScipt                                      //
///////////////////////////////////////////////////////////////////


function create() 
{
        this.width = ''
        this.height = ''
        this.src = ''
        this.href = ''
        this.border = ''
        this.alt = ''
}
function buildSplashArray()
{
	//set this to number of splash images
	var numberOfSplashImages = 4;
	
	splashImages = new Array()
	
	for(var i=0; i<=numberOfSplashImages; i++) 
	{
	 splashImages[i] = new create() 
	}
	
	//define images here
	//set .href to "" if not a link
	
//Cyber Security Awareness Images
	
	/*splashImages[1].width = "450"
	splashImages[1].height = "569"
	splashImages[1].src = "http://helpdesk.mst.edu/images/1_Attachments_CSAM.jpg"
	splashImages[1].href = "http://helpdesk.mst.edu/generalinfo/security/index.html"
	splashImages[1].border = "0"
	splashImages[1].alt = "Attachment Awareness: Cyber Security Awareness Month week 1"
	
	splashImages[2].width = "450"
	splashImages[2].height = "569"
	splashImages[2].src = "http://helpdesk.mst.edu/images/2_Phishing_CSAM.jpg"
	splashImages[2].href = ""
	splashImages[2].border = "0"
	splashImages[2].alt = "Phishing Awareness: Cyber Security Awareness Month week 2"
	
	splashImages[3].width = "450"
	splashImages[3].height = "569"
	splashImages[3].src = "http://helpdesk.mst.edu/images/3_Worms_CSAM.jpg"
	splashImages[3].href = ""
	splashImages[3].border = "0"
	splashImages[3].alt = "Worm Awareness: Cyber Security Awareness Month week 3"
	
        splashImages[4].width = "450"
	splashImages[4].height = "569"
	splashImages[4].src = "http://helpdesk.mst.edu/images/4_Passwords_CSAM.jpg"
	splashImages[4].href = ""
	splashImages[4].border = "0"
	splashImages[4].alt = "Password Awareness: Cyber Security Awareness Month week 4"
	
	splashImages[5].width = "450"
	splashImages[5].height = "569"
	splashImages[5].src = "http://helpdesk.mst.edu/images/5_Spyware_CSAM.jpg"
	splashImages[5].href = ""
	splashImages[5].border = "0"
	splashImages[5].alt = "Spyware Awareness: Cyber Security Awareness Month week 5"*/
	
//Cyber Security Awareness Images

        splashImages[1].width = "525"
	splashImages[1].height = "345"
	splashImages[1].src = "http://it.mst.edu/images/splash.jpg"
	splashImages[1].href = ""
	splashImages[1].border = "0"
	splashImages[1].alt = "IT SPLASH image"
	
	splashImages[2].width = "525"
	splashImages[2].height = "345"
	splashImages[2].src = "http://it.mst.edu/images/cluster-splash.jpg"
	splashImages[2].href = ""
	splashImages[2].border = "0"
	splashImages[2].alt = "IT's Data Cluster image"
	
        splashImages[3].width = "525"
	splashImages[3].height = "345"
	splashImages[3].src = "http://it.mst.edu/images/computers-splash.jpg"
	splashImages[3].href = ""
	splashImages[3].border = "0"
	splashImages[3].alt = "Desktop Enhancement image"
	
	splashImages[4].width = "525"
	splashImages[4].height = "345"
	splashImages[4].src = "http://it.mst.edu/images/insideit-splash.jpg"
	splashImages[4].href = ""
	splashImages[4].border = "0"
	splashImages[4].alt = "Inside IT image"
	
	return splashImages;
}
function generateRandomNumber(maxNumber)
{ //generates a random number between 1 and the passed in number
	return Math.floor(Math.random()*maxNumber) + 1;
}
function getRandomSplashImage()
{
	splashImages = new Array();
	splashImages = buildSplashArray();
	var n = generateRandomNumber(splashImages.length - 1); //subtract 1 to take into account that we dont use 0 in the array
	n += ""
	var image = splashImages[n]
	var activeImage = ""
	if (image.href != null && image.href != "")
	{
		activeImage += '<a href="' + image.href + '" >\n'
	}
	activeImage += '<img src="' + image.src + '" width="' + image.width
	activeImage += '"\n height="' + image.height + '" border="' + image.border
	activeImage += '"\n alt="' + image.alt +'">'
	if (image.href != null && image.href != "")
	{
		activeImage +='</a>'
	}
	return activeImage;
}