<!--

var iam = navigator.appName+navigator.appVersion.substring(0,1);
var win, launcher;

var availWidth, availHeight;
if (screen.availWidth) {
	availWidth = screen.availWidth;
	availHeight = screen.availHeight;
} else {
	availWidth = screen.width;
	availHeight = screen.height - 30;
}
//var w = 770, h = 541;
//var w = 994, h = 709;
var w = 880, h = 640;
var scrollbars = 0;
if (w > availWidth || h > availHeight) {
	scrollbars = 1;
	if (w > availWidth) w = availWidth;
	if (h > availHeight) h = availHeight;
}
var wint = Math.floor((availHeight - h) / 2);
var winl = Math.floor((availWidth - w) / 2);


var winProps = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl + ",scrollbars=1";
if (true || iam == "Netscape4") winProps += ',resizable';

function Launch(theURL) {
	if (theURL.indexOf(".wmv") > -1 || theURL.indexOf(".wma") > -1 || theURL.indexOf(".mp3") > -1 || theURL.indexOf(".asf") > -1)
		return (true);

	if (theURL.indexOf("faculty.asp") > -1 || theURL.indexOf("issue_submission") > -1 || theURL.indexOf("links.asp") > -1)
		var theseWinProps = "height=300,width=450,top=" + wint + ",left=" + winl + ",scrollbars=yes,resizable";
	else
		var theseWinProps = winProps;
	if (arguments.length >= 3) {
		// optional width and height arguments were specified.
		var newW = arguments[1];
		var newH = arguments[2];
		if (newW > availWidth) newW = availWidth;
		if (newH > availHeight) newH = availHeight;
		theseWinProps = theseWinProps.replace(/width=[0-9]{1,4}/, "width=" + newW);
		theseWinProps = theseWinProps.replace(/height=[0-9]{1,4}/, "height=" + newH);
		/*if (arguments.length == 4) {
			theseWinProps = theseWinProps.replace(",resizable", "");
		}*/
	}
	if (typeof(win = window.open(theURL, 'win', theseWinProps)) != "object") {
		// pop-up blocker stopped new window. just go to the URL anyway.
		return (true);
	}
	else if (typeof(win) == "object") {
		if (win == null) {
			var msg = "Software on your computer is preventing us from launching a pop-up window.\r\n" +
				"Please disable any pop-up blocking software and try again by first hitting the\r\n" +
				"cancel button.\r\n\r\n" +
				"If you continue to experience problems, hit the okay button and we will attempt to\r\n" +
				"load the new page in this window.";
			if (confirm(msg)) self.location = theURL;			
		} else {
			win.location.replace('about:blank');
			win.focus();
			win.location = theURL;
			// the window already exists. replace it with the new one.
		}
	}
	// window launched okay. stop mouseclick event for clicked link.
	return (false);	
}

function PrinterFriendly(theURL) {
	var qsAnd = "";
	if (typeof(totalRecords) != "undefined") {
		var msg = "Your search yielded more than " + rowsPerPage + " results. " +
			"To print all " + totalRecords + " results, click OK.\r\n" +
			"To print only the page you see, press CANCEL.";
		if (confirm(msg)) qsAnd += "&rows=all";
	}
	hiddenFrame.location.replace(theURL + qsAnd);
}

var emailRegEx = /^(\w+[\w|\.|-]*\w*)(@\w+[\w|\.|-]*\w+\.\w{2,4}$)/;
function forgotPW(href) {
	var msg = "Please specify the email address for which you cannot remember the password.";
	var exampleEmail = "example@aol.com";
	var toEmail = prompt(msg,exampleEmail);
	while ((toEmail != null && !emailRegEx.test(toEmail)) || toEmail == "example@aol.com") {
		msg = "The e-mail address you entered is not valid. Please enter a valid e-mail address.";
		toEmail = prompt(msg,exampleEmail);
	}
	if (toEmail != null) self.location = href + "&User_Login=" + toEmail;
}

function lsPrint() {
	lsWindow = window.open("", "printWindow", "width=600,height=400,scrollbars=yes,resizable");
	lsWindow.document.body.innerHTML = obj("printable").innerHTML.replace(/<.*Click here to print this page[^>]*>/g, '');
	lsWindow.document.body.style.fontFamily = "Arial, Helvetica, Tahoma, Verdana, sans";
	lsWindow.print();
}

function obj(strObj) {
	if (document.layers) return (true);
	return (document.all) ? document.all[strObj] : document.getElementById(strObj);
}

