
var QUERYURL=js_server+"json";var FEEDBACKURL=js_server+"feedback";var LIST="all";var CATEGORY="";var SEARCHT="";var mid="";var movieid=0;var CATEGORY_SIZE=0;var PAGE=0;var actPage;var hasReqestedVersion;var requiredMajorVersion=9;var requiredMinorVersion=0;var requiredRevision=64;var files={};var fileclasses={};function jsonp(url,name,query)
{if(url.indexOf("?")>-1)
url+="&callback="
else
url+="?callback="
url+=name+"&";if(query)
url+=query+"&";url+=new Date().getTime().toString();var script=document.createElement("script");script.setAttribute("src",url);script.setAttribute("type","text/javascript");document.body.appendChild(script);}
function makeVotingRequest(voteNum){jsonp(FEEDBACKURL,"cbVotingResult","type=movie&sid="+SID+"&movieid="+movieid+"&rating="+voteNum);}
function repopulate(){URL=unescape(location.href);var xstart=URL.lastIndexOf("/")+1;var xend=URL.length;if(xstart!=0){var urlsubstring=URL.substring(xstart,xend);mid=urlsubstring;}
var xstart2=URL.indexOf("#")+1;var xend2=URL.length;if(xstart2!=0&&xend2>xstart2){var urlsubstring=URL.substring(xstart2,xend2);if(urlsubstring=="play"){tb_remove();var file=$(".files>li>a.peli");var id=file.attr("id");$("#movie").hide();$("#movieinfo").show().html("<iframe frameborder=\"0\" scrolling=\"no\" src='"+js_server+"play.jsp?fileid="+id+"'></iframe>");$(this).find("a").text("Atrás").attr("class","info");return;}
var data=urlsubstring.split(",");LIST=data[0];CATEGORY=data[1];SEARCHT=data[2];actPage=parseInt(data[3]);$("#searchText").val(SEARCHT);$("#tabSelect>option").each(function(i){if($(this).attr("value")==LIST){var title=$('#tabSelect_ms_a_'+i).attr("title");MSDropDown.setRepopSelected('tabSelect_ms',title,'tabSelect_ms_a_'+i,LIST,'undefined');}});}else{LIST="all";actPage=0;}}
function cbMovieData(movie){hasReqestedVersion=DetectFlashVer(requiredMajorVersion,requiredMinorVersion,requiredRevision);dynamicTitle(movie.title);$(".files>li").click(function(){$("#movie").hide();var id=$(this).find("a").attr("id");$("#movieinfo").html("<iframe frameborder=\"0\" scrolling=\"no\" src='"+js_server+"play.jsp?fileid="+id+"'></iframe>");return false;});bindThickBoxEvents();}
function init(){$("#CatSelect>option").each(function(i){if($(this).attr("value")==CATEGORY){var title=$('#CatSelect_ms_a_'+i).attr("title");MSDropDown.setRepopSelected('CatSelect_ms',title,'CatSelect_ms_a_'+i,CATEGORY,'undefined');}});}
function showMovie(){$("#movieinfo").hide();$("#movie").show();}
function dynamicTitle(t){var s=showtitle+" - "+t;$(document).attr("title",s);}
function vote(voteNum,b){makeVotingRequest(voteNum);}
function TabChange(){var NEW_LIST=$("#tabSelect").val();if(LIST!=NEW_LIST){LIST=NEW_LIST;dynamicTitle();window.location.href="../#"+LIST+","+CATEGORY+","+SEARCHT+","+PAGE;makeRequest();}}
function CatChange(){var NEW_CATEGORY=$("#CatSelect").val();if(NEW_CATEGORY=="catAdult"){tb_show("","../util/verify-age/index.php?KeepThis=true&m=1&maamp;TB_iframe=true&amp;height=125&amp;width=720","");}else if(NEW_CATEGORY=="catCine"){window.location.href=nonadultlink;}else{if(CATEGORY!=NEW_CATEGORY){CATEGORY=NEW_CATEGORY;window.location.href="../#"+LIST+","+CATEGORY+","+SEARCHT+","+PAGE;makeRequest();}}}
function showHelp(){tb_show("","../help/index.php?KeepThis=true&m=1&maamp;TB_iframe=true&amp;height=470&amp;width=740","");}
$(document).ready(function(){setTimeout("refreshSessionStatus();",300000);refreshSessionStatus();repopulate();$(".actors>li").click(function(){var la=$(this).children("a").html();la=la.replace("á","a");la=la.replace("é","e");la=la.replace("ñ","n");window.location.href="../#"+"all"+","+CATEGORY+","+"actor:"+la+","+PAGE;});$(".directors>li").click(function(){var la=$(this).children("a").html();la=la.replace("á","a");la=la.replace("é","e");la=la.replace("ñ","n");window.location.href="../#"+"all"+","+CATEGORY+","+"director:"+la+","+PAGE;});$(".producers>li").click(function(){var la=$(this).children("a").html();la=la.replace("á","a");la=la.replace("é","e");la=la.replace("ñ","n");window.location.href="../#"+"all"+","+CATEGORY+","+"studio:"+la+","+PAGE;});$(".writers>li").click(function(){var la=$(this).children("a").html();la=la.replace("á","a");la=la.replace("é","e");la=la.replace("ñ","n");window.location.href="../#"+"all"+","+CATEGORY+","+"writer:"+la+","+PAGE;});$("#return").click(function(){window.location.href="../#"+LIST+","+CATEGORY+","+SEARCHT+","+actPage;});$(".files>li").click(function(){var c=$(this).find("a").attr("class");var id=$(this).find("a").attr("id");if(c!="info"){$("#movie").hide();files[id]=$(this).find("a").html();fileclasses[id]=$(this).find("a").attr("class");$("#movieinfo").show().html("<iframe frameborder=\"0\" scrolling=\"no\" src='"+js_server+"play.jsp?fileid="+id+"'></iframe>");$(this).find("a").text("Atrás").attr("class","info");}else{$(this).find("a").html(files[id]).attr("class",fileclasses[id]);$("#movieinfo").hide().empty();$("#movie").show();}
return false;});init();});