// anti-frame code
if (window.location != window.top.location) window.top.location=window.location;



var awin=null;
function PH(url,w,h,caption, title) {
    if (url==null || url=="") { url="about:blank"; w=750; h=500; }
    var ww=w+50;
    var wh=h+100;
    if (title==null || title=="") title="Image Gallery";
    if (caption==null || caption=="") caption="&nbsp;";

    var cl=awin;
    awin=null;
    if (cl!=null) cl.close();
    awin=window.open(url,"Photo","toolbar=no,status=no,width="+ww+",height="+wh+",left=40,top=40,scrollbars=no,resizable=yes");
    awin.document.writeln("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=\"iso-8859-1\"><title>Bradley ECE Department - "+title+"</title></head>");
    awin.document.writeln("<body style=\"color: #000000; background-color: #FFFFFF;\" onBlur=\"window.close();\">");
    awin.document.writeln("<a href=\"javascript:window.close();\"><img src=\""+url+"\" style=\"width: "+w+"px; height: "+h+"px; border-width: 0px; border-style: none; display: block; vertical-align: middle; text-align: center;\" alt=\"Click to close\" /></a>");
    awin.document.writeln("<div style=\"font-weight: bold; text-align: center;\">"+caption+"</div>");
    awin.document.writeln("<div style=\"text-align: center; font-family: verdana,arial,helvetica; \"><a href=\"javascript:window.close();\">Return to previous page</a></div>");
    awin.document.writeln("</body></html>");
    awin.document.close();
    if (navigator.appName=="Netscape") awin.focus();
}



function oPDFwin() {
    window.open("about:blank","pdf","width=800,height=600,left=40,top=40,resizable=yes,toolbar=no,status=yes");
}


function openWindow(url, name) {
    if (url==null || url=="") url="about:blank";
    if (name==null || name=="") name="aphoto";
    window.open(url,name,"width=700,height=560,left=40,top=40");
}



function EA(a1, a2, a3) {
    var email=a1+"@"+a2+"."+a3;
    document.writeln("<a href=\"mailto:"+email+"\">"+email+"</a>\n");
}



function addEngine(name,ext,cat,type)
{
	if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) {
		window.sidebar.addSearchEngine(
		"http://cegt201.bradley.edu/resources/firefox/" + name + ".src",
		"http://cegt201.bradley.edu/resources/firefox/" + name + "."+ ext, name, cat );
	} else {
		alert("You will need a Mozilla based browser to install a search plugin.");
	}
}
