// JavaScript Document

function start()
{
	//makeTall();
//	randomLink("imgLink","Event");
	
}

function randomLink(a , b)
{
	var x;
	var links = new Array("/spotlight/tilly.shtml", "/spotlight/wilson.shtml", "", "#none");
	var spotimg = new Array("/spotlight/img/tilly.gif", "/spotlight/img/wilson.gif", "/template/images/test2.gif" ,"/template/images/test2.gif");
	var spotquote = document.getElementById(b);		
	var spotlight = document.getElementById(a);
	var image = get_random(x);
	while (image > links.length -1)
		{image = get_random(x);}				
	//alert(spotlight);
	spotlight.href = links[image];
	spotquote.src = spotimg[image];
	//alert(spotlight.href);
}

function get_random(image)
{
	image = Math.round(Math.random() * 10);
	return image; 
}

function makeTall()
{
var news = document.getElementById('News').offsetHeight;
//var smenu = document.getElementById('MsectionMenu').offsetHeight; 
if(document.getElementById('content'))
var con = document.getElementById('content').offsetHeight; 
if(document.getElementById('contentM'))
var con = document.getElementById('contentM').offsetHeight; 

var x;
x = news;
//if (smenu > x) {x = smenu;};
if (con > x) {x = con;};

document.getElementById('News').style.height = x +"px";
//document.getElementById('MsectionMenu').style.height = x +'px' ;
if(document.getElementById('content'))
document.getElementById('content').style.height = x + "px";
if(document.getElementById('contentM'))
document.getElementById('contentM').style.height = x + "px";

}
function goIntranet(place) {
 switch(place) {
 case 0:
 if(confirm("Access to the Student Intranet requires a valid Law Student account. Click OK to continue or Cancel to return"))
 {
 location.href = "https://jefferson.law.ou.edu/intranet"
 }
 break

 case 1:
 if(confirm("Access to the Faculty/Staff Intranet requires a valid Faculty or Staff account. Click OK to continue or Cancel to return"))
 {
 location.href = "https://jay.law.ou.edu/intranet/fs"
 }
 break
 }
}

function QuickLink() {
 place = document.getElementById('picked').value;
 window.location.href = place;
 return true;
}
