function addDelayedEvent(functionref) {
	if (navigator.userAgent.toLowerCase().indexOf('applewebkit')!=-1) //for Safari
		window.addEventListener("load", functionref, false)
	else if (window.addEventListener) //for Firefox
		window.addEventListener("DOMContentLoaded", functionref, false)
	else if (window.attachEvent) //for Explorer
		window.attachEvent("onload", functionref)
}





/* new flipbook js for popping flipbook media from external photo searches */
function popFlipMedia(fid, mid) {
	pWin = window.open('index.html?fid=' + fid + '&mid=' + mid,'flipbook' + fid,'width=748,height=500,scrollbars=0');
}

/* Hack for Firefox/Flash bug (https://bugzilla.mozilla.org/show_bug.cgi?id=362193) */
try {
  if(navigator.userAgent.toLowerCase().indexOf("firefox")>=0){
    var _el=parent.document.getElementById('contentarea');
    var _cd=parent.document.createElement('div');
    _cd.style.cssText='clear:both;';
    _el.appendChild(_cd);
    _el.style.overflow='visible';
  }
}catch(e){}



function catchEnter(formRef) {
	if (window.event && window.event.keyCode == 13)
	submitSearch(formRef);
	else
	return true;
}
