function tafwin(URL){
		tafWin = window.open(URL,'TAFWin','width=480,height=354,toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=0,copyhistory=0');
}

function diamondchartwin(URL){
		diamondWin = window.open(URL,'TAFWin','width=625,height=450,toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=1,copyhistory=0');
}

function externalLink(URL){
		linkWin = window.open(URL,'LinkWin','width=760,height=500,toolbar=0,directories=0,menubar=1,status=0,resizable=1,location=0,scrollbars=0,copyhistory=0');
}

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_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
	var sobj = selObj.options[selObj.selectedIndex]
	var sval = sobj.value;
	var stype = sobj.linktype;
 	if(sval == "#") {
		alert('Please select an option');
		return;
	}
 	if(stype == "external") {
  		externalLink('popup_link.cfm?siteurl=' + sval);		
	} else {
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	}
  	if (restore) selObj.selectedIndex=0;
}

/* Function that swaps images. */

function di20(id, newSrc) {
    var theImage = FWFindImage(document, id, 0);
    if (theImage) {
        theImage.src = newSrc;
    }
}

/* Functions that track and set toggle group button states. */

function FWFindImage(doc, name, j) {
    var theImage = false;
    if (doc.images) {
        theImage = doc.images[name];
    }
    if (theImage) {
        return theImage;
    }
    if (doc.layers) {
        for (j = 0; j < doc.layers.length; j++) {
            theImage = FWFindImage(doc.layers[j].document, name, 0);
            if (theImage) {
                return (theImage);
            }
        }
    }
    return (false);
}
