//This is JS equivalent of the vtvsettings that is resident on the server for mobile devices and other device.
//Add a line here for the 3-tuple values for the dataspace we want to support. The first value is the numeric value of the DS.
//The second value is the proxypass tag.

var AjaxConstsBase = 
 { 
    "VideoDS"       : {"title":"Videos", "val": 16777216,"proxy_pass": "/bsearch", "user_agent":"def-xml","req_header":"text/xml","req_type":"GET","preload_images_array":"VideopreloadImagesSrc"}
};

var AjaxConsts = 
{
    "VideoMoreInfoDS":{"val": 16777216,"proxy_pass": "/cgi-bin/mi.py", "user_agent":"def-xml","req_header":"text/xml","req_type":"GET"},
    "VideoMoreInfoDS2_0":{"val": 16777216,"proxy_pass": "/bsearch", "user_agent":"def-xml","req_header":"text/xml","req_type":"GET"},
    "EnableCategories":true,
    "EnableGetVtap": false,
    "EnableEmbed": false,
    "useSearch2_0": true,
    "ShareURL"      : "http://www.vtap.com/cgi-bin/clip.cgi?",
    "StatisticURL"  : "/cgi-bin/clip.cgi?",
    "AboutURL"      : "http://www.vtap.com",
    "Resolver"      : "/act?ua=pc_iphone&gid=",
    "IResolver"     : "/prslv",
    "DataSpaceMap" : [{"val": 16777216, "search_handler": "VideoSearchResult", "render_handler": "video_renderer", "evt_handler":"video_evt_handler"}],
    "IPhoneCheckDS" : {"val": 16777216,"proxy_pass":"/iphonecheck","user_agent":"pc_iphone","req_header":"text/xml","req_type":"POST"},
    "IPhoneCheck"   : "/iphonecheck?ua=iphone",
    "PlayAudio"     : "/iphoneaudio",
    "GetPreview"    : "/iphonepreview?ua=iphone_preview",
    "VideoTime"     : "300",
    "MoreInfoURL"   : "",
    "Max_Rating"    : 5,
    "Max_UN_Length" : 14,
    "MailURL" : "mailto:?subject=Check out this video!&body=",
     //msecs
     "QueryGapPollTimer" : "20",
     "DeadClip"     : "images/deadclip.png",
     "AudioClip"    : "images/speaker.png",
     "debug"        : 0,
     // In secs. 
     "PreviewRetry" : 5,
     "ClipCheck": [true, true, 5, false],
     "iphone_versions" : [{"ver":"1A543a"}, {"ver":"1C25"}],
    "useMemMI":1,
    "miParams":"&RC=10",
    "iGoogleUrl": "http://www.google.com/ig/add?moduleurl=http://hosting.gmodules.com/ig/gadgets/file/100551125980586397550/pcwidget.xml&source=imag",
    "EmbedTitleCharsLimit": 40
};
AjaxConsts.prototype = AjaxConstsBase; //This is the base object defined in iphone.html


var __DEBUG__ = false;

