
function imgPreload_Home()
{
	var i=0;
	if(document.images){

		
		imgArray = new Array();
		lstArray = new Array();

		for(i=0; i < 6 ; i++){
			imgArray[i] = new Image();
		}
		
		
		lstArray[0] = "Listen_Now_Over.png";
		lstArray[1] = "Archive_Over.png";
		lstArray[2] = "Get_Involved_Over.png";
		lstArray[3] = "Listen_Now.png";
		lstArray[4] = "Archive.png";
		lstArray[5] = "Get_Involved.png";
	

		for(i=0; i < 6; i++){
			imgArray[i].src = lstArray[i];
		}

	}
	
}

function Roll_Over(img)
{
	var check=0;
	if(img=="Listen_Now")
		document.Listen_Now.src="Listen_Now_Over.png";
	else if(img=="Get_Involved")
		document.Get_Involved.src="Get_Involved_Over.png";
	else if(img=="Archive")
		document.Archive.src="Archive_Over.png";
	else if(img=="One")
	{
		<!--document.write(document.Calender.src);  Include this to test for Actual source location and debug logic below.
		document.getElementById("randimg").src="instudio.jpg";
		document.Calender.src="Weekly_Cal.png";
	}
	else if(img=="Two")
	{
		document.getElementById("randimg").src="broadcast.jpg";
		document.Calender.src="Monthly_Cal.png";
	}
	else if(img=="One_Over")
	{
		<!--document.write(document.Calender.src);  Include this to test for Actual source location and debug logic below.
		document.getElementById("randimg").src="instudio.jpg";
	}
	else if(img=="Two_Over")
	{
		document.getElementById("randimg").src="broadcast.jpg";
	}
	else if(img=="CalW")
	{
		if(document.Calender.src == "http://72.233.136.2/Calender_Buttons.png" || document.Calender.src == "http://radio.spu.edu/Calender_Buttons.png")
		{
		document.getElementById("One").src="Stream_1.png";
		document.Calender.src="Weekly_Cal.png";
		}
	}
	else if(img=="CalM")
	{
		if(document.Calender.src == "http://72.233.136.2/Calender_Buttons.png" || document.Calender.src == "http://radio.spu.edu/Calender_Buttons.png")
		{
		document.Calender.src="Monthly_Cal.png";
		document.getElementById("One").src="Stream_2.png";
		}		
	}
	else if(img=="Return")
	{	
		document.getElementById("One").src="Stream-Box.png";
		document.Calender.src="Calender_Buttons.png";
	}
	else if(img=="DJ")
		document.DJ.src="DJ_Wanna_Hover.png";
	else if(img=="Prod")
		document.Prod.src="Prod_Wanna_Hover.png";
	else if(img=="Comments")
		document.Comments.src="Comments_Hover.png";
	else if(img=="Item_Menu")
	{	
		<!--document.write(document.getElementById("menu_box").src);  <!--Include this to test for Actual source location and debug logic below.
		if(document.getElementById("menu_box").src == "http://72.233.136.2/3.gif" || document.Calender.src == "http://radio.spu.edu/3.gif")
			return 1;
		else document.item_box.src="Archive_Item.png";
	}
	else if(img == "Brittany")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="BrittanyFortune.png";
		}
	}
	else if(img == "SarahB")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="SaraBloom.png";
		}
	}
	else if(img == "MichaelQ")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="MichaelQ.png";
		}
	}
	else if(img == "Brandon")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="BrandonCouch.png";
		}
	}
	else if(img == "JordanCope")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="JordanCope.png";
		}
	}
	else if(img == "DustyO")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="DustyOConnor.png";
		}
	}
	else if(img == "ChesterP")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="ChesterPinada.png";
		}
	}
	else if(img == "ChesterA")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="ChesterandCompany.png";
		}
	}
	else if(img == "RyanCamden")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="RyanCamden.png";
		}
	}
	else if(img == "GregMcKinnon")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="GregMcKinnon.gif";
		}
	}
	else if(img == "DanielJosh")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="DanielJosh.png";
		}
	}
	else if(img == "Brassel")
	{
		
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="Brassel.png";
		}
		
	}
	else if(img == "Bekkah")
	{
		
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="Bekkah.jpg";
		}
		
	}
	else if(img == "Dusty")
	{
		
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="Dusty.jpg";
		}
		
	}
	else if(img == "ComingSoon")
	{
		if(document.Calender.src == "http://72.233.136.2/Weekly_Cal.png" || document.Calender.src == "http://radio.spu.edu/Weekly_Cal.png")
		{
		document.getElementById("randimg").src="Default_Box.png";
		}
	}
}

