function newImage(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}

function r_on(i) {
  if (document.images) { 
    if (document[i].src.indexOf("down") < 0) {
      document[i].src = "images/" + i + "_over.gif"; 
    }
  }
}

function r_off(i) {
  if (document.images) { 
    if (document[i].src.indexOf("down") < 0) {
      document[i].src = "images/" + i + ".gif"; 
    }
  }
}

function s_on(i) {
  if (document.images) { 
    if (document[i].src.indexOf("down") < 0) {
      document[i].src = "images/" + i + "_over.gif"; 
    }
  }
}

function s_off(i) {
  if (document.images) { 
    if (document[i].src.indexOf("down") < 0) {
      document[i].src = "images/" + i + ".gif"; 
    }
  }
}

function poppup(page) {
  popUpWin = window.open(page,'PopWin','resizeable=no,scrollbars=yes,top=0,left=0,width=220,height=350');
}

function open_window(url){
  demo=window.open(url,"demo","width=500,height=400,toolbar=yes,directories=0,status=0,menubar=yes,resizable=yes,scrollbars=yes");
} 

function leaveSite3(site) {
   if (confirm("You are now leaving the Devlin Architecture web site. We take no responsibility for, and exercises no control over, the organizations, views, accuracy, copyright or trademark compliance or legality of any material outside of our site.\n\nThank you for visiting our site.") == 1) {
      window.open(site, 'perceptions','toolbar=yes,width=800,height=600,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=yes')
   }
}



function writeDate() {
  theDate = new Date();
  var yearLocation=12;
  if (theDate.getDate() < 10) {
  	yearLocation=yearLocation-1
  }
  var theGMTYear = theDate.toGMTString();
  var theYear = theGMTYear.substring(yearLocation,yearLocation+5);
  document.write(theYear);
}