var ProtoUIStates={"currentWidth":0,"dspace":AjaxConstsBase.VideoDS,"searchTextBox":null,"searchContainer":null,"header":null,"resultsContainer":null,"playerDiv":null,"keypadElem":null,"timerId":0,"timer_counter":0,"curr_query":"","max_chars":20,"ctxt_str_max":16,"contextString":"","contextLabel":null,"charWidth":8,"bkgDiv":null,"curr_hash":0,"actPopup":null,"preloadImagesArray":null,"MIpreloadImagesArray":null,"MIpreloadImagesSrc":null,"share_gid":"","fold_gid":"","search_word":"","platform_info":null,"windowOpenUrl":"","resultsPerPage":4,"relatedClipsPerPage":4,"resultsPerPageUMPC":calc_shelf_size()<3?3:calc_shelf_size(),"relatedClipsPerPageUMPC":(calc_shelf_size()-2)<1?1:(calc_shelf_size()-2)};
var VideopreloadImagesSrc=[];
ProtoUIStates.MIpreloadImagesSrc=[];
var AnswersPreloadImagesSrc=[];
function calc_shelf_size(){
var ss=parseInt((screen.availHeight/100)-2);
return ss;
}
function home(){
EvHandleHome();
}
function back(){
EvHandleBack(1);
}
function search(){
EvHandleSearch();
}
function shareVideo(p1){
return EvHandleShareVideo(p1);
}
function bookmark(){
EvHandleBookMark();
}
function GetvTap(_3){
EvHandleGetvTap(_3);
}
function about(){
EvHandleAbout();
}
function resizeWidget(){
EvHandleResize();
}
function categories(){
EvHandleCategories();
}
function windowOpen(){
window.open(ProtoUIStates.windowOpenUrl,"Share","width=580,height=480,resizable=yes,scrollbars=yes,status=0");
}
function unloader(){
EvCleanup();
}
function parseQueryString(){
var _4=window.location.toString();
var mi;
var _6=_4.indexOf("?");
if(_6==-1){
_6=_4.indexOf("#");
}
if(_6!=-1){
mi=_4.substr(_6+1);
_6=mi.indexOf("#");
if(_6!=-1){
mi=mi.substr(0,_6);
}
var _7=mi.split("&");
for(i=0;i<_7.length;i++){
mi=_7[i];
if(mi.indexOf("sl:")>=0){
ProtoUIStates.share_gid=mi.substr(mi.indexOf("sl:")+"sl:".length);
}else{
if(mi.indexOf("vp:")>=0){
ProtoUIStates.fold_gid=mi;
}else{
_6=mi.indexOf("=");
if(_6!=-1){
var _8=mi.substr(0,_6);
var _9=mi.substr(_6+1);
if(_8=="sw"){
ProtoUIStates.search_word=unescape(_9);
}
}
}
}
}
}
}
function start_app(){
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
SInitializeSearch(ProtoUIStates.resultsPerPageUMPC*3,ProtoUIStates.dspace,ProtoUIStates.share_gid);
}else{
SInitializeSearch(ProtoUIStates.resultsPerPage*3,ProtoUIStates.dspace,ProtoUIStates.share_gid);
}
}
function loader(){
ProtoUIStates.searchTextBox=document.getElementById("searchTextBox");
ProtoUIStates.searchTextBox.value="";
var _a=document.referrer.toLowerCase();
if(_a.indexOf("vtap.com")!=-1){
ProtoUIStates.searchTextBox.focus();
}
ProtoUIStates.preloadImagesArray=new Array();
ProtoUIStates.searchContainer=document.getElementById("searchContainer");
ProtoUIStates.header=document.getElementById("header");
ProtoUIStates.resultsContainer=document.getElementById("resultsContainer");
ProtoUIStates.playerDiv=document.getElementById("player");
ProtoUIStates.keypadElem=document.getElementById("keypad");
ProtoUIStates.bkgDiv=document.getElementById("bkgDiv");
ProtoUIStates.contextLabel=document.getElementById("my_text");
ProtoUIStates.contextLabelContainer=document.getElementById("contextLabelSpan");
ProtoUIStates.actPopup=document.getElementById("actPopup");
ProtoUIStates.platform_info=new PlatformInfo();
ProtoUIStates.share_gid="__share_gid__";
parseQueryString();
setTimeout("start_app()",10);
}
var bmConsts={"bm":[{"name":"Add to my Bookmarks","url":"Browser Bookmarks","bkmk":"url=","title":"title=","icon":"images/bookmark_over.gif"},{"name":"Google Bookmarks","url":"http://www.google.com/bookmarks/mark?op=edit&","bkmk":"bkmk=","title":"title=","icon":"images/google.png"},{"name":"Yahoo My Web","url":"http://myweb2.search.yahoo.com/myresults/bookmarklet?","bkmk":"u=","title":"t=","icon":"images/yahoo.gif"},{"name":"Windows Live","url":"https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&top=1&","bkmk":"url=","title":"title=","icon":"images/windows_live.gif"},{"name":"Newsvine","url":"http://www.newsvine.com/_wine/save?","bkmk":"u=","title":"h=","icon":"images/newsvine.png"},{"name":"Reddit","url":"http://reddit.com/submit?","bkmk":"url=","title":"title=","icon":"images/reddit.gif"},{"name":"Digg","url":"http://digg.com/submit?phase=2&","bkmk":"url=","title":"title=","icon":"images/digg.gif"}]};
function Bookmark(){
addBrowserBookmark=function(_b,_c){
if(window.sidebar){
window.sidebar.addPanel(_b,_c,"");
}else{
if(document.all){
window.external.AddFavorite(_c,_b);
}else{
if(window.opera&&window.print){
return true;
}
}
}
};
bmRequest=function(_d,_e,_f,_10){
var bm=bmConsts.bm[_d];
if(bm.url=="Browser Bookmarks"){
javascript:
addBrowserBookmark(unescape(_f),unescape(_e));
}else{
bmUrl=bm.url+bm.bkmk+_e+"&"+bm.title+_f;
valert("title:"+_f+" url:"+bmUrl);
window.open(bmUrl,"bmwindow","",false);
}
};
this.createBMPage=function(bmA,url,_14){
valert("URL: "+url);
bmt="<table><tbody>";
for(var i=0;i<bmA.length;i++){
if(bmA[i].name=="Add to my Bookmarks"&&getBrowser()=="Internet Explorer"){
bmA[i].name="Add to my Favorites";
}
id="remove"+i;
onclk="onclick=\"bmRequest("+i+",'"+url+"','"+_14+"');\"";
bmt+="<tr "+onclk+"><td height=\"20px;\"><img src=\""+bmA[i].icon+"\" id=\""+id+"\" style=\"cursor:pointer;\"/></td><td align=\"left\" valign=\"center\"><span class=\"title_text\">"+bmA[i].name+"</span></td></tr>";
}
bmt+="</tbody></table>";
return bmt;
};
this.loadBMPage=function(url,_17){
disp_tit=unescape(_17);
disp_tit=(disp_tit.length>25?disp_tit.substring(0,22)+"...":disp_tit);
bmt=this.createBMPage(bmConsts.bm,url,_17);
bmHtml="<div id=\"content\" style=\"width:96%; border:1px solid darkgray; margin-bottom: 8px;\">"+bmt+"</div>";
actHTML=bmHtml;
return actHTML;
};
}
function createXMLParserAndLoadString(_18){
var _19;
if(window.ActiveXObject){
var doc=new ActiveXObject("Microsoft.XMLDOM");
doc.async="false";
doc.loadXML(_18);
_19=doc;
}else{
var _1b=new DOMParser();
var doc=_1b.parseFromString(_18,"text/xml");
_19=doc;
}
return _19;
}
function getWindowWidth(){
var _1c=0;
if(typeof (window.innerWidth)=="number"){
_1c=window.innerWidth;
}else{
if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){
_1c=document.documentElement.clientWidth;
}else{
if(document.body&&(document.body.clientWidth||document.body.clientHeight)){
_1c=document.body.clientWidth;
}
}
}
return _1c;
}
function getWindowHeight(){
var _1d=0;
if(typeof (window.innerHeight)=="number"){
_1d=window.innerHeight;
}else{
if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){
_1d=document.documentElement.clientHeight;
}else{
if(document.body&&(document.body.clientWidth||document.body.clientHeight)){
_1d=document.body.clientHeight;
}
}
}
return _1d;
}
function showElement(_1e){
var _1f=navigator.appName.indexOf("Netscape")!=-1;
var _20=navigator.appName.indexOf("Microsoft")!=-1;
_1e.style.display="block";
}
function hideElement(_21){
var _22=navigator.appName.indexOf("Netscape")!=-1;
var _23=navigator.appName.indexOf("Microsoft")!=-1;
if(_21){
_21.style.display="none";
}
}
function getBrowser(){
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("opera")!=-1){
return "Opera";
}
if(agt.indexOf("staroffice")!=-1){
return "Star Office";
}
if(agt.indexOf("webtv")!=-1){
return "WebTV";
}
if(agt.indexOf("beonex")!=-1){
return "Beonex";
}
if(agt.indexOf("chimera")!=-1){
return "Chimera";
}
if(agt.indexOf("netpositive")!=-1){
return "NetPositive";
}
if(agt.indexOf("phoenix")!=-1){
return "Phoenix";
}
if(agt.indexOf("firefox")!=-1){
return "Firefox";
}
if(agt.indexOf("safari")!=-1){
return "Safari";
}
if(agt.indexOf("skipstone")!=-1){
return "SkipStone";
}
if(agt.indexOf("msie")!=-1){
return "Internet Explorer";
}
if(agt.indexOf("netscape")!=-1){
return "Netscape";
}
if(agt.indexOf("mozilla/5.0")!=-1){
return "Mozilla";
}
if(agt.indexOf("/")!=-1){
if(agt.substr(0,agt.indexOf("/"))!="mozilla"){
return navigator.userAgent.substr(0,agt.indexOf("/"));
}else{
return "Netscape";
}
}else{
if(agt.indexOf(" ")!=-1){
return navigator.userAgent.substr(0,agt.indexOf(" "));
}else{
return navigator.userAgent;
}
}
}
function stripHTML(_25){
var _26=_25;
if(_25){
_26=_25.replace(/(<([^>]+)>)&/ig,"").replace(/&lt;/ig,"<").replace(/&gt;/ig,">");
}
return _26;
}
function createCookie(_27,_28,_29){
if(_29){
var _2a=new Date();
_2a.setTime(_2a.getTime()+(_29*24*60*60*1000));
var _2b="; expires="+_2a.toGMTString();
}else{
var _2b="";
}
document.cookie=_27+"="+_28+_2b+"; path=/";
}
function readCookie(_2c){
var _2d=_2c+"=";
var ca=document.cookie.split(";");
for(var i=0;i<ca.length;i++){
var c=ca[i];
while(c.charAt(0)==" "){
c=c.substring(1,c.length);
}
if(c.indexOf(_2d)==0){
return c.substring(_2d.length,c.length);
}
}
return null;
}
function eraseCookie(_31){
createCookie(_31,"",-1);
}
function setClipRslvStatus(_32,_33){
if(_33=="3"||_33=="8"||_33=="404"||_33=="4"){
_32.resolveStatus=3;
}else{
if(_33=="0"){
_32.resolveStatus=2;
_32.image=_32.imageURL;
}else{
_32.resolveStatus=4;
_32.image=_32.imageURL;
}
}
}
function handleRslvRsp(_34,_35){
var _36=_34.getElementsByTagName("VtvActResp");
var _37=_36[0].getElementsByTagName("status");
var _38=_36[0].getElementsByTagName("type");
setClipRslvStatus(_35,_37[0].childNodes[0].nodeValue);
var _39=_36[0].getElementsByTagName("xurl");
if(_39.length>0){
_35.resolveStatus=4;
}
if(_35.resolveStatus==2){
_35.videoType=_38[0].childNodes[0].nodeValue;
if(AjaxConsts.ClipCheck[3]==false){
var url=_36[0].getElementsByTagName("url");
_35.videoURL=url[0].childNodes[0].nodeValue;
}
if(_35.videoType=="x-audio"){
_35.isAudioOnly=true;
}else{
_35.isAudioOnly=false;
}
}else{
if(_35.resolveStatus==3){
var msg=_36[0].getElementsByTagName("msg");
_35.videoURL=msg[0].childNodes[0].nodeValue;
}
}
}
function ClipChecker(_3c){
var _3d=_3c;
var _3e=false;
this.videoCheckCB=function(_3f,_40,_41,_42){
var _43=_42.results_obj.arr;
var len=_43.length;
var _45=_40.split("\n");
var _46=(_3d.GetSearchResults()==_42.results_obj);
for(var i=0;i<_45.length;i++){
if(_45[i]==null||_45[i]==""){
continue;
}
var _48=_45[i].split(",");
var gid=_48[0].split("=")[1];
var _4a=_48[1].split("=")[1];
for(var j=_42.startIndex;j<len;j++){
if(gid==_43[j].gid){
_43[j].videoStatus=_4a;
if(_48.length>2){
_43[j].videoURL=_48[2].split("=")[1];
}
if(_46){
_3d.UpdateOverLayImage(_43[j],j);
}
break;
}
}
}
};
this.clipResolveCB=function(_4c,_4d,_4e,_4f){
var _50=_4e.getElementsByTagName("VtvActResp");
var _51=_50[0].getElementsByTagName("status");
var _52=_50[0].getElementsByTagName("type");
_4f.videoRetryCnt++;
handleRslvRsp(_4e,_4f);
if(_4f.resolveStatus==2){
_4f.resolverResp=_4d;
}
if(_3d.IsCurrResult(_4f)){
if(_4f.resolveStatus==2){
if(AjaxConsts.ClipCheck[3]==true){
_4f.videoStatus="fetchClip";
getClipTranscodeStatus(_4f);
}
}
if(_3e==false){
_3d.UpdateFetchingStatus(_4f);
_3d.UpdateImage(0,_4f.image);
_3d.UpdateOverLayImage(_4f,0);
}
}
};
function pruneDeadClips(_53,_54){
_53.valid_results--;
if(AjaxConsts.ClipCheck[1]){
_3d.HideResult(_54);
if((_53.valid_results==(_53.expected_results-1))&&(_53.last_set==false)&&(_53.arr.length<(_53.expected_results*AjaxConsts.ClipCheck[2]))){
_3d.FireRangeQuery(false);
}
}
}
this.resolveImagesCB=function(_55,_56,_57,_58){
var _59=_58.results_obj;
var _5a=_59.arr;
var len=_5a.length;
var _5c=_56.split("\n");
var _5d=(_3d.GetSearchResults()==_58.results_obj);
for(var i=0;i<_5c.length;i++){
if(_5c[i]==null||_5c[i]==""){
continue;
}
var _5f=_5c[i].split(":");
var gid=_5f[0];
var _61=_5f[1];
for(var j=_58.startIndex;j<len;j++){
if(gid==_5a[j].gid){
if(_5a[j].resolveStatus==2){
break;
}
setClipRslvStatus(_5a[j],_61);
if(_5d){
_3d.UpdateOverLayImage(_5a[j],j);
_3d.UpdateImage(j,_5a[j].image);
if(_5a[j].resolveStatus==3){
pruneDeadClips(_59,j);
}
}
break;
}
}
}
};
function recheckTranscodeStatus(_63){
_63.videoStatus="in_progress";
if(_3d.IsCurrResult(_63)){
getClipTranscodeStatus(_63);
}
}
this.getAudioLink=function(_64){
var url=AjaxConsts["PlayAudio"];
var _66="gid=";
_66+=_64.gid;
_66+="\n";
_66+="resolver_data=";
_66+=_64.resolverResp;
_66+="\n";
_66+="content_time="+(_64.runtime.total_secs?_64.runtime.total_secs:AjaxConsts.VideoTime);
_67.SendRequest(url,_64,_66);
};
function getClipTranscodeStatus(_68){
var url=AjaxConsts["GetPreview"];
var _6a="gid=";
if(_68.videoStatus=="fetching"||_68.videoStatus=="failure"||_68.videoStatus=="success"){
return;
}
if(_68.isAudioOnly==true){
return;
}
_6a+=_68.gid;
_6a+="\n";
_6a+=_68.resolverResp;
_6b.SendRequest(url,_68,_6a);
_68.videoStatus="fetching";
}
this.audioLinkCB=function(_6c,_6d,_6e,_6f){
if(_6c==404){
return;
}
if(_6c==200){
var _70=_6d.split("\n");
var _71=_70[0].split(",");
var gid=_71[0].split("=")[1];
var _73;
_73=_71[1].split("=")[1];
if(_73=="success"){
var _74=_6d.split("outputurl=");
_6f.audioURL=_74[1];
if(_3d.IsCurrResult(_6f)){
pl(_6f.audioURL);
}
}
}
};
this.previewCheckCB=function(_75,_76,_77,_78){
var _79=null;
_78.videoRetryCnt++;
switch(_75){
case 404:
_79="failure";
_78.videoStatus="failure";
if(_3d.IsCurrResult(_78)){
_3d.UpdateImage(0,_78.image);
_3d.UpdateFetchingStatus(_78);
_3d.UpdateOverLayImage(_78,0);
}
return;
case 200:
var _7a=_76.split("\n");
var _7b=_7a[0].split(",");
var gid=_7b[0].split("=")[1];
_79=_7b[1].split("=")[1];
_78.videoStatus=_79;
if(_79=="success"||_79=="preview"){
_78.videoStatus="success";
if(_7b.length>2){
_78.videoURL=_7b[2].split("=")[1];
}
if(_7b.length>3){
_78.videoTime=_7b[3].split("=")[1];
}
}
break;
default:
break;
}
if(_3d.IsCurrResult(_78)){
_3d.UpdateOverLayImage(_78,0);
_3d.UpdateFetchingStatus(_78);
if(_79&&_79!="success"){
if(_79=="in_progress"){
_78.videoStatus="fetching";
}
setTimeout(recheckTranscodeStatus,AjaxConsts["PreviewRetry"]*1000,_78);
}
}
};
var _7d=new SimpleAsyncInterface(this.resolveImagesCB,AjaxConsts["IPhoneCheckDS"]);
var _7e=new SimpleAsyncInterface(this.clipResolveCB,AjaxConsts.prototype.VideoDS);
var _7f=new SimpleAsyncInterface(this.videoCheckCB,AjaxConsts["IPhoneCheckDS"]);
var _6b=new SimpleAsyncInterface(this.previewCheckCB,AjaxConsts["IPhoneCheckDS"]);
var _67=new SimpleAsyncInterface(this.audioLinkCB,AjaxConsts["IPhoneCheckDS"]);
var _80="useragent="+AjaxConsts["IPhoneCheckDS"].user_agent+"\ngids=";
this.ResolveImages=function(_81){
if(_81==null){
return;
}
if(AjaxConsts.ClipCheck[0]==false){
return;
}
var _82=_81.arr;
var len=_82.length;
var _84="";
var _85=_80;
var _86;
var _87=new Object();
var _88=0;
_87.results_obj=_81;
for(var i=0;i<len;i++){
if((_82[i].resolveStatus==0)&&(_82[i].gid!=null&&_82[i].gid!="")&&(!_82[i].bFolded)){
if(_88){
_85+=","+_82[i].gid;
}else{
_85+=_82[i].gid;
}
_82[i].resolveStatus=1;
_82[i].videoStatus="fetching";
_84+="gid="+_82[i].gid+"\n";
if(_86==undefined){
_86=i;
}
_88++;
}
}
_87.startIndex=_86;
if(_88){
var url=AjaxConsts["IResolver"];
_7d.SendRequest(url,_87,_85);
if(AjaxConsts.ClipCheck[3]==true){
var url=AjaxConsts["IPhoneCheck"];
_7f.SendRequest(url,_87,_84);
}
}
};
this.fetchClip=function(_8b){
_3e=false;
if(_8b.videoURL){
if(_8b.videoStatus!="success"){
getClipTranscodeStatus(_8b);
}
return;
}
var url=AjaxConsts["Resolver"]+_8b.gid;
_8b.resolveStatus=1;
_7e.SendRequest(url,_8b);
};
this.cancelResolution=function(){
_3e=true;
};
this.abortAll=function(){
_7d.abortRequest(null);
_7e.abortRequest(null);
_7f.abortRequest(null);
_6b.abortRequest(null);
_67.abortRequest(null);
};
}
var MEDIA_TYPE_WINDOWS_MEDIA="windowsmedia";
var MEDIA_TYPE_REAL_PLAYER="realplayer";
var MEDIA_TYPE_REAL_PLAYER_NEW="x-realmedia";
var MEDIA_TYPE_FLASH="flash";
var MEDIA_TYPE_FLV="x-flv";
var MEDIA_TYPE_SHOCKWAVE="application/x-shockwave-flash";
var MEDIA_TYPE_TEXT_HTML="text/html";
var MEDIA_TYPE_RN_REAL_MEDIA="application/vnd.rn-realmedia-vbr";
var MEDIA_TYPE_AUDIO_MP3="audiomp3";
var MEDIA_TYPE_AUDIO_WAV="audio/wav";
var MEDIA_TYPE_AUDIO_PN_REAL_VIDEO="audio/x-pn-realvideo";
var MEDIA_TYPE_IMAGE_GIF="image/gif";
var MEDIA_TYPE_ACTD_METACAFE="link/x-actd-metacafe";
var MEDIA_TYPE_ACTD_YOUTUBE="link/x-veveo-youtube-actd";
var MEDIA_TYPE_ACTD_MYSPACE="application/x-shockwave-flash";
var MEDIA_TYPE_ACTD_NFL="application/vnd.rn-realmedia";
var MEDIA_TYPE_ACTD_MLB="video/x-ms-wmv";
var MEDIA_TYPE_ACTD_BLOOMBERG="video/x-ms-asf";
var MEDIA_TYPE_VIDEO_AVI="video/avi";
var MEDIA_TYPE_VIDEO_DVD="video/dvd";
var MEDIA_TYPE_VIDEO_MP4V_ES="video/mp4v-es";
var MEDIA_TYPE_VIDEO_MPEG="video/mpeg";
var MEDIA_TYPE_VIDEO_MS_WMA="video/x-ms-wma";
var MEDIA_TYPE_VIDEO_PN_REAL_VIDEO="video/x-pn-realvideo-plugin";
var MEDIA_TYPE_VIDEO_QUICKTIME="video/x-quicktimeplayer";
var MEDIA_TYPE_QUICKTIME="quicktime";
var mediaPlayerWidthByHeightRatio=1.2;
var resolverTimer=5;
var SHAREURL="http://www.vtap.com/cgi-bin/clip.cgi?";
var IS_PLAYER_IN_INDEPENDENT_PANEL=false;
var VIEWSTHRESHOLD=20000;
function Renderer(_8d){
var _8e="<table style=\"align: left;\" width=\"100%\" cellspacing=0 cellpadding=0 ID=\"ResultsTable";
var _8f="</table>";
var _90=new Object();
var _91=new LayoutManager(this);
_91.setDimensions();
init_rendering_handlers();
function init_rendering_handlers(){
var _92=AjaxConsts.DataSpaceMap.length;
var _93=AjaxConsts.DataSpaceMap;
for(var i=0;i<_92;i++){
var _95=eval(_93[i].render_handler);
if(_95){
_90[_93[i].val]=new _95();
_90[_93[i].val].css=_93[i].css;
}
}
}
function addNoResults(){
return "<tr><td><span class=\"ResultButton\"><span class=\"next_ten_results\">No Videos found</span></span></td></tr>";
}
function tableRowByIndex(_96,_97,_98,_99){
var str="";
if(_99){
var _9b="nextButton"+_96;
str+="<span class=next_ten_results>";
str+="<span id=\"prevPage\" onclick=\"EvScroll(this);\" style=\"cursor:pointer;\">";
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
if(_96==ProtoUIStates.resultsPerPage){
str+="<img src=\"images/left_arrow_disabled.gif\" height=\"20px\"></img><span class=\"prev_next\">Prev</span>";
}else{
str+="<img id=\"prevResults\" src=\"images/left_arrow.gif\"  height=\"20px\"></img><span class=\"prev_next\">Prev</span>";
}
}else{
str+="<img id=\"prevResults\" class=\"nextPrevResults\" src=\"images/new/previous_off.gif\" border=0 onmouseover=\"document.getElementById('prevResults').src='images/new/previous_over.gif';\" onmouseout=\"document.getElementById('prevResults').src='images/new/previous_off.gif';\" />";
}
str+="</span>";
str+="<span style=\"padding-left:20%;\">&nbsp;&nbsp;</span>";
str+="<span id=\"nextPage\" onclick=\"EvScroll(this);\" style=\"cursor:pointer;\">";
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+="<span class=\"prev_next\">Next</span><img id=\"nextResults\"  height=\"20px\" src=\"images/right_arrow.gif\"></img>";
}else{
str+="<img id=\"nextResults\" class=\"nextPrevResults\" src=\"images/new/next_off.gif\" border=0 onmouseover=\"document.getElementById('nextResults').src='images/new/next_over.gif';\" onmouseout=\"document.getElementById('nextResults').src='images/new/next_off.gif';\" />";
}
str+="</span>";
str+="</span>";
}else{
var _9c="document.getElementById('result"+_96+"')";
var _9d="EvOnClickHandler("+_9c+",event)";
str="<tr id=\"row";
str+=_96;
str+="\" onclick=";
str+=_9d;
str+="><td align=left >";
str+="<div style=\"width:100%;";
str+="\" id=\"result";
str+=_96;
str+="\" class=\"ResultButton_expanded";
str+="\" selected=\"expanded";
str+="\">";
str+=_97;
str+="</div></td></tr>";
}
return str;
}
var _9e=null;
var _9f=null;
var _a0=0;
var _a1=0;
var _a2=0;
var _a3=0;
var _a4=false;
var _a5=false;
var _a6=false;
var _a7=null;
var _a8="";
this.bm=null;
this.lbm=1;
this.Cleanup=function(){
_a7.stopAndHide();
delete _a7;
delete _90;
delete _91;
};
this.setDataspace=function(_a9){
_9e=_a9;
_9f=_90[_a9.val];
document.title="vTap "+(_a9.title?_a9.title:"");
};
this.setDataspace(_8d);
this.Initialize=function(){
document.getElementById("resultDisplay").style.display="none";
createMediaPlayerObj();
this.HideFooter();
_91.setDimensions();
};
function createMediaPlayerObj(){
var _aa=new Array();
var _ab=_91.getPlayerDimension();
_aa[MediaPlayer.pLeft]=_ab[0];
_aa[MediaPlayer.pTop]=_ab[1];
_aa[MediaPlayer.pWidth]=_ab[2];
_aa[MediaPlayer.pHeight]=_ab[3];
_a7=new MediaPlayer(_aa);
var _ac=document.getElementById("toolbar").offsetHeight;
var _ad=document.getElementById("videoHeaderDiv").offsetHeight+20;
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
var _ae=document.getElementById("playerLoadingMessage");
_ae.style.top=_ac+_ad;
var _af=document.getElementById("playerLoadingMessageCell");
_af.width=_ab[2];
_af.height=_ab[3];
}
var _b0=document.getElementById("playerLoadingSpan");
if(_b0){
_b0.style.width=_aa[MediaPlayer.pWidth];
_b0.style.height=_aa[MediaPlayer.pHeight];
}
}
this.setVideoPageMessage=function(str){
var _b2=document.getElementById("clipMessage");
if(_b2){
_b2.innerHTML=str;
}
};
this.showPlayerLoadingMessageSpan=function(){
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
return;
}
var _b3=document.getElementById("playerLoadingMessage");
if(_b3){
_b3.style.display="block";
}
};
this.hidePlayerLoadingMessageSpan=function(){
var _b4=document.getElementById("playerLoadingMessage");
if(_b4){
_b4.style.display="none";
}
};
this.GetSearchString=function(){
return ProtoUIStates.searchTextBox.value;
};
this.GetContextString=function(){
return ProtoUIStates.contextString;
};
this.HandleShareVideo=function(arg,_b6,re){
gid=_b6.replace(/%/,"%25");
var url="http://vtap.com/widget/share.html?source$equalto$"+AjaxConsts.ShareURL+gid+"$ampersand$"+"mailclient$equalto$"+AjaxConsts.MailURL+"Title: "+re.strTitle+"%0AVideo: "+AjaxConsts.ShareURL+escape(gid)+"$ampersand$"+"cliptitle$equalto$"+re.strTitle;
if(arg=="noreturn"){
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
window.open(url,"Share","width=580,height=480,resizable=yes,scrollbars=no,status=0");
}else{
window.open(url,"Share","width=580,height=480,resizable=yes,scrollbars=yes,status=0");
}
}else{
return url;
}
};
this.HandleHome=function(_b9){
this.ClearSearchState();
ProtoUIStates.searchTextBox.value="";
this.ShowHeader();
ProtoUIStates.curr_query="";
this.showToolbarIconsInResultsPage(_b9);
this.HideMoreInfo();
this.SetContextString("");
};
this.HandleResize=function(sr){
_91.setDimensions();
};
this.BlurElement=function(obj){
obj.className=obj.className.substr(0,obj.className.indexOf("_"));
};
this.FocusElement=function(obj){
obj.className=obj.className+"_selected";
};
this.EnableElement=function(id,_be){
var obj=document.getElementById(id);
obj.className=_be;
};
this.DisableElement=function(id,_c1){
var obj=document.getElementById(id);
obj.className=_c1+"_disabled";
};
function move(obj,_c4,_c5){
if(_c5<=0){
return;
}
var pos=obj.style.left;
pos=parseInt(pos.substr(0,pos.length-2));
obj.style.left=(pos+_c4)+"px";
_c5-=_c4<0?-_c4:_c4;
setTimeout(function(){
move(obj,_c4,_c5);
},5);
}
this.MoveImageList=function(_c7,_c8){
var _c9=document.getElementById("relImageList").offsetWidth-4;
var _ca=document.getElementById("imageList");
var _cb=12;
var pos=_ca.style.left;
pos=parseInt(pos.substr(0,pos.length-2));
if(_c7=="left"){
if(pos>-((Math.floor(_c8/ProtoUIStates.relatedClipsPerPage)-1)*_c9)){
_cb*=-1;
move(_ca,_cb,_c9);
this.BlurElement(document.getElementById("icon"+this.relatedClipUnderFocus+"Span"));
this.relatedClipUnderFocus=ProtoUIStates.relatedClipsPerPage*(1+Math.floor(this.relatedClipUnderFocus/ProtoUIStates.relatedClipsPerPage));
this.FocusElement(document.getElementById("icon"+this.relatedClipUnderFocus+"Span"));
}else{
}
}else{
if(_c7=="right"){
if(pos<0){
move(_ca,_cb,_c9);
this.BlurElement(document.getElementById("icon"+this.relatedClipUnderFocus+"Span"));
this.relatedClipUnderFocus=ProtoUIStates.relatedClipsPerPage*(Math.floor(this.relatedClipUnderFocus/ProtoUIStates.relatedClipsPerPage)-1);
this.FocusElement(document.getElementById("icon"+this.relatedClipUnderFocus+"Span"));
}else{
}
}
}
};
this.HandleScroll=function(id,sr){
var _cf=sr.arr;
var _d0=_a2;
var _d1=0;
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
if(!this.isMoreInfoPage()){
_d1=ProtoUIStates.resultsPerPageUMPC;
}else{
_d1=ProtoUIStates.relatedClipsPerPageUMPC;
}
}else{
if(!this.isMoreInfoPage()){
_d1=ProtoUIStates.resultsPerPage;
}else{
_d1=ProtoUIStates.relatedClipsPerPage;
}
}
if(id=="nextPage"){
if(_cf.length-(_a2+1)*_d1<0){
return true;
}
_a2++;
if(!this.isMoreInfoPage()){
this.DisplaySearchResults(sr);
}else{
if(ProtoUIStates.relatedClipsPerPageUMPC<=0){
return true;
}
this.DisplayRelatedClipsForUMPC(sr);
}
var _d2=_cf.length-_a2*_d1;
if(_d2==2*_d1){
return false;
}
}else{
if(id=="prevPage"){
_a2--;
if(_a2<0){
_a2=0;
}else{
this.DisplaySearchResults(sr);
}
var _d2=_cf.length-_a2*_d1;
if(_d2==2*_d1){
return false;
}
}else{
if(id=="leftArrow"){
this.MoveImageList("right",_cf.length);
}else{
if(id=="rightArrow"){
this.MoveImageList("left",_cf.length);
}
}
}
}
return true;
};
this.CreateGetvTapDiv=function(url,_d4,_d5){
var str="";
var _d7=28;
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
_d7=52;
}
if(_d5.length>AjaxConsts.EmbedTitleCharsLimit){
_d5=_d5.substr(0,AjaxConsts.EmbedTitleCharsLimit-3)+"...";
}
str+="<table>";
str+="<tr>";
str+="<td align=\"center\">";
if(_d4==-1){
str+="<h3>vTap Videos</h3>";
}
str+="<div onclick=\"EvOnClickHandler(this, event);\" class=\"close\" id=\"closeEmbedPopup\">&nbsp;</div>";
str+="</td></tr>";
if(_d4==-1){
str+="<tr><td class=\"embedCell\" align=\"left\">";
str+="<a class=\"iGoogleLink\" target=\"_blank\"";
str+="href=\""+AjaxConsts.iGoogleUrl+"\" >&nbsp;";
str+="</a>";
str+="</td></tr>";
}else{
str+="<tr><td class=\"embedCell\" class=\"embedCell\" style=\"text-align:center; font-weight:bold;\">"+_d5+"</td></tr>";
}
str+="<tr><td class=\"embedCell\" style=\"text-align: left;\"><div>Embed:&nbsp;";
str+="<input onclick=\"this.focus(); this.select();return false;\" value='"+url+"' readonly=\"true\" id=\"embed_link\" size=\""+_d7+"\" type=\"text\"/></div></td></tr>";
str+="</table>";
if(_d4==-1){
str+="<div style=\"margin:40px 0px 30px 0px;\">";
str+="<table><tr>";
str+="<td><a class=\"aboutLink\" target=\"_blank\" href=\"http://vtap.com\">About</a></td>";
str+="<td><img height=\"13px\" src=\"images/seperator.gif\"></img></td>";
str+="<td><a class=\"aboutLink\" target=\"_blank\" href=\"http://corporate.veveo.net/privacy.html\">";
str+="Privacy Policy and Terms of use</a></td>";
str+="</tr></table>";
str+="</div>";
}
return str;
};
this.HandleGetvTap=function(url,_d9,_da){
var _db=ProtoUIStates.actPopup;
_db.className="embedPopup";
if(_d9!=-1){
_db.style.top="30%";
}else{
_db.style.top="5%";
}
_a8=this.CreateGetvTapDiv(url,_d9,_da);
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
this.ShowActPopup();
}
this.ResetScrollBar();
};
this.changeHomeImageToRefresh=function(){
var _dc=document.getElementById("homeImage");
var _dd="";
var _de="";
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
_dd="images/new/refresh_over.png";
_de="images/new/refresh_off.png";
}else{
_dd="images/refresh.gif";
_de="images/refresh_over.gif";
}
_dc.src=_de;
_dc.onmouseover=function(){
document.getElementById("homeImage").src=_dd;
};
_dc.onmouseout=function(){
document.getElementById("homeImage").src=_de;
};
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
var _df=document.getElementById("toolbarHomeText");
_df.innerHTML="<a style=\"color:black;\" href=\"javascript:void(0);\">Refresh</a>";
}
var _e0=document.getElementById("homeCell");
if(_e0){
_e0.title="Refresh";
}
};
this.changeRefreshImageToHome=function(){
var _e1=document.getElementById("homeImage");
var _e2="";
var _e3="";
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
_e2="images/new/home_over.png";
_e3="images/new/home_off.png";
}else{
_e2="images/home.gif";
_e3="images/home_over.gif";
}
_e1.src=_e3;
_e1.onmouseover=function(){
document.getElementById("homeImage").src=_e2;
};
_e1.onmouseout=function(){
document.getElementById("homeImage").src=_e3;
};
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
var _e4=document.getElementById("toolbarHomeText");
_e4.innerHTML="<a href=\"javascript:void(0);\" style=\"color: black;\">Home</a>";
}
var _e5=document.getElementById("homeCell");
if(_e5){
_e5.title="Home";
}
};
this.HandleCategories=function(){
this.ClearSearchState();
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
this.HideActPopup();
}
this.changeRefreshImageToHome();
if(_a4){
_a4=false;
}
};
this.HandleBack=function(){
this.hideClipMessage();
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
this.HideActPopup();
}
if(this.HideBookmark()){
return true;
}
if(!IS_PLAYER_IN_INDEPENDENT_PANEL&&ProtoUIStates.share_gid!="__share_gid__"){
ProtoUIStates.share_gid="__share_gid__";
this.HideLargeMoreInfo();
this.ShowMIMainPanel();
}
if(this.isMoreInfoPage()){
this.showToolbarIconsInResultsPage();
}
return false;
};
this.SetFocus=function(){
if(this.isSearchInputBoxVisible()){
ProtoUIStates.searchTextBox.focus();
}
};
this.SetTextBoxValue=function(_e6){
var tb=ProtoUIStates.searchTextBox;
if(tb&&_e6!=null&&_e6.length>=0){
tb.value=_e6;
ProtoUIStates.curr_query=_e6;
}
};
this.SetContextString=function(_e8){
var _e9=SEARCHICONWIDTH+4;
if(_e8==null||_e8=="0"){
return;
}else{
this.setPlaceHolder(false);
}
ProtoUIStates.contextString=_e8;
if(_e8.length>ProtoUIStates.ctxt_str_max-2){
_e8=_e8.substring(0,ProtoUIStates.ctxt_str_max-2)+"..";
}
ProtoUIStates.contextLabel.innerHTML=_e8;
if(_e8.length>0){
if(!this.isSearchInputBoxVisible()){
this.ShowHeader();
_e9+=parseInt(ProtoUIStates.contextLabel.offsetWidth);
this.HideHeader();
}else{
_e9+=parseInt(ProtoUIStates.contextLabel.offsetWidth);
}
}
_91.setSearchBoxPosition(_e9+"px");
};
this.ClearSearchState=function(){
_a2=0;
_a0=0;
_a1=0;
_a3=0;
};
this.RenderResultsCB=function(_ea,_eb){
ProtoUIStates.bkgDiv.innerHTML="";
_a4=_eb;
if(!document.getElementById("ResultTable"+_a2)){
if(!this.isMoreInfoPage()){
this.DisplaySearchResults(_ea);
}else{
this.ShowMoreInfo();
if(ProtoUIStates.relatedClipsPerPageUMPC<=0){
return;
}
this.DisplayRelatedClipsForUMPC(_ea);
}
}
};
this.create_clip_info=function(_ec,_ed,_ee,_ef,_f0){
var _f1="<span class=\"titleDiv\">"+create_title_string(_ec)+"</span>";
var _f2=_ec.description;
if(_f2!=null&&_f2!=""&&_f2.length>0){
if(_f2.length>100){
_f2=_f2.substr(0,97)+"...";
}
_f2="&nbsp;- "+_f2;
}else{
_f2="";
}
var _f3="titleDiv";
var _f4="document.getElementById('result"+_ee+"')";
var _f5="auto";
var _f6="<div id=\"re_title_"+_ee+"\" class=\""+_f3+"\" style=\"width:"+_f5+"px;\">";
var _f7=_f1.replace(/^\s+/,"").replace(/\s+$/,"");
if(_ed&&(_f7.length>_ed)){
_f7=_f7.substr(0,_ed)+" ...";
}
var _f8=_f6+_f7+"<span class=\"desc\">"+_f2+"</span></div>";
if(!_ec.bFolded){
var _f9=create_auxInfo_string(_ec,0,_ee);
if(_9f.formatAuxInfo){
_f9=_9f.formatAuxInfo(_f9,_ee);
}
_f8+=_f9;
}
return _f8;
};
this.isMoreInfoPage=function(){
return _a4;
};
this.DisplayHeader=function(_fa){
if(_fa){
this.ShowHeader();
ProtoUIStates.searchTextBox.focus();
}else{
this.HideHeader();
}
};
this.ShowVideoTitle=function(){
var _fb=document.getElementById("videoHeaderDiv");
_fb.style.display="block";
_fb.style.visibility="visible";
};
this.isSearchInputBoxVisible=function(){
var _fc=ProtoUIStates.header;
if(_fc.style.display=="block"){
return true;
}
return false;
};
this.createDropdown=function(_fd){
var str=_fd;
if(_fd=="tools"){
str="Font:&nbsp;<select>";
str+="<option>14</option>";
str+="<option>16</option>";
str+="</select>";
}
var _ff=document.getElementById("toolPopup");
_ff.className="toolPopup";
_ff.innerHTML=str;
};
this.showToolbarIconsInVideoPage=function(){
var _100=document.getElementById("toolbar");
var _101="";
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
_101+="<table id=\"toolbarTable\" class=\"toolbarTable\">";
}else{
_101+="<div id=\"toolbarTable\" class=\"toolbarTable\" align=\"center\">";
}
var str=this.createToolbarImageCell("back","Back","back();");
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createToolbarSeperatorCell("backHomeSeperator");
}
str+=this.createToolbarImageCell("home","Home","home();");
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createToolbarSeperatorCell("homeRefreshSeperator");
}
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createToolbarImageCell("share","Share","shareVideo('noreturn');",false);
str+=this.createToolbarSeperatorCell("shareBookmarkSeperator");
str+=this.createToolbarImageCell("bookmark","Bookmark","bookmark();",false);
str+=this.createToolbarSeperatorCell("BookmarkRelatedSeperator");
str+=this.createToolbarImageCell("related","Related","back();",false);
}else{
str+=this.createToolbarImageCell("categories","Categories","categories();",false);
}
_101+=str;
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
_101+="</table>";
}else{
_101+="</div>";
}
_100.innerHTML=_101;
this.changeToolTipsForNonFunctionalMenus();
};
this.showToolbarIconsInResultsPage=function(_103){
var _104=document.getElementById("toolbar");
var _105="";
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
_105+="<table id=\"toolbarTable\" class=\"toolbarTable\">";
}else{
_105+="<div id=\"toolbarTable\" class=\"toolbarTable\" align=\"center\">";
}
var str=this.createToolbarImageCell("back","Back","back();");
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createToolbarSeperatorCell("backHomeSeperator");
}
str+=this.createToolbarImageCell("home","Home","home();");
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createToolbarSeperatorCell("homeRefreshSeperator");
}
str+=this.createToolbarImageCell("categories","Categories","categories();",false);
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createToolbarSeperatorCell("categoriesExtrasSeperator");
}
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createToolbarImageCell("GetvTap","Get&nbsp;vTap","GetvTap(-1);",true);
}
_105+=str;
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
_105+="</table>";
}else{
_105+="</div>";
}
_104.innerHTML=_105;
if(_103&&_103==true){
this.changeHomeImageToRefresh();
}
this.changeToolTipsForNonFunctionalMenus();
};
this.showToolbarIconsInMoreInfoPage=function(){
var _107=document.getElementById("toolbar");
var _108="";
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
_108+="<table id=\"toolbarTable\" class=\"toolbarTable\"><tr>";
}else{
_108+="<div id=\"toolbarTable\" class=\"toolbarTable\" align=\"center\">";
}
var str=this.createToolbarImageCell("back","Back","back();",false);
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createToolbarSeperatorCell("backHomeSeperator");
}
str+=this.createToolbarImageCell("home","Home","home();",false);
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createToolbarSeperatorCell("homeRefreshSeperator");
}
str+=this.createToolbarImageCell("categories","Categories","categories();",false);
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createToolbarSeperatorCell("categoriesExtrasSeperator");
}
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createToolbarImageCell("GetvTap","Get&nbsp;vTap","GetvTap(-1)",true);
}
_108+=str;
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
_108+="</tr></table>";
}else{
_108+="</div>";
}
_107.innerHTML=_108;
this.changeToolTipsForNonFunctionalMenus();
};
this.createToolbarSeperatorCell=function(_10a){
var str="<td id=\""+_10a+"Cell\" class=\"seperatorCell\">";
str+="<img src=\"images/seperator.gif\" id=\""+_10a+"Image\" >";
str+="</td>";
return str;
};
this.createOptionsbarImageCell=function(_10c){
var _10d="new/"+_10c+"_over.png";
var _10e="new/"+_10c+"_off.png";
var _10f="optionsbarImageCell";
var str="";
str+="<img src=\"images/"+_10e+"\" id=\""+_10c+"Image\" class="+_10f;
str+=" onmouseover=\"document.getElementById('"+_10c+"Image').src='images/"+_10d+"';\"";
str+=" onmouseout=\"document.getElementById('"+_10c+"Image').src='images/"+_10e+"';\">";
str+="</img>";
return str;
};
this.createToolbarImageCell=function(_111,_112,_113,_114){
var _115=_112;
if(!_115){
_115=_111;
}
var _116="";
var _117="";
var _118="";
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
_117="new/"+_111+"_over.png";
_118="new/"+_111+"_off.png";
}else{
_117=_111+".gif";
_118=_111+"_over.gif";
}
if(_114){
_117=_111+"_disabled.gif";
_118=_111+"_disabled.gif";
}
if(_111=="GetvTap"){
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
_117="logo.png";
_118="GetvTap_disabled.gif";
}
_116="aboutImage";
if(!AjaxConsts.EnableGetVtap){
_113="about()";
_111="about";
_115="About";
}
}else{
_116="toolbarImage";
}
var str="";
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+="<td id=\""+_111+"Cell\" class=\"toolbarImageCell\" title=\""+_115.replace(/<br\/>/," ")+"\"";
}else{
str+="<a style=\"cursor:pointer;\"";
}
if(_113){
str+=" onclick=\""+_113+"\">";
}else{
str+=">";
}
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+="<table class=\"imageTextToolbarTable\" cellspacing=\"0px\" cellpadding=\"0px\" align=\"center\" >";
str+="<tr><td class=\"imageToolbarCell\">";
}
str+="<img src=\"images/"+_118+"\" id=\""+_111+"Image\" class="+_116;
str+=" onmouseover=\"document.getElementById('"+_111+"Image').src='images/"+_117+"';\"";
str+=" onmouseout=\"document.getElementById('"+_111+"Image').src='images/"+_118+"';\">";
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
str+="</td>";
str+="<td id=\"toolbar"+_115+"Text\">";
str+="<a style=\"color:black;\" href=\"javascript:void(0);\">"+_115+"</a>";
str+="</td>";
str+="</tr></table></td>";
}else{
str+="</a>";
}
return str;
};
this.changeToolTipsForNonFunctionalMenus=function(){
var _11a=new Array("categories");
for(i=0;i<_11a.length;i++){
var _11b=_11a[i]+"Cell";
var _11c=document.getElementById(_11b);
if(_11c){
if(i==0&&AjaxConsts["EnableCategories"]==false){
_11c.title="Coming soon";
}
}
}
};
this.ReplaceVTapIconWithHomeIcon=function(){
var _11d=document.getElementById("veveoLogo");
if(_11d){
_11d.src="images/home.gif";
}
};
this.ReplaceHomeIconWithVTapIcon=function(){
var _11e=document.getElementById("veveoLogo");
if(_11e){
_11e.src="images/vtap.gif";
}
};
this.HideVideoTitle=function(){
var _11f=document.getElementById("videoHeaderDiv");
_11f.style.display="none";
_11f.style.visibility="hidden";
};
this.ShowBackGroundLogo=function(){
document.getElementById("playerWindow").style.backgroundImage="url(images/vTapLogo.gif)";
};
this.HideBackGroundLogo=function(){
document.getElementById("playerWindow").style.backgroundImage="none";
};
this.createMediaCloseButton=function(){
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
var _120=document.createElement("DIV");
ProtoUIStates.windowOpenUrl=shareVideo("return");
var str="";
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
str+="<div align=\"center\">";
}else{
str+="<table width=\"100%\" cellspacing=\"0px\" cellpadding=\"0px\" align=\"center\" ><tr><td align=\"right\">";
}
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
str+="<a class=\"videoPageLink\" href=\""+document.getElementById("VideoTitleLink")+"\" id=\"sourceLink\" target=\"_blank\">";
str+=this.createOptionsbarImageCell("source");
str+="</a>";
}
str+="<a class=\"videoPageLink\" href=\"javascript:windowOpen()\" id=\"shareLink\">";
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createOptionsbarImageCell("share")+"</a>";
}else{
str+="Share</a>&nbsp;&nbsp;&nbsp;";
}
str+="<a class=\"videoPageLink\" href=\"javascript:void(0)\" id=\"relatedLink\" onclick=\"EvOnClickHandler(this,event);\">";
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createOptionsbarImageCell("related")+"</a>";
}else{
str+="Related</a>&nbsp;&nbsp;&nbsp;";
}
str+="<a class=\"videoPageLink\" href=\"javascript:void(0)\" id=\"mediaCloseButton\" onclick=\"EvOnClickHandler(this, event)\">";
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
str+=this.createOptionsbarImageCell("close")+"</a></div>";
}else{
str+="Close</a></td></tr></table>";
}
_120.innerHTML=str;
_120.align="center";
var _122=document.getElementById("playerSpan");
if(_122.childNodes.length==1){
_122.appendChild(_120);
}else{
valert("Close button creation failed!");
}
}
};
this.createMediaSpan=function(_123,top,left,_126,_127){
valert("start");
var id="mediaContainer"+"_"+_123;
var _129=document.getElementById(id);
if(_129!=null){
return _129;
}
valert("start 1");
mediaSpan=document.createElement("DIV");
mediaSpan.id="mediaContainer"+"_"+_123;
mediaSpan.style.top=top;
mediaSpan.style.left=left;
mediaSpan.style.zIndex=50;
mediaSpan.style.textAlign="center";
var _12a=document.getElementById("playerSpan");
_12a.appendChild(mediaSpan);
valert("start 2");
this.showPlayer();
mediaSpan.style.zIndex=50;
valert("start 3");
return mediaSpan;
};
this.showPlayer=function(){
var _12b=document.getElementById("playerSpan");
_12b.style.display="block";
};
this.hidePlayer=function(){
var _12c=document.getElementById("playerSpan");
_12c.style.display="none";
};
this.playClip=function(url,type){
_a5=true;
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
this.HideMoreInfo();
this.HideResults();
this.HideResultsContainer();
this.ReplaceVTapIconWithHomeIcon();
}
this.ShowPlayerSpan();
this.ShowVideoTitle();
this.showToolbarIconsInVideoPage();
if(type=="text/html"){
return;
}
var _12f=getMediaFormat(type);
_a7.playClip(url,_12f,type);
};
function getMediaFormat(type){
var _131=MediaPlayer.UnknownMedia;
switch(type.toLowerCase()){
case MEDIA_TYPE_WINDOWS_MEDIA:
case MEDIA_TYPE_VIDEO_MS_WMA:
case MEDIA_TYPE_VIDEO_AVI:
case MEDIA_TYPE_VIDEO_DVD:
case MEDIA_TYPE_VIDEO_MP4V_ES:
case MEDIA_TYPE_VIDEO_MPEG:
case MEDIA_TYPE_ACTD_MLB:
case MEDIA_TYPE_ACTD_BLOOMBERG:
case MEDIA_TYPE_AUDIO_WAV:
case MEDIA_TYPE_AUDIO_MP3:
case MEDIA_TYPE_IMAGE_GIF:
_131=MediaPlayer.MicrosoftMedia;
break;
case MEDIA_TYPE_REAL_PLAYER:
case MEDIA_TYPE_REAL_PLAYER_NEW:
case MEDIA_TYPE_VIDEO_PN_REAL_VIDEO:
case MEDIA_TYPE_AUDIO_PN_REAL_VIDEO:
case MEDIA_TYPE_RN_REAL_MEDIA:
case MEDIA_TYPE_ACTD_NFL:
_131=MediaPlayer.RealMedia;
break;
case MEDIA_TYPE_FLASH:
case MEDIA_TYPE_ACTD_YOUTUBE:
case MEDIA_TYPE_ACTD_METACAFE:
case MEDIA_TYPE_ACTD_MYSPACE:
case MEDIA_TYPE_FLV:
case MEDIA_TYPE_SHOCKWAVE:
_131=MediaPlayer.FlashMedia;
break;
case MEDIA_TYPE_TEXT_HTML:
_131=MediaPlayer.IFrame;
break;
case MEDIA_TYPE_VIDEO_QUICKTIME:
case MEDIA_TYPE_QUICKTIME:
_131=MediaPlayer.QTimeMedia;
break;
default:
_131=MediaPlayer.UnknownMedia;
break;
}
return _131;
}
this.stopVideo=function(){
_a7.stopAndHide();
this.hidePlayerLoadingMessageSpan();
this.HidePlayerSpan();
this.HideVideoTitle();
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
this.HideLargeMoreInfo();
this.ShowMIMainPanel();
this.ShowMoreInfo();
this.ShowResults();
this.ShowResultsContainer();
this.ReplaceHomeIconWithVTapIcon();
this.showToolbarIconsInMoreInfoPage();
}else{
this.ShowBackGroundLogo();
}
_a5=false;
};
this.DisplayMoreInfo=function(re,_133){
if(IS_PLAYER_IN_INDEPENDENT_PANEL||!_a5){
this.showToolbarIconsInMoreInfoPage();
}
var _134="images/clip.gif";
var _135=document.getElementById("mi_span");
if(_133){
var _136=document.getElementById("resultDisplay");
if(_136){
_136.innerHTML="";
}
this.HideResults();
}
var _137=document.getElementById("relTit");
_137.style.visibility="hidden";
if(IS_PLAYER_IN_INDEPENDENT_PANEL||!_a5){
_135.style.display="block";
_135.style.visibility="visible";
this.HideHeader();
}
var _138=document.getElementById("rowDiv1");
var _139="<div align=\"center\" title=\"Play\" id=\"mi_iconovl\" class=\"mi_icon_div\" clip=\"video\""+" onclick=\"EvPlayMCClip(0);"+"\" style=\"width:"+_91.getShelfImageWidth()+"px;"+" height:"+_91.getShelfImageHeight()+"px;"+"\" >";
var _13a=re.title;
if(_13a.length>80){
_13a=_13a.substr(0,77)+"...";
}
var _13b=re.image;
var _13c="mi_icon";
if(_13b==null||_13b==""){
_13b="images/clip.gif";
_13c="mi_noImageIcon";
}
if(__DEBUG__){
_13a+="<br/>"+re.gid;
}
var _13d="<td vAlign=\"middle\">"+_139+"<img class=\""+_13c+"\" src=\""+_13b+"\" id = mi_icon"+"\" onerror=\"this.src='images/clip.gif'; this.className='mi_noImageIcon';"+"\"></img>"+"<img class=\"mi_overlay\" id=\"mi_overlay_image\" src=\"images/play.gif\"></img>"+"</div></td>"+"<td align=\"left\" width = 100% > "+"<a class=\"mitextTitle\" href=\""+re.reference+"\" target=\"_blank\""+" onclick=\"if(getBrowser()!='Internet Explorer') event.stopPropagation(); else window.event.cancelBubble=true;\">"+_13a+"</a>"+"<div class=\"auxInfo\">"+create_auxInfo_string(re,1)+"</div>"+"<span>";
if(AjaxConsts.EnableEmbed){
_13d+=" &nbsp;&nbsp;&nbsp;<a class=\"mi_play\" href=\"javascript:GetvTap(0)\">Embed</a>";
}
_13d+="</span></td>";
_138.innerHTML="<table><tr id=\"mi_row1\" valign=\"top\" >"+_13d+"</tr></table>";
_138=document.getElementById("rowDiv2");
var desc=re.description;
if(desc&&desc.length>200){
desc=desc.substring(0,197)+"...";
}
if(desc){
_138.innerHTML=desc;
}else{
_138.innerHTML="";
}
_a4=true;
};
this.setVideoPageData=function(_13f){
var _140=document.getElementById("VideoTitleLink");
var _141=document.getElementById("VideoSourceLink");
if(_13f.title){
_140.innerHTML="<NOBR>"+_13f.strTitle+"</NOBR>";
}
if(_13f.source){
_141.innerHTML="<NOBR>"+_13f.source+"</NOBR>";
}
if(_13f.reference){
_140.href=_13f.reference;
}else{
_140.href="";
}
if(_13f.homeUrl){
_141.href=_13f.homeUrl;
}else{
_141.href="";
}
};
this.setVideoFrameData=function(re){
var _143=document.getElementById(Elements.clipDescriptionElem);
var desc=re.description;
if(desc&&desc.length>100){
desc=desc.substring(0,100)+"...";
}
_143.innerHTML=desc;
};
this.noImageHTML=function(){
var str="<img src=\"images/clip64.png\" id = \"mi_icon_large\" style=\"padding:5% 0 5% 0;\"></img>";
str+="<div style=\"font-size:110%;\">No image found. <a href=\"javascript:void(0)\" onclick=\"EvPlayMCClip(0);\">Click here</a> to play the video.</div>";
return str;
};
this.HideLargeMoreInfo=function(){
var _146=document.getElementById("mi_large");
hideElement(_146);
};
this.ShowLargeMoreInfo=function(){
var _147=document.getElementById("mi_large");
showElement(_147);
};
this.EnlargeMoreInfo=function(re){
var _149=document.getElementById("mi_icon");
var _14a=document.getElementById("mi_large");
var _14b="mi_enlarge_icon";
var _14c=re.image;
var str="";
var _14e=parseInt(_91.getLargeMoreInfoWidth());
var _14f=parseInt(_91.getLargeMoreInfoHeight());
str+="<table>";
str+="<tr><td>";
str+="<div align=\"center\" style=\"width:"+_14e+"px;height:"+_14f+"px; position:relative;top:0px; left:0px;\">";
if(_14c!=null||_14c!=""){
str+="<img width=\""+_14e+"px;\" height=\""+_14f+"px;\" src=\""+_14c+"\" id = \"mi_large_icon\" ";
str+="onerror=\"EvOnError(this, event)\"></img>";
str+="<span class=\"mi_overlay_large\" id=\"mi_overlay_image\"";
str+=" onclick=\"EvPlayMCClip(0);\"></span>";
}else{
str+=this.noImageHTML();
}
str+="</div></td></tr>";
str+="<tr style=\"background:#e6e6e6 none repeat scroll 0%\" align=\"left\">";
str+="<td style=\"padding:5px;\">";
str+="<div class=\"mitextTitle\" ";
if(re.views||re.rating||re.user){
str+="style=\"height:16px;width:100%;overflow:hidden;\">";
}else{
str+="style=\"height:32px;width:100%;overflow:hidden;\">";
}
str+=re.title;
str+="</div>";
str+=create_auxInfo_string(re,1);
str+="<br/><span>";
str+="<a class=\"mi_play\" href=\"javascript:EvPlayMCClip(0)\">Play</a>&nbsp;&nbsp;&nbsp;";
str+="<a class=\"mi_play\" href=\"javascript:shareVideo('noreturn')\">Share</a>&nbsp;&nbsp;&nbsp;";
str+="<a class=\"mi_play\" href=\"javascript:bookmark()\">Bookmark</a>&nbsp;&nbsp;&nbsp;";
if(AjaxConsts.EnableEmbed){
str+="<a class=\"mi_play\" href=\"javascript:GetvTap(0)\">Embed</a>";
}
str+="</span></td></tr>";
str+="</table>";
_14a.innerHTML=str;
};
this.ShowMIMainPanel=function(){
var _150=document.getElementById("mi_main_panel");
showElement(_150);
};
this.HideMIMainPanel=function(){
var _151=document.getElementById("mi_main_panel");
hideElement(_151);
};
this.HideMoreInfo=function(){
var _152=document.getElementById("mi_span");
_152.style.display="none";
_152.style.visibility="visible";
_a4=false;
};
this.ShowMoreInfo=function(){
var _153=document.getElementById("mi_span");
_153.style.display="block";
_153.style.visibility="visible";
_a4=true;
this.HideHeader();
};
this.HideResults=function(){
var _154=document.getElementById("resultDisplay");
_154.style.display="none";
};
this.ShowResults=function(){
var _155=document.getElementById("resultDisplay");
_155.style.display="block";
};
this.setPlaceHolder=function(_156){
var _157=document.getElementById("my_text");
if(_156&&ProtoUIStates.searchTextBox.value==""){
if(_157.innerHTML==""){
_157.className="placeHolder";
_157.innerHTML="start typing...";
}
}else{
if(_157.innerHTML=="start typing..."){
_157.className="hd_input_label";
_157.innerHTML="";
}
}
return true;
};
this.HideHeader=function(){
if(this.isSearchInputBoxVisible()){
hideElement(ProtoUIStates.header);
_91.setResultsContainerDimensions();
}
};
this.ShowHeader=function(){
if(!this.isSearchInputBoxVisible()){
showElement(ProtoUIStates.header);
_91.setResultsContainerDimensions();
ProtoUIStates.searchTextBox.focus();
ProtoUIStates.searchTextBox.selectionStart=ProtoUIStates.searchTextBox.value.length;
}
};
this.showClipMessage=function(){
var _158=document.getElementById("playerLoadingSpan");
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
this.HideMoreInfo();
this.HideResults();
this.HideResultsContainer();
}else{
this.HideBackGroundLogo();
}
if(_158){
_158.style.display="block";
_158.style.visibility="visible";
}
};
this.hideClipMessage=function(){
var _159=document.getElementById("playerLoadingSpan");
if(_159){
_159.style.display="none";
}
};
this.HideFooter=function(){
var _15a=document.getElementById("footer");
hideElement(_15a);
};
this.ShowFooter=function(){
var _15b=document.getElementById("footer");
showElement(_15b);
};
this.HideResultsContainer=function(){
var _15c=document.getElementById("resultsContainer");
if(_15c){
_15c.style.display="none";
}
};
this.ShowResultsContainer=function(){
var _15d=document.getElementById("resultsContainer");
if(_15d){
_15d.style.display="block";
}
};
this.HidePlayerSpan=function(){
var _15e=document.getElementById("playerSpan");
_15e.innerHTML="";
hideElement(_15e);
};
this.ShowPlayerSpan=function(){
var _15f=document.getElementById("playerSpan");
showElement(_15f);
_15f.style.visibility="visible";
};
this.ResetScrollBar=function(){
ProtoUIStates.resultsContainer.scrollTop=0;
};
this.HideRelatedClips=function(){
var _160=document.getElementById("relatedClips");
if(_160){
hideElement(_160);
_160.innerHTML="";
}
_a3=0;
};
this.ShowClipInfo=function(str){
document.getElementById("clipInfoDiv").innerHTML=str;
};
this.DisplayRelatedClips=function(sr){
var _163=document.getElementById("relatedClips");
var _164=sr.arr;
var _165=ProtoUIStates.relatedClipsPerPage;
var _166=_a3*_165;
var str="";
var _168=_164.length-_a3*_165;
var _169=_165>_168?_168:_165;
showElement(_163);
str+="<div class=\"relClipDiv\">";
str+="<div id=\"leftArrow\" class=\"leftArrow\" onclick=\"EvScroll(this);\"></div>";
str+="<div style=\"width:280px;\" class=\"relImageList\" id=\"relImageList\">";
str+="<div id=\"imageList\" class=\"relImageList\" style=\"width:2000px;left:0px; top:0px;\">";
for(i=_166;i<_164.length;i++){
this.relatedClipUnderFocus=_166;
str+=create_icon(_164[i],i,sr.final_response,true);
}
str+="</div>";
str+="</div>";
str+="<div id=\"rightArrow\" class=\"rightArrow\" onclick=\"EvScroll(this);\"></div>";
str+="</div>";
str+="<div id=\"clipInfoDiv\" class=\"clipInfoDiv\" align=\"left\">";
str+=this.create_clip_info(_164[_166],0,_166,true,true);
str+="</div>";
_163.innerHTML=str;
this.FocusElement(document.getElementById("icon"+this.relatedClipUnderFocus+"Span"));
};
this.DisplayRelatedClipsForUMPC=function(sr){
this.HideResults();
var _16b=document.getElementById("relTit");
_16b.style.visibility="visible";
var _16c=document.getElementById("relatedClips");
var _16d=sr.arr;
var _16e=ProtoUIStates.relatedClipsPerPageUMPC;
var _16f=_a2*_16e;
var str=_8e;
var _171=_16d.length-_a2*_16e;
var _172=_16e>_171?_171:_16e;
var _173=sr.last_set;
str+=_a2;
str+="\">";
showElement(_16c);
str+="<div class=\"relClipDiv\">";
var _174=0;
for(i=_16f;i<_16f+_172;i++){
try{
var _175="";
var _176="";
var _177="";
var _178="result"+i;
var _179="row"+i;
var _17a="";
var _17b="";
var _17c="";
if((AjaxConsts.ClipCheck[0]==true)&&_16d[i].resolveStatus==3){
continue;
}
_177="<table id=\"resultTable\" cellspacing=0 cellpadding=0\"><tr class=\""+"resultTitleEntry"+"\">";
_176=create_icon(_16d[i],i,sr.final_response);
if(_176){
_177+=_176;
}
_177+="<td align=\"left\">";
_177+=this.create_clip_info(_16d[i],0,i,_9f.isTitleSelectable?true:false,this.isMoreInfoPage());
_177+="</td></tr></table>";
if(_9f.get_resultItem_attributes){
_17c=_9f.get_resultItem_attributes(_16d[i]);
}
str+=tableRowByIndex(i,_177,_17c,false);
_174++;
}
catch(e){
}
}
str+=_8f;
str+="</div>";
if(_a0==0&&_172==0){
str+=addNoResults();
}
if(_174){
if(!_173){
var _17d=document.getElementById("footerNavigButtons");
if(_17d){
_17d.innerHTML=tableRowByIndex(i,null,"",true);
}
}
}else{
_a2--;
}
_16c.innerHTML=str;
};
this.DisplaySearchResults=function(sr){
var _17f=sr.arr;
var _180=document.getElementById("resultDisplay");
var _181=0;
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
_181=ProtoUIStates.resultsPerPage;
}else{
_181=ProtoUIStates.resultsPerPageUMPC;
}
var _182=_a2*_181;
var str=_8e;
var _184=_17f.length-_a2*_181;
var _185=_181>_184?_184:_181;
var _186=sr.last_set;
if(IS_PLAYER_IN_INDEPENDENT_PANEL||!_a5){
this.ShowResults();
_180.style.display="block";
_180.style.visibility="visible";
}
str+=_a2;
str+="\">";
if(!this.isMoreInfoPage()){
this.SetContextString(sr.page_title);
}
if(_a0==0){
if(this.isMoreInfoPage()){
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
this.DisplayRelatedClips(sr);
}else{
if(ProtoUIStates.relatedClipsPerPageUMPC<=0){
return;
}
this.DisplayRelatedClipsForUMPC(sr);
}
var _187=document.getElementById("relTit");
if(_187){
_187.style.visibility="visible";
}
return;
}else{
this.HideRelatedClips();
this.HideMoreInfo();
this.ShowHeader();
}
}
var _188=0;
for(i=_182;i<_182+_185;i++){
try{
var _189="";
var _18a="";
var _18b="";
var _18c="result"+i;
var _18d="row"+i;
var _18e="";
var _18f="";
var _190="";
if((AjaxConsts.ClipCheck[0]==true)&&_17f[i].resolveStatus==3){
continue;
}
_18b="<table id=\"resultTable\" cellspacing=0 cellpadding=0\"><tr class=\""+"resultTitleEntry"+"\">";
_18a=create_icon(_17f[i],i,sr.final_response);
if(_18a){
_18b+=_18a;
}
_18b+="<td align=\"left\"><div>";
_18b+=this.create_clip_info(_17f[i],0,i,_9f.isTitleSelectable?true:false,this.isMoreInfoPage());
_18b+="</td></tr></table>";
if(_9f.get_resultItem_attributes){
_190=_9f.get_resultItem_attributes(_17f[i]);
}
str+=tableRowByIndex(i,_18b,_190,false);
_188++;
}
catch(e){
}
}
str+=_8f;
if(_a0==0&&_185==0){
str+=addNoResults();
}
if(_188){
if(!_186){
var _191=document.getElementById("footerNavigButtons");
if(_191){
_191.innerHTML=tableRowByIndex(i,null,"",true);
}
}
}else{
_a2--;
}
if(_a0){
if(str!=null){
_180.innerHTML=str;
}
}else{
if(str!=null){
_180.innerHTML=str;
}else{
_180.innerHTML="";
}
}
this.SetTextBoxValue(ProtoUIStates.searchTextBox.value);
if(sr.page_title==""&&ProtoUIStates.searchTextBox.value==" "){
if(this.isSearchInputBoxVisible()){
this.SetTextBoxValue("");
this.changeHomeImageToRefresh();
}
}
if(ProtoUIStates.searchTextBox.value==""){
this.setPlaceHolder(true);
}
_a0=_185;
};
this.UnhiliteSearchEntry=function(_192){
var _193="result"+_192;
var ele=document.getElementById(_193);
if(ele){
ele.setAttribute("selected","expanded");
}
};
this.EmphasisRenderer=function(_195){
return "&lt;span class=\"TapHilite\"&gt;"+_195+"&lt;/span&gt;";
};
this.HiliteButton=function(_196){
var _197="result"+_196;
var elem=document.getElementById(_197);
if(elem){
elem.className="ResultButton_hilite";
}
};
this.DisplayLoading=function(){
var _199="nextButton"+_a0;
var ele=document.getElementById(_199);
if(ele){
ele.innerHTML="<center><br/>Loading...</center>";
ele.onclick="";
ele.setAttribute("selected","clicked");
}
};
this.HideResult=function(_19b){
var _19c="row"+_19b;
var elem=document.getElementById(_19c);
if(elem){
elem.style.display="none";
}
};
this.ShowActPopup=function(){
showElement(ProtoUIStates.actPopup);
ProtoUIStates.actPopup.innerHTML=_a8;
};
this.isActionPopupVisible=function(){
return ProtoUIStates.actPopup.innerHTML.length;
};
this.HideActPopup=function(){
if(ProtoUIStates.actPopup){
hideElement(ProtoUIStates.actPopup);
ProtoUIStates.actPopup.innerHTML="";
}
};
this.ShowMIDescription=function(){
var _19e=document.getElementById("rowDiv2");
showElement(_19e);
};
this.HideMIDescription=function(){
var _19f=document.getElementById("rowDiv2");
hideElement(_19f);
};
this.ChangeMITitle=function(_1a0){
var _1a1=document.getElementById("relTit");
_1a1.innerHTML=_1a0;
};
this.ShowBookmark=function(){
if(!_a6){
_a6=true;
this.HideMIDescription();
this.ChangeMITitle("Bookmark this Video");
this.HideResults();
ProtoUIStates.actPopup.className="actPopup";
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
this.ShowActPopup();
}
ProtoUIStates.actPopup.className="actPopup";
}else{
this.HideBookmark();
}
};
this.HideBookmark=function(){
if(_a6){
_a6=false;
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
this.HideActPopup();
}
this.ShowResults();
this.ChangeMITitle("Related Videos");
this.ShowMIDescription();
return true;
}
return false;
};
this.bml=function(bu,bt){
rdr=EvtInst.getRenderer();
bmo=rdr.bm;
if(!rdr.bm){
rdr.bm=new Bookmark();
}
_a8=rdr.bm.loadBMPage(bu,bt);
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
rdr.ShowActPopup(null);
}
};
this.loadBMPage=function(bu,bt){
ebu=escape(bu);
ebt=escape(bt);
if(this.lbm){
this.bml(ebu,ebt);
this.lbm=0;
}else{
if(this.bm){
this.bml(ebu,ebt);
}
}
};
function create_title_string(_1a6){
title=_1a6.title;
if(_1a6.epiTitle&&_1a6.epiTitle.length>0){
if(title.length>0){
title+=":";
}
title+=_1a6.epiTitle;
}
return title;
}
function getStarTable(_1a7){
var _1a8="";
var _1a9="<img class=\"star\" src=\"";
var _1aa="\">";
if(_1a7>AjaxConsts.Max_Rating){
_1a7=AjaxConsts.Max_Rating;
}
for(var ii=0;ii<_1a7;ii++){
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
_1a8+=_1a9+"images/new/star.png"+_1aa;
}else{
_1a8+=_1a9+"images/star.gif"+_1aa;
}
}
for(;ii<AjaxConsts.Max_Rating;ii++){
if(IS_PLAYER_IN_INDEPENDENT_PANEL){
_1a8+=_1a9+"images/new/star_gray.png"+_1aa;
}else{
_1a8+=_1a9+"images/star_gray.gif"+_1aa;
}
}
return _1a8+"";
}
function padout(_1ac){
return (_1ac<10)?"0"+_1ac:_1ac;
}
function mytrim(str){
return str.replace(/^\s+|\s+$/g,"");
}
function video_renderer(_1ae,args){
this.ds_create_auxInfo_string=function(_1b0,_1b1,_1b2){
var ln2=0;
var _1b4="";
var _1b5=0;
if(_1b0.views){
_1b5=parseInt(_1b0.views);
}
if(_1b0.rating&&!isNaN(parseInt(_1b0.rating))&&_1b5<VIEWSTHRESHOLD){
_1b4+=getStarTable(parseInt(_1b0.rating))+"&nbsp;";
ln2++;
}
if(_1b0.views&&(_1b1||_1b5>VIEWSTHRESHOLD)){
_1b4+="<span class=\"views\">"+_1b0.views+"&nbsp;views </span>";
ln2++;
}
if(_1b0.user_name){
var un=_1b0.user_name;
if(_1b1){
_1b4+="<span class=\"user\">"+un+"</span>";
}else{
_1b4+="<span class=\"user\"><nobr>"+un+"</nobr></span>";
}
ln2++;
}
if(_1b0.views){
_1b4+="<br/>";
}
if(_1b0.runtime!=null&&_1b0.runtime.total_secs!=null){
var hrs,sec;
var min=parseInt(_1b0.runtime.minutes);
hrs=Math.floor(min/60);
min=min%60;
sec=_1b0.runtime.duration;
if(hrs>0){
_1b4+="<span class=\"time\">"+padout(hrs)+":"+padout(min)+":"+padout(sec)+"</span>";
}else{
_1b4+="<span class=\"time\">"+padout(min)+":"+padout(sec)+"</span>";
}
}
if(_1b0.time!=null&&mytrim(_1b0.time.month).length>0&&mytrim(_1b0.time.date).length>0&&mytrim(_1b0.time.year).length>0){
var _1ba=new Date();
var _1bb=new Date();
_1bb.setFullYear(parseInt(_1b0.time.year),parseInt(_1b0.time.month)-1,parseInt(_1b0.time.date));
_1bb.setHours(_1b0.time.hrs);
_1bb.setMinutes(_1b0.time.mins);
_1b4+="<span class=\"date\">"+getRelativeDateStr(_1bb,_1ba.getTimezoneOffset())+"</span>";
}
if(!_1b1){
_1b4+="&nbsp;";
}
if(_1b0.sourceOs!=null){
_1b4+="<a class=\"mi_homeUrl_fold\" linktype=\"fold\" title=\"Goto '"+_1b0.source+"' Videos\" href=\"javascript:void(0)\" onclick=\"EvSourceBrowse('"+_1b0.sourceOs+"', "+_1b2+"); if(getBrowser()!='Internet Explorer') event.stopPropagation(); else window.event.cancelBubble=true;\">";
}
_1b4+="&nbsp;"+"</a>";
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
_1b4+="<a class=\"mi_homeUrl_external\" id=\"sourceAtMoreInfo\" linktype=\"external\" title=\"Go to "+_1b0.source+"\" href=\""+_1b0.reference+"\" target=\"_blank\" onclick=\"if(getBrowser()!='Internet Explorer') event.stopPropagation(); else window.event.cancelBubble=true;\">"+"&nbsp;"+"</a>";
}
_1b4+="<a class=\"source\" style=\"color: #CD2626;\" title=\"Go to "+_1b0.source+"\" href=\""+_1b0.reference+"\" target=\"_blank\" onclick=\"if(getBrowser()!='Internet Explorer') event.stopPropagation(); else window.event.cancelBubble=true;\">";
_1b4+=_1b0.source;
_1b4+="</a>";
return _1b4;
};
this.ds_create_icon=function(_1bc,_1bd,_1be){
var _1bf="";
var icon="";
var _1c1="icon"+_1bd;
var _1c2="icon_overlay"+_1bd;
var _1c3="";
var _1c4="overlay_icon";
var _1c5="1px";
var _1c6="50px";
var _1c7="";
var _1c8="EvPlayMCClip("+_1bd+", event)";
var _1c9="Play";
var _1ca="center";
if(!_1bc||_1bc.title=="No Results"){
return _1bf;
}
if(_1bc.bFolded){
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
icon="images/folded.gif";
}else{
icon="images/new/folded_black.gif";
}
_1c3="foldIcon";
_1c8="";
_1c9="";
_1c4="overlay_clear";
}else{
if(_1bc.imageURL&&_1be==true){
icon=_1bc.imageURL;
_1c3="resultIcon";
_1ca="left";
}else{
icon="images/clip.gif";
_1c3="noImageIcon";
}
}
_1c7=_1bc.overlay_image;
_1bf="<td valign=\"middle\">"+"<div align=\""+_1ca+"\" onclick=\""+_1c8+";\" style=\"width:"+_91.getShelfImageWidth()+"px;"+" height:"+_91.getShelfImageHeight()+"px;"+"\" class=\"iconDiv\" onMouseOver=\";\" onmouseout=\";\" title=\""+_1c9+"\">"+"<img onload=\"this.style.left='auto'; "+"\"id=\""+_1c1+"\" class = \""+_1c3+"\" src=\""+icon+"\" onerror=\"this.src='images/clip.gif';this.className='noImageIcon';this.parentNode.align='center';"+"\"></img>"+"<a href=\"javascript:void(0)\" style=\"text-decoration:none;border-width:0px;margin:0px;padding:0px;\">"+"<img class=\""+_1c4+"\" id=\""+_1c2+"\" src=\"images/play.gif\"></img></div></a></td>";
return _1bf;
};
this.get_resultItem_attributes=function(_1cb){
return "onclick=\"EvOnClickHandler(this, event);\"";
};
this.formatAuxInfo=function(_1cc,_1cd){
var _1ce=_91.getShelfTextWidth();
return "<div class=\"auxInfo\">"+_1cc+"</div>";
};
}
function create_auxInfo_string(_1cf,_1d0){
var _1d1="";
if(_9f.ds_create_auxInfo_string){
_1d1+=_9f.ds_create_auxInfo_string(_1cf,_1d0);
}
return _1d1;
}
function create_icon(_1d2,_1d3,_1d4){
if(_9f.ds_create_icon){
return _9f.ds_create_icon(_1d2,_1d3,_1d4);
}
return null;
}
function construct_schedule_display(_1d5){
return "&nbsp;&nbsp;&nbsp;"+_1d5.callsign+"("+_1d5.vcnum+")"+" "+construct_time_display(_1d5);
}
function construct_time_display(_1d6){
var td="";
var _1d8=_1d6.date;
var _1d9=_1d6.time;
var _1da=Date.UTC(_1d8.year,_1d8.month-1,_1d8.date,_1d9.hour,_1d9.minutes,0);
var dt=new Date(_1da);
td+=dt.toLocaleString()+" ";
var ampm="AM";
var hrs=dt.getHours();
if(hrs>=12){
ampm="PM";
}
var mins=dt.getMinutes();
if(mins<10){
mins="0"+mins;
}
td=td.substring(0,td.length-7)+td.substring(td.length-4,td.length);
return td;
}
function getRelativeDateStr(date,_1e0){
var _1e1=new Date();
var _1e2=parseInt((_1e1.getTime()-date.getTime())/(60*1000));
if(_1e0!=undefined){
_1e2+=(_1e0-5*60);
}
var _1e3="";
if(_1e2<120){
return "an hour ago";
}else{
if(_1e2<(24*60)){
return (parseInt(_1e2/60)).toString()+" hours ago";
}else{
if(_1e2<(1*24*60)){
_1e3+="Today";
}else{
if(_1e2<(2*24*60)){
_1e3+="Yesterday";
}else{
if(_1e2<(7*24*60)){
_1e3+=(parseInt(_1e2/(24*60))).toString()+" days ago";
}else{
if(_1e2<(14*24*60)){
_1e3+="a week ago";
}else{
if(_1e2<(30*24*60)){
_1e3+=(parseInt(_1e2/(7*24*60))).toString()+" weeks ago";
}else{
if(_1e2<(60*24*60)){
_1e3+="a month ago";
}else{
if(_1e2<(365*24*60)){
_1e3+=(parseInt(_1e2/(30*24*60))).toString()+" months ago";
}else{
if(_1e2<(2*365*24*60)){
_1e3+="a year ago";
}else{
_1e3=(parseInt(_1e2/(365*24*60))).toString()+" years ago";
}
}
}
}
}
}
}
}
}
}
return _1e3;
}
}
var EvtInst=null;
function EvBodyClick(){
if(EvtInst){
EvtInst.BodyClick();
}
}
function EvToolsClick(p1){
if(EvtInst){
EvtInst.ToolsClick(p1);
}
}
function EvOnError(p1,p2){
if(EvtInst){
EvtInst.OnError(p1,p2);
}
}
function EvFireRangeQuery(_1e7){
if(EvtInst){
EvtInst.FireRangeQuery(_1e7);
}
}
function isTextBoxModified(_1e8){
if(_1e8==8||_1e8==13||_1e8==32){
return true;
}else{
if(_1e8>45&&_1e8<=90){
return true;
}else{
if(_1e8>95&&_1e8<=111){
return true;
}else{
if(_1e8>=186&&_1e8<=192){
return true;
}else{
if(_1e8>=219&&_1e8<=222){
return true;
}
}
}
}
}
return false;
}
function EvTextBoxModified(_1e9){
if(EvtInst){
var _1ea=_1e9.keyCode?_1e9.keyCode:_1e9.charCode;
if(isTextBoxModified(_1ea)){
EvtInst.TextBoxModified();
}
}
}
function EvPlayMCClip(_1eb){
if(EvtInst){
EvtInst.playMCClip(_1eb);
}
}
function EvCleanup(){
if(EvtInst){
EvtInst.cleanup();
EvtInst=null;
}
}
function EvPlayVideo(url,type){
if(EvtInst){
EvtInst.playVideo(url,type);
}
}
function EvOnClickHandler(p1,p2){
if(EvtInst){
EvtInst.OnClickHandler(p1,p2);
}
}
function EvHandleBack(_1f0){
if(EvtInst){
EvtInst.HandleBack(_1f0);
}
}
function EvHandleSearch(){
if(EvtInst){
EvtInst.HandleSearch();
}
}
function EvHandleHome(){
if(EvtInst){
EvtInst.ToolsClick(Evt.Const.ToolsSoftKey2);
}
}
function EvHandleShareVideo(p1){
if(EvtInst){
return EvtInst.HandleShareVideo(p1);
}
}
function EvHandleBookMark(){
if(EvtInst){
EvtInst.HandleBookMark();
}
}
function EvHandleCategories(){
if(EvtInst){
EvtInst.HandleCategories();
}
}
function EvHandleGetvTap(_1f2){
if(EvtInst){
EvtInst.HandleGetvTap(_1f2);
}
}
function EvHandleAbout(){
if(EvtInst){
EvtInst.HandleAbout();
}
}
function EvHandleResize(){
if(EvtInst){
EvtInst.HandleResize();
}
}
function EvSourceBrowse(_1f3,_1f4){
if(EvtInst){
EvtInst.SourceBrowse(_1f3,_1f4);
}
}
function EvScroll(p1){
if(EvtInst){
EvtInst.HandleScroll(p1);
}
}
function openUrlInNewWindow(url){
window.open(url,"RefWindow","",false);
}
function SInitializeSearch(_1f7,_1f8,gid){
if(EvtInst==null){
EvtInst=new Evt(_1f7,_1f8);
}
if(gid=="__share_gid__"){
gid=null;
}
EvtInst.InitializeSearch(gid);
}
function UiContext(_1fa,_1fb,_1fc,_1fd){
this.re=_1fa;
this.ctxtStr=_1fb;
this.pageType=_1fc;
this.evtParam=_1fd;
}
function Evt(_1fe,_1ff){
var _200=_1fe;
var _201=new Renderer(_1ff);
var _202=new Parser(new ParserCB(this));
var _203=new SearchInterface(_202,0,_1ff,_200,false);
var _204=-1;
var _205=0;
var _206=null;
var _207=_1ff;
var _208=null;
var _209=null;
var _20a=" ";
var _20b=null;
var _20c=new Object();
var _20d=null;
var _20e=new ClipChecker(this);
var _20f=null;
var _210=null;
var _211=true;
this.getRenderer=function(){
return _201;
};
this.notificationCB=function(){
return;
};
var _212=new SimpleAsyncInterface(this.notificationCB,AjaxConsts.prototype.VideoDS);
init_ds_handlers();
function init_ds_handlers(){
var _213=AjaxConsts.DataSpaceMap.length;
var _214=AjaxConsts.DataSpaceMap;
for(var i=0;i<_213;i++){
var _216=eval(_214[i].evt_handler);
if(_216){
_20c[_214[i].val]=new _216();
}
}
_20d=_20c[_207.val];
}
this.TextBoxModified=function(){
valert("Aborting previous resolve request.");
_20e.abortAll();
if(!_211&&_201.GetContextString().length==0&&_201.GetSearchString().length==0){
_211=true;
_201.changeHomeImageToRefresh();
}else{
if(_211&&!(_201.GetContextString().length==0&&_201.GetSearchString().length==0)){
_201.changeRefreshImageToHome();
_211=false;
}
}
var _217=_201.GetSearchString();
if(_201.GetContextString().length>0&&_217.length<1){
var _218=null;
_218=_203.FireBackQuery(1);
var _217=_203.GetCurrentSearchString();
if(_217==null||_217.length==0){
_217=_20a;
}
_201.SetContextString("");
_201.SetTextBoxValue(_217);
return;
}
if(_217.length>0){
_201.setPlaceHolder(false);
}
clear_search_state();
var _218=new UiContext(null,_201.GetContextString(),"search","");
_203.FireSearchQuery(_217,_209,_218);
_201.HideMoreInfo();
};
this.GetSearchResults=function(){
return _209;
};
function GetSearchResult(_219){
if(_209&&_209.arr.length&&_219<_209.arr.length){
return _209.arr[_219];
}
return null;
}
function launchReferencePage(_21a){
window.location.href=AjaxConsts.reference_page+_21a;
}
this.OnError=function(obj,_21c){
var id=obj.id;
if(id=="mi_large_icon"){
obj.parentNode.innerHTML=_201.noImageHTML();
}
};
this.OnClickChangeRendererState=function(_21e){
if(_21e=="closeEmbedPopup"){
_201.HideActPopup();
return;
}
_201.HideBookmark();
_201.SetFocus();
_201.changeRefreshImageToHome();
if(!IS_PLAYER_IN_INDEPENDENT_PANEL&&ProtoUIStates.share_gid!="__share_gid__"){
ProtoUIStates.share_gid="__share_gid__";
_201.HideLargeMoreInfo();
_201.ShowMIMainPanel();
}
};
this.OnClickHandler=function(_21f,_220){
var _221=_21f.id;
if(_220=="reference"){
launchReferencePage(_20d.getReferenceParams(_208,null));
}
if(_221=="mediaCloseButton"){
stopVideo();
}
if(_221=="relatedLink"){
if(_20b){
_20d.handle_selection(_20b);
}
return;
}
this.OnClickChangeRendererState(_221);
var _222=_20d.getIndexOfClickedResult(_221);
if(isNaN(_222)){
return false;
}
handle_selection(_222,_21f);
return false;
};
this.BodyClick=function(){
_201.SetFocus();
};
this.ToolsClick=function(_223){
_201.HideBookmark();
if(_223==Evt.Const.ToolsSoftKey1){
_201.HandleBack();
this.HandleClear(true);
}else{
if(_223==Evt.Const.ToolsSoftKey2){
if(!IS_PLAYER_IN_INDEPENDENT_PANEL&&_20b){
stopVideo();
}
clear_search_state();
valert("Aborting previous resolve request.");
_20e.abortAll();
_203.FireHomeQuery(new UiContext(null,"","search",""),true,_211);
_211=true;
if(!IS_PLAYER_IN_INDEPENDENT_PANEL&&ProtoUIStates.share_gid!="__share_gid__"){
ProtoUIStates.share_gid="__share_gid__";
_201.HideLargeMoreInfo();
_201.ShowMIMainPanel();
}
_201.ShowHeader();
_201.HideActPopup();
_201.HandleHome(_211);
_201.SetTextBoxValue(null);
}else{
if(_223==Evt.Const.ToolsSoftKey3){
EvFireRangeQuery(true);
}
}
}
_201.SetFocus();
};
this.FireRangeQuery=function(_224){
var _225=_209;
if(_224==true){
_225.expected_results+=_200;
}else{
_201.DisplayLoading();
}
_203.FireRangeQuery(_225.ondown_context,_209,new UiContext(null,_201.GetContextString(),"scroll",""));
};
SendMoreInfo=function(os,_227,_228){
if(AjaxConsts.useMemMI==1){
var _229;
if(AjaxConsts.useSearch2_0){
_229=_203.SetDataspace(AjaxConsts["VideoMoreInfoDS2_0"]);
}else{
_229=_203.SetDataspace(AjaxConsts["VideoMoreInfoDS"]);
}
_203.FireBrowseQuery(os+_228,_209,_227);
_203.SetDataspace(_229);
}else{
_203.FireBrowseQuery(os,_209,_227);
}
};
HandleMoreInfo=function(os,_22b,_22c){
clear_search_state();
SendMoreInfo(os,_22b,_22c);
_201.HideHeader();
_205++;
if(!ProtoUIStates.MIpreloadImagesArray){
ProtoUIStates.MIpreloadImagesArray=new Array();
}
if(_22b.re){
_208=_22b.re;
_201.DisplayMoreInfo(_208,true);
return false;
}
return true;
};
this.InitializeSearch=function(gid){
if(navigator.userAgent.indexOf("MSIE")>=0){
_203.SetBrowser(SearchInterface.BTypes.IE);
}
if(navigator.userAgent.indexOf("Firefox")>=0){
_203.SetBrowser(SearchInterface.BTypes.FireFox);
}
if(navigator.userAgent.indexOf("Safari")>=0){
_203.SetBrowser(SearchInterface.BTypes.Safari);
}
if(navigator.userAgent.indexOf("Opera")>=0){
_203.SetBrowser(SearchInterface.BTypes.Opera);
}
_210=new RevealTimer(false);
_201.showToolbarIconsInResultsPage(true);
_201.Initialize();
if(gid!=null){
_203.FireHomeQuery(new UiContext(null,"","search",""),false,_211);
var mi="vp:mi:"+gid+"~";
HandleMoreInfo(mi,new UiContext(null,"","moreinfo",AjaxConsts.miParams),AjaxConsts.miParams);
}else{
if(ProtoUIStates.fold_gid!=""){
browseFold(null,ProtoUIStates.fold_gid,null);
if(ProtoUIStates.search_word!=""){
}
}else{
if(ProtoUIStates.search_word!=""){
_203.FireSearchQuery(ProtoUIStates.search_word,null,new UiContext(null,"","search",""));
}else{
_203.FireHomeQuery(new UiContext(null,"","search",""),true,_211);
}
}
}
_201.SetTextBoxValue(null);
};
function stopVideo(){
if(_20b){
_201.hideClipMessage();
_201.hidePlayerLoadingMessageSpan();
_201.stopVideo();
_20b=false;
_20e.cancelResolution();
}
}
this.HandleSearch=function(){
if(_201.isSearchInputBoxVisible()){
_201.HideHeader();
return;
}
_201.ShowHeader();
};
this.HandleShareVideo=function(p1){
var _230=_208.shareOs;
return _201.HandleShareVideo(p1,_230,_208);
sendNotification(_208,2);
};
this.HandleCategories=function(){
_201.HandleCategories();
if(AjaxConsts["EnableCategories"]==true){
browseFold(null,"vp:bm:0~SynCategories--155~",null);
}
};
this.HandleBookMark=function(){
_201.HideActPopup();
var _231=_208.shareOs;
if(!IS_PLAYER_IN_INDEPENDENT_PANEL){
stopVideo();
}
_201.loadBMPage(AjaxConsts.ShareURL+_231,_208.strTitle);
_201.ShowBookmark();
};
this.HandleGetvTap=function(type){
var gid="",_234="";
if(type!=-1){
gid="?"+_209.arr[type].shareOs;
_234=_209.arr[type].strTitle;
}
var url="<div><iframe style=\"border:0px\" width=\"328px\" height=\"300px\" src=\"http://www.vtap.com/widget/index.html"+gid+"\"></iframe></div>";
_201.HideBookmark();
_201.HandleGetvTap(url,type,_234);
};
this.HandleAbout=function(){
openUrlInNewWindow("http://vtap.com");
};
this.HandleResize=function(){
_201.HandleResize(this.GetSearchResults());
};
this.SourceBrowse=function(_236,_237){
this.OnClickChangeRendererState();
browseFold(_209[_237],_236,_209);
};
this.HandleScroll=function(p1){
var id=p1.id;
if(!_201.HandleScroll(id,_209)){
EvFireRangeQuery(true);
}
};
function sendNotification(_23a,_23b){
var url=AjaxConsts["StatisticURL"];
url+="gid="+_23a.gid;
url+="&";
url+="notify="+_23b;
_212.SendRequest(url,"");
}
this.HandleBack=function(_23d){
if(_201.HandleBack()){
return;
}
value=ProtoUIStates.searchTextBox.value;
if(!(value==null||value.length==0||value==" ")&&_201.isSearchInputBoxVisible()){
ProtoUIStates.searchTextBox.value=value.substr(0,value.length-1);
this.TextBoxModified();
return;
}
if(!IS_PLAYER_IN_INDEPENDENT_PANEL&&_20b){
stopVideo();
_201.ResetScrollBar();
return;
}
var _23e=false;
if(_20d.handle_back){
_23e=_20d.handle_back();
}
if(_23e){
return;
}
if(_203.getStackSize()<2){
return;
}
clear_search_state();
valert("Aborting previous resolve request.");
_20e.abortAll();
var _23f=null;
_23f=_203.FireBackQuery(_23d);
searchStr=_203.GetCurrentSearchString();
if(_203.getStackSize()<2){
if(searchStr==null||searchStr.length==0){
searchStr=null;
}
}else{
if(searchStr==null||searchStr.length==0){
searchStr=_20a;
}
}
_201.SetTextBoxValue(searchStr);
_201.SetContextString("");
if(_201.isMoreInfoPage()&&_203.getStackSize()<2){
_211=true;
_201.changeHomeImageToRefresh();
}
};
this.playVideo=function(url,type){
_201.playVideo(url,type);
};
this.HandleClear=function(_242){
var _243=_201.GetSearchString();
clear_search_state();
if(_243&&_243!=""){
if(!_242){
_243=_243.substr(0,_243.length-1);
}
if(_206==Evt.Const.ItemType_ResultsBox){
hilite_entry(_204);
}
_203.FireSearchQuery(_243,_209,new UiContext(null,_201.GetContextString(),"search",""));
}else{
if(_205>0){
_203.FireBackQuery(1);
if(_205>0){
_205--;
}
_243=_203.GetCurrentSearchString();
if(_243==null||_243.length==0||_243!=" "){
_243=_20a;
}
_201.SetTextBoxValue(_243);
}else{
if(_206==Evt.Const.ItemType_ResultsBox){
hilite_entry(_204);
}
_203.FireSearchQuery(_243,_209,new UiContext(null,_201.GetContextString(),"search",""));
}
}
};
this.EmphasisRendererCB=function(_244){
return _201.EmphasisRenderer;
};
this.RenderResultsCB=function(_245,_246){
var _247=false;
if(_245.arr.length==0&&_246.pageType!="scroll"){
_245.page_title=_209.page_title;
}
_209=_245;
if(_246.pageType=="moreinfo"){
_247=true;
if(_245.arr){
var _248=_245.arr.length;
if(_246!=null&&_246.re!=null){
var _249=_245.arr[0];
_245.arr[0]=_246.re;
if(_249){
if(_249.description&&_249.description!=""){
_245.arr[0].description=_249.description;
}
_245.arr[0].homeUrl=_249.homeUrl;
}
}
_208=_245.arr[0];
if(_248==1&&(AjaxConsts.useMemMI==0||_246.evtParam=="&RC=0")){
_203.FireUrlQuery(_245.arr[0].relatedOs,_209,_246);
}
}
}else{
if(_246.pageType=="browse"){
if(_245.page_title==null||_245.page_title.length==0){
if(_246.re){
_245.page_title=_246.re.title;
}
}
}
}
if(_246.pageType!="scroll"){
clear_search_state();
_208=_245.arr[0];
_245.expected_results=_200;
}
valert(_246.pageType);
if(_246.pageType!="scroll"){
if(_245.final_response==true){
valert("calling resolve");
startResolution();
}
}else{
startResolution();
}
_204=-1;
_201.RenderResultsCB(_245,_247);
if(!IS_PLAYER_IN_INDEPENDENT_PANEL&&ProtoUIStates.share_gid!="__share_gid__"){
_201.HideMIMainPanel();
_201.ShowLargeMoreInfo();
_201.EnlargeMoreInfo(_208);
}else{
if(IS_PLAYER_IN_INDEPENDENT_PANEL&&ProtoUIStates.share_gid!="__share_gid__"){
ProtoUIStates.share_gid="__share_gid__";
this.playMCClip(0);
}
}
};
function startResolution(){
valert("starting resolution");
_20e.ResolveImages(_209);
}
this.GetBrowser=function(){
return _203.GetBrowser();
};
function clear_search_state(){
selected_result_index=0;
_201.ClearSearchState();
}
function hilite_entry(_24a){
if(_24a<=_202.GetNumSearchResults()){
clear_selected_item();
_206=Evt.Const.ItemType_ResultsBox;
}
}
function clear_selected_item(){
if(!_206){
return;
}
_201.UnhiliteSearchEntry(_204,selected_result_index,_209);
}
function browseFold(_24b,_24c,_24d){
_205++;
clear_search_state();
var _24e=new UiContext(_24b,_201.GetContextString(),"browse","");
_203.FireBrowseQuery(_24c,_24d,_24e);
_201.SetTextBoxValue(_20a);
}
function handle_selection(_24f,_250){
var _251=GetSearchResult(_24f);
if(_251==null){
return;
}
if(_251.bFolded){
browseFold(_251,_251.on_select,_209);
}else{
var _252=false;
var _253=_250.id;
if(_253.indexOf("re_act_")==0){
var url=_250.getAttribute("action");
var type=_250.getAttribute("atype");
if(_20d.handle_actionable_selection){
_252=_20d.handle_actionable_selection(_251,url,type);
}
}else{
if(_20d.handle_selection){
return _20d.handle_selection(_251);
}
}
}
return true;
}
this.UpdateFetchingStatus=function(_256){
if(_208.gid!=_256.gid){
valert("What's wrong");
return;
}
switch(_256.resolveStatus){
case 0:
break;
case 1:
break;
case 2:
valert("resolverCB : "+_256.resolverResp);
if(_256.videoType=="text/html"){
showMessageToViewSourcePage(_256);
}else{
_201.showPlayerLoadingMessageSpan();
_201.hideClipMessage();
_201.setVideoPageMessage("Loading player");
_201.playClip(_256.videoURL,_256.videoType);
}
break;
case 3:
var _257=_256.videoURL;
if(_257==null||_257==""){
_257="This video is no longer available from";
}
_257+=" <a href=\"javascript:openUrlInNewWindow('"+_208.reference+"')\"><u>"+_208.source+"</u></a>";
_201.setVideoPageMessage(_257);
break;
case 4:
showMessageToViewSourcePage(_208);
break;
}
};
function showMessageToViewSourcePage(_258){
var _259="This video cannot be played inline. Click here to play this video from ";
_259+="<a href=\"javascript:openUrlInNewWindow('"+_258.reference+"')\"><u>"+_258.source+"</u></a>";
_201.setVideoPageMessage(_259);
}
this.UpdateImage=function(_25a,_25b){
};
this.UpdateOverLayImage=function(_25c,_25d){
};
this.HideResult=function(_25e){
_201.HideResult(_25e);
};
this.IsCurrResult=function(_25f){
if(_208!=null&&_208.gid==_25f.gid){
return true;
}
return false;
};
fetchClip=function(_260){
_20e.fetchClip(_260);
};
this.cleanup=function(){
_203.Cleanup();
_203=null;
_201.Cleanup();
_201=null;
_202=null;
};
function encodeUrlFields(args){
var str="";
var len=args.length;
var i=null;
for(i in args){
str+=i+"="+encodeURIComponent(args[i])+"&";
}
return str;
}
function video_evt_handler(){
this.getReferenceParams=function(_265,_266){
return "gid="+_265.gid;
};
this.handle_selection=function(_267){
var _268=AjaxConsts.useSearch2_0?_267.rel_more_info:_267.more_info;
valert("HandleMoreInfo "+_268);
if(_268){
return HandleMoreInfo(_268,new UiContext(_267,_201.GetContextString(),"moreinfo",AjaxConsts.miParams),AjaxConsts.miParams);
}
return true;
};
this.getIndexOfClickedResult=function(_269){
var _26a=parseInt(_269.substring("result".length));
if(isNaN(_26a)){
_26a=parseInt(_269.substring("row".length));
}
return _26a;
};
}
this.playMCClip=function(_26b){
if(!(_201.isMoreInfoPage()&&_26b==0)){
_201.HideHeader();
_208=_209.arr[_26b];
_201.setVideoPageData(_208);
}
if(_208==_20b){
return;
}
if(_20b){
stopVideo();
}
_208.videoURL=null;
_201.showClipMessage();
var _26c="Connecting to ";
_26c+="<u>"+_208.source+"</u>";
_26c+=" ...";
_20b=_208;
_201.setVideoPageData(_20b);
_201.setVideoPageMessage(_26c);
_201.ShowVideoTitle();
_201.ShowPlayerSpan();
valert("Aborting previous resolve request.");
_20e.abortAll();
fetchClip(_208);
sendNotification(_208,1);
return;
};
}
Evt.Const={"ToolsSoftKey1":0,"ToolsSoftKey2":1,"ToolsSoftKey3":2,"ItemType_ResultsBox":1,"ItemType_TripleTap":2,"ItemType_Dataspace":3,"ItemType_Toolbox":4};
var gFullScreen=false;
var mediaContainer=null;
function MediaPlayer(_26d){
var self=this;
var _26f=MediaPlayer.UndefinedEvent;
var type;
var _271;
var _272=0;
var _273=0;
var top=0;
var left=0;
var _276;
var _277;
var _278;
var _279;
var data;
var _27b=["mediaPlayer_Real","mediaPlayer_MS","mediaPlayer_Flash","mediaPlayer_IFrame","mediaPlayer_QT"];
var _27c=null;
var _27d;
var _27e=false;
var _27f;
var _280=false;
var _281=false;
var rndr=EvtInst.getRenderer();
this.getWidth=function(){
return _27d.width;
};
this.getHeight=function(){
return _27d.height;
};
this.play=function(){
if(_27f){
data["play"][type]();
}
};
this.playClip=function(url,_284,extn){
type=_284;
createPlayer(type,url);
_27d=document.getElementById(_27b[type]);
_27f=true;
this.setUrlName(url,_284,extn);
};
this.setUrlName=function(url,type,extn){
if(_27f){
data["setUrlName"][type](url,extn);
}
};
function createPlayer(type,url){
data["create"][type](url);
return;
var _28b=document.getElementById(_27b[type]);
if(_28b!=undefined&&_28b!=null){
return;
}
_27c=document.createElement("SPAN");
document.body.appendChild(_27c);
_27c.id="mediaContainer"+"_"+type;
_27c.style.position="absolute";
_27c.style.top=top;
_27c.style.left=left;
_27c.style.height=_273;
_27c.style.width=_272;
_27d=createMediaPlayer(_27c);
_27c.style.display="none";
_27c.style.zIndex=50;
_27c.appendChild(transGif);
var _28b=document.getElementById("playerSpan");
_28b.style.display="block";
_28b.appendChild(_27c);
switch(type){
case MediaPlayer.RealMedia:
break;
case MediaPlayer.MicrosoftMedia:
break;
case MediaPlayer.FlashMedia:
case MediaPlayer.IFrame:
case MediaPlayer.QTimeMedia:
break;
default:
break;
}
}
this.stop=function(){
try{
if(_27f){
_276=false;
gFullScreen=false;
data["stop"][type]();
}
}
catch(e){
valert("stop cathc");
}
};
this.pause=function(){
if(_27f){
return data["pause"][type]();
}
};
this.show=function(){
if(_27f){
_27c.style.display="block";
_27c.style.visibility="visible";
}
};
this.hide=function(){
if(_27f){
_27c.style.display="none";
_27c.style.visibility="hidden";
}
};
this.isPlayerVisible=function(){
if(_27c.style.display=="none"||_27c.style.visibility=="hidden"){
return true;
}
return false;
};
this.stopAndHide=function(){
var _28c=document.getElementById("mediaContainer"+"_"+type);
if(!_28c){
return;
}
if(type==MediaPlayer.FlashMedia||type==MediaPlayer.FlashMedia){
_28c.innerHTML="";
}
try{
this.stop();
_28c.style.display="none";
try{
embedFlash.SetVariable("isStop","2");
}
catch(e){
}
this.stop();
}
catch(e){
valert("caught in sto and hide");
}
};
this.gotoFullScreen=function(_28d){
var _28e=false;
_28e=fullscreenMS(_28d);
if(_28e){
_276=_28d;
gFullScreen=_28d;
}
return _28e;
};
this.getPlayerState=function(){
if(_27f){
return data["getPlayerState"][type]();
}
};
this.getPlayerStateString=function(){
if(_27f){
return data["getPlayerStateString"][type]();
}
};
this.playStateChange=function(_28f){
try{
if(_27f){
_26d[MediaPlayer.pCallBack](_28f,this);
}
}
catch(e){
}
};
this.IsFullScreen=function(){
var _290=_276;
if(isMediaCenter()){
return _290;
}
if(type==MediaPlayer.MicrosoftMedia){
var _291=document.getElementById("mediaPlayer_MS");
_290=_291.fullScreen;
}else{
if(type==MediaPlayer.RealMedia){
var _291=document.getElementById("mediaPlayer_Real");
_290=_291.GetFullScreen();
}
}
return _290;
};
function createMediaPlayer(_292){
var _293=null;
if(type!=MediaPlayer.DummyMedia){
_293=document.createElement("OBJECT");
_292.appendChild(_293);
_293.id=_27b[type];
_293.height=_273;
_293.width=_272;
try{
_293=data["create"][type](_293);
}
catch(e){
}
}else{
_293=createDummyMedia();
}
return _293;
}
function createReal(_294){
var _295=document.getElementById(_27b[type]);
if(_295!=undefined&&_295!=null){
return;
}
try{
document.mediaPlayer_Real.DoStop();
document.mediaPlayer_Real=null;
var _295=document.getElementById("playerSpan");
var id="mediaContainer"+"_"+MediaPlayer.RealMedia;
var _297=document.getElementById(id);
_297.innerHTML="";
_295.removeChild(_297);
}
catch(e){
}
var _298=36;
var _299=_273-_298;
_27c=rndr.createMediaSpan(type,top,left,_273,_272);
rndr.createMediaCloseButton();
var _29a="<object id=\""+_27b[type]+"\" classid=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" "+"WIDTH=\""+_272+"\" HEIGHT=\""+_273+"\" VIEWASTEXT>";
var _29b="<PARAM NAME=\"TYPE\" VALUE=\"audio/x-pn-realaudio-plugin\"> "+"<PARAM NAME=\"CONTROLS\" VALUE=\"ImageWindow\">"+"<PARAM NAME=\"CONSOLE\" VALUE=\"video1\">"+"<PARAM NAME=\"AUTOSTART\" VALUE=\"TRUE\">"+"<PARAM NAME=\"Shuffle\" VALUE=\"false\">"+"<PARAM NAME=\"PreFetch\" VALUE=\"false\">"+"<PARAM NAME=\"NoLabels\" VALUE=\"TRUE\">"+"<PARAM NAME=\"Loop\" VALUE=\"false\">"+"<PARAM NAME=\"NoLogo\" VALUE=\"TRUE\">"+"<PARAM NAME=\"BackgroundColor\" VALUE=\"#000000\">"+"<PARAM NAME=\"MaintainAspect\" VALUE=\"true\">"+"<PARAM NAME=\"Center\" VALUE=\"true\">"+"<PARAM NAME=\"Volume\" VALUE=\"100\">"+"<PARAM NAME=\"WantMouseEvents\" VALUE=\"true\">";
var _29c="<embed type=\"audio/x-pn-realaudio-plugin\" "+"name=\""+_27b[type]+"\" "+"controls=\"ImageWindow\" "+"console=\"realVideo\" "+"width=\""+_272+"\" "+"height=\""+_299+"\" "+"autostart=\"true\" "+"TYPE=\"audio/x-pn-realaudio-plugin\" "+"Shuffle=\"false\" "+"PreFetch=\"false\" "+"NoLabels=\"TRUE\" "+"Loop=\"false\" "+"NoLogo=\"TRUE\" "+"BackgroundColor=\"#000000\" "+"MaintainAspect=\"true\" "+"Center=\"true\" "+"Volume=\"100\" "+"WantMouseEvents=\"true\" "+">  "+"</embed> ";
var _29d="</object> ";
valert(_29c);
var _29e="<embed type=\"audio/x-pn-realaudio-plugin\" "+"name=\""+_27b[type]+"Control\""+"controls=\"ControlPanel\" "+"width=\""+_272+"\" "+"height=\""+_298+"\" "+"console=\"realVideo\" />";
valert(_29e);
_27c.innerHTML=_29c+_29e;
_271="RealPlayer";
}
function createMS(url){
var _2a0=document.getElementById("playerSpan");
_2a0.innerHTML="";
_27c=rndr.createMediaSpan(type,top,left,_273,_272);
rndr.createMediaCloseButton();
var _2a1=getBrowser();
var _2a2=null;
var _2a3=null;
var _2a4="</object> ";
if(_2a1!="Internet Explorer"){
_2a2="<object id=\""+_27b[type]+"\" data="+url+" height="+_273+" width="+_272+" type=\"application/x-mplayer2\" VIEWASTEXT>";
_2a3="<param name=\"Showcontrols\" value=\"false\">"+"<param name=\"src\" value=\""+url+"\" valuetype=\"ref\" type=\""+url+"\">"+"<param name=\"autoStart\" value=\"true\"> "+"<param name=\"enabled\" value=\"true\"> "+"<param name=\"uiMode\" value=\"mini\"> "+"<param name=\"stretchToFit\" value=\"true\"> "+"<param name=\"currentMarker\" value=\"0\"> "+"<param name=\"playCount\" value=\"1\"> "+"<param name=\"baseURL\" value=\"\"> "+"<param name=\"enableContextMenu\" value=\"false\"> "+"<param name=\"volume\" value=\"100\"> "+"<param name=\"enableErrorDialogs\" value=\"false\"> ";
}else{
_2a2="<object id=\""+_27b[type]+"\" height="+_273+" width="+_272+" classid=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\" standby=\"Loading Windows Media Player components...\" type=\"application/x-oleobject\" PlayStateChange=\"stateChangeCb\" VIEWASTEXT>";
_2a3="<param name=\"Showcontrols\" value=\"false\">"+"<param name=\"autoStart\" value=\"true\"> "+"<param name=\"enabled\" value=\"true\"> "+"<param name=\"uiMode\" value=\"mini\"> "+"<param name=\"stretchToFit\" value=\"true\"> "+"<param name=\"currentMarker\" value=\"0\"> "+"<param name=\"playCount\" value=\"1\"> "+"<param name=\"baseURL\" value=\"\"> "+"<param name=\"enableContextMenu\" value=\"false\"> "+"<param name=\"volume\" value=\"100\"> "+"<param name=\"enableErrorDialogs\" value=\"false\"> ";
}
_27c.innerHTML=_2a2+_2a3+_2a4;
_271="Windows Mediaplayer";
switch(type){
case MediaPlayer.RealMedia:
break;
case MediaPlayer.MicrosoftMedia:
break;
case MediaPlayer.FlashMedia:
case MediaPlayer.IFrame:
case MediaPlayer.QTimeMedia:
break;
default:
break;
}
return _27c;
}
function createFlash(_2a5){
_27c=rndr.createMediaSpan(type,top,left,_273,_272);
rndr.createMediaCloseButton();
_271="Flash Player";
}
function createIFrame(_2a6){
_271="IFrame based player";
return _2a6;
}
function createQt(_2a7){
_271="Quicktime player";
}
function playReal(){
var _2a8=document.getElementById(_27b[MediaPlayer.RealMedia]);
try{
_2a8.DoPlay();
}
catch(e){
}
try{
document.mediaPlayer_Real.DoPlay();
document.mediaPlayer_Real.focus();
}
catch(e){
}
}
function playMS(){
var _2a9=document.getElementById(_27b[MediaPlayer.MicrosoftMedia]);
if(_2a9){
_2a9.controls.play();
}
}
function playFlash(){
var _2aa=document.getElementById("flashObj0");
if(null!=_2aa){
try{
_2aa.SetVariable("isPaused","0");
_280=false;
}
catch(e){
}
}
}
function playIFrame(){
}
function playQt(){
}
function pauseReal(){
return _27d.DoPause();
}
function pauseMS(){
_27d.controls.pause();
}
function pauseFlash(){
var _2ab=document.getElementById("flashObj0");
if(null!=_2ab){
try{
_2ab.SetVariable("isPaused","1");
_280=true;
}
catch(e){
}
}
}
function pauseIFrame(){
}
function pauseQt(){
}
function stopReal(){
var _2ac=document.getElementById(_27b[MediaPlayer.RealMedia]);
try{
_2ac.DoStop();
}
catch(e){
}
document.mediaPlayer_Real.DoStop();
}
function stopMS(){
_281=false;
try{
_278.stop();
_277.stop();
valert("hello");
var _2ad=document.getElementById(_27b[MediaPlayer.MicrosoftMedia]);
if(_2ad){
_2ad.controls.pause();
_2ad.controls.stop();
_2ad.URL="";
}
}
catch(e){
valert("cathc in StopMs");
}
}
function stopFlash(){
var _2ae=document.getElementById("flashObj0");
if(null!=_2ae){
try{
_2ae.SetVariable("isStop","");
_280=true;
}
catch(e){
}
}
_2ae=null;
}
function stopIFrame(){
_27c.innerHTML="";
}
function stopQt(){
_27c.innerHTML="";
}
function setUrlReal(url,type){
_279=url;
_27c.style.display="block";
_278.setCallback(realStartPlayBack,self);
_278.setIntervalAndRestart(1);
}
function realStartPlayBack(){
var _2b1=document.getElementById(_27b[MediaPlayer.RealMedia]);
try{
_2b1.SetSource(_279);
}
catch(e){
document.mediaPlayer_Real.SetSource(_279);
}
playReal();
}
function setUrlIFrame(url,type){
_27c.style.display="block";
var str1="";
str1="<iframe onfocus=\"window.parent.document.body.focus()\" onload=\"window.parent.document.body.focus()\" id=\"frameEmbed\" width=\""+MediaPlayer.Width+"\" height=\""+MediaPlayer.Height+"\" scrolling=\"no\" src=\"";
str1+=url;
str1+="\">";
_27c.innerHTML=str1;
playIFrame();
}
function msStartPlayBack(){
_27d.URL=_279;
var _2b5=document.getElementById(_27b[MediaPlayer.MicrosoftMedia]);
_2b5.autoStart="true";
_2b5.autoStart="false";
valert("msStartPlayback "+_2b5.playState);
if(_2b5){
_27d.src=_279;
_27d.URL=_279;
try{
_27d.controls.play();
}
catch(e){
}
}else{
try{
document.mediaPlayer_MS.controls.play();
}
catch(e){
}
}
if(!_2b5.playState||_2b5.playState==10){
}
_277.setCallback(msCheckMediaEnd,self);
_277.setIntervalAndRestart(1);
}
function setUrlMS(url,type){
_279=url;
msStartPlayBack();
}
function setUrlFlash(url,type){
valert("Flash Url "+url);
_27c.style.display="block";
var str1="";
if(type.toLowerCase().indexOf("x-flv")!=-1){
str1="<object id=\"flashObj0\" type=\"application/x-shockwave-flash\"  classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+_272+"\" height=\""+_273+"\" > <param name=\"wmode\" value=\"window\"> <PARAM NAME=\"AllowNetworking\" VALUE=\"all\"><PARAM NAME=\"AllowFullScreen\" VALUE=\"false\"> <PARAM NAME=\"flashvars\" VALUE=\"usefullscreen=false&autostart=true&lightcolor=0x557722&type=flv&bufferlength=1&overstretch=false\"><param name=\"movie\" value=\"flvplayer.swf?file=";
}else{
str1="<iframe id=\"flashObj0\" width=\""+_272+"\" height=\""+_273+"\" src=\"";
}
if(type.toLowerCase().indexOf("x-flv")!=-1){
str1+=replaceAmpEqual(url);
}else{
str1+=url;
}
if(type.toLowerCase().indexOf("x-flv")!=-1){
str1+="\"> ";
str1+="<embed type=\"application/x-shockwave-flash\"";
str1+="name=\"flashObj0\"";
str1+="width=\""+_272+"\"";
str1+="height=\""+_273+"\"";
str1+="wmode=\"window\"";
str1+="AllowNetworking=\"all\"";
str1+="AllowFullScreen=\"false\"";
str1+="flashvars=\"usefullscreen=false&autostart=true&lightcolor=0x557722&type=flv&bufferlength=1&overstretch=false\"";
str1+="src=\"flvplayer.swf?file=";
str1+=url;
str1+="\"></embed> ";
str1+="</object>";
}else{
str1+="\">";
}
_27c.innerHTML=str1;
playFlash();
}
function replaceAmpEqual(url){
var _2bc=url.split("=");
url="";
for(var ii=0;ii<_2bc.length;ii++){
url+=_2bc[ii];
if(ii<_2bc.length-1){
url+="%3D";
}
}
var _2be=url.split("&");
url="";
for(var ii=0;ii<_2be.length;ii++){
url+=_2be[ii];
if(ii<_2be.length-1){
url+="%26";
}
}
return url;
}
function setUrlQt(url,type){
_27c=rndr.createMediaSpan(type,top,left,_273,_272);
rndr.createMediaCloseButton();
var _2c1="<OBJECT CLASSID=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" WIDTH=\""+_272+"\""+"HEIGHT=\""+_273+"\" CODEBASE=\"http://www.apple.com/qtactivex/qtplugin.cab\" "+"ID=\""+_27b[type]+" \" VIEWASTEXT>";
var _2c2="<PARAM name=\"AUTOPLAY\" VALUE=\"true\"> "+"<PARAM name=\"SRC\" VALUE=\""+url+"\"> "+"<PARAM name=\"CONTROLLER\" VALUE=\"true\">"+"<PARAM name=\"ENABLEJAVASCRIPT\" VALUE=\"true\">"+"<PARAM name=\"scale\" VALUE=\"tofit\">";
var _2c3="<EMBED WIDTH=\""+_272+"\" HEIGHT=\""+_273+"\" "+" NAME=playerId[type]  "+" SRC=\""+url+"\""+"AUTOPLAY=\"true\""+"CONTROLLER=\"true\""+"ENABLEJAVASCRIPT=\"true\""+"PLUGINSPAGE=\"http://www.apple.com/quicktime/download/\""+"scale=\"tofit\""+"</EMBED>";
var _2c4="</object> ";
_27c.innerHTML=_2c1+_2c2+_2c3+_2c4;
_27c.style.display="block";
return;
var str1;
_27c.style.display="block";
str1="<embed id=\"qtEmbed\" type=\"video/quicktime\" width=\""+MediaPlayer.Width+"\" height=\""+MediaPlayer.Height+"\" scale=\"tofit\" autoplay=\"true\" QTNEXT1= \"<javascript:fromFlash()> T<myself>\" src=\"";
str1+=url;
str1+="\"/>";
_27c.innerHTML=str1;
playQt();
}
function fullscreenReal(_2c6){
var _2c7=false;
if(_2c6){
if(_27d.GetPlayState()==3){
_27d.SetFullScreen();
_2c7=true;
}
}else{
_27d.SetOriginalSize();
_2c7=true;
}
return _2c7;
}
function fullscreenMS(_2c8){
var _2c9=true;
switch(type){
case MediaPlayer.RealMedia:
var _2ca=document.getElementById("mediaPlayer_Real");
if(!isMediaCenter()){
var _2cb=_2ca.GetPlayState();
if(_2c8&&(_2cb==2||_2cb==3||_2cb==4)){
_2ca.SetFullScreen();
}
if(_2c8&&!(_2cb==2||_2cb==3||_2cb==4)){
_2c9=false;
}else{
if(!_2c8&&_2ca.GetFullScreen()){
_2c9=false;
}
}
}
break;
case MediaPlayer.MicrosoftMedia:
var _2ca=document.getElementById("mediaPlayer_MS");
if(!isMediaCenter()){
if(_2c8&&_27d.playState==3){
_2ca.fullScreen="true";
}else{
if(!_2c8){
_2ca.fullScreen="false";
}else{
if(_2c8){
_2c9=false;
}
}
}
if(_2c8&&!_2ca.fullScreen){
_2c9=false;
}else{
if(!_2c8&&_2ca.fullScreen){
_2c9=false;
}
}
}
break;
case MediaPlayer.FlashMedia:
var _2ca=document.getElementById("flashObj0");
try{
}
catch(e){
}
break;
case MediaPlayer.IFrame:
var _2ca=document.getElementById("frameEmbed");
break;
case MediaPlayer.QTimeMedia:
var _2ca=document.getElementById("qtEmbed");
break;
default:
var _2ca=null;
break;
}
if(_2ca==null){
return false;
}
if(false==_2c9){
return _2c9;
}
var oGif=document.getElementById(_27c.id+"_gif");
if(_2c8&&!((type==MediaPlayer.MicrosoftMedia||type==MediaPlayer.RealMedia)&&(!isMediaCenter()))){
_27c.style.pixelTop=0;
_27c.style.pixelLeft=0;
if(type==MediaPlayer.QTimeMedia&&isTabletReveal){
_2ca.height=document.body.clientHeight-38;
_2ca.width=document.body.clientWidth;
}else{
_2ca.height=document.body.clientHeight;
_2ca.width=document.body.clientWidth;
}
if(oGif!=null){
oGif.style.top=0;
oGif.style.left=0;
if(type==MediaPlayer.QTimeMedia&&isTabletReveal){
oGif.height=document.body.clientHeight-38;
oGif.width=document.body.clientWidth;
}else{
oGif.height=document.body.clientHeight;
oGif.width=document.body.clientWidth;
}
}
adjustPlayerButtonsTable(MediaPlayer.BottomBound-10);
}else{
if(!_2c8&&isTabletReveal){
var _2cd=false;
if(document.getElementById("BackButtonSpan")!=null&&document.getElementById("BackButtonSpan").style.display!="none"){
_2cd=true;
}else{
return;
}
if(!_2cd){
document.getElementById("BackButtonSpan").style.display="block";
}
var _2ce=document.getElementById("actionSpan").parentElement.getBoundingClientRect();
var _2cf=document.getElementById("buttonsRow2").getBoundingClientRect();
var _2d0=document.getElementById("videoStatus").getBoundingClientRect();
MediaPlayer.RightBound=document.body.getBoundingClientRect().right;
MediaPlayer.BottomBound=document.body.getBoundingClientRect().bottom-30;
var _2d1=MediaPlayer.RightBound-MediaPlayer.LeftBound-2*MediaPlayer.padding;
var _2d2=(MediaPlayer.BottomBound-MediaPlayer.TopBound)-2*MediaPlayer.padding;
if(_2d2<1){
_2d2=MediaPlayer.MinHeight;
}
if(_2d1>MediaPlayer.padding){
_2ca.width=_2d1-2*MediaPlayer.padding;
}else{
_2ca.width=MediaPlayer.MinWidth;
}
if(_2ca.width>MediaPlayer.padding){
_2ca.height=(_2ca.width*3)/4;
}else{
_2ca.height=MediaPlayer.padding;
}
if(_2ca.height>_2d2){
_2ca.height=_2d2;
_2ca.width=(_2ca.height*4)/3;
}
var _2d3=(_2d2-_2ca.height)/2;
var _2d4=(_2d1-_2ca.width)/2;
if(_2d3<0){
_2d3=0;
}
if(_2d4<0){
_2d4=0;
}
_27c.style.pixelTop=_2d3+document.body.scrollTop+MediaPlayer.TopBound+MediaPlayer.padding;
_27c.style.pixelLeft=MediaPlayer.LeftBound+_2d4;
_27c.style.height="";
adjustPlayerButtonsTable(_27c.style.pixelTop+parseInt(_2ca.height,10)-5);
if(isTabletReveal){
var _2d5=document.getElementById("videoStatusSpan");
if(_2ca.height>1){
_2d5.style.pixelTop=_27c.style.pixelTop+_2ca.offsetHeight+10;
_2d5.style.pixelLeft=_27c.style.pixelLeft;
var _2d6=document.getElementById("NowPlayingLink");
if(_2d6!=null){
_2d6.style.display="inline";
_2d6.innerHTML="Now Playing ";
}
}else{
_2d5.style.top=_2d0.top+10;
_2d5.style.left=_2d0.left;
}
}
if(!_2cd){
document.getElementById("BackButtonSpan").style.display="none";
}
if(oGif!=null&&(!(type==MediaPlayer.MicrosoftMedia||type==MediaPlayer.RealMedia))){
oGif.top=_27c.style.pixelTop;
oGif.style.left=0;
oGif.height=_2ca.height;
oGif.width=_2ca.width;
}
}else{
if(!_2c8){
var _2cd=false;
var _2d7;
if(isTwoLineViewActive){
_2d7="Prev2ButtonSpan";
}else{
_2d7="Prev1ButtonSpan";
}
if(document.getElementById(_2d7).style.display!="none"){
_2cd=true;
}
_2ca.height=_273*document.getElementById("bodyDiv").style.zoom;
_2ca.width=_272*document.getElementById("bodyDiv").style.zoom;
if(!_2cd){
document.getElementById(_2d7).style.display="block";
}
_27c.style.pixelTop=document.getElementById(_2d7).getBoundingClientRect().top-_273*document.getElementById("bodyDiv").style.zoom-10;
_27c.style.pixelLeft=document.getElementById("actionTitle").getBoundingClientRect().left;
if(!_2cd){
document.getElementById(_2d7).style.display="none";
}
if(oGif!=null&&(!(type==MediaPlayer.MicrosoftMedia||type==MediaPlayer.RealMedia))){
oGif.top=_27c.style.pixelTop;
oGif.style.left=0;
oGif.height=_2ca.height;
oGif.width=_2ca.width;
}
}
}
}
oGif.style.position="absolute";
oGif=null;
_2ca=null;
return _2c9;
}
function fullscreenFlash(_2d8){
var _2d9=document.getElementById("flashObj0");
if(_2d9==null){
return false;
}
if(_2d8){
_27c.style.pixelTop=0;
_27c.style.pixelLeft=0;
_2d9.height=document.body.clientHeight;
_2d9.width=document.body.clientWidth;
}else{
_27c.style.pixelTop=top;
_27c.style.pixelLeft=left;
_2d9.height=_273;
_2d9.width=_272;
}
_2d9=null;
return true;
}
function fullscreenIFrame(_2da){
var _2db=document.getElementById("frameEmbed");
if(_2da){
_27c.style.pixelTop=0;
_27c.style.pixelLeft=0;
_2db.height=document.body.clientHeight;
_2db.width=document.body.clientWidth;
}else{
_27c.style.pixelTop=top;
_27c.style.pixelLeft=left;
_2db.height=_273;
_2db.width=_272;
}
_2db=null;
return true;
}
function fullscreenQt(_2dc){
var _2dd=document.getElementById("qtEmbed");
if(_2dd==null){
return false;
}
if(_2dc){
_27c.style.pixelTop=0;
_27c.style.pixelLeft=0;
_2dd.height=document.body.clientHeight;
_2dd.width=document.body.clientWidth;
}else{
_27c.style.pixelTop=top;
_27c.style.pixelLeft=left;
_2dd.height=_273;
_2dd.width=_272;
}
_2dd=null;
return true;
}
function dummyMedia(){
return false;
}
function adjustPlayerButtonsTable(top){
if(!isTabletReveal){
return;
}
var _2df=document.getElementById("buttonsTableSpan");
_2df.style.pixelTop=top;
_2df.style.pixelWidth=document.body.getBoundingClientRect().right-450;
}
function getPlayerStateReal(){
var _2e0=MediaPlayer.Undefined;
var _2e1=_27d.GetPlayState();
switch(_2e1){
case 0:
if(_27e){
_27e=false;
}else{
_2e0=MediaPlayer.Stopped;
}
break;
case 2:
_2e0=MediaPlayer.Buffering;
_27e=false;
break;
case 3:
_2e0=MediaPlayer.Playing;
_27e=false;
break;
case 4:
_2e0=MediaPlayer.Paused;
_27e=false;
break;
case 5:
_2e0=MediaPlayer.Seeking;
_27e=false;
break;
}
return _2e0;
}
function msCheckMediaEnd(){
return;
var _2e2=_27d.playState;
switch(_2e2){
case 3:
case 2:
case 6:
case 9:
_277.setCallback(msCheckMediaEnd,self);
_277.setIntervalAndRestart(1);
break;
default:
self.playStateChange(MediaPlayer.Stopped);
break;
}
}
function getPlayerStateMS(){
var _2e3=MediaPlayer.Undefined;
var _2e4=_27d.playState;
switch(_2e4){
case 1:
_2e3=MediaPlayer.Stopped;
case 10:
_2e3=MediaPlayer.Ready;
break;
case 2:
_2e3=MediaPlayer.Paused;
break;
case 3:
_2e3=MediaPlayer.Playing;
break;
case 4:
case 5:
break;
case 6:
break;
case 8:
_277.setCallback(msCheckMediaEnd,self);
_277.setIntervalAndRestart(1);
break;
}
return _2e3;
}
function getPlayerStateFlash(){
var _2e5=MediaPlayer.Undefined;
if(_280==true){
_2e5=MediaPlayer.Paused;
}else{
if(_280==false){
_2e5=MediaPlayer.Playing;
}
}
return _2e5;
}
function getPlayerStateIFrame(){
return MediaPlayer.Undefined;
}
function getPlayerStateQt(){
return MediaPlayer.Undefined;
}
function getPlayerStateStringReal(){
var _2e6=["Stopped","Contacting","Buffering","Playing","Paused","Seeking"];
return _2e6[_27d.GetPlayState()];
}
function getPlayerStateStringMS(){
var _2e7=["Undefined \tWindows Media Player is in an undefined state.","Stopped \tPlayback of the current media item is stopped.","Paused \tPlayback of the current media item is paused. When a media item is paused, resuming playback begins from the same location.","Playing \tThe current media item is playing.","ScanForward \tThe current media item is fast forwarding.","ScanReverse \tThe current media item is fast rewinding.","Buffering \tThe current media item is getting additional data from the server.","Waiting \tConnection is established, but the server is not sending data. Waiting for session to begin.","MediaEnded \tMedia item has completed playback.","Transitioning \tPreparing new media item.","Ready \tReady to begin playing.","Reconnecting \tReconnecting to stream."];
return _2e7[_27d.playState];
}
function getPlayerStateStringFlash(){
return "Player is in undefined state";
}
function getPlayerStateStringIFrame(){
return "Player is in undefined state";
}
function getPlayerStateStringQt(){
return "Cannot get the player state.";
}
function stateChangeCb(){
var _2e8=MediaPlayer.Undefined;
_2e8=self.getPlayerState();
valert("stateChangeCb "+_2e8);
if(MediaPlayer.Stopped!=_2e8){
valert("stateChangeCb not stopped");
_281=true;
}
}
function CheckForUnProcessedEvent(){
var _2e9=false;
if(_26f==MediaPlayer.UndefinedEvent){
return _2e9;
}
switch(_26f){
case MediaPlayer.StopEvent:
self.stop();
break;
}
_26f=MediaPlayer.UndefinedEvent;
_2e9=true;
return _2e9;
}
function createDummyMedia(){
return document.createElement("SPAN");
}
function realErrorCb(_2ea,_2eb,_2ec,_2ed,_2ee,_2ef){
_26d[MediaPlayer.pCallBack](MediaPlayer.Stopped);
}
function init(){
data={"create":[createReal,createMS,createFlash,createIFrame,createQt,createDummyMedia],"play":[playReal,playMS,playFlash,playIFrame,playQt,dummyMedia],"pause":[pauseReal,pauseMS,pauseFlash,pauseIFrame,pauseQt,dummyMedia],"stop":[stopReal,stopMS,stopFlash,stopIFrame,stopQt,dummyMedia],"setUrlName":[setUrlReal,setUrlMS,setUrlFlash,setUrlIFrame,setUrlQt,dummyMedia],"gotoFullScreen":[fullscreenReal,fullscreenMS,fullscreenFlash,fullscreenIFrame,fullscreenQt,dummyMedia],"getPlayerState":[getPlayerStateReal,getPlayerStateMS,getPlayerStateFlash,getPlayerStateIFrame,getPlayerStateQt,dummyMedia],"getPlayerStateString":[getPlayerStateStringReal,getPlayerStateStringMS,getPlayerStateStringFlash,getPlayerStateStringIFrame,getPlayerStateStringQt,dummyMedia]};
_276=false;
_27f=false;
_272=_26d[MediaPlayer.pWidth];
_273=_26d[MediaPlayer.pHeight];
top=_26d[MediaPlayer.pTop];
left=_26d[MediaPlayer.pLeft];
_277=new RevealTimer(false);
_278=new RevealTimer(false);
try{
switch(type){
case MediaPlayer.RealMedia:
case MediaPlayer.MicrosoftMedia:
case MediaPlayer.FlashMedia:
case MediaPlayer.IFrame:
case MediaPlayer.QTimeMedia:
break;
default:
type=MediaPlayer.DummyMedia;
break;
}
}
catch(e){
type=MediaPlayer.DummyMedia;
}
_27f=true;
}
this.height=function(_2f0){
_273=_2f0;
};
this.giveFocus=function(){
if(type==MediaPlayer.MicrosoftMedia){
var _2f1=document.getElementById("mediaPlayer_MS");
if(!isMediaCenter()){
var _2f2=_2f1.fullScreen;
_2f1.fullScreen=_2f2;
}
}
};
init();
}
function imageClicker(){
revealViewObj.gotoFullScreen(false);
}
function fromFlash2(){
fromFlash();
}
MediaPlayer.RealMedia=0;
MediaPlayer.MicrosoftMedia=1;
MediaPlayer.FlashMedia=2;
MediaPlayer.IFrame=3;
MediaPlayer.QTimeMedia=4;
MediaPlayer.UnknownMedia=5;
MediaPlayer.pType=0;
MediaPlayer.pWidth=1;
MediaPlayer.pHeight=2;
MediaPlayer.pTop=3;
MediaPlayer.pLeft=4;
MediaPlayer.pCallBack=5;
MediaPlayer.Undefined=-1;
MediaPlayer.Stopped=1;
MediaPlayer.Paused=2;
MediaPlayer.Playing=3;
MediaPlayer.Buffering=4;
MediaPlayer.Seeking=5;
MediaPlayer.Ready=6;
MediaPlayer.UndefinedEvent=-1;
MediaPlayer.StopEvent=1;
MediaPlayer.PauseEvent=2;
MediaPlayer.PlayEvent=3;
MediaPlayer.Width=560;
MediaPlayer.Height=420;
MediaPlayer.MinHeight=160;
MediaPlayer.MinWidth=240;
MediaPlayer.padding=5;
MediaPlayer.LeftBound=450;
MediaPlayer.RightBound=-1;
MediaPlayer.TopBound=110;
MediaPlayer.BottomBound=-1;
function ParserCB(_2f3){
var evt=_2f3;
this.RenderResultsCB=function(_2f5,_2f6){
evt.RenderResultsCB(_2f5,_2f6);
};
this.EmphasisRendererCB=function(_2f7){
return evt.EmphasisRendererCB(_2f7);
};
}
function Parser(_2f8){
var _2f9=_2f8;
var _2fa=new Object();
init_results_handlers();
this.CreateContext=function(){
return new SearchResults();
};
this.HandleResponse=function(_2fb,_2fc,_2fd,_2fe,_2ff){
var ret=0;
var _301=_2fb.current_query.data_space;
if(_2fe!=null){
_2fb.parsed_results=set_search_results(_2fb.parser_context,_2fe.getElementsByTagName("RC"),_301,_2ff);
}
if(!_2fb.parsed_results){
return 1;
}
var _302=_2fb.parsed_results;
_302.final_response=(_2fc==0)?true:false;
if(_302.arr[0].title=="No Results"){
ret=1;
_302.arr.pop();
}else{
if(_302.arr.length>1&&_302.arr[1].title=="No Results"){
ret=1;
_302.arr.splice(1,1);
}
}
_302.last_set=(_302.ondown_context==null||_302.ondown_context=="")?true:false;
_2f9.RenderResultsCB(_302,_2fb.current_query.ui_context,_2ff);
Profile(false,"cached_query");
return ret;
};
function set_search_results(_303,_304,_305){
_303.ondown_context=null;
if(!_304||_304.length<1){
return null;
}
_303.resp_type=Parser.GetElementTextNS("","RCty",_304[0],0);
var _306=_304[0].getElementsByTagName("CNs");
_306=_306[0];
if(_306==null){
return _303;
}
var _307=_306.childNodes;
for(var i=0;i<_307.length;i++){
if(_307[i].tagName=="n"||_307[i].tagName=="od"||_307[i].tagName=="SC"||_307[i].tagName=="xht"){
continue;
}
_303.arr.push(new _2fa[_305.val](_307[i],_2f9.EmphasisRendererCB(_305)));
_303.valid_results++;
}
_303.server_context=Parser.GetElementTextNS("","SC",_304[0],0);
_303.ondown_context=Parser.GetElementTextNS("","od",_304[0],0);
_303.page_title=Parser.GetElementTextNS("","xht",_304[0],0);
return _303;
}
function init_results_handlers(){
var _309=AjaxConsts.DataSpaceMap.length;
var _30a=AjaxConsts.DataSpaceMap;
for(var i=0;i<_309;i++){
_2fa[_30a[i].val]=eval(_30a[i].search_handler);
}
}
}
Parser.FillHighlightedString=function(_30c,_30d,_30e){
var _30f="";
var _310="";
if(!_30c){
return [_30f,_310];
}
for(var i=0;i<_30c.childNodes.length;i++){
var _312=_30c.childNodes[i];
var _313=_30d-_310.length;
if(_312.nodeType==1){
var _314=_312.firstChild.nodeValue.substr(0,_313);
_310+=_314;
_30f+=_30e(_314);
}else{
var _314=_312.nodeValue.substr(0,_313);
_310+=_314;
_30f+=_314;
}
}
return [_30f,_310];
};
Parser.GetElementTextNS=function(_315,_316,_317,_318){
var _319="";
if(_317){
if(_315&&(SearchInterface.Browser==SearchInterface.BTypes.IE)){
_319=_317.getElementsByTagName(_315+":"+_316)[_318];
}else{
_319=_317.getElementsByTagName(_316)[_318];
}
}
if(_319){
if(_319.childNodes.length>1){
return _319.childNodes[1].nodeValue;
}else{
if(_319.firstChild){
return _319.firstChild.nodeValue;
}else{
return "";
}
}
}else{
return "";
}
};
Parser.ReplaceWithConfigParams=function(str){
if(!str){
return str;
}
return str.replace(/%[0-9]+ /g,function(word){
var _31c=vtv_config_params[word.slice(1,-1)];
return _31c?_31c:word;
});
};
function SearchResults(){
this.arr=new Array();
this.server_context=null;
this.ondown_context=null;
this.page_title=null;
this.resp_type=null;
this.last_set=false;
this.valid_results=0;
}
function VideoSearchResult(_31d,_31e){
var _31f=Parser.FillHighlightedString(_31d.getElementsByTagName("T")[0],60,_31e);
this.title=stripHTML(_31f[0]);
this.strTitle=_31f[1];
var _320=Parser.FillHighlightedString(_31d.getElementsByTagName("EPT")[0],60,_31e);
this.epiTitle=stripHTML(_320[0]);
this.strEpiTitle=_320[1];
this.description=stripHTML(Parser.GetElementTextNS("","D",_31d,0));
this.on_select=Parser.GetElementTextNS("","os",_31d,0);
this.source=Parser.GetElementTextNS("","CST",_31d,0);
this.reference=Parser.GetElementTextNS("","RF",_31d,0);
this.image=this.imageURL=Parser.GetElementTextNS("","CMI",_31d,0);
this.resolveStatus=2;
this.gid=Parser.GetElementTextNS("","G",_31d,0);
this.homeUrl=Parser.GetElementTextNS("","SLK",_31d,0);
if(this.title==null||this.title==""){
this.title=this.epiTitle;
this.epiTitle="";
}
if(this.homeUrl.length==0){
if(this.reference.indexOf("http://")==0){
this.homeUrl=this.reference.slice(0,this.reference.indexOf("/",7));
}else{
this.homeUrl="http://www."+this.source.replace(" ","")+".com";
}
}
if(this.on_select.length==0){
this.on_select=this.gid;
}
this.image=null;
this.time=null;
this.runtime=null;
this.overlay_image="";
this.resolveStatus=0;
this.videoStatus=null;
this.videoURL=null;
this.videoType=null;
this.videoTime=0;
this.audioURL=null;
this.videoRetryCnt=0;
this.image=this.imageURL;
var tm=Parser.GetElementTextNS("","TM",_31d,0);
if(tm){
this.time=new vtvDate(tm);
this.runtime=new vtvTime(tm);
}else{
this.time=new vtvDate(" : : : : : : : :");
this.runtime=new vtvTime(" : : : : : : : :");
}
this.rel_more_info=AjaxConsts["MoreInfoURL"]+getActionItemOs(_31d,"RM");
this.more_info=AjaxConsts["MoreInfoURL"]+getActionItemOs(_31d,"MORE-INFO");
this.relatedOs=getActionItemOs(_31d,"RELATED");
if(this.relatedOs.length==0){
this.relatedOs=new String("vp:rc:0~"+this.gid+"~");
}
this.sourceOs=getActionItemOs(_31d,"SBR");
if(this.sourceOs.length==0){
this.sourceOs=null;
}
this.shareOs=getActionItemOs(_31d,"SHARE");
if(this.shareOs.length==0){
this.shareOs=new String("sl:0~"+this.gid);
}
this.rating=Parser.GetElementTextNS("","rt",_31d,0);
this.views=Parser.GetElementTextNS("","views",_31d,0);
this.user_name=Parser.GetElementTextNS("","un",_31d,0);
this.bFolded=false;
if(_31d.tagName=="CF"){
this.bFolded=true;
}
}
function getActionItemOs(_322,type){
var _324=_322.getElementsByTagName("AI");
var leng=_324.length;
for(var i=0;i<leng;i++){
var elem=_324[i];
var _328=elem.getElementsByTagName("ty");
if(_328&&_328.length>=1&&_328[0].childNodes[0].nodeValue==type){
var _329=elem.getElementsByTagName("os");
return _329&&_329.length>0?Parser.ReplaceWithConfigParams(_329[0].childNodes[0].nodeValue):"";
}
}
return "";
}
function vtvDate(_32a){
this.hrs=0;
this.mins=0;
if(!_32a){
return;
}
var _32b=_32a.split(":");
this.year=_32b[0];
this.date=_32b[1];
this.month=_32b[2];
this.hrs=_32b[3];
this.mins=_32b[4];
}
function vtvTime(_32c){
if(!_32c){
return;
}
var _32d=_32c.split(":");
if(_32d.length>5){
if(!parseInt(_32d[5])){
this.total_secs=null;
return;
}
this.total_secs=_32d[5];
this.duration=this.total_secs%60;
this.minutes=(this.total_secs-this.duration)/60;
}
}
function WikiSearchResult(_32e,_32f){
var _330=Parser.FillHighlightedString(_32e.getElementsByTagName("T")[0],60,_32f);
this.title=_330[0];
this.strTitle=_330[1];
var _331=Parser.FillHighlightedString(_32e.getElementsByTagName("EPT")[0],0,_32f);
this.epiTitle=_331[0];
this.strEpiTitle=_331[1];
this.description=Parser.GetElementTextNS("","D",_32e,0);
this.isTableDesc=this.description.search("<table ")==-1?false:true;
this.on_select=Parser.ReplaceWithConfigParams(Parser.GetElementTextNS("","os",_32e,0));
var _332=Parser.GetElementTextNS("","CMI",_32e,0);
var gid=Parser.GetElementTextNS("","G",_32e,0);
this.image=_332;
this.wiki_cached=getActionItemOs(_32e,"WIKIC");
this.wiki_related=getActionItemOs(_32e,"WIKIREL");
this.shareOs=getActionItemOs(_32e,"SHARE");
this.bFolded=false;
if(_32e.tagName=="CF"){
this.bFolded=true;
}
}
var revealTimer=new Array();
function RevealTimer(_334){
var _335=null;
var _336=null;
var _337=0;
var id=null;
var _339=revealTimer.length;
revealTimer.push(this);
this.timeout=function(){
try{
_335(_336);
}
catch(e){
}
};
this.setInterval=function(_33a){
_337=_33a*1000;
};
this.setIntervalAndRestart=function(_33b){
this.stop();
_337=_33b*1000;
this.start();
};
this.start=function(){
var _33c;
if(_334&&_334==true){
_33c=setInterval;
}else{
_33c=setTimeout;
}
id=_33c("revealTimer["+_339+"].timeout()",_337);
};
this.stop=function(){
var _33d;
if(_334&&_334==true){
_33d=clearInterval;
}else{
_33d=clearTimeout;
}
if(id){
_33d(id);
}
};
this.stopAndCallback=function(){
this.stop();
this.timeout();
};
this.setCallback=function(_33e,_33f){
_335=_33e;
_336=_33f;
};
}
function SimpleAsyncInterface(cbp,_341){
var _342=cbp;
var _343=new SearchInterface(this,new NonSearchProtocolHandler(),_341,0,true);
var _344=null;
this.SendRequest=function(url,_346,_347){
_344=_343.NSQuery(url,_346,_347);
return _344;
};
this.HandleResponse=function(_348,_349,_34a,_34b,_34c){
_342(_34c.status,_34a,_34b,_348.current_query.ui_context);
};
this.CreateContext=function(){
return null;
};
this.abortRequest=function(_34d){
try{
if(_34d){
_34d.http.abort();
}else{
if(_344){
_344.http.onreadystatechange=function(){
};
_344.http.abort();
_344=null;
}
}
}
catch(e){
}
};
}
function NonSearchProtocolHandler(){
this.ConstructURL=function(_34e){
return _34e.search_string;
};
this.PrepForDispatch=function(_34f,_350){
var _351=_34f.http;
var url=_34f.current_query.constructed_url;
var _353=_34f.current_query.data_space;
var _354=(_353.req_type?_353.req_type:"GET");
var _355=(_353.user_agent?_353.user_agent:"iphone");
var _356=(_353.req_header?_353.req_header:"text/xml");
_351.open(_354,url,true);
_351.setRequestHeader("User-Agent",_355);
_351.setRequestHeader("Accept",_356);
_351.setRequestHeader("Pragma","no-cache");
_351.setRequestHeader("Cache-Control","no-cache");
_351.setRequestHeader("X-User-Name",getUserName(document));
};
}
function ProtocolHandler(){
this.ConstructURL=function(_357){
var _358=_357.server_context;
var _359=_357.on_select;
var _35a=_357.is_vtap_mode;
var _35b=escape(_357.search_string);
if(_35b=="null"){
_35b="";
}
var _35c=get_common_req(_35b,_35a);
if(_359){
_35c+="&os="+_359;
}
if(_358){
_35c+="&sc="+_358;
}
return _35c;
};
this.PrepForDispatch=function(_35d,_35e){
var url=_35d.current_query.constructed_url;
var _360=_35d.current_query.data_space;
var _361=_35d.queryid;
var _362=_35d.http;
var _363=_360.proxy_pass+"?XUA="+_360.user_agent+"&DS="+_360.val+"&CC="+_361+"&PN=16"+"&RPR="+_35e+"&"+(url?url:"");
_362.open("GET",_363,true);
_362.setRequestHeader("User-Agent",_360.user_agent);
_362.setRequestHeader("Accept","text/xml");
_362.setRequestHeader("Pragma","no-cache");
_362.setRequestHeader("Cache-Control","no-cache");
_362.setRequestHeader("X-User-Name",getUserName(document));
};
function get_common_req(word,_365){
var url="Word="+(word?word:"");
if(_365){
url+="&VTapMode=1";
}
return url;
}
}
function NWErrorObj(_367,_368){
this.status=_367;
this.status_string=_368;
}
function SearchInterface(_369,_36a,_36b,_36c,_36d){
var _36e=new Array();
var _36f=0;
var _370=0;
var _371=_369?_369:new Parser();
var _372=_36a?_36a:(new ProtocolHandler());
var _373=new Object();
var _374=new RequestState(_36b,null,null,null,null,null,false);
var _375=new RequestState(_36b,"",null,null,null,null,false);
var _376=_36b;
var _377=0;
var _378=0;
set_browser();
this.SetBrowser=function(val){
SearchInterface.Browser=val;
};
this.GetBrowser=function(){
return SearchInterface.Browser;
};
this.FireHomeQuery=function(_37a,_37b,_37c){
prepare_current_request(0,null,null,null,(_37a==undefined?null:_37a));
reset_stack();
_374.constructed_url=_372.ConstructURL(_374);
push_context();
if(_37c){
remove_cache_results(_374);
}
if(_37b){
search_request();
}
print_stack("home");
};
this.FireSearchQuery=function(_37d,_37e,_37f){
var _380=(_37e!=null?_37e.server_context:null);
prepare_current_request(0,_380,_37d,null,(_37f==undefined?null:_37f));
_374.constructed_url=_372.ConstructURL(_374);
set_stack_top_value("search_string",_37d);
set_stack_top_value("constructed_url",_374.constructed_url);
search_request();
print_stack("search");
};
this.FireBrowseQuery=function(_381,_382,_383,_384){
var _385=(_382!=null?_382.server_context:null);
prepare_current_request(0,_385,"",_381,_383);
_374.constructed_url=_372.ConstructURL(_374);
print_stack("browse 1");
if(_384!=false){
push_context();
}
search_request();
print_stack("browse 2");
};
this.FireBackQuery=function(_386){
print_stack("back 1");
pop_context(_386);
print_stack("back 2");
search_request();
return get_stack_top_value("ui_context");
};
this.FireUrlQuery=function(url,_388,_389){
var _38a=(_388!=null?_388.server_context:null);
prepare_current_request(0,_38a,get_search_word(),url,_389);
_374.results=_388;
_374.constructed_url=_372.ConstructURL(_374);
search_request();
};
this.FireRangeQuery=function(_38b,_38c,_38d){
var _38e=(_38c!=null?_38c.ondown_context:null);
if(_38e==""){
return;
}
this.FireUrlQuery(_38e,_38c,_38d);
};
this.NSQuery=function(url,_390,_391){
prepare_current_request(1,null,url,null,_390);
_374.constructed_url=_372.ConstructURL(_374);
return search_request1(_391);
};
this.SetDataspace=function(_392){
var ds=_376;
_375.data_space=_392;
_376=_392;
return ds;
};
this.GetCurrentSearchString=function(){
var _394=_36e.length;
_394-=(_394>0)?1:0;
return (_36e[_394]!=null?_36e[_394].search_string:"");
};
this.getStackSize=function(){
return _36e.length;
};
this.SetVTAPMode=function(val){
_374.is_vtap_mode=val;
_375.is_vtap_mode=val;
};
this.Cleanup=function(){
_373=null;
_373=new Object();
};
this.GetContextStack=function(){
var jj=0;
var _397=new Array();
for(jj=1;jj<_36e.length;jj++){
if(_36e[jj]["ui_context"].re){
_397.push(_36e[jj]["ui_context"].re.strTitle);
}
}
return _397;
};
function abortLastRequest(_398){
try{
valert("Aborting last search request.");
_398.http.onreadystatechange=function(){
};
_398.http.abort();
_398=null;
}
catch(e){
}
}
function dispatch_response(_399){
var func=function clo_func(){
_371.HandleResponse(_399,0,null,null,null);
};
setTimeout(func,1);
}
function check_dispatch_query(_39b,_39c){
var key=make_key_from_request(_39c);
var _39e=_373[key];
_36f++;
if(_39e&&(((new Date()).getTime())-_39e.time>30000)){
remove_cache_results(_39c);
_39e=null;
}
if(_39e){
Profile(true,"cached_query");
_39e.current_query.ui_context=_39c.ui_context;
dispatch_response(_39e);
_370=_36f;
_377=0;
print_stack("Response path: cached query gapping response");
}else{
if(_377==0){
_378=request_dispatch(_39b);
}
}
}
function search_request1(_39f){
set_in_prep(false);
return request_dispatch(_39f);
}
function search_request(){
set_in_prep(false);
check_dispatch_query(null,_374);
}
function request_dispatch(_3a0){
var _3a1=construct_xmlhttp();
if(_3a1){
Profile(true,"search_query");
var _3a2=new Object();
_3a2.http=_3a1;
_3a2.current_query=clone_request(_374);
_3a2.queryid=_36f;
_3a2.parser_context=((_374.results)?_374.results:_371.CreateContext());
_3a2.parsed_results=null;
_3a1.onreadystatechange=function searchResponse(){
search_response(_3a2);
};
_372.PrepForDispatch(_3a2,_36c);
_377=_3a2.queryid;
_3a1.send(_3a0);
return _3a2;
}
return null;
}
function search_response(_3a3){
var _3a4=_3a3.http;
try{
switch(_3a4.readyState){
case 4:
if(_3a3.current_query.query_type==1){
_377=0;
Profile(false,"search_query");
_371.HandleResponse(_3a3,false,_3a4.responseText,_3a4.responseXML,new NWErrorObj(_3a4.status,_3a4.statusText));
return;
}
if(_3a4.status==200){
Profile(false,"search_query");
if(_3a3.queryid>_370){
_370=_3a3.queryid;
}
if(_370<_36f){
request_dispatch(null);
}else{
_377=0;
}
if(_370==_3a3.queryid){
if(_371.HandleResponse(_3a3,_377,_3a4.responseText,_3a4.responseXML,null)==false){
cache_results(_3a3);
}
}
if(_3a3.parsed_results){
_3a3.parser_context=null;
_3a3.http=null;
}
print_stack("Response path: cached respxmlreqonse");
}else{
valert("Failure to retrieve data:"+_3a4.statusText);
_371.HandleResponse(_3a3,false,null,null,new NWErrorObj(_3a4.status,_3a4.statusText));
}
break;
default:
break;
}
}
catch(e){
_377=false;
try{
_371.HandleResponse(_3a3,false,null,null,new NWErrorObj(_3a4.status,_3a4.statusText));
}
catch(e){
_377=false;
_371.HandleResponse(_3a3,false,null,null,new NWErrorObj(-1,"Connection failure: Network exception"));
}
}
}
function cache_results(_3a5){
var _3a6=_3a5.http;
var _3a7=make_key_from_request(_3a5.current_query);
_3a5.time=(new Date()).getTime();
_373[_3a7]=_3a5;
}
function remove_cache_results(_3a8){
var _3a9=make_key_from_request(_3a8);
_373[_3a9]=null;
}
function construct_xmlhttp(){
var _3aa=null;
if(window.XMLHttpRequest){
_3aa=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
try{
_3aa=new ActiveXObject("MSXML2.XMLHTTP.5.0");
}
catch(e){
try{
_3aa=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(E){
}
}
}
}
return _3aa;
}
function RequestState(_3ab,_3ac,_3ad,_3ae,url,_3b0,_3b1){
this.data_space=_3ab;
this.server_context=_3ac;
this.search_string=_3ad;
this.on_select=_3ae;
this.ui_context=_3b0;
this.constructed_url=url;
this.is_vtap_mode=_3b1;
this.in_prep=true;
this.query_type=0;
}
function prepare_current_request(_3b2,_3b3,_3b4,_3b5,_3b6){
_374.server_context=_3b3;
_374.search_string=_3b4;
_374.on_select=_3b5;
_374.ui_context=_3b6;
_374.constructed_url=null;
_374.in_prep=true;
_374.query_type=_3b2;
_374.data_space=_376;
_374.results=null;
}
function copy_request_contents(_3b7,obj){
obj.data_space=_3b7.data_space;
obj.server_context=_3b7.server_context;
obj.search_string=_3b7.search_string;
obj.on_select=_3b7.on_select;
obj.constructed_url=_3b7.constructed_url;
obj.ui_context=_3b7.ui_context;
obj.is_vtap_mode=_3b7.is_vtap_mode;
obj.in_prep=_3b7.in_prep;
obj.query_type=_3b7.query_type;
obj.results=_3b7.results;
return obj;
}
function clone_request(_3b9){
var obj=new RequestState();
copy_request_contents(_3b9,obj);
obj.in_prep=true;
return obj;
}
function set_in_prep(val){
_374.in_prep=val;
}
function make_key_from_request(_3bc){
var key=(((_3bc.data_space!=null)&&_3bc.data_space.val?_3bc.data_space.val:"")+(_3bc.server_context?_3bc.server_context:"")+(_3bc.search_string?_3bc.search_string:"")+(_3bc.on_select?_3bc.on_select:"")+(_3bc.is_vtap_mode?_3bc.is_vtap_mode:"")+(_3bc.constructed_url?_3bc.constructed_url:""));
return key;
}
function push_context(){
_36e.push(clone_request(_374));
}
function reset_stack(){
_36e.length=0;
}
function pop_context(_3be){
for(var ii=0;ii<_3be;ii++){
_36e.pop();
}
var _3c0=_36e.length;
if(_3c0){
_374=clone_request(_36e[_3c0-1]);
}else{
_374=new RequestState(_36b,"",null,null,null,null,false);
push_context();
}
_374.constructed_url=_372.ConstructURL(_374);
}
function get_search_word(){
var val=get_stack_top_value("search_string");
return (val&&val.length>0)?val:null;
}
function get_stack_top_value(_3c2){
var _3c3=_36e.length;
var _3c4=null;
if(_3c3){
_3c4=_36e[_3c3-1][_3c2];
}else{
valert("**Stack top Value for "+_3c2+": IS NULL");
}
return _3c4;
}
function set_stack_top_value(_3c5,_3c6){
var _3c7=_36e.length;
if(_3c7){
_36e[_3c7-1][_3c5]=_3c6;
}else{
}
}
function print_stack(str){
return;
var len=_36e.length;
valert("***********************                                    :"+str+": Stack  Begin*****************");
for(var i=0;i<len;i++){
valert("current search string = "+_36e[i].constructed_url+" results length "+length);
}
valert("***********************                                    Stack End *****************");
}
function set_browser(){
if(navigator.userAgent.indexOf("MSIE")>=0){
SearchInterface.Browser=SearchInterface.BTypes.IE;
}
if(navigator.userAgent.indexOf("Firefox")>=0){
SearchInterface.Browser=SearchInterface.BTypes.FireFox;
}
if(navigator.userAgent.indexOf("Safari")>=0){
SearchInterface.Browser=SearchInterface.BTypes.Safari;
}
if(navigator.userAgent.indexOf("Opera")>=0){
SearchInterface.Browser=SearchInterface.BTypes.Opera;
}
}
}
function valert(str){
try{
if(SearchInterface.BTypes.FireFox==SearchInterface.Browser){
console.log(str);
}
}
catch(e){
}
}
SearchInterface.BTypes={"IE":1,"FireFox":2,"Safari":3,"Opera":4};
SearchInterface.Browser=0;
function Profile(_3cc,str){
if(SearchInterface.BTypes.FireFox==SearchInterface.Browser){
}
}
function getCookie(_3ce,_3cf){
if(_3ce.cookie.length>0){
var _3d0=_3ce.cookie.indexOf(_3cf+"=");
var _3d1;
if(_3d0!=-1){
_3d0=_3d0+_3cf.length+1;
_3d1=_3ce.cookie.indexOf(";",_3d0);
if(_3d1==-1){
_3d1=_3ce.cookie.length;
}
return unescape(_3ce.cookie.substring(_3d0,_3d1));
}
}
return "";
}
function setCookie(_3d2,_3d3,_3d4,_3d5){
var _3d6=new Date();
_3d6.setDate(_3d6.getDate()+_3d5);
var _3d7=_3d3+"="+escape(_3d4)+((_3d5==null)?"":";expires="+_3d6.toGMTString());
valert("setCookie:"+_3d7);
_3d2.cookie=_3d7;
}
function getUserName(_3d8){
var _3d9=getCookie(_3d8,"Apache");
if(_3d9==null||_3d9==""){
_3d9=getCookie(_3d8,"vTap");
}
return _3d9;
}
function PlatformInfo(){
var _3da=window.navigator.userAgent;
if(_3da.match("iPhone")){
this.is_iphone=1;
this.platform="iphone";
var _3db=AjaxConsts.iphone_versions.length;
for(var i=0;i<_3db;i++){
if(_3da.match(AjaxConsts.iphone_versions[i].ver)!=null){
this.version=i;
break;
}
}
}else{
this.is_iphone=0;
this.platform="pc";
this.version=0;
}
}
function loaded_module(m,f){
eval("self.loaded_module_"+m+"='true';");
eval(f);
}
function load_module(m,f){
var md=eval("self.loaded_module_"+m);
if(md!=null){
eval(f);
return;
}
if(document.createElement&&document.childNodes){
var _3e2=document.createElement("script");
_3e2.setAttribute("src",m+".js");
_3e2.setAttribute("type","text/javascript");
str="loaded_module('"+m+"','"+f+"')";
_3e2.setAttribute("onload",str);
document.getElementsByTagName("head")[0].appendChild(_3e2);
}
}
var minWidgetWidth=300;
var SEARCHICONWIDTH=16;
var SEARCHBOXWIDTHPERCENTAGE=94;
var IMAGEASPECTRATIO=0.75;
var IMAGEDIVWIDTH=100;
var SCROLLBARWIDTH=16;
var logoWidth=0;
IS_PLAYER_IN_INDEPENDENT_PANEL=true;
function LayoutManager(_3e3){
var _3e4=0;
var _3e5=0;
var _3e6=_3e3;
var _3e7=0;
var _3e8=0;
IS_PLAYER_IN_INDEPENDENT_PANEL=true;
this.setDimensions=function(){
var _3e9=getBrowser();
_3e5=getWindowWidth();
_3e4=getWindowHeight();
if(logoWidth==0){
logoWidth=document.getElementById("logo").offsetWidth;
}
var _3ea=0;
var _3eb=0;
var _3ec=document.getElementById("toolbar").offsetHeight;
var _3ed=document.getElementById("resultsWindow");
var _3ee=document.getElementById("playerWindow");
_3ea=40;
_3eb=100;
if(_3e5*_3ea<100*minWidgetWidth){
_3ea=Math.ceil(minWidgetWidth*100/_3e5);
}else{
_3ea=40;
}
document.body.style.width=_3e5+"px";
document.body.style.height=_3e4+"px";
_3e8=_3e5*_3ea/100;
_3e7=_3e4*_3eb/100;
_3ee.style.left=_3ea+"%";
_3ee.style.width=(100-_3ea)+"%";
_3ed.style.width=_3ea+"%";
if(ProtoUIStates.header){
if(ProtoUIStates.searchContainer){
var _3ef=ProtoUIStates.searchTextBox.style.paddingLeft;
if(!_3ef||_3ef.length<1){
_3ef=(SEARCHICONWIDTH+4)+"px";
}
this.setSearchBoxPosition(_3ef);
}
ProtoUIStates.resultsContainer.style.height=_3e7-ProtoUIStates.header.offsetHeight-_3ec+"px";
ProtoUIStates.resultsContainer.style.width=_3e8+"px";
}else{
ProtoUIStates.resultsContainer.style.height=_3e7-_3ec+"px";
ProtoUIStates.resultsContainer.style.width=_3e8+"px";
}
if(_3e9=="Internet Explorer"){
var _3f0=document.getElementById("excludeScrollBarDiv");
_3f0.style.width=(_3e8-16)+"px";
}
};
this.getResultWindowWidth=function(){
return _3e8;
};
this.getShelfTextWidth=function(){
return _3e8-SCROLLBARWIDTH-IMAGEDIVWIDTH;
};
this.getShelfImageWidth=function(){
return IMAGEDIVWIDTH;
};
this.getShelfImageHeight=function(){
return IMAGEDIVWIDTH*IMAGEASPECTRATIO;
};
this.getPlayerDimension=function(){
var _3f1=0;
var _3f2=0;
var _3f3=document.getElementById("playerWindow");
var _3f4=_3f3.offsetHeight;
var _3f5=_3f3.offsetWidth;
var _3f6=_3f5/mediaPlayerWidthByHeightRatio;
var _3f7=_3f4*mediaPlayerWidthByHeightRatio;
if(_3f6>_3f4){
_3f6=_3f4;
_3f7=_3f6*mediaPlayerWidthByHeightRatio;
}else{
if(_3f7>_3f5){
_3f7=_3f5;
_3f6=_3f7/mediaPlayerWidthByHeightRatio;
}else{
_3f7=_3f5;
_3f6=_3f4;
}
}
var _3f8=new Array();
_3f8[0]=0;
_3f8[1]=0;
_3f8[2]="98%";
_3f8[3]=_3f6;
return _3f8;
};
this.setResultsContainerDimensions=function(){
var _3f9=document.getElementById("toolbar").offsetHeight;
if(ProtoUIStates.header&&ProtoUIStates.header.style.display=="block"){
ProtoUIStates.resultsContainer.style.height=_3e4-ProtoUIStates.header.offsetHeight-_3f9+"px";
ProtoUIStates.resultsContainer.style.width=_3e8+"px";
}else{
ProtoUIStates.resultsContainer.style.height=_3e4-_3f9+"px";
ProtoUIStates.resultsContainer.style.width=_3e8+"px";
}
};
this.getSearchBoxWidth=function(){
var _3fa=_3e8-logoWidth;
return parseInt(_3e8*SEARCHBOXWIDTHPERCENTAGE/100);
};
this.setSearchBoxPosition=function(_3fb){
var _3fc=_3e8-logoWidth;
var _3fd=_3fc*SEARCHBOXWIDTHPERCENTAGE/100;
var _3fe=_3fb.indexOf("px");
if(_3fe!=-1){
_3fb=_3fb.substr(0,_3fe);
}
var _3ff=parseInt(_3fb);
ProtoUIStates.searchTextBox.style.paddingLeft=_3ff+"px";
ProtoUIStates.searchTextBox.style.width=_3fd-_3ff+"px";
ProtoUIStates.searchContainer.style.left=(logoWidth+_3fc*(100-SEARCHBOXWIDTHPERCENTAGE)/200)+"px";
};
}

