
function playList1A() {
	wimpy_clearPlaylist();
	setTimeout('playList1B()',100);
}

function playList1B() {
	wimpy_appendPlaylist('playlist', 'ophome_rs.xml', '', 'Operation Homecoming%3A Robert Schaefer', '', '');
}

/*
function addEvent(obj, evType, fn){ 
 	if (obj.addEventListener) { 
		obj.addEventListener(evType, fn, false); 
		return true; 
 	} 	else if (obj.attachEvent){ 
			var r = obj.attachEvent("on"+evType, fn); 
			return r; 
		}	else { 
				return false; 
			} 
}
// addEvent(window, 'load', foo);
// addEvent(object, 'event-type', function-name);


// if the browser can deal with DOM, call the function onload		
if(document.getElementById && document.createTextNode) {
		addLoadEvert(linkImgSnd);
	}


function linkImgSnd() {
	var as,i,islink;
	// grab all links, loop over them;
	as=document.getElementsByTagName('a');
	for(i=0;i<as.length;i++) {
	// check which link has a target attribute, and send this one to popup
		if(as[i].getAttribute('target')=='iframe1')	{
			as[i].onclick=function(){return(popup(this));};
			//as[i].onkeypress=function(){return(popup(this));};
		}
	}
}

	function linkImgSnd(o) {
	// open a new window with the location of the link's href
		alert(o.href);
		return false;
}

*/

// url query data specifies file for iframe
// (in case an iframe file was accessd directly; see iframe.js)
function changeIframe() {
	urldat = unescape(location.search.substring(1, location.search.length));
	if (urldat)
		frames['iframe1'].location = urldat + '.html';
}


// Simon Willsons' addLoadEvent
// http://simon.incutio.com/archive/2004/05/26/addLoadEvent
function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}

function getTargetLinks() {
	var as, i, islink;
	// grab all links, loop over them;
	as = document.getElementsByTagName('a');
	for(i=0;i<as.length;i++) {
	// if link target is iframe, send to addImg() (event handler)
		if(as[i].getAttribute('target')=='iframe1') {
			as[i].onclick = function(){return(addImg(this));};
			//as[i].onkeypress=function(){return(popup(this));};
		}
	}
}

/*
	var alt_schaefer = 'Chairborne: Schaefer smiling after a shower and rare moments in the rear to send email.';
	var alt_jewell = 'Dr. Jewell on deck the USNS Comfort.';
	var alt_gerhardt = 'Gerhardt between supply trucks.';
	var alt_mccary = 'MaCary with rifle and army trucks passing.';
	var alt_douglas = 'Douglas in full battle rattle, with weapons, comm gear, and vehicle.';
	var alt_nea = 'Detail of Operation Homecoming booklet cover; helmet with letters in it.';
*/

function addImg(link) {
	var newimg = document.getElementById('ctrimg');
	newimg.src = 'img/ophome_' + link.id + '.jpg';
	newimg.alt = link.id;
}

// used by iframe js to load iframe if accessed directly.
var inframe = 1;


// if the browser can deal with DOM, call the function onload		
if(document.getElementById && document.createTextNode) {
	addLoadEvent(getTargetLinks);
	addLoadEvent(changeIframe);
}



