
function swapBG(element, BG1, BG2) {
element.style.background = (element.style.background == BG1) ? BG2 : BG1;
}

function changeID(id,newname) {
	identity = document.getElementById(id);
	identity.className = newname;
}
	
function toggleID(id,nameone,nametwo) {
	identity = document.getElementById(id);
	identity.className = (identity.className == nameone) ? nametwo : nameone;
}

function openLargePic(myImage,myname,w,h){
  LeftPosition=(screen.width)?(screen.width-w)/2:100;
  TopPosition=(screen.height)?(screen.height-h)/2:100;
  settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
  popupWindow=window.open("",'EnlargePicture',settings);

  popupWindow.document.write("<link href=\"styles.css\" rel=\"stylesheet\" type=\"text/css\">\n");
  popupWindow.document.write("<TITLE>"+myname+"</TITLE>\n");
  popupWindow.document.write("<img src='"+myImage+"'>\n");  
  popupWindow.document.write("<br>\n");  
  popupWindow.document.write("<table width=\"100%\" border=\"0\"><tr>\n");  
  popupWindow.document.write("<td align=\"right\"><A HREF=\"#\" onClick='self.close()'><img src='http://images.shoption.ca/CloseButton.gif'></a></td>\n");
  popupWindow.document.write("</tr></table>\n");  
  popupWindow.document.close();
  popupWindow.focus();
}