// JavaScript Document

//Common to all GRCC Pages

//From Dreamweaver

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//Focused popup window
function popWin(url,height,width,toolbar,menubar,locationbar,scroll,resize,status,name) {
			var Browser;
			var spec;
			spec = "status="+status+",toolbar="+toolbar+",menubar="+menubar+",location="+locationbar+",scrollbars="+scroll+",resizable="+resize+",height="+height+",width="+width;
			remote = window.open(url, name, spec);
			remote.focus();
			remote.location.href = url;
			}
			
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
if (document.images) {
//rollover images  
  search_btn = new Image();
  search_btn.src = "/staging/images/btn_search_off.gif";
  search_btn2 = new Image();
  search_btn2.src = "/staging/images/btn_search_on.gif";
  az_index_tab = new Image();
  az_index_tab.src = "/staging/images/tab_index_off.gif";
  az_index_tab2 = new Image();
  az_index_tab2.src = "/staging/images/tab_index_on.gif";
  sitemap_tab = new Image();
  sitemap_tab.src = "/staging/images/tab_sitemap_off.gif";
  sitemap_tab2 = new Image();
  sitemap_tab2.src = "/staging/images/tab_sitemap_on.gif";
}
function OnImage(name) {
	if (document.images) {
		fullname = eval(name + "2");
		document[name].src = fullname.src;
	}
}
function OffImage(name) {
  if (document.images) {
    fullname = eval(name);
	if (fullname.complete) {
      document[name].src = fullname.src;
	}
  }
}

<!-- Begin
// Script by Trånn: http://come.to/tronds
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/

var initialsubj="Hi there. You may be interested in this."
var initialmsg="Hi:\n\n You may want to check out this page from Green River Community College site: "+window.location
var good;
function checkEmailAddress(field) {

var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
if (goodEmail) {
good = true;
}
else {
alert('Please enter a valid address.');
field.focus();
field.select();
good = false;
   }
}
u = window.location;
function mailThisUrl() {
good = false
checkEmailAddress(document.eMailer.email);
if (good) {

//window.location = "mailto:"+document.eMailer.email.value+"?subject="+initialsubj+"&body="+document.title+" "+u;
window.location = "mailto:"+document.eMailer.email.value+"?subject="+initialsubj+"&body="+initialmsg
   }
}
//  End -->
