google.load("search","1",{"nocss":true});google.load("jquery","1.4.2");google.setOnLoadCallback(searchLoaded);function searchLoaded(){jQuery("#onpage_search").attr("value",search_translations["search"]);jQuery("#onpage_search").focus(function(){if(jQuery("#onpage_search").attr("value")==search_translations["search"]){jQuery("#onpage_search").attr("value","");}});jQuery("#onpage_search").blur(function(){if(jQuery("#onpage_search").attr("value")==""){jQuery("#onpage_search").attr("value",search_translations["search"]);}});jQuery(window).resize(function(){positionSearch();});jQuery("#onpage_search").parents("form").submit(function(){_1.execute(jQuery("#onpage_search").attr("value"));return false;});jQuery("<div>").attr({id:"searchcontainer"}).css({display:"none",width:"340px",position:"absolute","z-index":"1000"}).appendTo("body");jQuery("<iframe>").attr({id:"searchiframe"}).css({display:"none",width:"340px",position:"absolute",border:"none","z-index":"900",src:"javascript:void();"}).appendTo("body");var _1=new GSearchControl();var _2=new GsearcherOptions();_2.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);var _3=new GwebSearch();_3.setUserDefinedClassSuffix("siteSearch");_3.setSiteRestriction(document.location.hostname.replace(/^www./,''));_1.addSearcher(_3,_2);_1.setSearchCompleteCallback(this,searchComplete);_1.draw(document.getElementById("searchcontainer"));jQuery("<div>").attr({id:"searchcontainer-close"}).css({display:"block",padding:"10px 10px 0","text-align":"right",margin:"10px"}).html("<a onclick=\"jQuery('#searchcontainer').slideUp('slow'); jQuery('#searchiframe').hide(); return false;\" href=\"#close\">"+search_translations["close"]+"</a>").prependTo("#searchcontainer");jQuery("<div>").attr({id:"searchcontainer-noresults"}).css({display:"none",padding:"10px",margin:"10px",background:"#f0f0f0"}).text(search_translations["noresults"]).appendTo("#searchcontainer");jQuery("form.gsc-search-box table").remove();}
function positionSearch(){var _4={"above":parseInt(jQuery("#onpage_search").offset()["top"]),"below":parseInt(jQuery(window).height()-jQuery("#onpage_search").height()-jQuery("#onpage_search").offset()["top"]),"right":parseInt(jQuery(window).width()-jQuery("#onpage_search").width()-jQuery("#onpage_search").offset()["left"]),"left":parseInt(jQuery("#onpage_search").offset()["left"])};if((_4["above"]>_4["below"])&&(_4["above"]>parseInt(jQuery("#searchcontainer").outerHeight()))){var _5=parseInt(jQuery("#onpage_search").offset()["top"])-parseInt(jQuery("#searchcontainer").outerHeight()-1);jQuery("#searchcontainer").css({"border-bottom":"none","-moz-border-radius-topleft":"5px","-webkit-border-top-left-radius":"5px","-moz-border-radius-topright":"5px","-webkit-border-top-right-radius":"5px"});}else{var _5=parseInt(jQuery("#onpage_search").offset()["top"]+jQuery("#onpage_search").outerHeight()-1);jQuery("#searchcontainer").css({"border-top":"none","-moz-border-radius-bottomleft":"5px","-webkit-border-bottom-left-radius":"5px","-moz-border-radius-bottomright":"5px","-webkit-border-bottom-right-radius":"5px"});}
if(_4["right"]>_4["left"]){var _6=parseInt(jQuery("#onpage_search").offset()["left"]);}else{var _6=parseInt(jQuery("#onpage_search").offset()["left"]+jQuery("#onpage_search").outerWidth()-jQuery("#searchcontainer").outerWidth());}
jQuery("#searchcontainer").css({top:_5,left:_6});jQuery("#searchiframe").css({top:_5,left:_6,height:jQuery("#searchcontainer").outerHeight()});}
function searchComplete(){var _7=jQuery(".gsc-stats").html();if(_7=="(0)"){jQuery("#searchcontainer-noresults").show();}else{jQuery('#searchcontainer-noresults').hide();}
positionSearch();jQuery("#searchiframe").show();jQuery("#searchcontainer").slideDown("slow");}