﻿var d=document;var pageHeight;var mainContentHeight;var frameHeight;var mv=0;var tr=0;var dtop;var o1=0;var o2=0;var i1=0;var i2=0;var alwaysload=1;var webtype=0;var wt;var vrt1;var vrt2;var hrz1;var hrz2;var frst;var selected;var adif=d.getElementById("adif");var ifad=d.getElementById("ifad");var divc1=d.getElementById("divc1");var divc2=d.getElementById("divc2");var adl=0;var aa=0;function MinItH(hv){window.onresize=OnResizeHandler;var logo=d.getElementById("logo");logo.style.visibility="visible";var scon=d.getElementById("scon");scon.style.visibility="visible";if(hv==1){var hf1=d.getElementById("fr1");var hd1=d.getElementById("divc1");var hf2=d.getElementById("fr2");var hd2=d.getElementById("divc2");var hmd1=d.getElementById("imdv1");var hmd1b=d.getElementById("min1");var sitc=d.getElementById("sitc-1");var cl=d.getElementById("cl1");hrz1=0;o1=1;if(vrt2==1){hd2.style.display="block";}}else{var hf1=d.getElementById("fr2");var hd1=d.getElementById("divc2");var hf2=d.getElementById("fr1");var hd2=d.getElementById("divc1");var hmd1=d.getElementById("imdv2");var hmd1b=d.getElementById("min2");var sitc=d.getElementById("sitc-2");var cl=d.getElementById("cl2");hrz2=0;o2=1;if(vrt1==1){hd2.style.display="block";}}var hdiv1=d.getElementById("Div1");var htdiv=d.getElementById("topdiv");hd1.style.width="49.9999%";hmd1.style.display="block";hmd1b.style.display="none";sitc.style.display="block";cl.style.display="block";hd1.style.height=(pageHeight/2)+"px";hd1.style.top=(pageHeight/2)+"px";hf1.style.height=(pageHeight/2)+"px";hd1.style.zIndex="5000";document.getElementById("disp").style.display="block";}function MinMax2(obj){var allcdiv=d.getElementById("allc");var fr1=d.getElementById("fr1");var fr2=d.getElementById("fr2");document.getElementById("disp").style.display="none";var currentDiv=obj.parentNode.parentNode;var mnu=d.getElementById("menu1");var scon=d.getElementById("scon");var tdiv=d.getElementById("topdiv");var logo=d.getElementById("logo");var tpd=d.getElementById("topdiv");if(obj.id=="im1"){allcdiv.style.width="100%";divc1.style.width="100%";divc1.style.height=pageHeight+"px";divc1.style.display="block";fr1.style.height=pageHeight+"px";mnu.style.visibility="hidden";scon.style.visibility="hidden";logo.style.visibility="hidden";tdiv.style.top="12px";divc2.style.display="none";var md1=d.getElementById("imdv1");md1.style.display="none";var md1b=d.getElementById("min1");md1b.style.display="block";divc1.style.top="0px";}else{allcdiv.style.width="100%";divc2.style.width="100%";divc2.style.height=pageHeight+"px";divc2.style.top="0px";divc2.style.display="block";fr2.style.height=pageHeight+"px";mnu.style.visibility="hidden";scon.style.visibility="hidden";logo.style.visibility="hidden";tdiv.style.top="12px";divc1.style.display="none";var md2=d.getElementById("imdv2");md2.style.display="none";var md2b=d.getElementById("min2");md2b.style.display="block";}}function MinMaxV(obj){var vfr1=d.getElementById("fr1");var vfr2=d.getElementById("fr2");var vdivc1=d.getElementById("divc1");var vdivc2=d.getElementById("divc2");var vallcdiv=d.getElementById("allc");var vtdiv=d.getElementById("topdiv");var vmnu=d.getElementById("menu1");var vscon=d.getElementById("scon");var vlogo=d.getElementById("logo");var vmd1=d.getElementById("imdv1");var vmd1b=d.getElementById("min1");var vmd2=d.getElementById("imdv2");var vmd2b=d.getElementById("min2");var disp=d.getElementById("disp");if((obj.id=="imv1")||(obj=="imv1")){vdivc1.style.top="0px";vdivc1.style.height=pageHeight+"px";vfr1.style.height=pageHeight+"px";vmd1.style.display="none";vmd1b.style.display="block";vmnu.style.visibility="visible";vscon.style.visibility="visible";vlogo.style.visibility="visible";o1=1;}else{vdivc2.style.top="0px";vdivc2.style.height=pageHeight+"px";vfr2.style.height=pageHeight+"px";vmd2.style.display="none";vmd2b.style.display="block";vmnu.style.visibility="visible";vscon.style.visibility="visible";vlogo.style.visibility="visible";disp.style.display="none";o2=1;}}function MinMaxH(obj){window.onresize="";var allcdiv=d.getElementById("allc");var fr1=d.getElementById("fr1");var fr2=d.getElementById("fr2");var mnu=d.getElementById("menu1");var scon=d.getElementById("scon");var tdiv=d.getElementById("topdiv");var logo=d.getElementById("logo");var tc=d.getElementById("tabc");var cl1=d.getElementById("cl1");var cl2=d.getElementById("cl2");if((obj.id=="imh1")||(obj=="imv1")){divc1.style.width="100%";divc1.style.height=(pageHeight/2)+"px";fr1.style.height=(pageHeight/2)+"px";divc1.style.display="block";mnu.style.visibility="hidden";tdiv.style.top="12px";cl1.style.display="none";var md1=d.getElementById("imdv1");md1.style.display="none";var md1b=d.getElementById("min1");md1b.style.display="block";hrz1=1;divc1.style.top=(pageHeight/2)+"px";if(divc2.style.display=="block"){divc2.style.display="none";vrt2=1;}else{vrt2=0;}o1=1;}else{divc2.style.top=(pageHeight/2)+"px";divc2.style.width="100%";divc2.style.height=(pageHeight/2)+"px";fr2.style.height=(pageHeight/2)+"px";divc2.style.display="block";mnu.style.visibility="hidden";tdiv.style.top="12px";cl2.style.display="none";var md2=d.getElementById("imdv2");md2.style.display="none";var md2b=d.getElementById("min2");md2b.style.display="block";hrz2=1;if(divc1.style.display=="block"){divc1.style.display="none";vrt1=1;}else{vrt2=0;}o2=1;}}function SetFramesHeight(){var isIE=window.innerHeight==null;pageHeight=isIE?d.documentElement.offsetHeight:window.innerHeight;mainContentHeight=pageHeight-24;if(mainContentHeight<0){mainContentHeight=0;}var frm1=d.getElementById("divc1");var frm2=d.getElementById("divc2");var ifrm1=d.getElementById("divc1");var ifrm2=d.getElementById("divc2");d.getElementById("topdiv").style.top="12px";frm1.style.top=(pageHeight/2)+"px";frm2.style.top=(pageHeight/2)+"px";frm1.style.height=(pageHeight/2)+"px";frm2.style.height=(pageHeight/2)+"px";ifrm1.style.height=(pageHeight/2)+"px";ifrm2.style.height=(pageHeight/2)+"px";frm1.style.width="49.99%";frm2.style.width="49.99%";var allc=d.getElementById("allc");allc.style.width="100%";var fr1=d.getElementById("fr1");fr1.allowTransparency="true";}function Init(){SetFramesHeight();}function OnResizeHandler(){SetFramesHeight();}function makeURL(stc){if(stc.value!=''){var issite=true;if(issite==true){window.onbeforeunload=function(){return "Click OK to leave BevyFind. Click Cancel to load the desired site in BevyFind.";};}var stcdiv=stc.parentNode;var frarray2=stcdiv.getElementsByTagName("iframe");var frame2=frarray2[0];frame2.src=stc.value;frame2.style.display="block";stcdiv.style.zIndex=5000;var qw=d.getElementById(stc.id);qw.value='';var imd=stcdiv.getElementsByTagName("div");var imdv=imd[0];imdv.style.display="block";var sit=stcdiv.getElementsByTagName("input");var sitc=sit[0];sitc.style.display="block";setTimeout(is,10000);}}function makeURLpst(ths){function mkurl(){var issite=true;if(issite==true){window.onbeforeunload=function(){return "Click OK to leave BevyFind. Click Cancel to load the desired site in BevyFind.";};}var qwe=d.getElementById(ths.id);var val=qwe.value;var qwediv=qwe.parentNode;var frarray3=qwediv.getElementsByTagName("iframe");var frame3=frarray3[0];frame3.src=val;frame3.style.display="block";var tyu=d.getElementById("searchcontrol");qwediv.style.zIndex=5000;qwe.value='';}setTimeout(mkurl,250);setTimeout(is,20000);}function showd(icn){divid=icn.parentNode;divid.style.display="block";var inparr=divid.getElementsByTagName("input");var inp=inparr[1];inp.style.visibility="visible";inp.setAttribute('autocomplete','off');inp.focus();inp.value="http://";}function is(){var issite=false;window.onbeforeunload=null;}function address(val){var issite=true;if(issite==true){window.onbeforeunload=function(){return "Click OK to leave BevyFind. Click Cancel to load the desired site in BevyFind.";};}var pardiv=val.parentNode.parentNode;var ifrarr=pardiv.getElementsByTagName("iframe");var ifra=ifrarr[0];ifra.src=val.value;ifra.style.display="block";val.blur();pardiv.style.zIndex=5000;var imd=pardiv.getElementsByTagName("div");var imdv=imd[0];imdv.style.display="block";var sit=pardiv.getElementsByTagName("input");var sitc=sit[0];sitc.style.display="block";setTimeout(is,20000);}var elem=d.getElementsByTagName("iframe");elval=elem[0];var h="g";var arr=d.getElementsByTagName("input");var t1=arr[3];if(d.getElementById("hidd")){var que=d.getElementById("hidd").value;}function getElementsByClass(searchClass,node,tag){var classElements=new Array();if(node==null)node=d;if(tag==null)tag='*';var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)");for(i=0,j=0;i<elsLen;i++){if(pattern.test(els[i].className)){classElements[j]=els[i];j++;}}return classElements;}function dispy(){var fra1=d.getElementById("fr1");var fra2=d.getElementById("fr2");var imdv1=d.getElementById("imdv1");var imdv2=d.getElementById("imdv2");var cl1=d.getElementById("cl1");var cl2=d.getElementById("cl2");fra1.style.display="block";fra2.style.display="block";divc1.style.display="block";divc2.style.display="block";divc1.style.zIndex=5000;divc2.style.zIndex=5000;imdv1.style.display="block";imdv2.style.display="block";cl1.style.display="block";cl2.style.display="block";var dv=d.getElementById("Div2");var arr=[0];var had=getElementsByClass('gsc-wrapper gsc-thinWrapper',dv,'div');var ee=getElementsByClass('gsc-results gsc-webResult',dv,'div');var ev=getElementsByClass('gsc-adBlockVertical',dv,'div');if(had.length!=0){arr[0]=had[0];}if((screen.width>1220)&&(screen.width<1350)){}if(screen.width>1349){}}function dispn(x){var fra1=d.getElementById("divc1");var fra2=d.getElementById("divc2");var cl1=d.getElementById("cl1");var cl2=d.getElementById("cl2");var imdv1=d.getElementById("imdv1");var imdv2=d.getElementById("imdv2");if(x==1){vrt1=0;o1=0;fra1.style.display="none";divc1.style.zIndex=0;cl1.style.display="none";imdv1.style.display="none";}if(x==2){vrt2=0;o2=0;fra2.style.display="none";divc2.style.zIndex=0;cl2.style.display="none";imdv2.style.display="none";}if(x==3){fra1.style.display="none";fra2.style.display="none";divc1.style.display="none";divc2.style.display="none";fra1.style.zIndex=0;fra2.style.zIndex=0;divc1.style.zIndex=0;divc2.style.zIndex=0;cl1.style.display="none";cl2.style.display="none";imdv1.style.display="none";imdv2.style.display="none";o1=0;o2=0;}var dv=d.getElementById("Div2");var arr=[0];var had=getElementsByClass('gsc-wrapper gsc-thinWrapper',dv,'div');var ev=getElementsByClass('gsc-adBlockVertical',dv,'div');var ee=getElementsByClass('gsc-results gsc-webResult',dv,'div');if(had.length!=0){arr[0]=had[0];}if((screen.width>1220)&&(screen.width<1350)){}if(screen.width>1349){}}var combo=d.getElementById("combo");function srcr(){function now(){self.scrollTo(0,0);}setTimeout(now,500);}function ga(){window.clearInterval(intv);var q=d.getElementById("q");que=q.value;if(window.location.hash.replace(/\+/g," ").substr(1)!==que){if(window.innerHeight==null){que=encodeURI(que);}vl="y";var hq=que.replace(/"%20"/g," ");window.location.hash="#"+hq;var vl=1;gsearch(que);loadSearchResults();if(window.innerHeight==null){que=decodeURIComponent(que);}d.title=que;d.getElementById("q0").value=que;}q.blur();blursugg();selected=0;if((readCookieOrg('addit')!==null)&&(readCookieOrg('addit')!=="0")&&(readCookieOrg('bevyview')!=="1")){srch(readOneCookie('addit'));}var intv=window.setInterval('pl()',2000);}function ga2(){var q0=d.getElementById("q0");que=q0.value;switch(webtype){case 0:{gsearch(que);break;}case 1:{yahooGetter(que,"images",1);break;}case 2:{yahooGetter(que,"news",1);break;}case 3:{bingGetter(que,1);break;}case 4:{yahooGetter(que,"blog",1);break;}}}function gettype(type,obj){var pdiv="";switch(type){case('web'):{pdiv=obj.parentNode.parentNode;break;}case('news'):{pdiv=obj.parentNode.parentNode;break;}case('img'):{pd=obj.parentNode.parentNode;var aarr=getElementsByClass('imdiv',pd,'div');var pdiv=aarr[0];break;}case('video'):{pdv=obj.parentNode.parentNode.parentNode;var aarrv=getElementsByClass('vidthumbnail',pdv,'div');var pdiv=aarrv[0];break;}case('twit'):{pdiv=obj.parentNode;break;}}return pdiv;}function op1(type,obj){var if1=d.getElementById("fr1");var if2=d.getElementById("fr2");var tdiv=gettype(type,obj);var eys=tdiv.getElementsByTagName("a");var a1=eys[0];if1.style.borderStyle="solid";if1.style.borderWidth="1px";if2.style.borderStyle="solid";if2.style.borderWidth="1px";divc1.style.display="block";divc1.style.zIndex="5000";var nm;if(type!=="video"&&type!=="twit"&&type!=="web"){nm=a1.name;}else{nm=a1.href;}var hq2=nm;var isIE=window.innerHeight==null;var isCH=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;if(!isIE&&!isCH){var nmhas=nm.indexOf('http://lrd.yahooapis.com');if(nmhas!==-1){var hq1=nm.substring(0,50)+escape(nm.substring(50));hq2=hq1.replace(/%3D/g,"=").replace(/\+/g,"%2B").replace(/%2C/g,",").replace(/\?/g,"%2F").replace(/%28/g,"(").replace(/%29/g,")").replace(/%7E/g,"~");}else{var hq2=nm;}}if(if1.src!=hq2){var issite=true;if(issite==true){window.onbeforeunload=function(){return "Click OK to leave BevyFind. Click Cancel to load the desired site in BevyFind.";};}if1.src=hq2;if1.parentNode.style.zIndex=5000;setTimeout(is,15000);var imdv1=d.getElementById("imdv1");var sitc1=d.getElementById("sitc-1");var cl1=d.getElementById("cl1");i1=1;}if(o1==0){divc1.style.display="block";if1.style.display="block";imdv1.style.display="block";sitc1.style.display="block";cl1.style.display="block";o1=1;}if(hrz2==1){MinItH(2);}}function op2(type,obj){var if2=d.getElementById("fr2");var if1=d.getElementById("fr1");var tdiv=gettype(type,obj);var eys=tdiv.getElementsByTagName("a");var a1=eys[0];if1.style.borderStyle="solid";if1.style.borderWidth="1px";if2.style.borderStyle="solid";if2.style.borderWidth="1px";divc2.style.display="block";divc2.style.zIndex="5000";var nm;if(type!=="video"&&type!=="twit"&&type!=="web"){nm=a1.name;}else{nm=a1.href;}var hq2=nm;var isIE=window.innerHeight==null;var isCH=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;if(!isIE&&!isCH){var nmhas=nm.indexOf('http://lrd.yahooapis.com');if(nmhas!==-1){var hq1=nm.substring(0,50)+escape(nm.substring(50));hq2=hq1.replace(/%3D/g,"=").replace(/\+/g,"%2B").replace(/%2C/g,",").replace(/\?/g,"%2F").replace(/%28/g,"(").replace(/%29/g,")").replace(/%7E/g,"~");}else{var hq2=nm;}}if(if2.src!=hq2){var issite=true;if(issite==true){window.onbeforeunload=function(){return "Click OK to leave BevyFind. Click Cancel to load the desired site in BevyFind.";};}if2.src=hq2;if2.parentNode.style.zIndex=5000;setTimeout(is,8000);var imdv2=d.getElementById("imdv2");var sitc2=d.getElementById("sitc-2");var cl2=d.getElementById("cl2");i2=1;}if(o2==0){divc2.style.display="block";if2.style.display="block";cl2.style.display="block";imdv2.style.display="block";sitc2.style.display="block";o2=1;}if(hrz1==1){MinItH(1);}}var vl="y";function Fadein(objID,CurrentAlpha,TargetAlpha,steps){var obj=d.getElementById(objID);obj.style.display="block";CurrentAlpha=parseInt(CurrentAlpha);if(isNaN(CurrentAlpha)){CurrentAlpha=parseInt(obj.style.opacity*100);if(isNaN(CurrentAlpha))CurrentAlpha=100;}var DeltaAlpha=parseInt((CurrentAlpha-TargetAlpha)/steps);var NewAlpha=CurrentAlpha-DeltaAlpha;if(NewAlpha==100&&(navigator.userAgent.indexOf('Gecko')!=-1&&navigator.userAgent.indexOf('Safari')==-1))NewAlpha=99.99;obj.style.opacity=(NewAlpha/100);obj.style.MozOpacity=obj.style.opacity;obj.style.KhtmlOpacity=obj.style.opacity;obj.style.filter='alpha(opacity='+NewAlpha+')';if(steps>1){setTimeout('Fadein("'+objID+'",'+NewAlpha+','+TargetAlpha+','+(steps-1)+')',50);}}function Fadeout(objID,CurrentAlpha,TargetAlpha,steps){var obj=d.getElementById(objID);CurrentAlpha=parseInt(CurrentAlpha);if(isNaN(CurrentAlpha)){CurrentAlpha=parseInt(obj.style.opacity*100);if(isNaN(CurrentAlpha))CurrentAlpha=100;}var DeltaAlpha=parseInt((CurrentAlpha-TargetAlpha)/steps);var NewAlpha=CurrentAlpha-DeltaAlpha;if(NewAlpha==100&&(navigator.userAgent.indexOf('Gecko')!=-1&&navigator.userAgent.indexOf('Safari')==-1))NewAlpha=99.99;obj.style.opacity=(NewAlpha/100);obj.style.MozOpacity=obj.style.opacity;obj.style.KhtmlOpacity=obj.style.opacity;obj.style.filter='alpha(opacity='+NewAlpha+')';if(steps>1){setTimeout('Fadeout("'+objID+'",'+NewAlpha+','+TargetAlpha+','+(steps-1)+')',50);}function out(){obj.style.display="none";}setTimeout(out,500);}function iff1(){Fadein('instr','',100,8);var inp=d.getElementById("inip");inp.focus();}function changecss(theClass,element,value){var cssRules;var added=false;for(var S=0;S<d.styleSheets.length;S++){if(d.styleSheets[S]['rules']){cssRules='rules';}else if(d.styleSheets[S]['cssRules']){cssRules='cssRules';}else{}for(var R=0;R<d.styleSheets[S][cssRules].length;R++){if(d.styleSheets[S][cssRules][R].selectorText==theClass){if(d.styleSheets[S][cssRules][R].style[element]){d.styleSheets[S][cssRules][R].style[element]=value;added=true;break;}}}if(!added){if(d.styleSheets[S].insertRule){d.styleSheets[S].insertRule(theClass+' { '+element+': '+value+'; }',d.styleSheets[S][cssRules].length);}else if(d.styleSheets[S].addRule){d.styleSheets[S].addRule(theClass,element+': '+value+';');}}}}if(screen.width>1349){}if((screen.width>1220)&&(screen.width<1350)){{}{}}function deleteCookie(name){if(readCookieOrg(name,null)===true){d.cookie=name+"= 0; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/";}}function cbxf(){var check=d.getElementById("defaultView");if(check.checked==1){d.cookie="tab=5;expires=Thu, 31 Dec 2020 23:59:59 UTC; path=/";}else{d.cookie="tab=0;expires=Thu, 31 Dec 2020 23:59:59 UTC; path=/";}}function shbord(){var cbx2=d.getElementById("cbx2");var boxArray=["web-box","video-box","image-box","blog-box","news-box"];if(cbx2.checked){for(var i=0;i<boxArray.length;i++){d.getElementById(boxArray[i]).style.border="none";d.cookie="borders=1;expires=Thu, 31 Dec 2020 23:59:59 UTC; path=/";}}else{for(var i=0;i<boxArray.length;i++){d.getElementById(boxArray[i]).style.border="1px solid";d.cookie="borders=0;expires=Thu, 31 Dec 2020 23:59:59 UTC; path=/";}}}var ise=window.innerHeight==null;var isIE=window.innerHeight==null;pageHeight=isIE?d.documentElement.offsetHeight:window.innerHeight;mainContentHeight=pageHeight-54;var pgWidth=ise?d.documentElement.offsetWidth:window.innerWidth;var pgw3=pgWidth/3;function sbs(){var que=d.getElementById("q").value;var srl=document.getElementById("srlinksdiv");var div2=d.getElementById("Div2");var web=d.getElementById("web");var addit=d.getElementById("addit");var news=d.getElementById("news");var blog=d.getElementById("blog");var pics=d.getElementById("pics");var video=d.getElementById("video");var dil=d.images.length;addit.style.width=((pgWidth/2)-160)+"px";adif.style.display="block";var sbx=d.getElementById("sbscbx");if(sbx.checked){addit.style.display="none";srl.style.display="none";div2.style.zIndex="711";ifad.style.height="211px";adif.style.cssFloat="none";adif.style.styleFloat="none";adif.style.height="211px";adif.style.top="185px";ifad.style.width="100%";adif.style.borderRightStyle="solid";adif.style.borderTopStyle="solid";adif.style.borderBottomStyle="solid";var isCH=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;if(isCH){adif.style.overflow="hidden";}d.getElementById("topdiv").style.top="12px";adif.style.left=(((pgWidth/100)*19)*3)+41+"px";adif.style.width=(((pgWidth/100)*19)+6)+"px";if(screen.width<1200){adif.style.top="205px";adif.style.left=pgWidth-360+"px";adif.style.width="280px";}div2.style.width="100%";news.style.top="10px";blog.style.top="10px";web.style.width="100%";news.style.width="100%";blog.style.width="100%";pics.style.width="100%";video.style.width="100%";div2.style.top="40px";if(readCookieOrg('bevyview')==null){alert("Your display settings have been saved");}d.cookie="bevyview=1;expires=Thu, 31 Dec 2020 23:59:59 UTC; path=/";}else{var wdt=(pgWidth-((pgWidth/2)+117))/2;srl.style.right=wdt+"px";srl.style.marginRight="-160px";d.getElementById("topdiv").style.top="35px";div2.style.zIndex="111";div2.style.top="35px";adif.style.top="0px";adif.style.width="240px";ifad.style.width="100%";adif.style.left="0px";adif.style.cssFloat="right";adif.style.styleFloat="right";adif.style.height="800px";adif.style.overflow="hidden";ifad.style.overflow="hidden";adif.style.borderRightStyle="none";adif.style.borderTopStyle="none";adif.style.borderBottomStyle="none";ifad.style.height="800px";srl.style.display="block";if((readCookieOrg('addit')==null)||(readCookieOrg('addit')=="0")){div2.style.width="920px";adif.style.borderRightStyle="none";web.style.width="560px";news.style.width="560px";blog.style.width="560px";addit.style.display="none";pics.style.width="100%";video.style.width="100%";}else{div2.style.width=((pgWidth/2)+117)+"px";web.style.width=((pgWidth/2)-160)+"px";blog.style.width=((pgWidth/2)-160)+"px";news.style.width=((pgWidth/2)-160)+"px";pics.style.width="800px";video.style.width="750px";adif.style.borderRightStyle="solid";addit.style.display="block";srch(readOneCookie('addit'));}news.style.top="30px";blog.style.top="30px";if(webtype=='5'){srl.style.display="none";addit.style.display="none";}d.cookie="bevyview=0;expires=Thu, 31 Dec 2020 23:59:59 UTC; path=/";}SetFramesHeight();if(aa!==0){gsearch(que);}aa=1;loadSearchResults();if(frst==1){alert("Your display setting has been saved");}frst=1;d.getElementById("pwrd").style.zIndex="699";}var Drag={obj:null,init:function(o,oRoot,minX,maxX,minY,maxY,bSwapHorzRef,bSwapVertRef,fXMapper,fYMapper){o.onmousedown=Drag.start;o.hmode=bSwapHorzRef?false:true;o.vmode=bSwapVertRef?false:true;o.root=oRoot&&oRoot!=null?oRoot:o;if(o.hmode&&isNaN(parseInt(o.root.style.left)))o.root.style.left="0px";if(o.vmode&&isNaN(parseInt(o.root.style.top)))o.root.style.top="0px";if(!o.hmode&&isNaN(parseInt(o.root.style.right)))o.root.style.right="0px";if(!o.vmode&&isNaN(parseInt(o.root.style.bottom)))o.root.style.bottom="0px";o.minX=typeof minX!='undefined'?minX:null;o.minY=typeof minY!='undefined'?minY:null;o.maxX=typeof maxX!='undefined'?maxX:null;o.maxY=typeof maxY!='undefined'?maxY:null;o.xMapper=fXMapper?fXMapper:null;o.yMapper=fYMapper?fYMapper:null;o.root.onDragStart=new Function();o.root.onDragEnd=new Function();o.root.onDrag=new Function();},start:function(e){var o=Drag.obj=this;e=Drag.fixE(e);zi(o);var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);o.root.onDragStart(x,y);o.lastMouseX=e.clientX;o.lastMouseY=e.clientY;if(o.hmode){if(o.minX!=null)o.minMouseX=e.clientX-x+o.minX;if(o.maxX!=null)o.maxMouseX=o.minMouseX+o.maxX-o.minX;}else{if(o.minX!=null)o.maxMouseX=-o.minX+e.clientX+x;if(o.maxX!=null)o.minMouseX=-o.maxX+e.clientX+x;}if(o.vmode){if(o.minY!=null)o.minMouseY=e.clientY-y+o.minY;if(o.maxY!=null)o.maxMouseY=o.minMouseY+o.maxY-o.minY;}else{if(o.minY!=null)o.maxMouseY=-o.minY+e.clientY+y;if(o.maxY!=null)o.minMouseY=-o.maxY+e.clientY+y;}d.onmousemove=Drag.drag;d.onmouseup=Drag.end;return false;},drag:function(e){e=Drag.fixE(e);var o=Drag.obj;var ey=e.clientY;var ex=e.clientX;var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);var nx,ny;if(o.minX!=null)ex=o.hmode?Math.max(ex,o.minMouseX):Math.min(ex,o.maxMouseX);if(o.maxX!=null)ex=o.hmode?Math.min(ex,o.maxMouseX):Math.max(ex,o.minMouseX);if(o.minY!=null)ey=o.vmode?Math.max(ey,o.minMouseY):Math.min(ey,o.maxMouseY);if(o.maxY!=null)ey=o.vmode?Math.min(ey,o.maxMouseY):Math.max(ey,o.minMouseY);nx=x+((ex-o.lastMouseX)*(o.hmode?1:-1));ny=y+((ey-o.lastMouseY)*(o.vmode?1:-1));if(o.xMapper)nx=o.xMapper(y);else if(o.yMapper)ny=o.yMapper(x);Drag.obj.root.style[o.hmode?"left":"right"]=nx+"px";Drag.obj.root.style[o.vmode?"top":"bottom"]=ny+"px";Drag.obj.lastMouseX=ex;Drag.obj.lastMouseY=ey;Drag.obj.root.onDrag(nx,ny);return false;},end:function(){d.onmousemove=null;d.onmouseup=null;Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode?"left":"right"]),parseInt(Drag.obj.root.style[Drag.obj.vmode?"top":"bottom"]));var cookieID="box_"+Drag.obj.root.id;var left=parseInt(Drag.obj.root.style.left);var top=parseInt(Drag.obj.root.style.top);if(readCookie(cookieID,null)===true){writeCookie(cookieID,0,left);writeCookie(cookieID,1,top);}else{d.cookie=cookieID+"=x"+left+" y"+top+"; expires=Thu, 31 Dec 2020 23:59:59 UTC; path=/";}Drag.obj=null;},fixE:function(e){if(typeof e=='undefined')e=window.event;if(typeof e.layerX=='undefined')e.layerX=e.offsetX;if(typeof e.layerY=='undefined')e.layerY=e.offsetY;return e;}};function writeCookie(name,index,new_value){var regex_array=["x\\d+","y\\d+","z\\d+","w\\d+","h\\d+"];var indexChar_array=["x","y","z","w","h"];var name_regex=new RegExp(name+"=.*?(;|$)","g");var name_replace_regex=new RegExp(".*?=","g");if(d.cookie.search(new RegExp(name_regex))===-1){return null;}if(index!==null){var index_regex=new RegExp(regex_array[index],"g");var match=name_regex.exec(d.cookie);if(match){var new_cookie="";var old_params=match[0].replace(name_replace_regex,"");var searching_param=index_regex.exec(match[0]);if(searching_param){var replace_regex=new RegExp(searching_param[0],"g");var new_param=searching_param[0].replace(new RegExp("\\d+","g"),new_value);new_cookie=old_params.replace(replace_regex,new_param);}else{new_cookie=old_params+" "+indexChar_array[index]+new_value;}deleteCookie(name);if(new_cookie.length>0){new_cookie=new_cookie+"; expires=Thu, 31 Dec 2020 23:59:59 UTC; path=/";d.cookie=name+"="+new_cookie;}}}return true;}function readCookie(name,index){var regex_array=["x\\d+","y\\d+","z\\d+","w\\d+","h\\d+"];var name_regex=new RegExp(name+"=.*?(;|$)");if(d.cookie.search(name_regex)===-1){return null;}if(index!==null){var index_regex=new RegExp(regex_array[index]);var match=name_regex.exec(d.cookie);if(match){if(index_regex.exec(match[0])){var temp_regex_value=index_regex.exec(match[0])[0];return temp_regex_value.substr(1,temp_regex_value.length-1);}else{return null;}}}return true;}function deleteCookie(name){if(readCookie(name,null)===true){d.cookie=name+"= 0; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/";}}function readOneCookie(name){var name_regex=new RegExp(name+"=.*?(;|$)");if(d.cookie.search(name_regex)===-1){return null;}else{var value_regex=new RegExp("=.*?(;|$)");var match=name_regex.exec(d.cookie);if(match){if(value_regex.exec(match[0])){return value_regex.exec(match[0])[0].replace("=","").replace(";","");}}}}function dimensionsChange(e){if(e.options[e.selectedIndex].value!=="small"){deleteCookie("dimensions");d.cookie="dimensions="+e.options[e.selectedIndex].value+"; expires=Thu, 31 Dec 2020 23:59:59 UTC; path=/";}else{deleteCookie("dimensions");}var val;if(d.getElementById("q0").value!=""){val=d.getElementById("q0").value;}else{val=d.getElementById("q").value;}yahooGetter(val,"images",1);}function loadfr(){dispy();var web=d.getElementById("web");var ais=getElementsByClass("weba",d,"a");var a1=ais[0].name;var a2=ais[1].name;for(var t=0;t<2;t++){var nm=ais[t].name;var isIE=window.innerHeight==null;if(!isIE){var nmhas=nm.indexOf('http://lrd.yahooapis.com');if(nmhas!==-1){var hq1=nm.substring(0,50)+escape(nm.substring(50));hq2=hq1.replace(/%3D/g,"=");}else{var hq2=nm;}}else{var hq2=nm;}if(d.getElementById("fr"+(t+1)).src!=hq2){var issite=true;if(issite==true){window.onbeforeunload=function(){return "Click OK to leave BevyFind. Click Cancel to load the desired site in BevyFind.";};}d.getElementById("fr"+(t+1)).src=hq2;}}if(readCookieOrg('ldfr')!==null){if(readCookieOrg('ldfr')==2){alwaysload=1;}else{alwaysload=0;}}else{alwaysload=0;}setTimeout(is,20000);}function loadSearchResults(){switch(webtype){case 0:{yahooGetter(que,"images,news,blog",1);bingGetter(que,1);break;}case 1:{yahooGetter(que,"images,news,blog",1);break;}case 2:{yahooGetter(que,"news,images,blog",1);break;}case 3:{bingGetter(que,1);yahooGetter(que,"images,news,blog",1);break;}case 4:{yahooGetter(que,"blog,images,news",1);break;}case 5:{yahooGetter(que,"images,news,blog",1);bingGetter(que,1);break;}}}function yahooGetter(query,searchType,startIndex){var options={dimensions:"small"};if(searchType.match(new RegExp("images"))){if(readCookieOrg("dimensions",null)===true){options.dimensions=readOneCookie("dimensions");}var dimensions=d.getElementById("dimensions-selector");if(dimensions.options[dimensions.selectedIndex].value!==undefined){options.dimensions=dimensions.options[dimensions.selectedIndex].value;}}var cn;if((readCookieOrg('bevyview')!=null)&&(readCookieOrg('bevyview')=="0")){cn=10;}else{cn=22;}YBOSS._get({searches:searchType,query:query,count:cn,start:startIndex,dimensions:options.dimensions,callback:received});function received(o){var errorHTML="<p class='error-text'>No results</p>";switch(searchType){case "images":{if(o.imagesHTML!==undefined){d.getElementById('pics').innerHTML=o.imagesHTML+footerBuilder(query,"images",startIndex);}else{d.getElementById('pics').innerHTML=errorHTML;}break;}case "news":{if(o.newsHTML!==undefined){d.getElementById('news').innerHTML=frmtn(o.newsHTML)+footerBuilder(query,"news",startIndex);}else{d.getElementById('news').innerHTML=errorHTML;}break;}case "blog":{if(o.blogHTML!==undefined){d.getElementById('blog').innerHTML=o.blogHTML+footerBuilder(query,"blog",startIndex);}else{d.getElementById('blog').innerHTML=errorHTML;}break;}default:{if(o.imagesHTML!==undefined){d.getElementById('pics').innerHTML=o.imagesHTML+footerBuilder(query,"images",startIndex);d.getElementById('imagesc').innerHTML=o.imagesHTML+footerComboBuilder(query,"images",startIndex);}else{d.getElementById('pics').innerHTML=errorHTML;d.getElementById('imagesc').innerHTML=errorHTML;}if(o.newsHTML!==undefined){d.getElementById('news').innerHTML=o.newsHTML+footerBuilder(query,"news",startIndex);d.getElementById('newsc').innerHTML=frmtn(o.newsHTML2)+footerComboBuilder(query,"news",startIndex);}else{d.getElementById('news').innerHTML=errorHTML;d.getElementById('newsc').innerHTML=errorHTML;}if(o.blogHTML!==undefined){d.getElementById('blog').innerHTML=o.blogHTML+footerBuilder(query,"blog",startIndex);d.getElementById('blogsc').innerHTML=frmtw(o.blogHTML2)+footerComboBuilder(query,"blog",startIndex);}else{d.getElementById('blog').innerHTML=errorHTML;d.getElementById('blogsc').innerHTML=errorHTML;}}}if(adl==0&&(readCookieOrg('addit')!==null)){switch(readCookieOrg('addit')){case 'images':{d.getElementById("addit").innerHTML=o.imagesHTML+footerBuilder(query,"images",startIndex);break;}case 'news':{d.getElementById("addit").innerHTML=o.newsHTML+footerBuilder(query,"news",startIndex);break;}case 'blog':{type='web';d.getElementById("addit").innerHTML=o.blogHTML+footerBuilder(query,"blog",startIndex);break;}}}}}function frmtw(w){if((readCookieOrg('bevyview')!==null)||(readCookieOrg('bevyview')=="1")){if(screen.width>1200){w=w.replace(/"newebres"/g,"webres");}else{w=w.replace(/"newebres\" style=\"width:21%;margin-bottom:35px"/g,"webres");}}return w;}function frmtn(n){if((readCookieOrg('bevyview')!==null)||(readCookieOrg('bevyview')=="1")){if(screen.width>1200){n=n.replace(/"newsres"/g,"webres");}else{n=n.replace(/"newsres\" style=\"width:21%"/g,"webres");}}return n;}function yahooComboGetter(query,searchType,startIndex){var options={dimensions:"small"};if(searchType.match(new RegExp("images"))){if(readCookieOrg("dimensions",null)===true){options.dimensions=readOneCookie("dimensions");}var dimensions=d.getElementById("dimensions-selector");if(dimensions.options[dimensions.selectedIndex].value!==undefined){options.dimensions=dimensions.options[dimensions.selectedIndex].value;}}var cn;if((readCookieOrg('bevyview')==null)||(readCookieOrg('bevyview')=="0")){cn=10;}else{cn=20;}YBOSS._get({searches:searchType,query:query,count:cn,start:startIndex,dimensions:options.dimensions,callback:received});function received(o){var errorHTML="<p class='error-text'>No results</p>";switch(searchType){case "search":{if(o.webHTML!==undefined){d.getElementById('webc').innerHTML=frmtw(o.webHTML2)+footerComboBuilder(query,"search",startIndex);var comboAds=d.getElementById("combo-ads");comboAds.src="http://ajax.googleapis.com/ajax/services/ads/afs?q="+que+"&hl=en&ad=n4&cx=008547903940742109064:4nbv9tuhap0&referer=www.bevyfind.com";}else{d.getElementById('webc').innerHTML=errorHTML;}break;}case "images":{if(o.imagesHTML!==undefined){d.getElementById('imagesc').innerHTML=o.imagesHTML+footerComboBuilder(query,"images",startIndex);}else{d.getElementById('imagesc').innerHTML=errorHTML;}break;}case "news":{if(o.newsHTML!==undefined){d.getElementById('newsc').innerHTML=frmtn(o.newsHTML2)+footerComboBuilder(query,"news",startIndex);}else{d.getElementById('newsc').innerHTML=errorHTML;}break;}case "blog":{if(o.blogHTML!==undefined){d.getElementById('blogsc').innerHTML=frmtw(o.blogHTML2)+footerComboBuilder(query,"blog",startIndex);}else{d.getElementById('blogsc').innerHTML=errorHTML;}break;}default:{if(o.webHTML!==undefined){d.getElementById('webc').innerHTML=frmtw(o.webHTML2)+footerComboBuilder(query,"search",startIndex);var comboAds=d.getElementById("combo-ads");comboAds.src="http://ajax.googleapis.com/ajax/services/ads/afs?q="+que+"&hl=en&ad=n4&cx=008547903940742109064:4nbv9tuhap0&referer=www.bevyfind.com";}else{d.getElementById('webc').innerHTML=errorHTML;}if(o.imagesHTML!==undefined){d.getElementById('imagesc').innerHTML=o.imagesHTML+footerComboBuilder(query,"images",startIndex);}else{d.getElementById('imagesc').innerHTML=errorHTML;}if(o.newsHTML!==undefined){d.getElementById('newsc').innerHTML=frmtn(o.newsHTML2)+footerComboBuilder(query,"news",startIndex);}else{d.getElementById('newsc').innerHTML=errorHTML;}if(o.blogHTML!==undefined){d.getElementById('blogsc').innerHTML=frmtw(o.blogHTML2)+footerComboBuilder(query,"blog",startIndex);}else{d.getElementById('blogsc').innerHTML=errorHTML;}}}}}function bingGetter(query,startIndex){YBING._get({searches:'video',query:query,count:16,start:startIndex,callback:received});function received(o,searchType,startIndex){var errorHTML="<p class='error-text'>No results</p>";if(o.videoHTML!==undefined){d.getElementById('video').innerHTML=o.videoHTML+footerBuilder(query,"video",startIndex);d.getElementById('videosc').innerHTML=o.videoHTML+footerComboBuilder(query,"video",startIndex);}else{d.getElementById('video').innerHTML=errorHTML;d.getElementById('videosc').innerHTML=errorHTML;}if((readCookieOrg('addit')!==null)&&(readCookieOrg('addit')=='video')){d.getElementById("addit").innerHTML=o.videoHTML+footerBuilder(query,"video",startIndex);}}}function bingComboGetter(query,startIndex){YBING._get({searches:'video',query:query,count:16,start:startIndex,callback:received});function received(o,searchType,startIndex){var errorHTML="<p class='error-text'>No results</p>";if(o.videoHTML!==undefined){d.getElementById('videosc').innerHTML=o.videoHTML+footerComboBuilder(query,"video",startIndex);}else{d.getElementById('videosc').innerHTML=errorHTML;}}}function footerBuilder(query,searchType,activeIndex){var footer="<div class='footer'>";switch(searchType){case "video":{for(var i=1;i<=8;i++){if(i!==activeIndex){footer=footer+'<a onclick="bingGetter(\''+query+'\', '+i.toString()+')">'+i.toString()+'</a>';}else{footer=footer+'<a class="active" onclick="bingGetter(\''+query+'\', '+i.toString()+')">'+i.toString()+'</a>';}}j=activeIndex+1;footer=footer+'<a onclick="bingGetter(\''+query+'\', '+j.toString()+')">'+'>'+'</a>';break;}case "twitter":{for(var i=1;i<=8;i++){if(i!==activeIndex){footer=footer+'<a onclick="TwitGetter(\''+query+'\', '+i.toString()+')">'+i.toString()+'</a>';}else{footer=footer+'<a class="active" onclick="TwitGetter(\''+query+'\', '+i.toString()+')">'+i.toString()+'</a>';}}break;}default:{for(var i=1;i<=8;i++){if(i!==activeIndex){footer=footer+'<a onclick="yahooGetter(\''+query+'\', \''+searchType+'\', '+i.toString()+')">'+i.toString()+'</a>';}else{footer=footer+'<a class="active" onclick="yahooGetter(\''+query+'\', \''+searchType+'\', '+i.toString()+')">'+i.toString()+'</a>';}}j=activeIndex+1;footer=footer+'<a onclick="yahooGetter(\''+query+'\', \''+searchType+'\', '+j.toString()+')">'+'>'+'</a>';break;}}footer=footer+"</div>";return footer;}function footerComboBuilder(query,searchType,activeIndex){var footer="<div class='footer'>";switch(searchType){case "video":{for(var i=1;i<=8;i++){if(i!==activeIndex){footer=footer+'<a onclick="bingComboGetter(\''+query+'\', '+i.toString()+')">'+i.toString()+'</a>';}else{footer=footer+'<a class="active" onclick="bingComboGetter(\''+query+'\', '+i.toString()+')">'+i.toString()+'</a>';}}break;}case "twitter":{for(var i=1;i<=8;i++){if(i!==activeIndex){footer=footer+'<a onclick="TwitGetter(\''+query+'\', '+i.toString()+')">'+i.toString()+'</a>';}else{footer=footer+'<a class="active" onclick="TwitGetter(\''+query+'\', '+i.toString()+')">'+i.toString()+'</a>';}}break;}default:{for(var i=1;i<=8;i++){if(i!==activeIndex){footer=footer+'<a onclick="yahooComboGetter(\''+query+'\', \''+searchType+'\', '+i.toString()+')">'+i.toString()+'</a>';}else{footer=footer+'<a class="active" onclick="yahooComboGetter(\''+query+'\', \''+searchType+'\', '+i.toString()+')">'+i.toString()+'</a>';}}break;}}footer=footer+"</div>";return footer;}function TwitGetter(query,startIndex){YTwit._get({query:query,count:15,start:startIndex,callback:received});function received(o,startIndex){if(o.twitHTML!==undefined){d.getElementById('addit').innerHTML=o.twitHTML;d.getElementById("d1st").innerHTML+=footerBuilder(query,"twitter",startIndex);var twinp=d.getElementById("twinp");twinp.value=query;}}}function BuildRecaptcha(){function showRecaptcha(){d.getElementById("recaptcha-block").style.display="block";}Recaptcha.create("6Ldh-wcAAAAAAHQmF5w540-wv-pHF11SoJviKsN6","recaptcha-block",{theme:"red",callback:showRecaptcha});}function showEmail(obj,type){var searchObj=obj.parentNode;var listObj=d.getElementById("list-results").getElementsByTagName("ul")[0];var emailBlock=d.getElementById("email-block");if(navigator.userAgent.match(new RegExp(/MSIE/))){}else{}var resultTitle="";var resultUrl="";var resultContent="";switch(type){case "images":{searchObj=searchObj.parentNode;listObj.innerHTML+="<li>";var imageReg=/<div class=(|")imdiv(|")>.*?<\/div>/i;var linkReg=/<div class=(|")imgnamediv(|")>.*?<\/div>/i;var dimReg=/<div class=(|")imgdim(|")>.*?<\/div>/i;var sourceReg=/<div class=(|")urldiv(|")>.*?<\/div>/i;var imageUrl=getElementsByClass("imgname",searchObj,"a")[0];resultTitle=imageUrl.textContent;resultUrl=imageUrl.name;resultContent=getElementsByClass("imgdim",searchObj,"div")[0].textContent;listObj.innerHTML+=imageReg.exec(searchObj.innerHTML)[0];listObj.innerHTML+=linkReg.exec(searchObj.innerHTML)[0];listObj.innerHTML+=dimReg.exec(searchObj.innerHTML)[0];listObj.innerHTML+=sourceReg.exec(searchObj.innerHTML)[0];listObj.innerHTML+="</li>";if(window.innerHeight==null){listObj.innerHTML=listObj.innerHTML.replace(/imdiv/g,'imdivs');}break;}case "news":{searchObj=searchObj.parentNode;listObj.innerHTML+="<li>";var titleReg=/<a.*?>.*?<\/a>/i;var sourceReg=/<a style=(|")(position|color):.*?>.*?<\/a>/i;var textReg=/<div style=.*?>.*?<\/div>/i;var newsUrl=searchObj.getElementsByTagName("a")[0];resultTitle=newsUrl.textContent;resultUrl=newsUrl.name;resultContent=searchObj.getElementsByTagName("div")[1].textContent;listObj.innerHTML+=titleReg.exec(searchObj.innerHTML)[0];if(sourceReg.exec(searchObj.innerHTML)){listObj.innerHTML+=sourceReg.exec(searchObj.innerHTML)[0];}listObj.innerHTML+=textReg.exec(searchObj.innerHTML)[0];listObj.innerHTML+="</li>";break;}case "video":{searchObj=searchObj.parentNode.parentNode;listObj.innerHTML+="<li>";var thumbReg=/<div class=(|")vidthumbnail(|")>.*?<\/div>/i;var titleReg=/<div class=(|")infoin(|")>.*?<\/div>/i;var sourceReg=/<div class=(|")vdl(|")>.*?<\/div>/i;var videoUrl=getElementsByClass("vidtitle",searchObj,"a")[0];resultUrl=videoUrl.name;resultTitle=videoUrl.textContent;listObj.innerHTML+=thumbReg.exec(searchObj.innerHTML)[0];listObj.innerHTML+=titleReg.exec(searchObj.innerHTML)[0];listObj.innerHTML+=sourceReg.exec(searchObj.innerHTML)[0];listObj.innerHTML=listObj.innerHTML.replace("vidthumba","").replace("infoin","").replace("vdl","");listObj.innerHTML+="</li>";if(window.innerHeight==null){listObj.innerHTML=listObj.innerHTML.replace(/vidthumbnail/g,"");}break;}default:{if(type=="web"){searchObj=searchObj.parentNode;}listObj.innerHTML+="<li>";var webUrl=searchObj.getElementsByTagName("a")[0];resultUrl=webUrl.name;resultTitle=webUrl.textContent;resultContent=searchObj.getElementsByTagName("div")[0].textContent;if(searchObj.innerHTML.match(/<a.*?>.*?<\/a>/i)){listObj.innerHTML+=searchObj.innerHTML.match(/<a.*?>.*?<\/a>/i)[0];}if(searchObj.innerHTML.match(/<div.*?>.*?<\/div>/i)){listObj.innerHTML+=searchObj.innerHTML.match(/<div.*?>.*?<\/div>/i)[0];}if(searchObj.innerHTML.match(/<a style=(|")color:.*?(|")>.*?<\/a>/i)){listObj.innerHTML+=searchObj.innerHTML.match(/<a style=(|")color:.*?(|")>.*?<\/a>/i)[0];}listObj.innerHTML+="</li>";}}listObj.innerHTML+="<div class='element' />";var images=listObj.getElementsByTagName("img");for(var i=0;i<images.length;i++){images[i].style.position="";images[i].style.cssFloat="left";images[i].parentNode.style.cssFloat="left";}var links=listObj.getElementsByTagName("a");for(var i=0;i<links.length;i++){links[i].style.position="";}if(emailBlock.style.display!=="block"){emailBlock.style.display="block";BuildRecaptcha();}return false;}var addthis_share={templates:{twitter:'{{title}} {{url}}   (from bevyfind)'}};var addthis_config={};function sendEmail(){function validFields(){var emailRegex=new RegExp("^[\\w-0-9]+@[\\w-0-9]+\\.[\\w]{2,6}$");var multipleEmailRegex=new RegExp("^[\\w-0-9]+@[\\w-0-9]+\\.[\\w]{2,6}(,[\\w-0-9]+@[\\w-0-9]+\\.[\\w]{2,6}){0,3}$");if(emailRegex.exec(d.getElementById("from-input").getElementsByTagName("input")[0].value)!==null&&multipleEmailRegex.exec(d.getElementById("to-input").getElementsByTagName("input")[0].value)!==null){return true;}else{return false;}}function buildMailBody(){return"<p>"+d.getElementById("body-input").getElementsByTagName("textarea")[0].value+"</p><br /><p>Bevyfind Search results:<br />"+d.getElementById("list-results").innerHTML+"</p><p>Email search results straight from your search page! <a title='BevyFind site' href='http://www.bevyfind.com'>BevyFind</a>: the new search engine that lets you Find it Fast!</p>";}function pageMethodsEmailOnSucceeded(res){d.getElementById("recaptcha-validation-text").innerText="";d.getElementById("recaptcha-validation-text").textContent="";alert("Your email is on its way!");clearList();closeEmail();}function pageMethodsEmailOnFailed(res){alert("Unfortunately you email could not be sent at this time. We apologize profusely! Please try again later.");}if(validFields()===true){d.getElementById("fields-validation-text").innerText="";d.getElementById("fields-validation-text").textContent="";PageMethods.RecaptchaValid(Recaptcha.get_challenge("recaptcha-block"),Recaptcha.get_response("recaptcha-block"),function(result){if(result===true){d.getElementById("recaptcha-validation-text").innerText="Your email is being sent. Please hold.";d.getElementById("recaptcha-validation-text").textContent="Your email is being sent. Please hold.";var fromValue=d.getElementById("from-input").getElementsByTagName("input")[0].value;var toValue=d.getElementById("to-input").getElementsByTagName("input")[0].value;PageMethods.SendEmail(fromValue,toValue,buildMailBody(),pageMethodsEmailOnSucceeded,pageMethodsEmailOnFailed);}else{d.getElementById("recaptcha-validation-text").innerText="Incorrect reCaptcha text!";d.getElementById("recaptcha-validation-text").textContent="Incorrect reCaptcha text!";Recaptcha.reload("recaptcha-block");}});}else{d.getElementById("fields-validation-text").innerText="Incorrect data! Please verify email addresses and subject!";d.getElementById("fields-validation-text").textContent="Incorrect data! Please verify email addresses and subject!";}}function clearList(){d.getElementById("list-results").getElementsByTagName("ul")[0].innerHTML="";}function closeEmail(){d.getElementById("email-block").style.display="none";}function listener(event){}function uswitch(obj){obj.href=obj.name;}function uswitch2(obj){var nm=obj.name;var isIE=window.innerHeight==null;var isCH=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;if(!isIE&&!isCH){var nmhas=nm.indexOf('http://lrd.yahooapis.com');if(nmhas!==-1){var hq1=nm.substring(0,50)+escape(nm.substring(50));hq2=hq1.replace(/%3D/g,"=");obj.href=hq2;}else{obj.href=nm;}}else{obj.href=nm;}}function setup(){frst=0;var sbscbx=d.getElementById("sbscbx");if((readCookieOrg('bevyview')==null)||(readCookieOrg('bevyview')=="0")){sbscbx.checked=false;}else{sbscbx.checked="checked";}sbs();var last_tab_div=d.getElementById("combo");var divs=last_tab_div.getElementsByTagName("div");for(var i=0;i<divs.length;i++){if(readCookie("box_"+divs[i].id,null)===true){var xCoord=readCookie("box_"+divs[i].id,0);var yCoord=readCookie("box_"+divs[i].id,1);var zIndex=readCookie("box_"+divs[i].id,2);var wDimm=readCookie("box_"+divs[i].id,3);var hDimm=readCookie("box_"+divs[i].id,4);if(xCoord){divs[i].style.left=parseInt(xCoord)+"px";}if(yCoord){divs[i].style.top=parseInt(yCoord)+"px";}if(zIndex){divs[i].style.zIndex=parseInt(zIndex);}if(wDimm){divs[i].style.width=parseInt(wDimm)+"px";}if(hDimm){divs[i].style.height=parseInt(hDimm)+"px";}}}}function st(n){var ssb=d.getElementById("ssb");var ssb2=d.getElementById("ssb2");var is=d.getElementById("is");webtype=n;for(t=0;t<6;t++){if(t==n){if(((readCookieOrg('addit')==null)||(readCookieOrg('addit')==0))&&t==0){is.style.display="block";}else{is.style.display="none";}d.getElementById("tc"+t).style.display="block";d.getElementById("tab"+t).style.color="black";d.getElementById("tab"+t).style.textDecoration="none";d.getElementById("tab"+t).style.fontWeight="bold";ssb.style.display="block";var chb=d.getElementById("chb");var borders=d.getElementById("borders");if(t==5){chb.style.display="block";borders.style.display="block";d.getElementById("menudiv1").style.display="none";d.getElementById("addit").style.display="none";d.getElementById("srlinksdiv").style.display="none";ssb.style.display="none";}else{if(readCookieOrg('addit')==1){d.getElementById("addit").style.display="block";}var imsize=d.getElementById("imsize");if(readCookieOrg('bevyview')!=1){d.getElementById("srlinksdiv").style.display="block";}if(t==1){imsize.style.display="block";imsize.style.left="360px";imsize.style.top="108px";}else{imsize.style.display="none";}chb.style.display="none";borders.style.display="none";d.getElementById("menudiv1").style.display="block";}}else{d.getElementById("tc"+t).style.display="none";d.getElementById("tab"+t).style.color="blue";d.getElementById("tab"+t).style.textDecoration="underline";d.getElementById("tab"+t).style.fontWeight="normal";}}if(n==0){d.getElementById("pwrd").style.display="block";d.getElementById("q0div").style.left="180px";}else{d.getElementById("pwrd").style.display="none";d.getElementById("q0div").style.left="80px";}var tx;var at=document.getElementById("atype");switch(n){case 0:{tx="Web";break;}case 1:{tx="Images";break;}case 2:{tx="News";break;}case 3:{tx="Videos";break;}case 4:{tx="Blogs";break;}case 5:{tx="Combo";break;}}if(d.all){ssb2.innerText=tx;at.innerText=tx;}else{ssb2.textContent=tx;at.textContent=tx;}}function ggetter(){}function h(qu,qu0){var qu1=qu0.results;ln=qu1.length;if(d.getElementById("q").value!==" "){d.getElementById('suggc').style.display="block";}else{d.getElementById('suggc').style.display="none";}d.getElementById('suggbox').innerHTML="";var objr='<div class="suggclass" id="suggclass">';var suggItem='<div class="suggres" onmouseover="sugghil(this);" onmouseout="sugglol(this);" onclick="choosesugg(this);">{res}</div>';for(var i=0;i<ln;i++){objr+=suggItem.replace('{res}',qu1[i].content);}objr+='</div>';d.getElementById('results').innerHTML+=objr;}var ggscript={pingSearch:function(event){if(window.event){keyPressed=window.event.keyCode;}else{keyPressed=event.which;}if(keyPressed!==40&&keyPressed!==38){var queval=d.getElementById("q").value;if(queval){obj.s=d.createElement('script');obj.s.type='text/javascript';obj.s.charset='utf-8';obj.s.src='http://google.com/uds/GwebSearch?callback=h&context=0&rsz=large&q=poli&v=1.0';d.getElementsByTagName('head')[0].appendChild(obj.s);}}}};function yformatUrl(url){if(url.indexOf("https://")==0){return url.match("https://.*?/")[0].replace("https://","").replace("/","");}else{return url.match("http://.*?/")[0].replace("http://","").replace("/","");}}function ytrimText(text){var temp=text.replace(/^(\W+)/,"");if(temp.match(/^(\w+)((\ \w+)){0,2}/)){return temp.match(/^(\w+)((\ \w+)){0,2}/)[0];}else{return temp;}}YBOSS=function(){var appID='XVqJGwLV34GhmY9JFPQikt.rVF5xcp26dCigUOQgy_A3NXb05G2eXEQNQXeRSq.H8xD2CPo-';var queries=[];var query="";function _get(o){if(typeof o!=='undefined'&&typeof o.searches==='string'&&typeof o.query==='string'&&typeof o.callback==='function'){var searches=makeAPIurl(o);o.query=encodeURIComponent(o.query);query=o.query;queries[o.query]={all:o.searches.split(',').length,count:0,databack:{},callback:o.callback};add(searches);}}function add(urls){for(var i=0;i<urls.length;i++){var s=d.createElement('script');s.setAttribute('src',urls[i]);s.setAttribute('type','text/javascript');d.getElementsByTagName('head')[0].appendChild(s);}}function makeAPIurl(o){var searchtypes=[];var APIurl='http://boss.yahooapis.com/ysearch/web/v1/'+o.query+'?format=json&callback=YBOSS.retrieved&'+'appid='+appID;if(typeof o.count==='number'&&parseInt(o.count)===o.count&&o.count>0){APIurl+='&count='+o.count;}if(typeof o.start==='number'&&parseInt(o.start)===o.start&&o.start>0){var start=0;if(o.start!=1){start=(o.start-1)*o.count+1;}else{start=0;}APIurl+='&start='+start;}if(typeof o.sites==='string'){APIurl+='&sites='+clean(o.sites);}if(typeof o.filter==='string'){APIurl+='&filter='+clean(o.filter);}if(typeof o.lang==='string'){APIurl+='&lang='+clean(o.lang);}if(typeof o.region==='string'){APIurl+='&region='+clean(o.region);}if(typeof o.type==='string'){APIurl+='&type='+clean(o.type);}if(typeof o.dimensions==='string'){APIurl+='&dimensions='+clean(o.dimensions);}if(typeof o.refererurl==='string'){APIurl+='&refererurl='+clean(o.refererurl);}if(typeof o.url==='string'){APIurl+='&url='+clean(o.url);}if(typeof o.age==='string'){APIurl+='&age='+clean(o.age);}if(typeof o.filter==='string'){APIurl+='&filter='+clean(o.filter);}if(typeof o.sites==='string'){APIurl+='&sites='+clean(o.sites);}if(o.searches.indexOf('search')!==-1){searchtypes.push(APIurl);}if(o.searches.indexOf('news')!==-1){searchtypes.push(APIurl.replace('web','news'));}if(o.searches.indexOf('images')!==-1){if((readCookieOrg('bevyview')!==null)&&(readCookieOrg('bevyview')=="1")){if(screen.width<1280){cv="count=20";}else{if(screen.width>1400){cv="count=24";}else{cv="count=18";}}var APIurl2=APIurl.replace(/count=20/,cv);}else{cv="count=24";var APIurl2=APIurl.replace(/count=10/,cv);}searchtypes.push(APIurl2.replace('web','images'));}if(o.searches.indexOf('blog')!==-1){APIurl=APIurl.replace("/v1/"+o.query,"/v1/"+o.query+" blog");searchtypes.push(APIurl);}return searchtypes;}function clean(s){return encodeURIComponent(s);}function retrieved(o){var webVisibleLinks;var newVisibleLinks;var imageVisibleLinks;var clss;var nclss;var cv;var rndst;var wih;var nih;if((readCookieOrg('bevyview')!==null)&&(readCookieOrg('bevyview')=="1")){webVisibleLinks='<br /><a class="opup" title="open search result in left BevyWindow" onclick="op1(\'twit\',this);"><img class="opimg" src="Images/beupb2b.gif" /></a>&nbsp<a class="opup" title="open search result in right BevyWindow" onclick="op2(\'twit\',this)" style="cursor: pointer;position:relative;color:fuchsia;"><img class="opimg" src="Images/bednb2b.gif" /></a><a class="send-email" onclick=\'showEmail(this, "yweb"); return false;\'>&nbsp;&nbsp;&nbsp;&nbsp;</a>';newVisibleLinks='<a style="position:relative;top:2px;margin-left:20px" title="open search result in left BevyWindow" onclick="op1(\'news\',this);"><img class="opimg" src="Images/opup3b.png" /></a>&nbsp<a style="position:relative;top:2px" title="open search result in right BevyWindow" onclick="op2(\'news\',this)"><img class="opimg" src="Images/opdn3b.png" /></a><a class="send-email" onclick=\'showEmail(this, "news"); return false;\'>&nbsp;&nbsp;&nbsp;&nbsp;</a>';imageVisibleLinks='<div class="btndiv" ><a title="open search result in left BevyWindow" onclick="op1(\'img\',this);" style="margin-left:20px"><img class="opimg" src="Images/opup3b.png" /></a>&nbsp<a title="open search result in right BevyWindow" onclick="op2(\'img\',this)"><img class="opimg" src="Images/opdn3b.png" /></a><a class="send-email2" onclick=\'showEmail(this, "images"); return false;\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></div>';clss='newebres';nclss='newsres';rndst='style="width:19%;height:190px;"';if(screen.width<1201){clss='newebres" style="margin-bottom:35px';nclss='newsres" style="width:21%';rndst='style="width:19%;height:200px;margin-right:4px"';}wih='<div id="result" class="roundedcornr_box_884220"'+rndst+'><div class="roundedcornr_top_884220"><div></div></div><div id="result" class="'+clss+' roundedcornr_content_884220"><a class="weba" style="font-size:16px"  href="{url}" name="{clickurl}" onclick="uswitch2(this);">{title}</a><br /><div>{abstract}</div><a style="color:maroon">{siteurl}</a>&nbsp;&nbsp;&nbsp;'+webVisibleLinks+'</div></div>';nih='<div id="result" class="roundedcornr_box_884220" style="height:200px;width:23%"><div class="roundedcornr_top_884220"><div></div></div><div class="'+nclss+' roundedcornr_content_884220" lang="{language}"><a style="font-size:15px;" href="{url}" name="{clickurl}" onclick="uswitch2(this)">{title}</a><br /><div><a style="position:relative;top:-3px;color:maroon">{source}-{idate}</a>&nbsp;&nbsp;&nbsp;'+newVisibleLinks+'</div><div style="color:black">{abstract} </div></div></div>';}else{webVisibleLinks='<a class="opup" title="open search result in top BevyWindow" onclick="op1(\'twit\',this);"><img class="opimg" src="Images/beupb2b.gif" /></a>&nbsp<a class="opup" title="open search result in bottom BevyWindow" onclick="op2(\'twit\',this)" style="cursor: pointer;position:relative;color:fuchsia;"><img class="opimg" src="Images/bednb2b.gif" /></a><a class="send-email" onclick=\'showEmail(this, "yweb"); return false;\'>&nbsp;&nbsp;&nbsp;&nbsp;</a>';newVisibleLinks='<a style="position:relative;top:2px;margin-left:20px" title="open search result in top BevyWindow" onclick="op1(\'news\',this);"><img class="opimg" src="Images/opup3b.png" /></a>&nbsp<a style="position:relative;top:2px" title="open search result in bottom BevyWindow" onclick="op2(\'news\',this)"><img class="opimg" src="Images/opdn3b.png" /></a><a class="send-email" onclick=\'showEmail(this, "news"); return false;\'>&nbsp;&nbsp;&nbsp;&nbsp;</a>';imageVisibleLinks='<div class="btndiv" ><a title="open search result in top BevyWindow" onclick="op1(\'img\',this);" style="margin-left:20px"><img class="opimg" src="Images/opup3b.png" /></a>&nbsp<a title="open search result in bottom BevyWindow" onclick="op2(\'img\',this)"><img class="opimg" src="Images/opdn3b.png" /></a><a class="send-email2" onclick=\'showEmail(this, "images"); return false;\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></div>';clss='webres';nclss='webres';wih='<div class="'+clss+'"><a class="weba" style="font-size:16px"  href="{url}" name="{clickurl}" onclick="uswitch2(this);">{title}</a><br /><div>{abstract}</div><a style="color:maroon">{siteurl}</a>&nbsp;&nbsp;&nbsp;'+webVisibleLinks+'</div>';nih='<div class="'+nclss+'" lang="{language}"><a style="font-size:15px;" href="{url}" name="{clickurl}" onclick="uswitch2(this)">{title}</a><br /><div><a style="position:relative;top:-3px;color:maroon">{source}-{idate}</a>&nbsp;&nbsp;&nbsp;'+newVisibleLinks+'</div><div style="color:black">{abstract} </div></div>';}var config={webItemHTML:wih,webItemHTML2:'<div class="'+clss+'"><a class="weba" style="font-size:16px"  href="{url}" name="{clickurl}" onclick="uswitch2(this);">{title}</a><br /><div>{abstract}</div><a style="color:maroon">{siteurl}</a>&nbsp;&nbsp;&nbsp;'+webVisibleLinks+'</div>',newsItemHTML:nih,newsItemHTML2:'<div class="'+nclss+'" lang="{language}"><a style="font-size:15px;" href="{url}" name="{clickurl}" onclick="uswitch2(this)">{title}</a><br /><div><a style="position:relative;top:-3px;color:maroon">{source}-{idate}</a>&nbsp;&nbsp;&nbsp;'+newVisibleLinks+'</div><div style="color:black">{abstract} </div></div>',imageItemHTML:'<div class="picdiv" ><div class="imdiv" ><a href="{url}" name="{clickurl}" onclick="uswitch2(this);"><img style="position:absolute;bottom:0px" src="{thumbnail}" width="{thumbnailwidth}" height="{thumbnailheight}"></a></div><div class="imgnamediv" ><a class="imgname" href="{url2}">{title}</a></div><div class="imgdim" >{dimensions} - {size}</div><div class="urldiv" ><a class="urla" href="{refererurl}" name="{refererclickurl}" onclick="uswitch2(this)" style ="font-size:9px">{shortened}</a></div><br />'+imageVisibleLinks+'</div>'};if(o.ysearchresponse.count!=="0"){if(typeof o.ysearchresponse.nextpage!=='undefined'){var next=o.ysearchresponse.nextpage.split('?')[0];query=next.replace(/.*?\//g,'');}if(typeof o.ysearchresponse.prevpage!=='undefined'){var last=o.ysearchresponse.prevpage.split('?')[0];query=last.replace(/.*?\//g,'');}var blogSearch=false;if(query.match("%20blog")!==null){query=query.replace("%20blog","");blogSearch=true;}queries[query].count++;queries[query].databack.query=query;databack=queries[query].databack;if(typeof o.ysearchresponse.resultset_web!=='undefined'){if(blogSearch){databack.blog=[];databack.blogHTML='<div>';databack.blogHTML2='<div>';for(var i=0,j=o.ysearchresponse.resultset_web.length;i<j;i++){var item=o.ysearchresponse.resultset_web[i];databack.blog.push({abstract:item.abstract,title:item.title,clickurl:item.clickurl,url:item.url,displayurl:item.dispurl});var html=config.webItemHTML.replace('{clickurl}',item.clickurl);html=html.replace('{title}',item.title);html=html.replace('{siteurl}',yformatUrl(item.url));html=html.replace('{url}',item.url);html=html.replace('{abstract}',item.abstract);html=html.replace('{displayurl}',item.dispurl);html=html.replace('id=\"result\"',"");if((readCookieOrg('bevyview')!==null)&&(readCookieOrg('bevyview')=="1")){}if(screen.width<1201){if(i==3){html=html.replace('4px','70px');}if(i==7){html=html.replace('4px','70px');}}databack.blogHTML+=html;var html2=config.webItemHTML2.replace('{clickurl}',item.clickurl);html2=html2.replace('{title}',item.title);html2=html2.replace('{siteurl}',yformatUrl(item.url));html2=html2.replace('{url}',item.url);html2=html2.replace('{abstract}',item.abstract);html2=html2.replace('{displayurl}',item.dispurl);html2=html2.replace('id=\"result\"',"");html2=html2.replace('<br /><a class=\"opup\"',"<a class=\"opup\"");databack.blogHTML2+=html2;}databack.blogHTML+='</div>';databack.blogHTML2+='</div>';}else{databack.web=[];databack.webHTML='<div>';databack.webHTML2='<div>';for(var i=0,j=o.ysearchresponse.resultset_web.length;i<j;i++){var item=o.ysearchresponse.resultset_web[i];databack.web.push({abstract:item.abstract,title:item.title,clickurl:item.clickurl,url:item.url,displayurl:item.dispurl});var html=config.webItemHTML.replace('{clickurl}',item.clickurl);html=html.replace('{title}',item.title);html=html.replace('{siteurl}',yformatUrl(item.url));html=html.replace('{url}',item.url);html=html.replace('{abstract}',item.abstract);html=html.replace('{displayurl}',item.dispurl);html=html.replace('result','resu'+i);if((readCookieOrg('bevyview')!==null)&&(readCookieOrg('bevyview')=="1")){if(i==3){html=html.replace('style=\"','style=\"margin-right:70px;');}if(i==6){html=html.replace('style=\"','style=\"margin-right:350px;');}if(screen.width<1200){if(i==4||i==5||i==6){html=html.replace('19%','18%');}if(i==3){html=html.replace('margin-right:4px','margin-right:70px');}if(i==6){html=html.replace('margin-right:4px','margin-right:350px');}}}databack.webHTML+=html;var html2=config.webItemHTML2.replace('{clickurl}',item.clickurl);html2=html2.replace('{title}',item.title);html2=html2.replace('{siteurl}',yformatUrl(item.url));html2=html2.replace('{url}',item.url);html2=html2.replace('{abstract}',item.abstract);html2=html2.replace('{displayurl}',item.dispurl);html2=html2.replace('id=\"result\"',"");html2=html2.replace('<br /><a class=\"opup\"',"<a class=\"opup\"");databack.webHTML2+=html2;}databack.webHTML+='</div>';databack.webHTML2+='</div>';}}if(typeof o.ysearchresponse.resultset_images!=='undefined'){databack.images=[];databack.imagesHTML='<div>';for(var i=0,j=o.ysearchresponse.resultset_images.length;i<j;i++){var item=o.ysearchresponse.resultset_images[i];var referer=item.refererurl;var shorter=referer.replace('http://www.','').substring(0,39);databack.images.push({abstract:item.abstract,title:item.title,clickurl:item.clickurl,refererclickurl:item.refererclickurl,refererurl:item.refererurl,shorturl:shorter+'&hellip;',filename:item.filename,url:item.url,thumbnail:item.thumnail_url,thumbnaildimensions:[item.thumbnail_width,item.thumbnail_height],dimensions:[item.width,item.height],format:item.format,size:item.size});var dimensions=item.width+" x "+item.height;var html=config.imageItemHTML.replace('{url}',item.url);html=html.replace('{refererclickurl}',item.refererclickurl);html=html.replace('{refererurl}',item.refererurl);html=html.replace('{clickurl}',item.clickurl);html=html.replace('{url2}',item.url);html=html.replace('{shortened}',shorter);html=html.replace('{thumbnail}',item.thumbnail_url);html=html.replace('{thumbnailwidth}',item.thumbnail_width);html=html.replace('{thumbnailheight}',item.thumbnail_height);html=html.replace('{title}',ytrimText(item.title));html=html.replace('{dimensions}',dimensions);html=html.replace('{size}',item.size/1000+"k");databack.imagesHTML+=html;}databack.imagesHTML+='</div>';}if(typeof o.ysearchresponse.resultset_news!=='undefined'){databack.news=[];databack.newsHTML='<div id="newsch">';databack.newsHTML2='<div id="newsch">';for(var i=0,j=o.ysearchresponse.resultset_news.length;i<j;i++){var item=o.ysearchresponse.resultset_news[i];databack.news.push({abstract:item.abstract,title:item.title,clickurl:item.clickurl,url:item.url,language:item.language,source:item.source,sourceurl:item.sourceurl,idate:item.date,itime:item.time});var html=config.newsItemHTML.replace('{language}',item.language);html=html.replace('{clickurl}',item.clickurl);html=html.replace('{url}',item.url);html=html.replace('{abstract}',item.abstract);html=html.replace('{title}',item.title);html=html.replace('{source}',item.source);html=html.replace('{sourceurl}',item.sourceurl);html=html.replace('{idate}',item.date);html=html.replace('{itime}',item.time);html=html.replace('result','nresu'+i);databack.newsHTML+=html;var html2=config.newsItemHTML2.replace('{language}',item.language);html2=html2.replace('{clickurl}',item.clickurl);html2=html2.replace('{url}',item.url);html2=html2.replace('{abstract}',item.abstract);html2=html2.replace('{title}',item.title);html2=html2.replace('{source}',item.source);html2=html2.replace('{sourceurl}',item.sourceurl);html2=html2.replace('{idate}',item.date);html2=html2.replace('{itime}',item.time);html2=html2.replace('id=\"result\"',"");databack.newsHTML2+=html2;}databack.newsHTML+='</div>';databack.newsHTML2+='</div>';}if(queries[query].count==queries[query].all){queries[query].callback(databack);}}else{queries[query].count++;queries[query].databack.query=query;databack=queries[query].databack;if(queries[query].count==queries[query].all){queries[query].callback(databack);}}}return{_get:_get,retrieved:retrieved,appID:appID};}();function bformatUrlSrc(url){if(url.match("http://.*?/")!==null){return url.match("http://.*?/")[0];}else{return url;}}function btrimText(text){var temp=text.replace(/^(\W+)/,"");if(temp.match(/^(\w+)((\ \w+)){0,3}/)!==null){return temp.match(/^(\w+)((\ \w+)){0,3}/)[0];}else{return temp;}}YBING=function(){var AppId="0A30706AEE2267FC4ACBAC734E94938E5BDA2D0A";var parent={};var startIndex=0;function _get(o){if(typeof o!=='undefined'&&typeof o.searches==='string'&&typeof o.query==='string'&&typeof o.callback==='function'){var searches=makeAPIurl(o);startIndex=o.start;parent.callback=o.callback;add(searches);}}function makeAPIurl(o){var searchtypes=[];var offset=0;if(o.start!=1){offset=(o.start-1)*o.count+1;}else{offset=0;}if(screen.width<1400){o.count="20";}else{o.count="21";}var APIurl="http://api.bing.net/json.aspx?"+"AppId="+AppId+"&Query="+o.query+" site:youtube.com  "+"&Sources=Video"+"&Version=2.1"+"&Market=en-us"+"&Adult=Moderate"+"&Video.Count="+o.count+"&Video.Offset="+offset+"&JsonType=callback"+"&JsonCallback=YBING.searchCompleted";searchtypes.push(APIurl);return searchtypes;}function add(urls){for(var i=0;i<urls.length;i++){var s=d.createElement('script');s.setAttribute('src',urls[i]);s.setAttribute('type','text/javascript');d.getElementsByTagName('head')[0].appendChild(s);}}function searchCompleted(response){var errors=response.SearchResponse.Errors;if(errors==null){displayResults(response);}}function displayResults(response){var videoVisibleLinks='<a class="vidup" title="open search result in left BevyWindow" onclick=\"op1(\'video\',this);\"><img src=\"Images/opup3b.png\" /></a>&nbsp<a class="vidup" title="open search result in right BevyWindow" onclick=\"op2(\'video\',this);\"><img src="Images/opdn3b.png" /></a><a class="send-email2" onclick=\'showEmail(this, "video");return false;\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';var config={videoItemHTML:'<li class="video"><div class="vidthumbnail"><a class="vidthumba" href="{thumb_url}"><img class="vidthumbimg" src="{thumb_src}" width="{thumb_width}" height="{thumb_height}" alt="" /></a></div><div class="info"><div class="infoin"><a class="vidtitle" href="{title_url}">{title}</a></div><div class="vdl"><a class="vidlink" href="{parent_url}">{parent}</a></div><div class="divvisible-links">'+videoVisibleLinks+'</div></div></li>'};var databack={};var tempItem="";var results=response.SearchResponse.Video.Results;var maxConstLength=100;if(results!==undefined){databack.videoHTML="<ul class='vidul'>";for(var i=0;i<results.length;++i){tempItem=config.videoItemHTML;var maxLength=parseInt(results[i].StaticThumbnail.Width);if(maxLength<parseInt(results[i].StaticThumbnail.Height)){maxLength=parseInt(results[i].StaticThumbnail.Height);}var scale=maxLength/maxConstLength;var newWidth=parseInt(results[i].StaticThumbnail.Width)/scale;var newHeight=parseInt(results[i].StaticThumbnail.Height)/scale;tempItem=tempItem.replace("{thumb_url}",results[i].PlayUrl);tempItem=tempItem.replace("{thumb_src}",results[i].StaticThumbnail.Url);tempItem=tempItem.replace("{thumb_width}",newWidth);tempItem=tempItem.replace("{thumb_height}",newHeight);tempItem=tempItem.replace("{title}",btrimText(results[i].Title));tempItem=tempItem.replace("{title_url}",results[i].PlayUrl);tempItem=tempItem.replace("{parent}",results[i].SourceTitle);tempItem=tempItem.replace("{parent_url}",bformatUrlSrc(results[i].PlayUrl));databack.videoHTML+=tempItem;}databack.videoHTML+="</ul>";}databack.query=response.SearchResponse.Query.SearchTerms;parent.callback(databack,"video",startIndex);}return{_get:_get,searchCompleted:searchCompleted,appID:AppId};}();YTwit=function(){var twitVisibleLinks;var parent={};var startIndex=0;function formatText(text){var raw=text;var cooked=raw.replace(/\/u([^ ]+)/gi,"&#$1;");cooked=cooked.replace(/http:\/\/([^ ]+)/g,"<div style='display:inline'><a style=\"text-decoration:none\" href=\"http://$1\" target=\"_blank\">http://$1</a>&nbsp&nbsp"+twitVisibleLinks+"</div>");var woo='<a style="text-decoration:none" href="http://www.twitter.com/$1" target="blank">@$1</a>';cooked=cooked.replace(/@([\w*]+)/g,woo);var yay='<a style="color:blue;cursor:pointer;cursor:hand" onclick="TwitGetter(\'$1\',1);" >#$1</a>';cooked=cooked.replace(/#([\w*]+)/g,yay);return cooked;}function DateFormat(from){var date=new Date;date.setTime(Date.parse(from));return time_ago_in_words(date);function time_ago_in_words(from){return distance_of_time_in_words(new Date,from);}function distance_of_time_in_words(to,from){var distance_in_seconds=((to-from)/1000);var distance_in_minutes=Math.floor((distance_in_seconds/60));if(distance_in_minutes==0){return 'less than a minute ago';}if(distance_in_minutes==1){return 'a minute ago';}if(distance_in_minutes<45){return distance_in_minutes+' minutes ago';}if(distance_in_minutes<90){return 'about 1 hour ago';}if(distance_in_minutes<1440){return 'about '+Math.floor(distance_in_minutes/60)+' hours ago';}if(distance_in_minutes<2880){return '1 day ago';}if(distance_in_minutes<43200){return Math.floor(distance_in_minutes/1440)+' days ago';}if(distance_in_minutes<86400){return 'about 1 month ago';}if(distance_in_minutes<525960){return Math.floor(distance_in_minutes/43200)+' months ago';}if(distance_in_minutes<1051199){return 'about 1 year ago';}return 'over '+Math.floor(distance_in_minutes/525960)+' years ago';}}function _get(o){if(typeof o!=='undefined'&&typeof o.query==='string'&&typeof o.callback==='function'){var searches=makeAPIurl(o);startIndex=o.start;parent.callback=o.callback;add(searches);}}function makeAPIurl(o){var searchtypes=[];var APIurl="http://search.twitter.com/search.json?rpp="+o.count+"&q="+o.query+"&page="+o.start+"&callback=YTwit.searchCompleted";searchtypes.push(APIurl);return searchtypes;}function add(urls){for(var i=0;i<urls.length;i++){var s=d.createElement('script');s.setAttribute('src',urls[i]);s.setAttribute('type','text/javascript');d.getElementsByTagName('head')[0].appendChild(s);}}function searchCompleted(response){displayResults(response);}function displayResults(response){twitVisibleLinks='<a class="twitup" title="open search result in left BevyWindow" onclick=\"op1(\'twit\',this);\"><img src=\"Images/opupmin3b.png\" /></a>&nbsp<a class="twitup" title="open search result in right BevyWindow" onclick=\"op2(\'twit\',this);\"><img src="Images/opdnmin3b.png" /></a>';var config={twitItemHTML:'<div class="d2st" ><div ><img  align="left" class="imst"  src="{thumb_url}"  alt="" /><a class="ast" href="{userurl}" target="blank">{from}</a>:{text}<br /><div style="float:right;font-size:10px;height:10px">{date}</div></div></div>'};var databack={};var tempItem="";var resresults=response.results;var maxConstLength=100;if(resresults.length!==undefined){databack.twit=[];if(d.getElementById("d1st")){var d1st=d.getElementById('d1st').parentNode;var olddiv=d.getElementById("d1st");d1st.removeChild(olddiv);}databack.twitHTML="<div scrolling='no' id='d1st' class='d1st' ><div style=\"height:20px;width:50%;\"><input  id=\"twinp\" type=\"text\" style=\"height: 17px; border-style: solid; border-color: #bccdf0;"+"border-width: 1px; width: 100%;margin-left:5px;margin-top:5px; float: left; font-size: 13px; color: blue;\""+"onkeypress=\"var k=event.keyCode||event.which;if(k==13){TwitGetter(this.value,1)}\" /><img alt=\"\" src=\"Images/magico50small.png\""+"style=\"float: right; width: 19px; height: 19px; margin-top: -20px; margin-right: -5px;"+"cursor: pointer; cursor: hand;\" onclick=\"TwitGetter(d.getElementById('twinp').value,1);\" /></div><br />";for(var i=0,j=resresults.length;i<j;i++){var item=resresults[i];databack.twit.push({from:item.from_user,thumb_url:item.profile_image_url,text:item.text,tquery:item.query,date:item.created_at});tempItem=config.twitItemHTML;tempItem=tempItem.replace('{from}',item.from_user);tempItem=tempItem.replace('{userurl}','http://www.twitter.com/'+item.from_user);tempItem=tempItem.replace('{thumb_url}',item.profile_image_url);tempItem=tempItem.replace('{text}',formatText(item.text));tempItem=tempItem.replace('{date}',DateFormat(item.created_at));databack.twitHTML+=tempItem;}if(resresults.length==0){databack.twitHTML+="No Search results.";}databack.twitHTML+="</div>";}parent.callback(databack,startIndex);}return{_get:_get,searchCompleted:searchCompleted};}();function blursugg(){d.getElementById('suggc').style.display="none";d.getElementById('suggbox').innerHTML="";}function sugghil(t){t.style.backgroundColor="#FFE4B5";}function sugglol(t){t.style.backgroundColor="#FFFFFF";}function choosesugg(t,hide){if(hide==null){hide=true;}if(d.all){var sugv=t.innerText;}else{var sugv=t.textContent;}d.getElementById("q").value=sugv;if(hide){d.getElementById('suggc').style.display="none";}}var google={ac:{h:function(queryTerm){ln=queryTerm[1].length;if(d.getElementById("q").value!==" "){d.getElementById('suggc').style.display="block";}else{d.getElementById('suggc').style.display="none";}d.getElementById('suggbox').innerHTML="";var objr='<div class="suggclass" id="suggclass">';var suggItem='<div id="sgid{id}" class="suggres" onmouseover="sugghil(this);" onmouseout="sugglol(this);" onclick="choosesugg(this);">{res}</div>';for(var i=0;i<ln;i++){objr+=suggItem.replace('{id}',queryTerm[1][i][2]).replace('{res}',queryTerm[1][i][0]);}objr+='</div>';d.getElementById('suggbox').innerHTML+=objr;}}};function updn(event){if(window.event){keyPressed=window.event.keyCode;}else{keyPressed=event.which;}if(keyPressed==27){blursugg();}else{if(keyPressed==40||keyPressed==38){var suggclass=d.getElementById('suggclass');if(typeof(selected)=='undefined'||selected==null){selected=(keyPressed==40)?0:(suggclass.children.length-1);}else{sugglol(suggclass.children[selected]);if(keyPressed==40&&selected<suggclass.children.length-1){++selected;}else if(keyPressed==38&&selected>0){--selected;}}choosesugg(suggclass.children[selected],false);sugghil(suggclass.children[selected]);}}}var obj={pingSearch:function(event){if(window.event){keyPressed=window.event.keyCode;}else{keyPressed=event.which;}if(keyPressed!==40&&keyPressed!==38&&keyPressed!==27){var queval=d.getElementById("q").value;if(queval){obj.s=d.createElement('script');obj.s.type='text/javascript';obj.s.charset='utf-8';obj.s.src='http://suggestqueries.google.com/complete/search?hl=en&q='+queval;d.getElementsByTagName('head')[0].appendChild(obj.s);}}}};function srch(tp,tn){d.getElementById("is").style.display="none";type=tp;var addt=d.getElementById("addit");var imsize=d.getElementById("imsize");addt.style.display="block";var q=d.getElementById("q");var que=q.value;switch(tp){case 'web':{addt.innerHTML=d.getElementById("web").innerHTML;if(webtype!=1){imsize.style.display="none";}break;}case 'images':{addt.innerHTML=d.getElementById("pics").innerHTML;imsize.style.display="block";imsize.style.left=pgWidth-((pgWidth/2)-160)+"px";imsize.style.top="140px";break;}case 'news':{addt.innerHTML=d.getElementById("news").innerHTML;if(webtype!=1){imsize.style.display="none";}break;}case 'video':{addt.innerHTML=d.getElementById("video").innerHTML;if(webtype!=1){imsize.style.display="none";}break;}case 'blog':{type='web';addt.innerHTML=d.getElementById("blog").innerHTML;if(webtype!=1){imsize.style.display="none";}break;}case 'twitter':{TwitGetter(que,1);break;}}d.cookie="addit="+tp+";expires=Thu, 31 Dec 2020 23:59:59 UTC; path=/";d.getElementById("Div2").style.width=((pgWidth/2)+117)+"px";d.getElementById("web").style.width=((pgWidth/2)-160)+"px";d.getElementById("blog").style.width=((pgWidth/2)-160)+"px";d.getElementById("news").style.width=((pgWidth/2)-160)+"px";d.getElementById("pics").style.width="800px";d.getElementById("video").style.width="750px";d.getElementById("adif").style.borderRightStyle="solid";for(t=1;t<7;t++){if(t==tn){d.getElementById("srl"+t).style.color="black";d.getElementById("srl"+t).style.textDecoration="none";d.getElementById("srl"+t).style.fontWeight="bold";}else{d.getElementById("srl"+t).style.color="blue";d.getElementById("srl"+t).style.textDecoration="underline";d.getElementById("srl"+t).style.fontWeight="normal";}}}function unaddit(){var addit=d.getElementById("addit");d.cookie="addit=0;expires=Thu, 31 Dec 2020 23:59:59 UTC; path=/";addit.style.display="none";d.getElementById("Div2").style.width="920px";d.getElementById("web").style.width="560px";d.getElementById("news").style.width="560px";d.getElementById("blog").style.width="560px";d.getElementById("pics").style.width="100%";d.getElementById("video").style.width="100%";d.getElementById("adif").style.borderRightStyle="none";for(t=1;t<7;t++){d.getElementById("srl"+t).style.color="blue";d.getElementById("srl"+t).style.textDecoration="underline";d.getElementById("srl"+t).style.fontWeight="normal";}if(webtype==0){d.getElementById("is").style.display="block";}d.getElementById("imsize").style.display="none";}