// JavaScript Document

function tafPop(url){
		if(url==null) url= 'tellafriend.jsp';
		sWin = window.open(url,'InvWin',
		'width=400,height=390,toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=0,copyhistory=0');
}

function imagePop(image,w,h){
		aWin = window.open('popImage.jsp?image='+image+'&w='+w+'&h='+h,'testWin',
		'width=600,height=400,toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=1,copyhistory=0');
}


function textPop(pic,w,h){
		aWin = window.open(pic,'testWin',
		'width=600,height=400,toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=1,copyhistory=0');
}

function alertPop(pic,w,h){
		aWin = window.open(pic,'testWin',
		'width=600,height=300,toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=1,copyhistory=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);
}
		
		
