   // Jimco Add-ins Spawn javascript
   // This script is freely redistributable. //-->
// function spawnJimcoPopup(url, name, options, h, w, x, y, scaleType)
function graphicpopup(url) {
	var windowOptions;
	var scaleType = 'percent';
	var w = 40;
	var h = 60;
	var x = 'center';
	var name = 'Graphic_Popup';
	var options = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes';
   if (scaleType == 'percent') {
     w = (w * screen.availWidth) / 100;
     h = (h * screen.availHeight) / 100;
     if ( w < 350 )
     	w = 350;
   }
   if (x == 'center') {
     x = (screen.availwidth - w) / 2;
     y = (screen.availheight - h) / 2;
   }
   windowoptions = options + ',width=' + w + ',height=' + h + ',left=' + x + ',top=' + y;
   newwindow = window.open(url, name, windowoptions);
   newwindow.focus();
}
function emaillink(address, domain, suffix, params) {
  var email = address + "@" + domain + '.' + suffix
  var emaillink = email
  if (params != '')
    emaillink = emaillink + '?' + params
  var href = ("<a href='" + "mail" + "to:" + emaillink + "'>" + email + "</a>")
  return href
}

function emailtufac(person, params) {
  var email = person + "@TheUtilityFactory.com"
  var emaillink = email
  if (params != '')
    emaillink = emaillink + '?' + params
  var href = ("<a href='" + "mail" + "to:" + emaillink + "'>" + email + "</a>")
  return href
}

function TUFAC_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=TUFAC_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}
function TUFAC_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=TUFAC_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=TUFAC_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}

function TUFAC_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}


/*
  ---------------------------------------------------------------------------------------------
	Used to open a new widnow displaying the passed url, e.g. images/image.png, 'explain.htm'
	A typical call would be:
        <a href="images/rename/ren-chgext-dialog.png" 
		   onClick="image_pu_open('images/rename/ren-chgext-dialog.png', 'popup', 630, 430); return false;">
		note the url must be the same in both places!

*/
function image_pu_open(url, name, w, h)
{
// Fudge factors for window decoration space.
 // In my tests these work well on all platforms & browsers.
w += 32;
h += 96;
 var win = window.open(url,
  name,
  'width=' + w + ', height=' + h + ', ' +
  'location=no, menubar=no, ' +
  'status=no, toolbar=no, scrollbars=no, resizable=no');
 win.resizeTo(w, h);
 win.focus();
}


/*                                                                   yes or no */
function PopoffWindow(windowName,windowWidth,windowHeight,URL,shouldResize,shouldScroll) {
	var availableWidth = screen.availWidth;
   	var availableHeight = screen.availHeight;

   	var windowLeft = (availableWidth - windowWidth) / 2;
   	var windowTop = ((availableHeight - windowHeight) / 2) - 16;
   		
	newWindow = window.open(URL,windowName,"width=" + windowWidth + ",height=" + windowHeight + ",left=" + windowLeft + ",top=" + windowTop + ",location=no,resizable=" + shouldResize + ",scrollbars=" + shouldScroll + ",toolbar=no");
	newWindow.focus();
}


