var AXIS_X=0;
var AXIS_Y=1;
function getNode(_1){
return document.getElementById(_1);
}
function killNode(_2){
var _3=getNode(_2);
var _4=_3.parentElement;
if(typeof _4!="undefined"){
_4.removeChild(_3);
}else{
_3.style.display="none";
}
}
function swapTextNode(_5,_6){
_5.replaceChild(document.createTextNode(_6),_5.firstChild);
}
function replaceInnerText(_7,_8){
if(typeof _7.childNodes!="undefined"&&_7.childNodes.length>0){
var _9=document.createTextNode(_8);
_7.replaceChild(_9,_7.firstChild);
}else{
_7.innerHTML=_8;
}
}
function grabComputedStyle(_10,_11){
if(document.defaultView&&document.defaultView.getComputedStyle){
return document.defaultView.getComputedStyle(_10,null).getPropertyValue(_11);
}else{
if(_10.currentStyle){
return _10.currentStyle[_11];
}else{
return null;
}
}
}
function grabComputedHeight(_12){
var _13=grabComputedStyle(_12,"height");
if(_13!=null){
if(_13=="auto"){
if(_12.offsetHeight){
_13=_12.offsetHeight;
}
}
_13=parseInt(_13);
}
return _13;
}
function grabComputedWidth(_14){
var _15=grabComputedStyle(_14,"width");
if(_15!=null){
if(_15.indexOf("px")!=-1){
_15=_15.substring(0,_15.indexOf("px"));
}
if(_15=="auto"){
if(_14.offsetWidth){
_15=_14.offsetWidth;
}
}
}
return _15;
}
function getEventTarget(evt){
var tgt=evt.srcElement;
if(!tgt){
tgt=evt.target;
}
return tgt;
}
function getWindowHeight(){
var _18=0;
if(typeof (window.innerWidth)=="number"){
_18=window.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_18=document.documentElement.clientHeight;
}else{
if(document.body&&document.body.clientHeight){
_18=document.body.clientHeight;
}
}
}
return _18;
}
function getWindowDimensions(){
var x,y;
if(self.innerHeight){
x=self.innerWidth;
y=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
x=document.documentElement.clientWidth;
y=document.documentElement.clientHeight;
}else{
if(document.body){
x=document.body.clientWidth;
y=document.body.clientHeight;
}
}
}
return {width:x,height:y};
}
function clearRanges(_20){
if(UserAgent.matches.iemac){
}else{
if(UserAgent.matches.khtml){
_20.stopPropagation();
}else{
if(document.selection){
document.selection.empty();
}else{
if(window.getSelection()){
window.getSelection().removeAllRanges();
}else{
_20.stopPropagation();
}
}
}
}
}
function getDocumentScrollAmount(){
if(!UserAgent.matches.khtml){
return document.body.scrollTop;
}else{
return 0;
}
}
function getElementOffsetY(_21){
var _22=0;
if(_21.offsetTop!=null){
_22+=_21.offsetTop;
while(_21.offsetParent){
_22+=_21.offsetParent.offsetTop;
_21=_21.offsetParent;
}
}
return _22;
}
function getElementMouseCoordinate(_23,_24){
var _25=-1;
if(!_23){
var _23=window.event;
}
if(_23.offsetX){
_25=_23.offsetX;
}else{
if(_23.layerX){
var _26=getElementOffsetX(_24);
_25=_23.layerX-_26;
}
}
return _25;
}
function getElementOffsetX(_27){
return handleElementOffsetX(_27,true);
}
function getPageElementOffsetX(_28){
return handleElementOffsetX(_28,false);
}
function handleElementOffsetX(_29,_30){
var _31=0;
if(_29.offsetLeft!=null){
_31+=_29.offsetLeft;
var _32=0;
while(_29.offsetParent){
if(_30&&(grabComputedStyle(_29.offsetParent,"position")!="static"||grabComputedStyle(_29.offsetParent,"position")=="absolute")){
return _31;
}else{
_31+=_29.offsetParent.offsetLeft;
_29=_29.offsetParent;
}
}
}
return _31;
}
function getNodeTop(_33){
var _34=document.getElementById(_33);
var _35=_34.style.top?(_34.offsetTop-stripUnits(_34.style.top)):_34.offsetTop;
return _35;
}
function moveNode(_36,_37){
if(typeof _36=="string"){
_36=getNode(_36);
}
if(_36.style.top){
_36.style.top=stripUnits(_36.style.top)+_37+"px";
}else{
_36.style.top=(_37)+"px";
}
}
function displayObject(obj,_39){
var msg="";
var _41=false;
for(var _42 in obj){
if(!(_39&&_42.value==undefined)){
msg+=_42;
msg+=": ";
msg+=_42.value;
msg+="\n";
_41=true;
}
}
if(!_41){
msg+="No defined properties in this object.";
}
window.alert(msg);
}
function tokenizeString(_43,_44){
var _45=new Array();
var _46=0;
if(_43){
while(_43.indexOf(_44)!=-1){
var end=_43.indexOf(_44);
var _48=end+_44.length;
_45[_46]=_43.substring(0,end);
_43=_43.substring(_48);
_46++;
}
_45[_46]=_43;
}
return _45;
}
function getElementHeightMidpoint(_49,_50){
var _51=grabComputedHeight(_49);
if(_51==null){
return null;
}else{
var _52=""+_51;
if(_52.indexOf("px")!=-1){
_51=_52.substring(0,_51.indexOf("px"));
}
}
return _51/2;
}
function createNFTextNode(_53){
var _54=tokenizeString(_53,"%%~p;");
var _55=document.createElement("SPAN");
for(var ii=0;ii<_54.length;ii++){
_55.appendChild(document.createTextNode(_54[ii]));
if(ii+1<_54.length){
_55.appendChild(document.createElement("P"));
}
}
return _55;
}
function getMouseCoordinates(e){
var _58=0;
var _59=0;
if(!e){
var e=window.event;
}
if(e.pageX||e.pageY){
_58=e.pageX;
_59=e.pageY;
}else{
if(e.clientX||e.clientY){
_58=e.clientX+document.body.scrollLeft;
_59=e.clientY+document.body.scrollTop;
}
}
return {x:_58,y:_59};
}
if(!Array.prototype.push){
Array.prototype.push=function(_60){
this[this.length]=_60;
};
}
Array.prototype.append=function(_61){
this.push(_61);
};
String.prototype.trim=function(){
return this.replace(/^\s+|\s+$/g,"");
};
var Link={imgURL:function(_62){
var sb=new Array();
sb.append(IMAGE_ROOT);
sb.append(_62);
return sb.join("");
},pageURL:function(_64){
var sb=new Array();
var _65=false;
sb.append(PAGE_ROOT);
sb.append(_64);
return sb.join("");
}};
function removeChildNodes(_66){
while(_66.hasChildNodes()){
_66.removeChild(_66.firstChild);
}
}
var ServerConnectionFactory={init:false,getConnection:function(){
return new ServerConnection();
},isSupported:function(){
if(!this.init){
var s=new ServerConnection();
this._supported=s.hasTransport;
s=null;
this.init=true;
}
return this._supported;
}};
function ServerConnection(){
this.hasTransport=false;
this.method=ServerConnection.METHOD_GET;
if(!this.returnType){
this.returnType=ServerConnection.RETURN_XML;
}
this.setTransport();
}
ServerConnection.METHOD_GET="GET";
ServerConnection.METHOD_POST="POST";
ServerConnection.RETURN_XML="XML";
ServerConnection.RETURN_TEXT="TEXT";
ServerConnection.prototype={getNewAXO:function(_68){
return eval("(ne"+"w Ac"+"tiveXObj"+"ect('"+_68+"'))");
},parameters:{},transportStates:["Uninitialized","Loading","Loaded","Interactive","Complete"],setTransport:function(){
this.transport=false;
var _69=this;
tryTransports=[];
tryTransports.push(function(){
return _69.getNewAXO("Msxml2.XMLHTTP");
});
tryTransports.push(function(){
return _69.getNewAXO("Microsoft.XMLHTTP");
});
tryTransports.push(function(){
return new XMLHttpRequest();
});
for(var i=0;i<tryTransports.length;i++){
try{
this.transport=tryTransports[i]();
this.hasTransport=true;
break;
}
catch(e){
}
}
},bindStateChangeHandler:function(){
oThis=this;
this.transport.onreadystatechange=function(){
oThis.handleReadyStateChange();
};
},handleReadyStateChange:function(){
if(this.transportStates[this.transport.readyState]=="Complete"){
if(this.transport.status=="200"){
this.successCallback(
this.returnType==ServerConnection.RETURN_XML?this.transport.responseXML:this.transport.responseText);
}else{
this.failureCallback(this.transport.status,this.url);
}
}
},fixMozillaContentLength:function(){
if(this.transport&&this.transport.overrideMimeType){
this.transport.setRequestHeader("Connection","close");
}
},execute:function(){
if(this.transport){
var _71=null;
if(this.method==ServerConnection.METHOD_GET){
this.url=this.url.setUrlQueryString(this.parameters);
}
this.transport.open(this.method,this.url,true);
//alert(this.url);
this.bindStateChangeHandler();
if(this.method==ServerConnection.METHOD_POST){
_71="".setUrlQueryString(this.parameters);
this.transport.setRequestHeader("Content-type","application/x-www-form-urlencoded");
this.fixMozillaContentLength();
}
this.transport.send(_71);
}
},setParameters:function(_72){
this.parameters=_72;
},successCallback:function(){
},failureCallback:function(_73,url){
}};
function Movie(){
}
Movie.prototype={id:false,parentID:false,title:false,synopsis:false,rating:false,year:false,genreID:false,genre:false,CMURate:false,CMPred:false,CMWgtR:false,starring:[],director:false,friendRated:false,recommended:false,personalMovieData:false,hasBonusDisc:false,importFrom:function(_75){
var _76=/&#38;/g;
for(field in this){
_75[field]&&(this[field]=_75[field]());
if(typeof this[field]=="string"){
this[field]=this[field].replace(_76,"&");
}
if(this[field]=="false"){
this[field]=false;
}
}
}};
function Person(_77,id){
this.name=_77;
this.id=id;
}
function PersonalMovieData(){
}
PersonalMovieData.prototype={friendReviews:[],ratedPredictors:[],hasFriendReviews:function(_79){
return this.friendReviewCount(_79)>0;
},friendReviewCount:function(_80){
return this.friendReviews.length;
},hasRatedPredictors:function(){
return this.ratedPredictors.length>0;
},ratedPredictorCount:function(){
return this.ratedPredictors.length;
},importFrom:function(_81){
for(field in this){
_81[field]&&(this[field]=_81[field]());
}
}};
function PersonalMovieDataJSONImporter(_82){
this.json=_82;
}
PersonalMovieDataJSONImporter.prototype={friendReviews:function(){
return this.json.friendsCount?new Array(this.json.friendsCount):[];
},ratedPredictors:function(){
return this.json.ratedPredictCount?new Array(this.json.ratedPredictCount):[];
}};
function SummaryPMDManager(){
}
SummaryPMDManager.prototype={dataDisplayed:false,movieData:null,recNode:null,friendNode:null,recText:null,friendText:null,setPersonalMovieData:function(pmd){
this.movieData=pmd;
this.dataDisplayed=false;
},hasNext:function(){
if(!this.dataDisplayed){
return this.movieData.hasFriendReviews(true)||this.movieData.hasRatedPredictors();
}else{
return false;
}
},createContentElements:function(_84){
removeChildNodes(_84);
this.recNode=document.createElement("DIV");
var _85=this.recNode.appendChild(document.createElement("IMG"));
_85.src=IMAGE_ROOT+"layout/recs/icon_rec.gif";
_85.style.marginRight="3px";
this.recNode.appendChild(_85);
this.recText=document.createTextNode("");
this.recNode.appendChild(this.recText);
_84.appendChild(this.recNode);
this.friendNode=document.createElement("DIV");
var _86=this.friendNode.appendChild(document.createElement("IMG"));
_86.src=IMAGE_ROOT+"pages/community/friends-glyph-tiny.gif";
_86.style.marginLeft="9px";
_86.style.marginRight="6px";
_86.style.marginTop="2px";
this.friendNode.appendChild(_86);
this.friendText=document.createTextNode("");
this.friendNode.appendChild(this.friendText);
_84.appendChild(this.friendNode);
},displayNext:function(_87){
if(!this.recNode){
this.createContentElements(_87);
}
if(this.movieData.hasRatedPredictors()){
this.recNode.style.display="block";
var n=this.movieData.ratedPredictorCount();
this.recText.nodeValue="Recommended based on "+n+(n==1?" rating":" ratings");
}else{
this.recNode.style.display="none";
}
if(this.movieData.hasFriendReviews(true)){
this.friendNode.style.display="block";
var n=this.movieData.friendReviewCount(true);
this.friendText.nodeValue="Seen by "+n+" Netflix "+(n==1?"Friend":"Friends");
}else{
this.friendNode.style.display="none";
}
this.dataDisplayed=true;
}};
function RatedPredictor(_89,_90){
this.title=_89;
this.stars=_90;
}
function MovieJSONImporter(_91){
if(_91.movie){
this.movie=_91.movie;
}else{
this.movie=_91;
}
}
MovieJSONImporter.prototype={id:function(){
return this.movie.id;
},title:function(){
return this.movie.title;
},hasBonusDisc:function(){
return this.movie.hasBonusDisc;
},parentID:function(){
return this.movie.parentID;
},synopsis:function(){
return this.movie.synopsis;
},rating:function(){
return this.movie.mpaa;
},year:function(){
return this.movie.year;
},genre:function(){
return this.movie.genre;
},starring:function(){
var _92=[];
if(this.movie.starring){
for(var ii=0;ii<this.movie.starring.length;ii++){
var p=this.movie.starring[ii];
_92.push(new Person(p.name,p.id));
}
}
return _92;
},director:function(){
if(this.movie.directors){
var p=this.movie.directors[0];
return new Person(p.name,p.id);
}else{
return false;
}
},friendRated:function(){
return this.friendsCount;
},recommended:function(){
return this.ratedPredictCount;
},personalMovieData:function(){
var pmd=new PersonalMovieData;
pmd.importFrom(new PersonalMovieDataJSONImporter(this.movie));
return pmd;
}};
function BobTextHandler(id){
this.element=this.addTextNodeTo(id);
}
BobTextHandler.prototype={addTextNodeTo:function(id){
var _94=document.createTextNode("");
$(id).appendChild(_94);
return _94;
},handle:function(s){
this.setText(s);
},setText:function(s){
this.element.nodeValue=s;
}};
function BobCapHandler(id){
this.element=$(id).firstChild;
}
BobCapHandler.prototype=BobTextHandler.prototype;
function BobSynopsisHandler(id){
this.element=$(id);
}
BobSynopsisHandler.prototype.handle=function(s){
var _95=tokenizeString(s,"%%~p;");
var s="";
for(var i=0;i<_95.length;i++){
if(i==0){
s+="<span>"+_95[i]+"</span>";
}else{
s+="<p>"+_95[i]+"</p>";
}
}
this.element.innerHTML=s;
};
function BobVisibilityHandler(id){
this.element=$(id);
}
BobVisibilityHandler.prototype={handle:function(s){
this.setVisible(s);
},setVisible:function(_96){
this.element.style.visibility=(_96)?"visible":"hidden";
}};
function BobPMDHandler(id){
this.element=$(id);
this.initialize();
}
BobPMDHandler.prototype={pmdDisplayer:new SummaryPMDManager(),hasContent:false,initialize:function(){
this.visibilityHandler.parent=this;
},handle:function(pmd){
this.pmdDisplayer.setPersonalMovieData(pmd);
if(this.pmdDisplayer.hasNext()){
this.pmdDisplayer.displayNext(this.element);
this.hasContent=true;
}else{
this.hasContent=false;
}
},visibilityHandler:{handle:function(){
this.setVisible(this.parent.hasContent);
},setVisible:function(_97){
this.parent.element.style.display=(_97)?"block":"none";
}}};
var BobContentHandler={initialized:false,shownFlag:false,initialize:function(){
this.PARENTAL_RATING_ROOT=IMAGE_ROOT+"/pages/parental_ratings/rating_",this.canvas=$("bob");
this.boxImg=$("bobimg");
this.detailElements.initialize($("bobstarring").parentNode);
this.textHandlers={title:new BobCapHandler("bobtitle"),synopsis:new BobSynopsisHandler("bobsynopsis"),year:new BobCapHandler("bobyear"),starring:new BobTextHandler("bobactors"),director:new BobTextHandler("bobdirector"),genre:new BobTextHandler("bobgenre"),rating:new BobTextHandler("bobrating"),personalMovieData:new BobPMDHandler("bobpersonal")};
this.visibilityHandlers={starring:new BobVisibilityHandler("bobstarring"),director:new BobVisibilityHandler("bobdirecting"),genre:new BobVisibilityHandler("bobgenretbl"),rating:new BobVisibilityHandler("bobratingtbl"),personalMovieData:this.textHandlers.personalMovieData.visibilityHandler};
this.textHandlers.rating.ratingTypeHandler=new BobTextHandler("bobratingtype");
$("bobratingtype").style.fontWeight="bold";
this.textHandlers.rating.handle=function(s,_98){
if(s.indexOf("TV")!=-1||_98.genre.indexOf("Television")!=-1){
this.ratingTypeHandler.setText("S\u00FCre:");
}else{
this.ratingTypeHandler.setText("S\u00FCre:");
}
this.setText(s);
};
this.textHandlers.starring.handle=function(a){
if(a.length>0){
var _100="";
for(var i=0;i<a.length-1;i++){
_100+=a[i].name+", ";
}
_100+=a[i].name;
this.setText(_100);
}
};
this.textHandlers.director.handle=function(p){
p&&this.setText(p.name);
};
this.textHandlers.year.handle=function(s){
this.setText(" ("+s+")");
};
this.visibilityHandlers.starring.handle=function(a){
this.setVisible(a.length>0);
};
this.visibilityHandlers.starring.setVisible=function(_101){
if(_101){
if(this.rowRemoved){
BobContentHandler.detailElements.elements[this.element.id]=this.element;
this.rowRemoved=false;
}
}else{
if(!this.tBody){
this.tBody=this.element.parentNode;
}
if(!this.rowRemoved){
this.tBody.removeChild(this.element);
BobContentHandler.detailElements.elements[this.element.id]=null;
this.rowRemoved=true;
}
}
};
this.visibilityHandlers.director.setVisible=this.visibilityHandlers.starring.setVisible;
this.visibilityHandlers.genre.setVisible=this.visibilityHandlers.starring.setVisible;
this.visibilityHandlers.rating.setVisible=this.visibilityHandlers.starring.setVisible;
this.visibilityHandlers.director.handle=function(_102){
this.setVisible(_102&&_102.name.length>0);
};
this.initialized=true;
},display:function(_103,_104){
if(!this.initialized){
return false;
}
this.movieID=_103.id;
this.parentID=_103.parentID;
this.handleBoxshot(_104);
for(field in _103){
if(this.textHandlers[field]){
this.textHandlers[field].handle(_103[field],_103);
}
if(this.visibilityHandlers[field]){
this.visibilityHandlers[field].handle(_103[field]);
}
}
this.detailElements.display();
if(!this.shownFlag&&(UserAgent.matches.khtml||UserAgent.matches.opera)){
this.hideContent(_103,_104);
}
},handleBoxshot:function(_105){
if(!_105){
this.boxImg.style.display="none";
}else{
this.boxImg.style.display="inline";
this.boxImg.src=IMAGE_ROOT+"boxshots/small/"+(this.parentID?this.parentID:this.movieID)+".jpg";
}
},preloadBoxshot:function(_106){
if(!this.preloadBoxshot){
this.preloadBoxshot=new Image();
}
this.preloadBoxshot.src=IMAGE_ROOT+"boxshots/small/"+_106+".jpg";
},hideContent:function(_107,_108){
this.handleBoxshot(false);
for(k in this.visibilityHandlers){
this.visibilityHandlers[k].setVisible(false);
}
this.detailElements.clear();
if(!this.shownFlag&&(UserAgent.matches.khtml||UserAgent.matches.opera)){
var _109=this;
var _110=function(){
_109.shownFlag=true;
_109.display(_107,_108);
};
window.setTimeout(_110,2);
}
}};
BobContentHandler.detailElements={initialize:function(_111){
this.tBody=_111;
},elements:[],elementIDs:new Array("bobstarring","bobdirecting","bobgenretbl","bobratingtbl"),clear:function(){
for(field in this.elements){
this.elements[field]=null;
}
},display:function(){
for(var i=0;i<this.elementIDs.length;i++){
if(this.elements[this.elementIDs[i]]){
this.tBody.appendChild(this.elements[this.elementIDs[i]]);
}
}
}};
var JSONMovieFetcher={cache:{},getMovie:function(id,_112,_113){
if(this.cache[id]){
_112(this.cache[id]);
}else{
var sc=ServerConnectionFactory.getConnection();
sc.url="http://www.evdeizle.com/" + "PopupData.aspx";
_113.movieid=id;
sc.setParameters(_113);
sc.returnType=ServerConnection.RETURN_TEXT;
var _115=this;
sc.successCallback=function(_116){
_115.handleJSONReturn(_116,_112);
};
sc.execute();
}
},handleJSONReturn:function(_117,_118){
var _119=false;
try{
var json=eval("("+_117+")");

if(!json.error){
var _121=new MovieJSONImporter(json);
var _122=new Movie();
_122.importFrom(_121);
this.cache[_122.id]=_122;
_119=true;
}
}
catch(e){
}
if(_119){
_118(_122);
}
}};
var BobManager={STYLE_POSITION:1,COUNT_DELIM:"_",BOXSHOT_STATE_DEFAULT:0,BOXSHOT_STATE_NONE:1,BOXSHOT_STATE_DISPLAY:2,STATE_AWAKE:0,STATE_ASLEEP:1,LINKCTR_TEXT:"TXT",LINKCTR_BOXSHOT:"BOX",LINKCTR_TEXT_NEAR_BOXSHOT:"BTX",LINKCTR_MINIQ:"MQI",displayFlag:false,doArrowClick:true,initialize:function(){
if(!ServerConnectionFactory.isSupported()){
return;
}
this.readyState=BobManager.STATE_AWAKE;
var _123=this;
var _124=function(){
if(_123.hideBobTimer){
clearTimeout(_123.hideBobTimer);
_123.hideBobTimer=null;
}
};
var _125=function(evt){
evt=evt||window.event;
if(evt.keycode){
if(evt.keyCode==33||evt.keyCode==34){
_123.currentScroll=document.body.scrollTop;
}
}
};
var _126=function(evt){
evt=evt||window.event;
if(evt.keycode){
if(evt.keyCode==33||evt.keyCode==34){
if(document.body.scrollTop!=_123.currentScroll){
_123.hideBob();
}
}
}
};
with(EventDispatcher){
addEvent($("bobarrow"),"click",function(){
if(_123.doArrowClick){
window.location.href=_123.href;
}
});
addEvent($("bobarrow"),"mouseout",this.hideBob.bindEventListener(this));
addEvent($("bobarrow"),"mouseover",_124);
addEvent(document,"keydown",_125);
addEvent(document,"keyup",_126);
}
BobContentHandler.initialize();
this.bobifyLinks();
},setReadyState:function(_127){
this.readyState=_127;
if(this.readyState==BobManager.STATE_ASLEEP){
this.hideBob();
this.detach();
}
},bobifyLinks:function(root){
if(this.readyState!=BobManager.STATE_AWAKE){
return;
}
root=root&&root.nodeType==1?root:$("page-content");
var imgs=root.getElementsByTagName("img");
var _130=[];
var _131=/dB\(/;
for(var i=0;i<imgs.length;i++){
var img=imgs[i];
if(img.onmouseover){
if(_131.test(img.onmouseover.toString())){
//countIndex=img.id.indexOf(BobManager.COUNT_DELIM);
//_130[_130.length]=img.id.substring(2,countIndex);
_130[_130.length]=img.id;
}
}
}
if(_130.length>0){
var _133=/(MovieDisplay|DVDPurchaseItem)?.*movieid=(\d+)/;
var _134=/Read\s?More/;
var _135=/^Why\s?is\s?this\s?movie/i;
var _136=/(DVD|Blu\s?Ray)/;
var _137=root.getElementsByTagName("A");
linkloop:
for(var i=0;i<_137.length;i++){
var link=_137[i];
if(link.onmouseover){
continue;
}
if(link.parentNode.className.containsClass("price")){
continue;
}
if(link.hasChildNodes()){
var kids=link.childNodes;
for(var j=0;j<kids.length;j++){
var _141=kids[j].tagName;
if(_141=="IMG"||_141=="TABLE"){
continue linkloop;
}
}
}
if(link.firstChild&&link.firstChild.nodeValue){
var _142=link.firstChild.nodeValue;
if(_134.test(_142)){
continue;
}
if(_135.test(_142)){
continue;
}
if(_136.test(_142)){
continue;
}
}
result=link.href.match(_133);
if(result!=null){
var id=result[2];
for(var j=0;j<_130.length;j++){
if(id==_130[j]){
link.movieid=id;
EventDispatcher.addEvent(link,"mouseover",this.dB.bindEventListener(this,link,BobManager.BOXSHOT_STATE_NONE));
continue;
}
}
}
}
}
},bobify:function(_143){
params={boxshotState:BobManager.BOXSHOT_STATE_DEFAULT,linkURL:PAGE_ROOT+"/MovieDisplay?movieid="+_143.movieId,doArrowClick:true};
for(key in _143){
params[key]=_143[key];
}
var c=params.container;
c.movieid=params.movieId;
if(c.db_eid){
EventDispatcher.removeEvent(c,"mouseover",c.db_eid);
}
if(this.readyState==BobManager.STATE_AWAKE){
var eid=EventDispatcher.addEvent(c,"mouseover",this.dB.bindEventListener(this,c,params.boxshotState,params.linkURL,params.doArrowClick));
c.db_eid=eid;
}
},getURLParams:function(){
if(this.triggerElement.movieid){
var _146={pos:0,ds:"b"};
_146.linkCtr=this.triggerElement.tagName=="A"?BobManager.LINKCTR_TEXT_NEAR_BOXSHOT:BobManager.LINKCTR_MINIQ;
}else{
var _146={pos:0,ds:this.triggerElement.id.charAt(BobManager.STYLE_POSITION)};
_146.linkCtr=this.triggerElement.tagName=="A"?BobManager.LINKCTR_TEXT:BobManager.LINKCTR_BOXSHOT;
}
return _146;
},isShowBoxshot:function(){
if(this.boxshotState==BobManager.BOXSHOT_STATE_DEFAULT){
return this.triggerElement.tagName=="A"||this.triggerElement.tagName=="DIV";
}else{
return this.boxshotState==BobManager.BOXSHOT_STATE_DISPLAY;
}
},display:function(_147){
if(_147!=this.getMovieID()){
return;
}
this.displayFlag=true;
var _148=this;
var _149=this.isShowBoxshot();
var _150=this.getURLParams();
if(window.isQueue){
_150.linkCtr+="QUEUE";
}
if(this.triggerElement.alt){
this.triggerElement.altbackup=this.triggerElement.alt;
this.triggerElement.alt="";
}
var _151=function(_152){
_148.showBobTimer=null;
if(!BobManager.displayFlag){
return;
}
BobContentHandler.display(_152,_149);
BobPositioner.setPosition(_148.triggerElement,_148.mouseCoord);
if((UserAgent.matches.khtml||UserAgent.matches.opera)&&!_148.shownFlag){
window.setTimeout(function(){
BobPositioner.setPosition(_148.triggerElement,_148.mouseCoord);
_148.shownFlag=true;
},5);
}
($("bob")).style.visibility="visible";
};
if(_149){
BobContentHandler.preloadBoxshot(_147);
}
JSONMovieFetcher.getMovie(_147,_151,_150);
},detach:function(){
if(this.triggerElement){
if(!this.triggerElement.getAttribute("persist_mouseout")&&this.triggerElement.bob_eid){
EventDispatcher.removeEvent(this.triggerElement,"mouseout",this.triggerElement.bob_eid);
this.triggerElement.bob_eid=null;
}
this.triggerElement=null;
}
},attach:function(){
if(!this.triggerElement.bob_eid){
this.triggerElement.bob_eid=EventDispatcher.addEvent(this.triggerElement,"mouseout",this.hideBob.bindEventListener(this));
}
},dB:function(evt,_153,_154,_155,_156){
if(!window.d_bobMS||d_bobMS==-1||this.readyState!=BobManager.STATE_AWAKE){
return;
}
if(this.hideBobTimer&&this.triggerElement&&this.triggerElement==_153){
clearTimeout(this.hideBobTimer);
this.hideBobTimer=null;
return;
}
this.mouseCoord=getMouseCoordinates(evt);
this.detach();
this.triggerElement=_153;
if(typeof _155=="undefined"){
this.href=_153.tagName.toLowerCase()=="a"?_153.href:_153.parentNode.href;
}else{
this.href=_155;
}
this.boxshotState=typeof _154=="undefined"?BobManager.BOXSHOT_STATE_DEFAULT:_154;
this.doArrowClick=typeof _156=="undefined"?true:_156;
this.attach();
var _157=this.getMovieID();
var _158=this;
var _159=function(){
_158.display(_157);
};
this.showBobTimer=setTimeout(_159,d_bobMS);
},getMovieID:function(){
if(this.triggerElement.movieid){
return this.triggerElement.movieid;
}else{
var id=this.triggerElement.id;
//var _160=id.indexOf(BobManager.COUNT_DELIM);
//return id.substring(2,_160);
return id;
}
},hideBob:function(){
if(this.readyState!=BobManager.STATE_AWAKE){
return;
}
this.displayFlag=false;
if(this.showBobTimer){
clearTimeout(this.showBobTimer);
this.showBobTimer=null;
return;
}
var _161=this;
var _162=function(){
_161.hideBobTimer=null;
$("bob").style.visibility="hidden";
if(_161.triggerElement&&_161.triggerElement.altbackup){
_161.triggerElement.alt=_161.triggerElement.altbackup;
}
BobContentHandler.hideContent();
};
this.hideBobTimer=setTimeout(_162,3);
},destroy:function(){
this.triggerElement&&(this.triggerElement=null);
}};
var BobPositioner={TOP_SHADOW_OFFSET:-10,BOB_BOX_WIDTH:290,MOVIE_TO_ARROW_SPACER:25,DISPLAY_STYLE_DEFAULT:0,DISPLAY_STYLE_LARGE_BOXSHOT:1,DISPLAY_STYLE_TINY_BOXSHOT:2,ARROW_HEIGHT:101,ARROW_HEIGHT_NO_SHADOW:70,LARGE_BOXSHOT_WIDTH:110,MED_BOXSHOT_WIDTH:65,TINY_BOXSHOT_WIDTH:50,TEXT_LINK_BUFFER_WIDTH:50,POSITION_LEFT:0,POSITION_RIGHT:1,MAX_PAGE_LEFT_OFFSET:490,bobId:"bob",arrowId:"bobarrow",arrowImageIds:{UL:"bobarrowulimg",UR:"bobarrowurimg",LL:"bobarrowllimg",LR:"bobarrowlrimg"},setPosition:function(_163,_164){
this.bobPosition=BobPositioner.POSITION_RIGHT;
this.triggerElement=_163;
this.mouseCoordX=_164.x;
this.mouseCoordY=_164.y;
this.setTop();
this.setLeft();
this.positionArrow();
},setTop:function(){
var _165=grabComputedHeight($(this.bobId));
var _166=_165/4;
var _167=getElementOffsetY(this.triggerElement)+BobPositioner.TOP_SHADOW_OFFSET-_166;
$(this.bobId).style.top=_167+"px";
this.correctForYOverrun(_167);
},correctForYOverrun:function(_168){
var _169=0;
var _170=getWindowHeight();
var _171=document.body.scrollTop;
var b=$(this.bobId);
var top=getElementOffsetY(b)-BobPositioner.TOP_SHADOW_OFFSET-_171;
var _174=(top*1)+(grabComputedHeight(b)*1);
if(_174>_170){
_169=_174-_170-30;
}
if(top-_169<1){
_169=top;
}
b.style.top=(_168-_169)+"px";
b=null;
},getTriggerTop:function(){
return getElementOffsetY(this.triggerElement);
},setLeft:function(){
var _175=0;
if(this.triggerElement.tagName=="A"||this.triggerElement.tagName=="DIV"){
_175=Math.max(this.mouseCoordX,0)+BobPositioner.TEXT_LINK_BUFFER_WIDTH;
if(_175>this.maxLeftPosition()){
_175-=(BobPositioner.BOB_BOX_WIDTH+BobPositioner.MOVIE_TO_ARROW_SPACER+(1.5*BobPositioner.TEXT_LINK_BUFFER_WIDTH));
this.bobPosition=BobPositioner.POSITION_LEFT;
}
}else{
var _176=0;
var _177=this.getBoxshotStyle();
if(_177==BobPositioner.DISPLAY_STYLE_LARGE_BOXSHOT){
_176=BobPositioner.LARGE_BOXSHOT_WIDTH;
}else{
if(_177==BobPositioner.DISPLAY_STYLE_TINY_BOXSHOT){
_176=BobPositioner.TINY_BOXSHOT_WIDTH;
}else{
_176=BobPositioner.MED_BOXSHOT_WIDTH;
}
}
var _178=getPageElementOffsetX(this.triggerElement);
_175=_178+BobPositioner.MOVIE_TO_ARROW_SPACER+_176;
if(_175>this.maxLeftPosition()){
_175-=(BobPositioner.BOB_BOX_WIDTH+BobPositioner.MOVIE_TO_ARROW_SPACER+_176);
this.bobPosition=BobPositioner.POSITION_LEFT;
}
}
$(this.bobId).style.left=_175+"px";
},maxLeftPosition:function(){
return getPageElementOffsetX($("page-content"))+BobPositioner.MAX_PAGE_LEFT_OFFSET;
},positionArrow:function(){
var _179=false;
var _180=this.getTriggerTop()-getElementOffsetY($(this.bobId));
var _181=grabComputedHeight($(this.bobId));
if(_180<(_181/2)){
_179=true;
}else{
_180-=BobPositioner.ARROW_HEIGHT_NO_SHADOW;
}
if(_180+BobPositioner.ARROW_HEIGHT+10>_181){
_180-=10;
}
if(_180<10){
_180=10;
}
$(this.arrowId).style.top=_180+"px";
if(this.bobPosition==BobPositioner.POSITION_LEFT){
$(this.arrowId).style.left="268px";
}else{
$(this.arrowId).style.left="-42px";
}
var _182=_179?"U":"L";
_182+=(this.bobPosition==BobPositioner.POSITION_LEFT)?"R":"L";
for(key in this.arrowImageIds){
$(this.arrowImageIds[key]).style.display=(key==_182)?"block":"none";
}
},getBoxshotStyle:function(){
return this.triggerElement.id.substring(1,2);
}};
function primeBOB(){
EventDispatcher.addEvent(dom,"ready",BobManager.initialize.bindEventListener(BobManager));
EventDispatcher.addEvent(window,"unload",BobManager.destroy.bindEventListener(BobManager));
}
function dB(evt,link){
BobManager.dB(evt,link);
}
function $(_183){
if(typeof _183=="string"){
_183=document.getElementById(_183);
}
return _183;
}

