// JavaScript Document


// START
//"Print this page" function

var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function printSpecial()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';  
		var stylesheet = '<link href="/css/print.css" rel="stylesheet" type="text/css" />\n';    
		var header = '<img src="/images/Print_Banner-UofM.gif" alt="Print Ready U of M Header">\n<img src="/images/Print_Banner-CTS.gif" alt="Print Ready CTS Header">\n';
		var footer = '<img src="/images/Print_Footer.gif" alt="Print Ready Footer">\n';

		html +=  stylesheet + '</HE' + 'AD>\n<BODY>\n';
		
		var printReadyElem = document.getElementById("centerColumn");
		
		if (printReadyElem != null)
		{
				html += header;
				html += printReadyElem.innerHTML;
				html += footer;
				
		}
		else
		{
			alert("Could not find the centerColumn section in the HTML");
			return;
		}
			
		

		
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("printSpecial","");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the print ready feature is only available in Internet Explorer 4+ and Netscape 6+.");
	}
}

// END
//"Print this page" function





// START
// "E-mail this page" function


function promptAndEmail() {

	var BodyText='You may be interested in reading more about ' +document.title + ' from the University of Minnesota Center for Transportation Studies: ' +window.location;
	var name= prompt('Please enter your name for the e-mail',' ');
	var SubjectLine='CTS Web page sent by '+name;
	var url = 'mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText);
	window.location = url;

}

// END
// "E-mail this page" function
