(function(){var b=window,k=b.googleSearchResizeIframe||b.googleSearchPath&&"/cse"==b.googleSearchPath&&"undefined"==typeof b.googleSearchResizeIframe,l=document.location.protocol,m=document.location.search,n,p,r,t;function u(c,a,d,e){var f={};c=c.split(d);for(d=0;d<c.length;d++){var g=c[d],h=g.indexOf(a);if(0<h){var q=g.substring(0,h);q=e?q.toUpperCase():q.toLowerCase();g=g.substring(h+1,g.length);f[q]=g}}return f}
function v(c,a,d){if(d){var e=c.slice(-1);a=[c,"?"==e?"":"&",a,"=",encodeURIComponent(d)].join("");if(2048>=a.length)return a}return c}function w(c,a){return c?Math.max(c,a):a}
function x(){var c="";c=b.googleSearchDomain?c+b.googleSearchDomain:c+"www.google.com";var a=!1;b.googleSearchPath?(a="/cse"==b.googleSearchPath,c+=b.googleSearchPath):c+="/custom";c=(a?l:"https:")+"//"+c+"?";b.googleSearchQueryString&&(b.googleSearchQueryString=b.googleSearchQueryString.toLowerCase());a=m;if(1>a.length)var d="";else{a=a.substring(1,a.length);a=u(a,"=","&",!1);"q"!=b.googleSearchQueryString&&a[b.googleSearchQueryString]&&(a.q=a[b.googleSearchQueryString],delete a[b.googleSearchQueryString]);
if(a.cof){var e=u(decodeURIComponent(a.cof),":",";",!0);(e=e.FORID)&&(n=parseInt(e,10))}a.siteurl&&(t=decodeURIComponent(a.siteurl));if(e=document.getElementById(b.googleSearchFormName))if(!e.q||!a.q||a.ie&&"utf-8"!=a.ie.toLowerCase()||(e.q.value=decodeURIComponent(a.q.replace(/\+/g," "))),e.sitesearch)for(var f=0;f<e.sitesearch.length;f++)e.sitesearch[f].checked=null==a.sitesearch&&""==e.sitesearch[f].value?!0:e.sitesearch[f].value==a.sitesearch?!0:!1;e="";for(d in a)e+="&"+d+"="+a[d];d=e.substring(1,
e.length)}c+=d;c=v(c,"ad","n"+p);c=v(c,"num",r);c=v(c,"adtest",b.googleAdtest);k&&(d=b.location.href,a=d.indexOf("#"),-1!=a&&(d=d.substring(0,a)),c=v(c,"rurl",d));d=c;c=b.document.getElementById(b.googleSearchFormName);t||(t=b.document.referrer,d=v(d,"siteurl",t));c&&!c.siteurl&&(a=document.createElement("input"),a.name="siteurl",a.type="hidden",a.value=t,c.appendChild(a));return c=d}
function y(c,a,d){var e={};e[9]=300+90*a;e[10]=300+50*Math.min(c,4)+90*a;e[11]=300+50*c+90*a;if(d)for(c=660+120*a,a=9;11>=a;a++)e[a]=Math.max(e[a],c);return e}
function z(){(p=b.googleSearchNumAds)||(p=9);r=(r=b.googleNumSearchResults)?Math.min(r,20):10;var c={9:795,10:795,11:500},a=y(p,r,"/cse"==b.googleSearchPath),d=x();b.googleSearchFrameborder||(b.googleSearchFrameborder="0");var e=document.getElementById(b.googleSearchIframeName);if(e&&c[n]){c=w(b.googleSearchFrameWidth,c[n]);a=w(b.googleSearchFrameHeight,a[n]);var f=document.createElement("iframe");d={name:"googleSearchFrame",src:d,frameBorder:b.googleSearchFrameborder,width:c,height:a,marginWidth:"0",
marginHeight:"0",hspace:"0",vspace:"0",allowTransparency:"true",scrolling:"no"};for(var g in d)f.setAttribute(g,d[g]);e.appendChild(f);f.attachEvent?f.attachEvent("onload",function(){window.scrollTo(0,0)}):f.addEventListener("load",function(){window.scrollTo(0,0)},!1);k&&b.setInterval(function(){if(b.location.hash&&"#"!=b.location.hash){var h=b.location.hash.substring(1)+"px";f.height!=h&&"0px"!=h&&(f.height=h)}},10)}b.googleSearchIframeName=null;b.googleSearchFormName=null;b.googleSearchResizeIframe=
null;b.googleSearchQueryString=null;b.googleSearchDomain=null;b.googleSearchPath=null;b.googleSearchFrameborder=null;b.googleSearchFrameWidth=null;b.googleSearchFrameHeight=null;b.googleSearchNumAds=null;b.googleNumSearchResults=null;b.googleAdtest=null}z();}).call(this);