function Click(img)
{
	<!--document.write(document.getElementById("itembox").src);
	
	if(img == "Danielson")
	{
		        document.getElementById("item").src="dan_interview.gif";
				document.getElementById("item").useMap="#Danielson";
				return 1;
	}
	
	if(img == "AOM")
	{
				document.getElementById("item").src="ashton_openmic.jpg";
				document.getElementById("item").useMap="#AOM";
				return 1;
	}
	
	if(img == "Aurora_Nectar")
	{
		document.getElementById("item").src="Aurora_Nectar.png";
		document.getElementById("item").useMap="#Aurora_Nectar";
		return 1;
	}
	if(img == "TylerSantoro")
	{
		document.getElementById("itembox").src="Artist_TylerSantoro.png";
		document.getElementById("itembox").useMap="#TylerSantoro";
		return 1;
	}
	 
	if(img == "ThomasCastle")
	{
		document.getElementById("itembox").src="Artist_ThomasCastle.png";
		document.getElementById("itembox").useMap="#ThomasCastle";	
		return 1;
	}
	
	if(img == "SeanHamilton")
	{
		document.getElementById("itembox").src="Artist_SeanHamilton.png";
		document.getElementById("itembox").useMap="#SeanHamilton";
		return 1;
	}
	
	if(img == "Aurora")
	{
				document.getElementById("itembox").src="Artist_Aurora.png";
				document.getElementById("itembox").useMap="#Artist_Aurora";
		return 1;
	}
	
	if(img == "TaylorNeal")
	{
		document.getElementById("itembox").src="Artist_TaylorNeal.png";
		document.getElementById("itembox").useMap="#TaylorNeal";
		return 1;
	}
	if( img == "TaylorVideos")
	{
		document.getElementById("item").src="TaylorNeal_Videos.gif";
		document.getElementById("item").useMap="#Taylor_Videos";
		return 1;
	}
	if(img == "ElDiablo")
	{
		document.getElementById("item").src="ElDiablo_08.png";
		document.getElementById("item").useMap ="#ElDiablo_08";
		return 1;
	}
	if( img == "Aurora_Nectar")
	{
		document.getElementById("item").src="Aurora_Nectar.png";
		document.getElementById("item").useMap="#Aurora_Nectar";
		return 1;
	}
	if( img == "KSPU_Launch")
	{
		document.getElementById("item").src="KSPU_Launch.gif";
		document.getElementById("item").useMap="#KSPU_Launch";
		return 1;
	}
	
}





	var interval = 2500;
	var random_display = 1;
	var imageNum = 0;
	var count=1;
	imageArray = new Array();
	imageArray[imageNum++] = new imageItem("1.gif");
	imageArray[imageNum++] = new imageItem("2.gif");
	imageArray[imageNum++] = new imageItem("3.gif");
	imageArray[imageNum++] = new imageItem("4.gif");
	imageArray[imageNum++] = new imageItem("5.gif");
	var totalImages = imageArray.length; 
	
	function imageItem(image_location) 
	{
		this.image_item = new Image();
		this.image_item.src = image_location;
	}
	
	function get_ImageItemLocation(imageObj) 
	{
		return(imageObj.image_item.src);
	}
	
	function randNum(x, y) 
	{
		var range = y - x + 1;
		return Math.floor(Math.random() * range) + x;
	}
	

	function getNextImage() 
	{
		if (random_display) 
		{
			imageNum = randNum(0, totalImages-1);
		}
		else 
		{
			imageNum = (imageNum+1) % totalImages;
		}
		var new_image = get_ImageItemLocation(imageArray[imageNum]);
		return(new_image);
	}
	function switchImage(place) 
	{
		var new_image = getNextImage();
		document[place].src = new_image;
		var recur_call = "switchImage('"+place+"')";
		timerID = setTimeout(recur_call, interval);
	}
	
	
function picture()
{
	var num = Math.random() * 100;
	num = Math.ceil(num);
	num = num % 3;
	<!--num = 0;
	document.getElementById('randimg').src= num+".jpg";
}
	
function picture2()
{
	var num = Math.random() * 100;
	num = Math.ceil(num);
	num = num % 2;
	document.getElementById('randimg').src= num+".png";
}
	
	
	
	
	
function Launch_Form(iname)
{
	if(iname == "DJ")
		document.getElementById('Custom_Form').src ='DJ_Form.html';
	else if(iname == "Prod")
		document.getElementById('Custom_Form').src ='Prod_Form.html';
	else if(iname == "Comments")
		document.getElementById('Custom_Form').src ='Comments_Form.html';
}
	
	
	
function validate_required(field, alerttxt, field2)
{
with (field)
{
if (value != field2.value)
  {alert(alerttxt); return false;}
else {return true}
}
}

function validate_form(thisform)
{
with (thisform)
{
if (validate_required(Email,"Email must match!", Confirm)==false)
  {email.focus();return false;}
}
}
