/* =====================================================================
	JavaScript Library - Portland Community College library extras
	Written by Gabriel McGovern <gabriel.mcgovern@pcc.edu>
	Compress with jmin, or shrinksafe <http://alex.dojotoolkit.org/shrinksafe/>
	Created: 		2008-05-01 required that pcclib.js is included first!
	Change Log: 
									 						 
 * ===================================================================== */

/* === INITIALIZE === */
addEvent(window, "load", libraryExtras);
function libraryExtras() {
	var i, j, o, c;
	linkType(); 
}


/* === LINKS TYPE === */
function linkType() {
	if (!DOM) return;
	var lnks = document.getElementsByTagName('a');
	var i, a;
	
	for (i=0; a=lnks[i]; i++) {
		
			if (a.className.hasClass("database")) {
				a.innerHTML += ' <em class="link-type" title="Database - www.pcc.edu/help/">[database]</em>';
			}
			else if (a.className.hasClass("video")) {
				a.innerHTML += ' <em class="link-type" title="Journal - www.pcc.edu/help/">[video]</em>';
			}
			else if (a.className.hasClass("journal")) {
				a.innerHTML += ' <em class="link-type" title="Journal - www.pcc.edu/help/">[journal]</em>';
			}
			else if (a.className.hasClass("website")) {
				a.innerHTML += ' <em class="link-type" title="Website - www.pcc.edu/help/">[website]</em>';
			}
			else if (a.className.hasClass("handout")) {
				a.innerHTML += ' <em class="link-type" title="Handout - www.pcc.edu/help/">[handout]</em>';
			}
			else if (a.className.hasClass("article")) {
				a.innerHTML += ' <em class="link-type" title="Article - www.pcc.edu/help/">[article]</em>';
			}
			
		
	}
}


/* Illiad functions */

 function lcPass() { 
  var lcuser = document.Registration.LastName.value;
  lcuser = lcuser.toLowerCase();
  document.Registration.Password2.value = document.Registration.Password1.value = lcuser; 
  } 
 function lcUser() { 
  var lcssn = document.Registration.SSN.value;
  lcssn = lcssn.toLowerCase();
  document.Registration.Username.value = lcssn; 
  } 

function lower(formvalue) {
  var lcvar = document.getElementById(formvalue).value;
  lcvar = lcvar.toLowerCase();
  document.getElementById(formvalue).value = lcvar;
}

