function openCenteredWindow(url, name, width, height, parms) {
	var left = Math.floor( (screen.width - width) / 2);
	var top = Math.floor( (screen.height - height) / 2);
	var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
	if (parms) { winParms += "," + parms; }
	var win = window.open(url, name, winParms);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
		return win;
}

// Copyright 2005 Bontrager Connection, LLC
// More info: "Automatic New Window for External Links" 
// at http://willmaster.com/possibilities/archives/
function makeExternalLinks() 
{
	var Domains = "www.talyst.com,talyst.com,talyst.mercurycloud.com,translate.google.com,216.239.39.104,216.239.37.104";

	if(Domains.indexOf(" ") != -1) {
	   var splitarray = Domains.split(" ");
	   Domains = splitarray.join("");
	}

	Domains = Domains.toLowerCase();

	var DomainsArray = Domains.split(",");
	for(var i = 0; i < document.links.length; i++) {
	   if(document.links[i].hostname.length < 1) 
	   { continue; }
	   if(document.links[i].target.length > 0)
	   { continue; }
	   var h = document.links[i].hostname.toLowerCase();
		 var chunks = document.links[i].href.split("/");
		 var type = chunks[chunks.length-1].split('.')[1];
	   var makeNewWindow = true;
		 if(type != 'pdf' && type != 'doc' && type != 'jpg' && type != 'eps' && type != 'gif') {
		   for(var ii = 0; ii < DomainsArray.length; ii++) {
		      if(DomainsArray[ii] != h) 
		      { continue; }
		      makeNewWindow = false;
		      break;
		   }			
		 }
	   if(makeNewWindow == true)
	   { document.links[i].target = '_blank'; }
	}	
}

var makeIEBehave = (function(){

    /*Use Object Detection to detect IE6*/
    var  m = document.uniqueID /*IE*/
    && document.compatMode  /*>=IE6*/
    && !window.XMLHttpRequest /*<=IE6*/
    && document.execCommand;
    
    try{
        if(!!m){
            m("BackgroundImageCache", false, true) /* = IE6 only */ 
        }
        
    }catch(oh){};
})();