var dlSGUID, dlInterval, dlPercent = "0", dlContainer, dlPackaging, dlFormat, dlWMA, dlMP3, dlProgress, dlGlow, dlEnabled, dlComplete, dlPInterval, dlSelectedFormat;
function Download(sguid, e) {
	dlSGUID = sguid;
	// update file progress every 5 seconds
	var imgPath = "https://" + window.location.host + "/catalog2/images/download_";
	var posx = 0, posy = 0;
	if (!e) var e = window.event;
	if (e.pageX || e.pageY) {
		posx = e.pageX;
		posy = e.pageY;
	} else if (e.clientX || e.clientY) {
		posx = e.clientY + document.body.scrollLeft;
		posy = e.clientY + document.body.scrollTop;
	}
	document.body.innerHTML += '<div id="dlContainer" ' +
		'style="background-image:url(' + imgPath + 'bg.jpg);width:352px;height:152px;left:' + (posx-176) + 'px;top:' + (posy-76) + 'px;position:absolute;">' +
		'<a href="#" onClick="document.body.removeChild(dlContainer);dlPercent=0;return(false);" style="position:absolute;left:323px;top:7px;">' +
			'<img src="https://' + window.location.host + '/catalog2/images/spacer.gif" width="22" height="21" border="0" alt="Close"></a>' +
		'<img id="dlPackaging" src="' + imgPath + 'packaging.gif" alt="Download Packaging" style="position:absolute;left:15px;top:15px;display:none;" width="225" height="15">' +
		'<img id="dlProgress" src="' + imgPath + 'progress.jpg" style="position:absolute;left:27px;top:67px;width:19px;height:22px;">' +
		'<img id="dlGlow" src="' + imgPath + 'glow.jpg" style="position:absolute;left:30px;top:66px;">' +
		'<img id="dlFormat" src="' + imgPath + 'format.gif" alt="Please choose a format..." style="position:absolute;left:15px;top:15px;" width="179" height="13">' +
		'<a id="dlWMA" href="http://togo.legalspan.com/download.aspx?s=' + dlSGUID + '&f=wma" onclick="return(DownloadFormat(\'wma\'));" style="position:absolute;left:4px;top:52px;">' +
		'<img src="' + imgPath + 'wma.jpg" width="175" height="54" border="0"></a>' +
		'<a id="dlMP3" href="http://togo.legalspan.com/download.aspx?s=' + dlSGUID + '&f=mp3" onclick="return(DownloadFormat(\'mp3\'));" style="position:absolute;left:179px;top:52px;">' +
		'<img src="' + imgPath + 'mp3.jpg" width="169" height="54" border="0"></a>' +
		'<img id="dlComplete" src="' + imgPath + 'complete.jpg" alt="Download Complete" style="position:absolute;left:10px;top:51px;display:none;" width="329" height="55">' +
		'<a id="dlEnabled" href="http://togo.legalspan.com/download.aspx?s=' + dlSGUID + '" style="position:absolute;display:none;left:115px;top:109px;" onClick="document.body.removeChild(dlContainer);dlPercent=0;">' +
			'<img src="' + imgPath + 'enabled.jpg" border="0" alt="Download"></a>' +
		'</div>';
	dlContainer = obj("dlContainer");
	dlFormat = obj("dlFormat");
	dlWMA = obj("dlWMA");
	dlMP3 = obj("dlMP3");
	dlProgress = obj("dlProgress");
	dlPackaging = obj("dlPackaging");
	dlGlow = obj("dlGlow");
	dlEnabled = obj("dlEnabled");
	dlComplete = obj("dlComplete");
	return (false);
}

function DownloadFormat(strSelectedFormat) {
	dlSelectedFormat = strSelectedFormat;
	dlEnabled.href += "&f=" + strSelectedFormat;
	dlFormat.style.display = dlWMA.style.display = dlMP3.style.display = "none";
	dlPackaging.style.display = "";
	dlInterval = setInterval("DownloadInterval()", 5000);
	dlPInterval = setInterval("DownloadAdvance()", 2000);
	return (false);
}

function DownloadAdvance() {
	window.status = dlPercent;
	var pmax = 2.92;	
	var newProgress = parseInt(dlProgress.style.width.replace("px", "")) + 1;
	var actualProgress = Math.ceil(pmax * dlPercent);
	if (actualProgress > newProgress)
		newProgress = actualProgress;
	else if (newProgress > pmax * 100)
		newProgress = pmax * 100;
	if (newProgress == pmax * 100) {
		clearInterval(dlInterval);
		clearInterval(dlPInterval);
		dlGlow.style.display = "none";
		dlPackaging.style.display = "none";
		dlComplete.style.display = "";
		dlEnabled.style.display = "";
	}
	dlProgress.style.width = newProgress + "px";
	dlGlow.style.left = (newProgress + 11) + "px";
}

function DownloadInterval() {
	RunHttp(window.location.protocol + "//www.legalspan.com/catalog2/progressbar.asp?s=" + dlSGUID + "&f=" + dlSelectedFormat);
	setTimeout("DownloadAdvance()", 50);
}

function RunHttp(url) {
	var xmlhttp=false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
		}
	}
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != "undefined") {
		xmlhttp = new XMLHttpRequest();
	}
	
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4) {
			params = xmlhttp.responseText.split('&');
			for (key in params) {					
				if (typeof(params[key]) != "function") {
					keyvalue = params[key].split('=');
					if (keyvalue[1].substring(0, 11) == "function(){")
						eval(keyvalue[1].substring(11, keyvalue[1].length-1));
					else
						eval(keyvalue[0] + " = unescape('" + keyvalue[1] + "')");
				}
			}
		}
	}
	xmlhttp.open("GET", url, true);
	xmlhttp.send(null);
}

//-->