// Rollover Function 

function swapImage(imageID, imagePath) {
	var imgID;
	imgID = document.getElementById(imageID);
	imgID.src = imagePath;
}

// Hide/Show Content

function revealPubs(showdiv, hidediv) {
	var shown;
	var hide;
	shown = document.getElementById(showdiv);
	hide = document.getElementById(hidediv);
	shown.style.display = "block";
	hide.style.display = "none";
}

function revealPrac(showdiv, hidediv) {
	var shown;
	var hide;
	shown = document.getElementById(showdiv);
	hide = document.getElementById(hidediv);
	shown.style.display = "block";
	hide.style.display = "none";
}

function openWindow(url) {
	windowpage = window.open (url,'newwindow','height=510,width=630,scrollbars=1,resizeable=0,toolbar=0,location=0');
}

function openCareers(file) {
	opencareers = window.open (file,'Careers','height=420,width=770,scrollbars=0,resizable=0,toolbar=1,location=0,status=0,menubar=1');
}
function writeHpFlash(){
	document.write( '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="760" height="202"><param name="movie" value="flash/McGeorgeNew.swf" /><param name="bgcolor" value="#000000" /><param name="quality" value="high" /><embed src="flash/McGeorgeNew.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#000000" width="760" height="202"><\/embed><\/object>' );
}
function writeStartFlash(){
	document.write( '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="700" height="440" id="start_here" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="media/videos/start_here.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="media/videos/start_here.swf" quality="high" bgcolor="#ffffff" width="700" height="440" name="start_here" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>' );
}
function writeScrollFlash(){
	document.write( '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="140" height="600" id="scroll" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="media/flash/slide_show.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#FAF8F5" /><embed src="media/flash/slide_show.swf" quality="high" bgcolor="#FAF8F5" width="140" height="600" name="scroll" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>' );
}
function write_x2646(){
	document.write( '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="666" height="360" id="law" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="media/flash/landing/law.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="media/flash/landing/law.swf" quality="high" bgcolor="#000000" width="666" height="360" name="law" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>' );
}
function write_jd2(){
	document.write( '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="300" height="120" id="law" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="media/flash/landing/jd2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#FAF8F5" /><embed src="media/flash/landing/jd2.swf" quality="high" bgcolor="#FAF8F5" width="300" height="120" name="law" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>' );
}
function get_course(){
var fullURL;
var ID;
var iframeurl;
fullURL = parent.document.URL;
ID = fullURL.substring(fullURL.indexOf('?')+1, fullURL.length);
iframeurl = "<iframe src=\"http://www.mcgeorge.edu/catalog/detail.asp?course_number=" + ID + "\" width=\"100%\" height=\"600\"  frameborder=\"0\" scrolling=\"no\"></iframe>";
document.write(iframeurl);
}
function get_faculty(){
var fullURL;
var ID;
var iframeurl;
fullURL = parent.document.URL;
ID = fullURL.substring(fullURL.indexOf('?')+1, fullURL.length);
iframeurl = "<iframe src=\"http://www.mcgeorge.edu/asp/faculty/faculty.asp?id=" + ID + "\" width=\"100%\" height=\"1500\"  frameborder=\"0\" scrolling=\"no\"></iframe>";
document.write(iframeurl);
}
function get_faculty_scholarship(){
var fullURL;
var ID;
var iframeurl;
fullURL = parent.document.URL;
ID = fullURL.substring(fullURL.indexOf('?')+1, fullURL.length);
iframeurl = "<iframe src=\"http://www.mcgeorge.edu/asp/faculty/faculty_scholarship.asp?id=" + ID + "\" width=\"100%\" height=\"1500\"  frameborder=\"0\" scrolling=\"no\"></iframe>";
document.write(iframeurl);
}
function get_faculty_bio(){
var fullURL;
var ID;
var iframeurl;
fullURL = parent.document.URL;
ID = fullURL.substring(fullURL.indexOf('?')+1, fullURL.length);
iframeurl = "<iframe src=\"http://www.mcgeorge.edu/asp/faculty/faculty_bio.asp?id=" + ID + "\" width=\"100%\" height=\"1500\"  frameborder=\"0\" scrolling=\"no\"></iframe>";
document.write(iframeurl);
}
function get_email(){
var fullURL;
var ID;
var iframeurl;
var referURL;
fullURL = parent.document.URL;
referURL = parent.document.referrer;
ID = fullURL.substring(fullURL.indexOf('?')+1, fullURL.length);
iframeurl = "<iframe src=\"http://www.mcgeorge.edu/asp/email.asp?" + ID + "&r=" + referURL + "\" width=\"100%\" height=\"500\"  frameborder=\"0\" scrolling=\"no\"></iframe>";
document.write(iframeurl);
}
function get_report_issue(){
var fullURL;
var ID;
var iframeurl;
fullURL = parent.document.referrer;
iframeurl = "<iframe src=\"http://www.mcgeorge.edu/ASP/forms/report/report_issues.asp?" + fullURL + "\" width=\"100%\" height=\"300\"  frameborder=\"0\" scrolling=\"no\"></iframe>";
document.write(iframeurl);
}
// Preload Images
var image0 = new Image(); image0.src = "images/move2.gif";
var image1 = new Image(); image1.src = "images/admissions_financial_aid/photo_julia_tsai-r.gif";
var image2 = new Image(); image2.src = "images/admissions_financial_aid/learn_about_student_arrow-r.gif";

// Spam-proof email by deanq.com
// Copyright © 2003. deanq.com
function email(who,domain,subject) {
  if (!domain) var domain = "pacific.edu";
  if (!subject) var subject = " ";
  var attrib = "width=1,height=1,resizable=1,toolbar=0,menubar=0,left=2000,top=2000,screenX=2000,screenY=2000,scrollbars=0";
  MyWindow=window.open('', "email", attrib);
  MyWindow.document.write("<HTML><HEAD><TITLE> <\/TITLE><META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=iso-8859-1'><\/HEAD><BODY leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad=\"javascript:location.href='mailto:" + who + "@" + domain + "?subject=" + subject + "'\" onBlur='window.close()' onFocus='window.close()'><\/BODY><\/HTML>");
  MyWindow.window.resizeTo(1, 1);
  MyWindow.document.title = " ";
  MyWindow.document.close();
}	
