var ytvbp={};ytvbp.MAX_RESULTS_LIST=5;ytvbp.PREVIOUS_PAGE_BUTTON="previousPageButton";ytvbp.NEXT_PAGE_BUTTON="nextPageButton";ytvbp.VIDEO_LIST_CONTAINER_DIV="searchResultsVideoList";ytvbp.VIDEO_PLAYER_DIV="videoPlayer";ytvbp.MAIN_SEARCH_CONTAINER_DIV="mainSearchBox";ytvbp.TOP_SEARCH_CONTAINER_DIV="searchBox";ytvbp.nextPage=2;ytvbp.previousPage=0;ytvbp.previousSearchTerm="";ytvbp.previousQueryType="all";ytvbp.listVideos=function(_1,_2,_3){ytvbp.previousSearchTerm=_2;ytvbp.previousQueryType=_1;var _4=ytvbp.MAX_RESULTS_LIST;var _5=(((_3-1)*ytvbp.MAX_RESULTS_LIST)+1);ytvbp.presentFeed(_1,_4,_5,_2);ytvbp.updateNavigation(_3)};ytvbp.sendRequest=function(_6,_7,_8){if(window.XMLHttpRequest){var _9=new XMLHttpRequest()}else{var _9=new ActiveXObject("MSXML2.XMLHTTP.3.0")}_9.open("POST",_6,true);_9.setRequestHeader("Content-Type","application/x-www-form-urlencoded");_9.onreadystatechange=function(){var _a=document.getElementById(_8);if(_9.readyState==1){_a.innerHTML="<b>Carregando...</b>"}else{if(_9.readyState==4&&_9.status==200){if(_9.responseText){_a.innerHTML=_9.responseText}}else{if(_9.readyState==4){alert("Invalid response received - Status: "+_9.status)}}}};_9.send(_7)};ytvbp.presentVideo=function(_b){var _c="queryType=show_video&videoId="+_b;var _d="youtube/index.php";ytvbp.sendRequest(_d,_c,ytvbp.VIDEO_PLAYER_DIV)};ytvbp.presentFeed=function(_e,_f,_10,_11){var _12="queryType="+_e+"&maxResults="+_f+"&startIndex="+_10+"&searchTerm="+_11;var _13="youtube/index.php";ytvbp.sendRequest(_13,_12,ytvbp.VIDEO_LIST_CONTAINER_DIV)};ytvbp.updateNavigation=function(_14){ytvbp.nextPage=_14+1;ytvbp.previousPage=_14-1;document.getElementById(ytvbp.NEXT_PAGE_BUTTON).style.display="inline";document.getElementById(ytvbp.PREVIOUS_PAGE_BUTTON).style.display="inline";if(ytvbp.previousPage<1){document.getElementById(ytvbp.PREVIOUS_PAGE_BUTTON).disabled=true}else{document.getElementById(ytvbp.PREVIOUS_PAGE_BUTTON).disabled=false}document.getElementById(ytvbp.NEXT_PAGE_BUTTON).disabled=false};ytvbp.hideMainSearch=function(){document.getElementById(ytvbp.MAIN_SEARCH_CONTAINER_DIV).style.display="none";document.getElementById(ytvbp.TOP_SEARCH_CONTAINER_DIV).style.display="inline"};ytvbp.queryTypeChanged=function(_15,_16){if(_15!="all"){_16.value=""}};


