

// ---------- script properties ----------

var include_num = 1;
var bold = 0;

// ---------- sites ----------


var s = new Array();

s[0] = "Map^map.asp^Map of EE Locations^map, location, campus map, buildings, building, places";
s[1] = "News and Calendar^newsarchive.asp^News Archive and a Calendar with Upcoming Events^News, events, calendar, upcoming events, date, dates, day, month, planning";
s[2] = "Electrical Engineering Pictures^randompictures.asp^Randomly Selected Pictures^Picture";
s[3] = "Faculty^faculty.asp^Penn State Electrical Engineering Faculty^Faculty, people, workers, professors, teachers";
s[4] = "304 Hammond^pclab.asp^Electrical Engineering Computer Lab in Hammond^computer lab, lab, computer, classroom, 304 hammond, hammond, study, homework";
s[5] = "Clean Rooms^cleanrooms.asp^Clean Rooms^Clean Rooms, Clean room, chemistry, semiconductior, chips, chip, building";
s[6] = "Staff^staff.asp^Staff^staff, workers, custodians, administrators, secretaries, secretary";
s[7] = "Sophmore Circuits Lab^sophmorecircuitslab.asp^Located in room 309 EE West^classroom";
s[8] = "Junior Eletronics Lab^juniorelectronicslab.asp^Located in room 310 EE West^classroom";
s[9] = "Signals and Systems Lab^signalsandsystemslab.asp^Located in room 302 EE West^classroom";
s[10] = "Senior Design Lab^seniordesignlab.asp^Located in room 301 EE West^classroom";
s[11] = "Laboratories^laboratories.asp^EE laboratories^computer, clean rooms, room";
s[12] = "Research Areas^research.asp^Research Penn State Electrical Engineering is currently involved in^resesarch, psp model, signal and image processing, center for information and communication technology research, control systems, communications and space sciences laboratory, electro-optics, electronic and opto-electronic materials and processing, power systems";
s[13] = "Partnerships^partnerships.asp^ ^partnerships, epics, spsee, research, partnership, experience, engineering projects in community service, the society of penn state electrical engineers";
s[14] = "Department Overview^about.asp^Introduction, Department Overview, Department Contact Information, about PSUEE";
s[15] = "Graduate Introduction^gradintroduction.asp^Introduction To Penn State Graduate Program^Graduate, introduction";
s[16] = "Gradutate Degrees^graddegrees.asp^Graduate Degrees Offered at Penn State, Along With Requirements^graduate, degrees, requirements, thesis, financial aid";
s[17] = "Admission Requirements^gradrequirements.asp^Requirements for Admission Into Penn State Graduate Program^graduate, requirements, procedures, how to become a graduate, deadlines, graduate application";
s[18] = "Application Forms^gradapplication.asp^Graduate Application Forms^graduate, forms, apply";
s[19] = "Job Positions^jobs.asp^Job Announcements^part-time, grad student";
s[20] = "Places^places.asp^ ^Map, laboratories, computer labs, research";
s[21] = "Links^links.asp^Helpful Links^links, hyperlinks, helpful";
s[22] = "Special Events^specialevents.asp^events, graduating seniors, party";
s[23] = "Contact Us^contact.asp^Contact Us^e-mail, email, contact, get in touch, write to";
s[24] = "Graduate Research Areas^gradresearch.asp^Graduate Research Areas^communications and networking, control systems, electromagnetics, electronic materials and devices, electro-optics, power systems, remote sensing and space systems, signal and image processing";
s[25] = "Course Descriptions^courses.asp^Courses offered at Electrical Engineering^500 Level, 400, 300, 200, 100 courses, circuit design, seminar, electives, majors, fall, summer, spring, timetable, semester, semesters";
s[26] = "Graduate Research Faculty^gradfaculty.asp^Faculty associated with each research area^communications and networking, control systems, electromagnetics, electronic materials and devices, electro-optics, power systems, remote sensing and space systems, signal and image processing";
s[27] = "F.A.Q.^gradfaq.asp^Frequently Asked Questions^application received, checking application status, toefl exam waived, submitting test scores, application fee waiver, previously refused, defer admission, visa documents";
s[28] = "Graduate Information and Links^gradinfo.asp^ ^state college.com";
s[29] = "Graduate program booklet^gradbooklet.asp^ ^table of contents, address, admission, information, ph. d., assistants, policies, university policies, safety compliance, ethics, patents, copyrights, student association";
s[30] = "BSEE Program Overview^undergradoverview.asp^Undergraduate overview^Undergrad";
s[31] = "Educational Objectives^undergradobjectives^of the BSEE Degree Program^Outcomes";
s[32] = "BSEE Application Information^undergradapplication.asp^Requirements^First-year Admission, Advvanced standing transfer admission, chemistry, chem, math, phys, physics, calculus";
s[33] = "BSEE Degree Requirements^undergradrequirements.asp^Information about the Blue and the Purple Programs^Degree Requirements";
s[34] = "Areas of Specialization within EE^undergradareas.asp^ ^communications, computer hardware, software, control systems, electromagnetics, electronic design, grad school preparation, optics, power systems, remote sensing and space systems, semiconductor devices, signal image processing";
s[35] = "Minors^undergradminors.asp^A minor is a structured collection of classes that make up a sub-discipline.^Engineering leadership development, entrepreneurship, bio-engineering, math, physics, electronic and photonic materials, business, product realization, information sciences and technology";
s[36] = "BSEE Electives^undergradelectives.asp^There are a variety of electives in the EE program. Thesee electives are divided into 7 categories.^300, 400, electives, statistics, arts humanities, social sciences, AHS GA GH GS, Health Physical Activity, GHA, GHS, GPE";
s[37] = "Co-operative education^undergradcoop.asp^Co-op Program^ms. Janet Woomer, Mark Wharton, job experience, salary";
s[38] = "Top 10 reasons to get a BSEE Degree at University Park^undergradreasons.asp^ ^curriculum";
s[39] = "Forms and Presentations^undergradpresentations.asp^ ^petition form, department audit reconcilliation, faculty senate petition instructions college of engineering open house presentation, grad school, ee program guide";
s[40] = "BS Degree Program Booklet^downloads/undergrad.pdf^Downloadable PDF Booklet^Undergraduate program booklet";
s[41] = "Getting More Infomation^undergradinformation.asp^Come in for a visit^Request form, david salvia, visitation, visit";
s[42] = "Webmaster's Page^webmaster.asp^Wembaster: Chris Wharton. Problems With the website? Need to contact somebody? Click above.^Christopher Wharton, website problems, error, problem, designer, web adminisrators, administrator, marsha church, support";
s[43] = "Questions and Hints^questions.asp^Have any questions about the site? Can't find something? Click above.^questions, hints, comments question, can't find something, missing, left out";
s[44] = "Webmaster^webmaster.asp^  ^Smartest guy in the world";

