var iYQIndx = 1;
var oYQObject;
var sYQBGColor = "";
var oYQTimeout;
var boolYQerr=false;
var boolYQreq=false;
var boolYQinline=false;
var sYQNewsThemeURL ="http://us.js1.yimg.com/us.yimg.com/lib/s/newstheme_050616.css";
var sYQDefaultThemeURL = "http://us.js1.yimg.com/us.yimg.com/lib/s/defaulttheme_050616.css";
//var sYQNewsThemeURL ="http://yq.search.yahoo.com/javascript/newsTheme.css";
//var sYQDefaultThemeURL = "http://yq.search.yahoo.com/javascript/defaultTheme.css";
//var sYQNewsThemeURL ="newsTheme.css";
//var sYQDefaultThemeURL = "defaultTheme.css";
if ( document.domain.indexOf('yahoo.com')!='-1' ){
assembleBeacon('load');
}
if (typeof(HTMLElement)!="undefined") {
HTMLElement.prototype.__defineGetter__("currentStyle", function() { return document.defaultView.getComputedStyle(this, null); });
}
function activateYQinl(poEl){
boolYQinline=true;
//if activateYQ returns true then submit the form instead
if(activateYQ(poEl)){
poEl.parentNode.getElementsByTagName("form").item(0).submit();
};
}
function activateYQ(poEl) {
//var oYQRS=document.getElementById('yschyqrs');
//if (oYQRS) return false;
if(boolYQreq) return false;
// beacon turning Y!Q on
assembleBeacon('turnon');
// just submit if not supported
if (!document.getElementById) return true;
if (navigator.appVersion.indexOf('MSIE 5')!='-1' && navigator.appVersion.indexOf('Macintosh')!='-1') return true; // MSIE 5
//if (navigator.appVersion.indexOf('Linux')!='-1' || navigator.appVersion.indexOf('X11')!='-1') return true; // Linux
if (navigator.appVersion.indexOf('Safari')!='-1' && document.domain.indexOf('yahoo.com')=='-1') return true; // Safari
var oForm;
if(boolYQinline){
oForm = poEl.parentNode.getElementsByTagName("form").item(0)
}else{
oForm = poEl.form;
}
// kill any open results
yqRemoveOpenResults();
// set default form values
yqSetFormDefaults(oForm);
// set z-index of all other YQ form elements
yqSetZIndex(oForm);
// populate embedded results
yqFetchResults(oForm);
// color the context background
// (go get parentNode until its yqresult)
oParent = oForm.parentNode;
while (oParent && (oParent.className!="yqcontext" && oParent.className!="yqlink") && oParent.tagName.toUpperCase()!="BODY") {
oParent = oParent.parentNode;
}
if (oParent && (oParent.className=='yqcontext' || oParent.className=='yqlink')) {
if(oParent.currentStyle){
if( oParent.currentStyle.backgroundColor){
sYQBGColor = oParent.currentStyle.backgroundColor;
}
oParent.style.background = "#FFFDE6";
}
}
// increment counter
iYQIndx++;
// set inline back to false in case of mixed elements on page.
boolYQinline=false;
return false;
}
function yqFetchResults(poForm) {
// make and populate div for iframe
var oResult= document.createElement('div');
oResult.id= 'yschyqresult';
oResult.className= 'yschyqresult';
if(boolYQinline){
oResult.className +=' yschyqresultinl';
}
poForm.appendChild(oResult);
// add inner div
var oResultIn= document.createElement('div');
oResultIn.id= 'yschyqresultin';
oResultIn.className= 'yschyqresultin';
//oResult.appendChild(oResultIn);
// prevent bubbling up of body event handlers to this div
modifyEventListener("add","onmouseup",oResult,yqStopEventBubble);
// define div text
var sTitle= '
Related Search Results
\n';
var sIcon= '\n';
//use partner code to define close button image.
var sCloseBtnURL = 'http://us.i1.yimg.com/us.yimg.com/i/us/search/gr/close.gif';
if(document.sYQPartnerCode){
switch(document.sYQPartnerCode){
case 'news':
sCloseBtnURL = 'http://us.i1.yimg.com/us.yimg.com/i/us/nws/gl/closewin_yq.gif';
break;
default:
sCloseBtnURL = 'http://us.i1.yimg.com/us.yimg.com/i/us/search/gr/close.gif';
}
}
var sCloseBtn= '