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= '
Help
\n'; var sLoading= '

Searching . . .

\n'; var sIFrame= '\n'; var sResults= '
\n'; var sFeedback= '

Got feedback?

\n'; // use iFrame or ScripNode version // depending on Int/Ext placement of YQ //if ( (document.domain.indexOf('yahoo.com')=='-1') || (document.domain.indexOf('yahoo.com.')!='-1') || ((navigator.userAgent.indexOf('Gecko')!='-1') && (navigator.userAgent.indexOf('Safari')=='-1')) ) { // EXTERNAL if(navigator.userAgent.indexOf('Safari')=='-1'){ // populate embedded results oResultIn.innerHTML= sTitle + sCloseBtn + sIcon + sLoading + sResults + sFeedback; oResult.appendChild(oResultIn); // go get JS Results var oJSResults = document.createElement('script'); oJSResults.setAttribute("language","JavaScript"); oJSResults.setAttribute("src", yqAssembleQuery(poForm)); //var oYQRS=document.getElementById('yschyqrs'); //if (oYQRS) return false; if (boolYQreq) return false; //oYQRS = document.getElementsByTagName("head").item(0).appendChild(oJSResults); document.getElementsByTagName("head").item(0).appendChild(oJSResults); //oYQRS.id='yschyqrs'; boolYQreq = !boolYQreq; } else { // INTERNAL // set domain as generic as possible document.domain = 'yahoo.com'; // populate embedded results oResultIn.innerHTML= sTitle + sCloseBtn + sIcon + sLoading + sIFrame + sFeedback; oResult.appendChild(oResultIn); // populate iframe with Embedded results var oIFrame= document.getElementById('yschyqif'); poForm.target= oIFrame.id; poForm.action= "http://yq.search.yahoo.com/yq/search"; poForm.method = "post"; poForm.submit(); } // move icon to front if not there (moz) var oIcon = document.getElementById('yschyqresulticon'); var oTitle = document.getElementById('yschyqresulthead'); if (oIcon && oTitle) oIcon.style.zIndex = oTitle.style.zIndex + 1; // add moveability to open objects var oTitle = document.getElementById('yschyqresulthead'); var oIcon = document.getElementById('yschyqresulticon'); modifyEventListener("add","onmousedown",oTitle,yqDoOnMouseDown); modifyEventListener("add","onmousedown",oIcon,yqDoOnMouseDown); modifyEventListener("add","onmouseup",oTitle,yqDoOnMouseUp); modifyEventListener("add","onmouseup",oIcon,yqDoOnMouseUp); // add close event when user hits escape key // Sorry Safari you crash when we try to capture keydown. if(navigator.appVersion.indexOf('Safari')=='-1'){ modifyEventListener("add","onKeyDown",document,yqCloseYQOverlay); } // following one prevents text selection in dragged objects modifyEventListener("add","onselectstart",document,returnFalse); // set timeout for getting results... oYQObject = oIFrame; oYQTimeout = setTimeout('yqCheckForResults()',20000); return false; } //remove the escape key capturing. Needs to be own function because used in different contexts. function yqRemoveEsc(){ //sorry Safari you crash when we try to capture keydown. if(navigator.appVersion.indexOf('Safari')=='-1'){ modifyEventListener("remove","onKeyDown",document,yqCloseYQOverlay); } } //when esc key pressed close overlay window function yqCloseYQOverlay(evt){ evt = getEventObject(evt); //alert(evt.keyCode); if(evt.keyCode == 27){ yqRemoveOpenResults(); boolYQreq=false; yqRemoveEsc(); return false } } function yqSetFormDefaults(poForm) { var aHidden = new Array(); var i = 0; if (!poForm.ei && (document.charset || document.characterSet)) { aHidden[i] = document.createElement('input'); aHidden[i].name = 'ei'; aHidden[i].id = 'ei'; //aHidden[i].value = 'UTF-8'; if(document.charset){ // IE case aHidden[i].value =document.charset; }else{ if(document.characterSet){ //FF case aHidden[i].value =document.characterSet; }else{ //should never hit this case aHidden[i].value = 'UTF-8'; } } i++; } //format sourceURL var url = document.location; if (url.toString().length > 125) { url = "http://" + document.domain; } if (!poForm.sourceURL) { aHidden[i] = document.createElement('input'); aHidden[i].name = 'sourceURL'; aHidden[i].id = 'sourceURL'; aHidden[i].value = url; i++; }else{ poForm.sourceURL.value = url; } // append above values to poForm for (i=0;i