// ---------- end of script properties and sites ----------


var cookies = document.cookie;
var p = cookies.indexOf("d=");

if (p != -1) {
	var st = p + 2;
	var en = cookies.indexOf(";", st);
	if (en == -1) {
		en = cookies.length;
	}
	var d = cookies.substring(st, en);
	d = unescape(d);
}
var od = d;
var m = 0;
if (d.charAt(0) == '"' && d.charAt(d.length - 1) == '"') {
	m = 1;
}

var r = new Array();
var co = 0;

if (m == 0) {
	var woin = new Array();
	var w = d.split(" ");
	for (var a = 0; a < w.length; a++) {
		woin[a] = 0;
		if (w[a].charAt(0) == '-') {
			woin[a] = 1;
		}
	}
	for (var a = 0; a < w.length; a++) {
		w[a] = w[a].replace(/^\-|^\+/gi, "");
	}
	a = 0;
	for (var c = 0; c < s.length; c++) {
		pa = 0;
		nh = 0;
		for (var i = 0; i < woin.length; i++) {
			if (woin[i] == 0) {
				nh++;
				var pat = new RegExp(w[i], "i");
				var rn = s[c].search(pat);
				if (rn >= 0) {
					pa++;
				} else {
					pa = 0;
				}
			}
			if (woin[i] == 1) {
				var pat = new RegExp(w[i], "i");
				var rn = s[c].search(pat);
				if (rn >= 0) {
					pa = 0;
				}
			}
		}
		if (pa == nh) {
			r[a] = s[c];
			a++;
		}
	}
	co = a;
}

if (m == 1) {
	d = d.replace(/"/gi, "");
	var a = 0;
	var pat = new RegExp(d, "i");
	for (var c = 0; c < s.length; c++) {
		var rn = s[c].search(pat);
		if (rn >= 0) {
			r[a] = s[c];
			a++;
		}
	}
	co = a;

}


function return_query() {
	document.jse_Form.d.value = od;
}

function num_jse() {
	document.write(co);
}

function out_jse() {
	if (co == 0) {
		document.write('Your search did not match any documents.<p>Make sure all keywords are spelled correctly.<br>Try different or more general keywords.');
		return;
	}
	for (var a = 0; a < r.length; a++) {
		var os = r[a].split("^");
		if (bold == 1 && m == 1) {
			var br = "<b>" + d + "</b>";
			os[2] = os[2].replace(pat, br);
		}
		if (include_num == 1) {
			document.write(a + 1, '. <a href="', os[1], '">', os[0], '</a><br>', os[2], '<p>');
		} else {
			document.write('<a href="', os[1], '">', os[0], '</a><br>', os[2], '<p>');
		}
	}

}
