var Behaviour={list:new Array,register:function(a){Behaviour.list.push(a)},start:function(){Behaviour.addLoadEvent(function(){Behaviour.apply()})},apply:function(){for(h=0;sheet=Behaviour.list[h];h++){for(selector in sheet){list=document.getElementsBySelector(selector);if(!list){continue}for(i=0;element=list[i];i++){sheet[selector](element)}}}},addLoadEvent:function(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){b();a()}}}};Behaviour.start();function getAllChildren(a){return a.all?a.all:a.getElementsByTagName("*")}document.getElementsBySelector=function(v){if(!document.getElementsByTagName){return new Array()}var o=v.split(" ");var f=new Array(document);for(var y=0;y<o.length;y++){token=o[y].replace(/^\s+/,"").replace(/\s+$/,"");if(token.indexOf("#")>-1){var r=token.split("#");var d=r[0];var q=r[1];var b=document.getElementById(q);if(d&&b.nodeName.toLowerCase()!=d){return new Array()}f=new Array(b);continue}if(token.indexOf(".")>-1){var r=token.split(".");var d=r[0];var c=r[1];if(!d){d="*"}var l=new Array;var g=0;for(var z=0;z<f.length;z++){var m;if(d=="*"){m=getAllChildren(f[z])}else{m=f[z].getElementsByTagName(d)}for(var u=0;u<m.length;u++){l[g++]=m[u]}}f=new Array;var p=0;for(var s=0;s<l.length;s++){if(l[s].className&&l[s].className.match(new RegExp("\\b"+c+"\\b"))){f[p++]=l[s]}}continue}if(token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)){var d=RegExp.$1;var x=RegExp.$2;var a=RegExp.$3;var n=RegExp.$4;if(!d){d="*"}var l=new Array;var g=0;for(var z=0;z<f.length;z++){var m;if(d=="*"){m=getAllChildren(f[z])}else{m=f[z].getElementsByTagName(d)}for(var u=0;u<m.length;u++){l[g++]=m[u]}}f=new Array;var p=0;var e;switch(a){case"=":e=function(j){return(j.getAttribute(x)==n)};break;case"~":e=function(j){return(j.getAttribute(x).match(new RegExp("\\b"+n+"\\b")))};break;case"|":e=function(j){return(j.getAttribute(x).match(new RegExp("^"+n+"-?")))};break;case"^":e=function(j){return(j.getAttribute(x).indexOf(n)==0)};break;case"$":e=function(j){return(j.getAttribute(x).lastIndexOf(n)==j.getAttribute(x).length-n.length)};break;case"*":e=function(j){return(j.getAttribute(x).indexOf(n)>-1)};break;default:e=function(j){return j.getAttribute(x)}}f=new Array;var p=0;for(var s=0;s<l.length;s++){if(e(l[s])){f[p++]=l[s]}}continue}if(!f[0]){return}d=token;var l=new Array;var g=0;for(var z=0;z<f.length;z++){var m=f[z].getElementsByTagName(d);for(var u=0;u<m.length;u++){l[g++]=m[u]}}f=l}return f};var code4="";function shareVideo(a,b){toUsers=$("#to").val();fromUser=$("#username").val();msg=$("#message").val();code=$("#captcha4").val();if(toUsers==""){alert("Please enter some pimps tnaflix usernames or emails to send to.");return false}if(fromUser==""){alert("Please enter your username or name.");return false}if(code==""){alert("Please enter the code for the captcha.");return false}$("#shareVideoButton").attr("disabled","disabled");$("#shareFieldSetMsg").html('<br /><img src="images/spinna.gif" alt="Loading..." />');$.ajax({type:"POST",url:"/ajax/shareVideo.php",data:({vkey:a,code:code,tousers:toUsers,fromusers:fromUser,msg:msg,num:b}),success:showShareResult});return false}function xmasShareVideo(a){toUsers=$("#to").val();fromUser=$("#username").val();code=$("#captcha4").val();msg=$("message").val();if(toUsers==""){alert("Please enter some pimps tnaflix usernames or emails to send to.");return false}if(fromUser==""){alert("Please enter your username or name.");return false}if(code==""){alert("Please enter the code for the captcha.");return false}$("#shareVideoButton").attr("disabled","disabled");$("#shareFieldSetMsg").html('<br /><img src="images/spinna.gif" alt="Loading..." />');$.ajax({type:"POST",url:"/ajax/shareVideo.php",data:({vkey:a,code:code,codeKey:4,xmas:1,tousers:toUsers,fromusers:fromUser,msg:msg}),success:showShareResult});return false}function showShareResult(xhr){$("#shareVideoButton").attr("disabled","");$("#shareFieldSetMsg").html("");var messageResponse=eval("("+xhr+")");if(messageResponse[0]=="success"){$("#to").val("");$("#message").val("");$("#captcha4").val("");$("#captchaCode4").attr("src","captcha.php?num=4&"+Math.random());alert(messageResponse[1]);$("#shareVideoButton").attr("disabled",false)}else{$("#captchaCode4").attr("src","captcha.php?num=4&"+Math.random());alert(messageResponse[1])}}var code1="";function addslashes(a){return a.replace("/([\"'])/g","\\$1").replace("/\0/g","\\0")}function flagResponse(xhr){if(xhr!=""){eval(xhr)}}function sndFlag(a){cCode=document.getElementById("captcha6").value;cCodeKey=6;$("#flagVideoButton").attr("disabled","disabled");document.getElementById("flagVideoMsg").innerHTML='<br><img src="images/spinna.gif" alt="Loading..." />';switch(a){case"1":flagVideo(cCodeKey,cCode);break;case"2":flagQuality(1,cCodeKey,cCode);break;case"3":flagQuality(2,cCodeKey,cCode);break;case"4":flagQuality(3,cCodeKey,cCode);break;case"5":flagQuality(4,cCodeKey,cCode);break;default:flagVideo(cCodeKey,cCode)}}function flagVideo(b,a){comment=$("#info").val();vkey=$("#vkey").val();if(comment!=""){$.ajax({type:"GET",url:"/ajax/flagvideo.php",data:({description:addslashes(comment),vkey:vkey,code:a,cCodeKey:b}),success:flagResponse})}else{alert("You can't post an empty comment!");$("#flagVideoButton").attr("disabled",false);$("#flagVideoMsg").html("")}}function flagQuality(b,c,a){comment=$("#info").val();vkey=$("#vkey").val();if(comment!=""){$.ajax({type:"GET",url:"/ajax/flagquality.php",data:({description:addslashes(comment),vkey:vkey,code:a,type:b,cCodeKey:c}),success:flagResponse})}else{alert("You can't post an empty comment!");$("#flagVideoButton").attr("disabled",false);$("#flagVideoMsg").html("")}}var code2="";var code3="";var formName="";function addslashes(a){return a.replace("/([\"'])/g","\\$1").replace("/\0/g","\\0")}function getComments(b,a){$("#commentOutput").removeClass();$("#commentOutput").html('<br class="clear" /><div class="clear center"><img src="images/spinna.gif" alt="Loading..." /></div>');$("#commentOutput").css("height","600px");$.ajax({type:"GET",url:"/ajax/get_comments.php",data:({VID:b,page:a}),success:showOnlyComments})}function showOnlyComments(a){if(a!=""){$("#commentOutput").css("height","");$("#commentOutput").addClass("blogComments floatLeft");$("#commentOutput").html(a)}}function showComments(xhr){$("#commentMsgRight").html("");$("#submitRight").attr("disabled","");$("#commentMsg").html("");$("#submit").attr("disabled","");if($("#noCommentGirl").length>0){$("#noCommentGirl").css("display","none")}eval(xhr)}function sndComment(c,b,a){cCode=$("#captcha3").val();cCodeKey=3;if(cCode!=""){if(c!=""){$("#commentMsgRight").html('<br /><br /><div style="text-align: center;"><img src="images/spinna.gif" alt="Loading..." /></div>');$("#submitRight").attr("disabled","disabled");$("#commentMsg").html('<br /><br /><div style="text-align: center;"><img src="images/spinna.gif" alt="Loading..." /></div>');$("#submit").attr("disabled","disabled");$.ajax({type:"POST",url:"/ajax/add_comment.php",data:({uid:b,id:a,cCode:cCode,c:c,cCodeKey:cCodeKey}),success:showComments});if($("#captcha2").length){$("#captcha2").val("")}if($("#captcha3").length){$("#captcha3").val("")}}else{alert("You cant post an empty comment!")}}else{alert("Sorry, Captcha was incorrect - please check and try again!")}return false}function addComment(c,b,a){comment_preview=c.replace(/\n/g,"<br/>").replace(/\r/g,"");if(c!=""){captchaDialog("Save your review","To post your review:",comment_preview,"sndComment",encodeURIComponent(c),b,a);getEmoticons(comment_preview)}else{alert("You cant post an empty comment!")}}function showReviewers(xhr){eval(xhr)}function updateReviewers(a){$.ajax({type:"GET",url:"/ajax/update_reviewers.php",data:({vid:a}),success:showReviewers})}function sndReq(a,b){$("#star_rating_ul").html('<div class="loading"></div>');$.ajax({type:"GET",url:"/ajax/process_rating_db.php",data:({vote:a,vkey:b,redirect:"n"}),success:handleResponse})}function handleResponse(b){var a=b;var c=new Array();if(a.indexOf("|")!=-1){c=a.split("|");changeText(c[0],c[1])}}function changeText(a,b){$("#"+a).html(b)}function ajaxStarRatingSystem(b,a){sndReq(b,a)}function displayMsg(a){ratingDescription=document.getElementById("ratingDesc");if(a>0){ratingDescription.innerHTML="";switch(a){case 1:msg="Poor";break;case 2:msg="Nothing special";break;case 3:msg="Worth watching";break;case 4:msg="Pretty cool";break;case 5:msg="Awesome!";break;default:msg="Poor";break}ratingDescription.innerHTML=msg}else{ratingDescription.innerHTML=ratingDescTmp}}function registerToVote(){registerHtml='<a href="/getiton.php">Sign In to Rate!</a>';document.getElementById("ratingDesc").innerHTML=registerHtml;ratingDescTmp=registerHtml}function get_related(a,b){killVideoThumbs();$("#videoRelatedOutput").html('<div style="text-align: center;"><img src="images/spinna.gif" alt="Loading..." /></div>');$.ajax({type:"GET",url:"/ajax/get_related_videos.php",data:({vid:a,page:b}),success:show_related})}function show_related(a){killVideoThumbs();if(a!=""){$("#videoRelatedOutput").html(a);initMultiviewToolTip()}}function getPremiumScenes(a,c){killVideoThumbs();var b=$("#videoRelatedOutput").html('<div style="text-align: center;"><img src="images/spinna.gif" alt="Loading..." /></div>');$.get("/ajax/get_related_premium.php",{vid:a,page:c},function(d){b.html(d);initMultiviewToolTip()})}function getUploads(c,a,b){killVideoThumbs();$("#videoRelatedOutput").html('<div style="text-align: center;"><img src="images/spinna.gif" alt="Loading..." /></div>');$.ajax({type:"GET",url:"/ajax/get_users_videos.php",data:({UID:c,VID:a,page:b}),success:showUsersVideos})}function showUsersVideos(a){killVideoThumbs();$("#videoRelatedOutput").html(a);initMultiviewToolTip()}function addToFavorite(b,a){if(b!=""&&a!=""){$("#add_to_favorite").html('<img src="images/spinna.gif" alt="Loading..." />');$.ajax({type:"GET",url:"/ajax/add_to_favorite.php",data:({VID:b,vkey:a}),success:updateFavorite})}}function updateFavorite(a){$("#TabBlock1").html(a)}function addCamToFavorite(a){if(a!=""){$.ajax({type:"GET",url:"/ajax/add_cam_favorite.php",data:({id:a}),success:updateCamFavorite})}}function updateCamFavorite(a){$("#favorite").html(a)}var isFF=(navigator.userAgent.indexOf("Firefox")>-1?true:false);var isIE=(navigator.userAgent.indexOf("MSIE")>-1?true:false);var curThumbURL="";var lastscroll=-1;var lastMultiVID=0;var lastMultiVIDisPremium=false;var multiplusdiv="";var multiparam1="";var multiparam2="";var multiparam3="";var multiparam4=readCookie("video_type_preview");var last_thumb="";var _current_play="";var thumb1;var movie1;var file1;var target1;var timeouts;window.addThisToMultiview=false;if(multiparam4!="image"){multiparam4="video"}var MVNr=document.getElementById("MVNr");if(MVNr){MVNr.innerHTML=countMultiVID()}$(document).ready(function(){document.body.setAttribute("onbeforeunload","firefix = false;");if(isIE){setInterval("changeDivPlaceOnScroll()",500)}});function goToThumb(){if(curThumbURL!=""){document.location=curThumbURL}return false}function getFlashMovie(b){var a=window.document[b];var d=document[b];var c=document.embeds[b];if(a!=false){return a}if(d!=false){return d}if(c!=false){return c}return false}function IsIE8Browser(){var c=-1;var a=navigator.userAgent;var b=new RegExp("Trident/([0-9]{1,}[.0-9]{0,})");if(b.exec(a)!=null){c=parseFloat(RegExp.$1)}return(c==4)}function findPos(a,e){var d=a?a.offsetLeft:0;var b=a?a.offsetTop:0;if(a){while(a.offsetParent){if(a==document.getElementsByTagName("body")[0]){break}else{d=d+a.offsetParent.offsetLeft;b=b+a.offsetParent.offsetTop;a=a.offsetParent}}}if(!e){if(!window.innerWidth){if(!(document.documentElement.clientWidth==0)){w=document.documentElement.clientWidth}else{w=document.body.clientWidth}}else{w=window.innerWidth}if(IsIE8Browser()&&(w%2)){d=d-1}}var c=[d,b];return c}function fireFoxFix(){if(isFF){var a=document.getElementById("thumb");var b=findPos(a);if(b[0]>0&&b[1]>0){a.style.left="-900px";a.style.top="-900px"}}}function firstLoadThumbMulti(){getFlashMovie("videoThumbMulti").startMovie(thumb1,movie1,file1,target1)}function postMovie(a){clearTimeout(timeouts)}function movieStartPromo(c,b,d,f,a,e){_current_play=a;lastMultiVIDisPremium=e;clearTimeout(timeouts);timeouts=setTimeout("movieStartBase('"+c+"','"+b+"','"+d+"','"+f+"','"+a+"','"+multiview_switch+"',1)",_delay_thumb)}function movieStart(c,b,d,f,a){lastMultiVIDisPremium=false;_current_play=a;clearTimeout(timeouts);var e=a.split("-");if(e[1]=="inactive"){a=e[0];timeouts=setTimeout("movieStartBase('"+c+"','"+b+"','"+d+"','"+f+"','"+a+"', 0)",_delay_thumb)}else{timeouts=setTimeout("movieStartBase('"+c+"','"+b+"','"+d+"','"+f+"','"+a+"',"+multiview_switch+")",_delay_thumb)}}function movieStartBase(a,d,b,e,g,k,j){if(typeof getFlashMovie=="undefined"){return false}else{if(typeof getFlashMovie("videoThumb")=="undefined"){return false}}if(_current_play!=g){return false}var c=findPos(document.getElementById(a));var f=g;if(lastMultiVIDisPremium){f=g+"_"+lastMultiVIDisPremium;$("#hdmovieRelIELink").css("display","block");$("#hdmovieRelIELink").removeClass().addClass("dvdIconThumb").addClass($("#hdIcon"+f).attr("class"))}else{if($("#hdIcon"+g).length>0){$("#hdmovieRelIELink").css("display","block");$("#hdmovieRelIELink").removeClass().addClass("dvdIconThumb").addClass($("#hdIcon"+g).attr("class"))}else{$("#hdmovieRelIELink").css("display","none")}}if(g&&k==1){window.addThisToMultiview=g;if(findVideoInCookie(f)){$("#addToMultiviewIELink").css("display","none");$("#multiaddedIELink").css("display","block")}else{$("#addToMultiviewIELink").css("display","block");$("#multiaddedIELink").css("display","none")}}if(k==0){$("#addToMultiviewIELink").css("display","none");$("#multiaddedIELink").css("display","none")}if(c[0]>0&&c[1]>0){$("#thumb").css("left",(c[0]+1)+"px");$("#thumb").css("top",(c[1]+1)+"px")}if(isFF==true){$("#videoThumb").css("position","relative");$("#videoThumb").css("position","")}curThumbURL=e;if(typeof getFlashMovie("videoThumb").startMovie=="function"){getFlashMovie("videoThumb").startMovie(a,d,b,e)}}function movieStart2(b,a,c,e){var d=findPos(document.getElementById(b),true);$("#thumbMulti").css("zIndex",10);$("#thumbMulti").css("left",(d[0]+1)+"px");$("#thumbMulti").css("top",(d[1]+1)+"px");curThumbURL=e;if(typeof getFlashMovie("videoThumbMulti").startMovie=="function"){getFlashMovie("videoThumbMulti").startMovie(b,a,c,e)}else{thumb1=b;movie1=a;file1=c;target1=e}}function smovieStart(b,a,c,e){var d=findPos(document.getElementById(b));if(d[0]>0&&d[1]>0){$("#thumb").css("left",(d[0]+1)+"px");$("#thumb").css("top",(d[1]+1)+"px")}if(isFF==true){$("#videoThumb").css("position","relative");$("#videoThumb").css("position","")}curThumbURL=e;getFlashMovie("videoThumb").startMovie(b,a,c,e)}function hideJpeg(b,a){var d=document.getElementById(a);var c=document.getElementById(b);d.className=""}function showJpeg(a){if(a==""&&last_thumb!=""){a=last_thumb}else{last_thumb=a}var b=document.getElementById(a);if(b){b.className=""}}function killVideoThumbs(){$("#thumb").css("left","-900px");$("#thumb").css("top","-900px")}function killVideoThumbs2(){$("#thumbMulti").css("left","-900px");$("#thumbMulti").css("top","-900px")}function getScrollTop(){if(typeof pageYOffset!="undefined"){return pageYOffset}else{var b=document.body;var a=document.documentElement;a=(a.clientHeight)?a:b;return a.scrollTop}}function getElementsByClassName(b,f,a){var e=(f=="*"&&b.all)?b.all:b.getElementsByTagName(f);var j=new Array();a=a.replace(/\-/g,"\\-");var g=new RegExp("(^|\\s)"+a+"(\\s|$)");var d;for(var c=0;c<e.length;c++){d=e[c];if(g.test(d.className)){j.push(d)}}return(j)}function delValFromCookieArr(g,b){var c="";var f=false;var a=readCookie(b);if(a!=null&&a!=""){var d=a.split(",");for(var e=0;e<d.length;e++){if(d[e]!=g){if(c!=""){c+=","+d[e]}else{c=d[e]}}else{f=true}}eraseCookie(b);setCookie(b,c,30)}return f}function removeOldestAddedVideo(){var b=readCookie("MultiSelectedVideos");if(b!=null&&b!=""){var c=b.split(",");vidDel=c[0];var a=document.getElementById("multicb"+vidDel);a.checked=false;delValFromCookieArr(vidDel,"MultiSelectedVideos")}}function changeDivPlace(){var c=$("#Multi_Plex");if(!window.innerWidth){if(!(document.documentElement.clientWidth==0)){h=document.documentElement.clientHeight;w=document.documentElement.clientWidth}else{h=document.body.clientHeight;w=document.body.clientWidth}}else{h=window.innerHeight;w=window.innerWidth}var b=getScrollTop();var d=window.location.href;var a={view_video:450}[d.substring(d.lastIndexOf("/")+1,d.lastIndexOf("."))];if(!a){a=295}if(c.css("display")!="block"){if(isIE){c.css("top",Math.round(b+(h/2)-140)+"px")}else{c.css("top",Math.round((h/2)-140)+"px")}c.css("left",Math.round((w/2)-a)+"px");saveMultiviewEditorPosition(Math.round((w/2)-a),Math.round((h/2)-140));lastscroll=b}}function changeDivPlaceOnScroll(){var c=document.getElementById("Multi_Plex");var b=getScrollTop();if(b!=lastscroll&&c.style.display=="block"){multidivPos=findPos(c);c.style.top=(b-lastscroll+multidivPos[1])+"px";if(multiparam4=="video"){var a=document.getElementById("thumbMulti");var d=findPos(document.getElementById("multiviewStartAuto"));a.style.zIndex=10;a.style.left=(d[0]+1)+"px";a.style.top=(d[1]+1)+"px"}lastscroll=b}}function showMulti(f,b){if(b==undefined){if(lastMultiVIDisPremium!=false){b=lastMultiVIDisPremium}}try{var l=$("#Multi_Plex");var c=$("#multivideo");changeDivPlace();if(f!=0){lastMultiVID=f;var j="div#remove"+f;var m=f;if(b!=undefined){j+="_"+b;m+="_"+b;$(j).html('<div class="multiadded" id="multiadded'+m+'" style="display: block; z-index: 1;"><div>Added to <span onclick="showMultiView(\''+f+"','"+b+"');\">Multi-View</span></div></div>")}else{$(j).html('<div class="multiadded" id="multiadded'+m+'" style="display: block; z-index: 1;"><div>Added to <span onclick="showMultiView(\''+f+"');\">Multi-View</span></div></div>")}addMultiView(b);var k="";c.html(k.replace(/<div class="videoExtra">(.*)<\/div>/mgi,""))}else{refreshMultiView()}var a="MultiVID";var d=f;if(lastMultiVIDisPremium){d=f+"_"+lastMultiVIDisPremium}c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}if((document.cookie.indexOf(","+d+",",c_start)!=-1||document.cookie.indexOf(d+",",c_start)!=-1||document.cookie.indexOf(","+d,c_start)!=-1||document.cookie.substring(c_start,c_end)==d)&&f!=0){changeStyle({MPaddedbutton:"block",MPaddbutton:"none",videoid:"none"})}else{if(f!=0){changeStyle({MPaddedbutton:"none",MPaddbutton:"block",videoid:"block"})}else{changeStyle({MPaddedbutton:"none",MPaddbutton:"none"})}}}l.css("display","block")}catch(g){alert(g)}}function showMultiView(a,b){showMulti(a,b)}function showVideoThumb(c,b){b=b!=undefined?b:false;if(!b){lastMultiVIDisPremium=false}if(c){killVideoThumbs();killVideoThumbs2();thumbnail_preview_stop2();var a=$("#multivideo");lastMultiVID=c;a.html('<div style="text-align:center;width:100%;"><img src="/images/spinna.gif" alt="Loading your request" style="margin: 0 auto; border: 0;" /></div>');if(b){$.ajax({type:"GET",url:"/ajax/get_video_thumb.php",data:({videoid:c,sceneid:b,m:Math.floor(Math.random()*100000),premium:"true"}),success:showVideoThumb_handler})}else{$.ajax({type:"GET",url:"/ajax/get_video_thumb.php",data:({videoid:c,m:Math.floor(Math.random()*100000),premium:"false"}),success:showVideoThumb_handler})}}}function showVideoThumb_handler(b){var a=b.split("|");$("#multivideo").html(a[1]);if(lastMultiVID!=""&&countMultiVID()==0){changeStyle({MPaddedbutton:"none",MPaddbutton:"block"})}else{changeStyle({MPaddedbutton:"block",MPaddbutton:"none"})}multiparam1=a[2];multiparam2=a[3];multiparam3=a[4];multiparam4=a[5];if(multiparam4=="video"){movieStart2("multiviewStartAuto","thumb",multiparam1,multiparam2)}else{thumbnail_preview_start_obj2(multiparam1)}}function addMultiView(b){b=b!=undefined?b:false;if(lastMultiVID>0){if(b!=false){lastMultiVIDisPremium=b;var a=b!=false?lastMultiVID+"_"+b:lastMultiVID;appendCookie("MultiVID",a,30)}else{appendCookie("MultiVID",lastMultiVID,30)}refreshMultiView()}}function addVideoToMultiView(a){if(a){showMulti(a)}}function refreshMultiView(){$("#MPplaylist").html('<div style="text-align:center;width:100%;"><img src="/images/spinna.gif" alt="Loading your request" /></div>');$.ajax({type:"GET",url:"/ajax/get_multiview_videos.php",data:({videoid:lastMultiVID,m:Math.floor(Math.random()*100000)}),success:refreshMultiView_handler})}function refreshMultiView_handler(b){var a=unescape(readCookie("MultiSelectedVideos"));eraseCookie("MultiSelectedVideos");setCookie("MultiSelectedVideos",a,30);$("#MPplaylist").html(b);$("#multiVIDNr").html(countMultiVID());if($("#MVNr").length>0){$("#MVNr").html(countMultiVID())}if($("#multiVIDNr").html()=="0"){$("#MPremoveall").css("display","none")}else{$("#MPremoveall").css("display","block")}sendToMultiView(0);showVideoThumb(lastMultiVID,lastMultiVIDisPremium)}function appendCookie(c,d,e){if(document.cookie.length>0){c_start=document.cookie.indexOf(c+"=");if(c_start!=-1){c_start=c_start+c.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}currentCookie=readCookie(c);if(currentCookie.indexOf(","+d)==-1&&currentCookie.indexOf(d+",")==-1){if(document.cookie.substring(c_start,c_end)!=""&&document.cookie.substring(c_start,c_end)!=d){d=unescape(document.cookie.substring(c_start,c_end))+","+d}}else{d=unescape(document.cookie.substring(c_start,c_end))}}}if(e){var b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));var a="; expires="+b.toGMTString()}else{var a=""}document.cookie=c+"="+d+a+"; domain=.tnaflix.com; path=/";$("#multiVIDNr").html(countMultiVID());if($("#MVNr").length>0){$("#MVNr").html(countMultiVID())}if($("#multiVIDNr").html()=="0"){$("#MPremoveall").css("display","none")}else{$("#MPremoveall").css("display","block")}tosearch=(lastMultiVIDisPremium)?lastMultiVID+"_"+lastMultiVIDisPremium:lastMultiVID;if(findVideoInCookie(tosearch)){changeStyle({MPaddedbutton:"block",MPaddbutton:"none",videoid:"none"})}}function setCookie(b,c,a){var d=new Date();d.setDate(d.getDate()+a);document.cookie=b+"="+c+((a==null)?"":";expires="+d.toGMTString())+"; domain=.tnaflix.com; path=/"}function readCookie(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null}function eraseCookie(a){document.cookie=a+"=; domain=.tnaflix.com; path=/";$("#multiVIDNr").html(countMultiVID());if($("#MVNr").length>0){$("#MVNr").html(countMultiVID())}if(a=="MultiVID"){$("#MPremoveall").css("display","none")}}function removeMultiView(b,a){a=a!=undefined?a:false;if(confirm("Are you sure you want to REMOVE this video from your MultiView playlist?")){delValFromCookieArr(b,"MultiVID");delValFromCookieArr(b,"MultiSelectedVideos");if(a){tmpvidel=b.split("_")[1];delValFromCookieArr(tmpvidel,"MultiVIDPremium");document.getElementById("MPaddbutton").href="javascript:addMultiView('"+tmpvidel+"');";$("#multiadded"+b).css("display","none")}else{document.getElementById("MPaddbutton").href="javascript:addMultiView();"}plusSign_Restore(document.getElementById("multiplus"+b));b=a?b.split("_")[0]:b;$("#MPaddedvid_"+b).addClass("hidden");$("#MPaddedvid_"+b).html("");if(b==lastMultiVID||(lastMultiVIDisPremium&&(b==lastMultiVID+"_"+lastMultiVIDisPremium))){changeStyle({MPaddedbutton:"none",MPaddbutton:"block",videoid:"block"})}sendToMultiView(b);if($("#multiadded"+b).length>0){$("#multiadded"+b).css("display","none")}}}function plusSign_Restore(a){if(a){a.style.display="block";a.style.position="absolute";a.style.left="150px"}}function removeAllMultiView(){if(confirm("Are you sure you want to REMOVE ALL videos from your MultiView playlist?")){$("#MultiView_VideoList").html("");eraseCookie("MultiVID");eraseCookie("MultiVIDPremium");eraseCookie("favs_added");var c=($("#multivideo").children(".video").length>0)?$("#multivideo").children(".video").attr("id").split("video")[1]:"";if(c.indexOf("_")>0){document.getElementById("MPaddbutton").href="javascript:addMultiView('"+c.split("_")[1]+"');"}else{document.getElementById("MPaddbutton").href="javascript:addMultiView();"}if(lastMultiVID>0){changeStyle({MPaddedbutton:"none",MPaddbutton:"block",MPplayoff:"none",MPplayon:"block",MPmessages:"block"})}else{if(lastMultiVID==0){changeStyle({MPaddedbutton:"none",MPaddbutton:"none",MPplayoff:"none",MPplayon:"block",MPmessages:"block"})}}var b=getElementsByClassName(document,"div","multi");for(var a=0;a<b.length;a++){plusSign_Restore(b[a])}var b=getElementsByClassName(document,"div","multiadded");for(var a=0;a<b.length;a++){b[a].style.display="none"}$("#StartMultiView").attr("href","/multiview_player.php")}}function countMultiVID(){var k=readCookie("MultiVID");var a="";var b=0;if(k!=null&&k!=""&&k!=" "){var f=k.split(",");for(var g=0;g<f.length;g++){if(f[g]!=""){if(a!=""){a+=","+f[g]}else{a+=f[g]}b++}}if(a!=""&&b!=f){document.cookie="MultiVID=; domain=.tnaflix.com; path=/";var e=new Date();e.setTime(e.getTime()+(30*24*60*60*1000));var c="; expires="+e.toGMTString();document.cookie="MultiVID="+a+c+"; domain=.tnaflix.com; path=/"}}var j=readCookie("MultiVIDPremium");if(j!=null&&j!=""&&j!=" "){var d=j.split(",");for(var g=0;g<d.length;g++){b++}}return b}function findVideoInCookie(e){var c="";var a=readCookie("MultiVID");if(a!=null&&a!=""){var b=a.split(",");for(var d=0;d<b.length;d++){if(b[d]==e){return true}}}return false}function findValueInCookieArray(f,b){var c="";var a=readCookie(b);if(a!=null&&a!=""){var d=a.split(",");for(var e=0;e<d;e++){if(d[e]==f){return true}}}return false}function delValFromCookieArr(g,b){var c="";var f=false;var a=readCookie(b);if(a!=null&&a!=""){var d=a.split(",");for(var e=0;e<d.length;e++){if(d[e]!=g){if(c!=""){c+=","+d[e]}else{c=d[e]}}else{f=true}}eraseCookie(b);appendCookie(b,c,30)}return f}function sendToMultiView(d,l){var f=0;var m=0;var j="";$("#MPplayoff").css("display","block");$("#MPplayon").css("display","none");$("#MPmessages").css("display","block");for(var g=0;g<document.forms.MultiPlexForm.elements.length;g++){var k=document.forms.MultiPlexForm.elements[g];if(k.type=="checkbox"){if(d!=0&&k.value==d){k.checked=false}k.disabled=false;if(k.checked==true){f++}m++}}if(l>0){var a=document.getElementById("multicb"+l);if(a.checked==false){delValFromCookieArr(l,"MultiSelectedVideos")}else{var c=readCookie("MultiSelectedVideos");eraseCookie("MultiSelectedVideos");if(c!=""){setCookie("MultiSelectedVideos",c+","+l,30)}else{setCookie("MultiSelectedVideos",l,30)}if(f>=5){removeOldestAddedVideo();f--}}}$("#MPplayoff").css("display","none");$("#MPplayon").css("display","block");$("#MPmessages").css("display","none");for(var g=0;g<document.forms.MultiPlexForm.elements.length;g++){var k=document.forms.MultiPlexForm.elements[g];if(k.type=="checkbox"){if(k.checked!=true){}else{if(k.checked==true){if(j==""){j=k.value}else{j=j+","+k.value}}}}}var b=baseurl+"/multiview_player.php?vids="+escape(j);$("#StartMultiView").attr("href",b)}function changeStyle(){var b="";var a="";for(b in arguments[0]){a=lastMultiVIDisPremium?lastMultiVID+"_"+lastMultiVIDisPremium:lastMultiVID;if(b=="videoid"){if($("#multiplus"+a).length>0){$("#multiplus"+a).css("display",arguments[0][b])}if(arguments[0][b]=="block"){if($("#multiadded"+a).length>0){$("#multiadded"+a).css("display","none")}}else{if($("#multiadded"+a).length>0){$("#multiadded"+a).css("display","block");$("#multiadded"+a).css("zIndex",1)}}}else{if($("#"+b).length>0){$("#"+b).css("display",arguments[0][b])}}}}function MPdrag(a){t=document.getElementById("Multi_Plex");if(a.preventDefault){a.preventDefault()}a.cancelBubble=true;window.document.onmousemoveOld=window.document.onmousemove;window.document.onmouseupOld=window.document.onmouseup;window.document.onmousemove=MPdodrag;window.document.onmouseup=MPstopdrag;window.document.draged=t;t.dragX=a.clientX;t.dragY=a.clientY;t.style.cursor="move";return false}function MPdodrag(g){if(!window.innerWidth){if(!(document.documentElement.clientWidth==0)){h=document.documentElement.clientHeight;w=document.documentElement.clientWidth}else{h=document.body.clientHeight;w=document.body.clientWidth}}else{h=window.innerHeight;w=window.innerWidth}if(!g){g=event}t=window.document.draged;t.style.left=(t.offsetLeft+g.clientX-t.dragX)+"px";t.style.top=(t.offsetTop+g.clientY-t.dragY)+"px";var a=t.offsetLeft+g.clientX-t.dragX;var c=t.offsetTop+g.clientY-t.dragY;if(a<-130){t.style.left="-130px"}else{if(a>(w-60)){t.style.left=(w-60)+"px"}}var b=-20;var d=h-40;if(isIE){b=getScrollTop()-20;d=h-40+getScrollTop()}if(c<b){t.style.top=b+"px"}else{if(c>d){t.style.top=d+"px"}}if(multiparam4=="video"){var f=findPos(document.getElementById("multiviewStartAuto"),true);if(f[0]!=0&&f[1]!=0){$("#thumbMulti").css("zIndex",10);$("#thumbMulti").css("left",(f[0]+1)+"px");$("#thumbMulti").css("top",(f[1]+1)+"px")}}t.dragX=g.clientX;t.dragY=g.clientY;return false}function MPstopdrag(){window.document.onmousemove=null;window.document.onmouseup=null;t=window.document.draged;t.style.cursor="auto";var b=t.offsetLeft;var a=t.offsetTop;if(isIE){a=t.offsetTop-getScrollTop()}saveMultiviewEditorPosition(b,a)}function addFavsToMultiview(a){$.ajax({type:"GET",url:"/ajax/get_favourites_vids.php",data:({uid:a,m:Math.floor(Math.random()*100000)}),success:addFavsToMultiview_handler})}function addFavsToMultiview_handler(a){appendCookie("favs_added","1",30);favs=a.split("|");for(i=0;i<favs.length;i++){if(i!=favs.length-1){appendCookie("MultiVID",favs[i],30);lastMultiVID=favs[i];changeStyle({MPaddedbutton:"block",MPaddbutton:"none",videoid:"none"})}else{showMulti(favs[i])}}}function showMultiviewEditor(b){var c=$("#Multi_Plex");if(c.css("display")!="block"){if(!b){changeDivPlace()}var d=readCookie("MultiVID");if(d){var a=d.split(",");lastMultiVID=a[a.length-1]}if(lastMultiVID!=""&&lastMultiVID.indexOf("_")>0){lastMultiVID=lastMultiVID.split("_");lastMultiVIDisPremium=lastMultiVID[1];lastMultiVID=lastMultiVID[0]}refreshMultiView();c.css("display","block")}}function saveMultiviewEditorPosition(b,a){setCookie("multiviewEditorPosition",b+","+a)}function deleteMultiviewEditorPosition(){setCookie("multiviewEditorPosition","")}function openMultiviewEditor(){var b=readCookie("multiviewEditorPosition");if(b){var a=b.split(",");var c=$("#Multi_Plex");if(c.css("display")!="block"){c.css("left",a[0]+"px");c.css("top",a[1]+"px");showMultiviewEditor(true)}}}var listOfVidsCookieIE=readCookie("MultiVID");if(listOfVidsCookieIE){var listOfVidsIE=listOfVidsCookieIE.split(",");for(var i=0;i<listOfVidsIE.length;i++){if($("#multiplus"+listOfVidsIE[i]).length>0){$("#multiplus"+listOfVidsIE[i]).css("display","none")}if($("#multiadded"+listOfVidsIE[i]).length>0){$("#multiadded"+listOfVidsIE[i]).css("display","block")}}}function stopVideo(){var a=getFlashMovie("mpl");if(a){if(typeof a.stopVideo=="function"){a.stopVideo()}}return true}function gotoSec(a){document.getElementById("mpl").gotoSeconds(a);document.getElementById("mpl").scrollIntoView(true)}if(window.attachEvent){window.attachEvent("onresize",function(){killVideoThumbs2();thumbnail_preview_stop2()})}else{if(multiparam4=="video"){window.addEventListener("resize",killVideoThumbs2,true)}else{window.addEventListener("resize",thumbnail_preview_stop2,true)}}function showHint(a){var b=findPos(a);$("#addMultiHint2").css("display","block");$("#addMultiHint2").css("left",b[0]+"px");$("#addMultiHint2").css("top",(b[1]-30)+"px")}function hideHint(a){$("#addMultiHint2").hide()}function show_videoAction(a){killVideoThumbs();var b=new Array();b[1]="share";b[2]="embed";b[3]="flag";for(i=1;i<b.length;i++){if(a==b[i]){document.getElementById(a).className=a}else{hide_videoAction(b[i])}}}function hide_videoAction(a){killVideoThumbs();if(a){document.getElementById(a).className="hidden"}}function startSearch(c,a){var b=c.toLowerCase();if(b.length>3){if(a!=""&&a==0){a=1}$("#searchOutput").html('<br /><br /><div style="text-align: center;"><img src="images/spinna.gif" alt="Loading..." /></div>');$.ajax({type:"GET",url:"/ajax/searchAjax.php",data:({what:b,page:a}),success:showAjaxRightResults})}}function showAjaxRightResults(a){$("#searchOutput").css("overflow-y","scroll");if(a!=""){$("#searchOutput").html(a)}}function make_uuid(){var b="";for(var a=0;a<32;a++){b+=Math.floor(Math.random()*16).toString(16)}return b}function updateCaptcha(){var e=updateCaptcha.arguments;var f=updateCaptcha.arguments.length;var c="";var b="";var d="";var a="";if(f>0){var c=(e[0]!="")?e[0]:"";var b=(e[1]!="")?e[1]:"";var d=(e[2]!="")?e[2]:"";var a=(e[4]!="")?e[3]:""}if($("#captchaCode"+c).length){$("#captchaCode"+c).attr("src","");if(d==""){$("#captchaCode"+c).css("width","200px")}else{$("#captchaCode"+c).css("width",d+"px")}if(a==""){$("#captchaCode"+c).css("height","80px")}else{$("#captchaCode"+c).css("height",a+"px")}}if(c==""){$("#captchaCode").attr("src","/captcha.php?"+Math.random()+b+"&width="+d+"&height="+a)}else{$("#captchaCode"+c).attr("src","/captcha.php?"+Math.random()+"&num="+c+b+"&width="+d+"&height="+a)}}var $dialog;function captchaDialog(){var params=captchaDialog.arguments;var paramsLength=captchaDialog.arguments.length;var functionCall;var functionCallParams="";var uuid;if(params["0"]==""){captchaDialogTitle="Tnaflix Dialog Box"}else{captchaDialogTitle=params["0"]}if(params["1"]==""){captchaDialogMsg="&nbsp;"}else{captchaDialogMsg=params["1"]}if(captchaDialogMsg!="&nbsp;"){captchaDialogMsg=captchaDialogMsg+"<br><br>"}if(paramsLength>0){$dialog=$("<div></div>").dialog({autoOpen:false,title:captchaDialogTitle,width:400,draggable:false,zIndex:99999,modal:true,open:function(event,ui){uuid=make_uuid()},buttons:{Ok:function(){captchaValCode=$("#captchaUserInputCode_"+uuid).val();if(captchaValCode!=""){for(i=4;i<paramsLength;i++){functionCallParams=functionCallParams+'"'+params[i]+'",'}functionCall=params[3]+"("+functionCallParams+'"'+captchaValCode+'","'+uuid+'");';eval(functionCall);$(this).dialog("close")}else{alert("Type the code in the image and click ok!")}},Cancel:function(){$.ajax({type:"GET",url:"/ajax/captchaRemoved.php",data:({uuid:uuid,action:"delete"}),success:silentResponse});$(this).dialog("close")}}});$dialog.dialog("open");$dialog.dialog("option","position","top");if(params[3]!="sndComment"){$dialog.html('<div style="margin-left: 5%; margin-right: 5%;"><div style="text-align:left">'+captchaDialogMsg+'<div style="font-size: .9em; font-style: italic;" id="captchaDialogBody">'+params[2]+'</div><br><br>Plese enter the code:</div><div style="float:left; margin-right: 10px;"><img id="captchaCode" src="/captcha.php?uuid='+uuid+'" class="captcha" width="115" height="45" /></div><div style="float:left; text-align:left;"><br><input type="text" name="captchaUserInputCode" id="captchaUserInputCode_'+uuid+'" autocomplete="off" /></div></div>')}else{$dialog.html('<div style="margin-left: 5%; margin-right: 5%;"><div style="text-align:left">'+captchaDialogMsg+'<div style="font-size: .9em; font-style: italic;" id="captchaDialogBody"></div><br><br>Plese enter the code:</div><div style="float:left; margin-right: 10px;"><img id="captchaCode" src="/captcha.php?uuid='+uuid+'" class="captcha" width="115" height="45" /></div><div style="float:left; text-align:left;"><br><input type="text" name="captchaUserInputCode" id="captchaUserInputCode_'+uuid+'" autocomplete="off" /></div></div>')}}else{alert("Invalid Options for Captcha")}}function silentResponse(a){if(a!=""){}}function markAsSpam(b,c,a){captchaDialog("Spam/Abuse","Mark comment as spam/abuse:","","submitSpam",b,c,a)}function submitSpam(uid,cid,vid,cCode,uuid){if(uuid!=""){$.ajax({type:"GET",url:"/ajax/mark_as_spam.php",data:({uid:uid,cid:cid,vid:vid,cCode:cCode,uuid:uuid}),success:function(xhr){eval(xhr)}})}else{alert("Sorry, Captcha was incorrect - please check and try again.")}}function hideSpamMessage(a){$.ajax({type:"GET",url:"/ajax/show_spam_message.php",data:({cid:a,action:"count"}),success:function(b){if(b>=2){$("#revCommentText"+a).html('<span><a href="#" onClick="expandSpamMessage('+a+'); return false;">This review has been marked as spam, click here to view the review.</a></span>')}else{$("#markTip"+a).html('<span class="small_blue floatLeft"><b>This comment has been flagged. An admin will review it as soon as possible.<br />Thank you.</b></span>')}}});$("#markSpamLink"+a).html("")}function expandSpamMessage(a){$.ajax({type:"GET",url:"/ajax/show_spam_message.php",data:({cid:a,action:"show"}),success:function(b){if(b!=""){$("#revCommentText"+a).html(b)}}})}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};function get_BoxPromo(a){if((a!=""&&a==0)||typeof a=="undefined"){a=1}$.ajax({type:"GET",url:"../ajax/get_Boxpromo.php",data:({page:a}),success:function(b){$("#loadingDiv").css("display","none");$("#boxPromo").html(b)}});$("#boxPromo").html("");$("#loadingDiv").css("display","")}function tab1(a){for(i=1;i<=5;i++){document.getElementById("TabMenu"+i).className="nonsel";document.getElementById("TabBlock"+i).style.display="none"}document.getElementById("TabMenu"+a).className="current";if(typeof document.getElementById("TabBlock"+a)!="undefined"){document.getElementById("TabBlock"+a).style.display="block"}}function tab2(a){for(i=1;i<=2;i++){document.getElementById("shareMode"+i).className="nonsel";document.getElementById("shareModeBlock"+i).style.display="none"}document.getElementById("shareMode"+a).className="current";document.getElementById("shareModeBlock"+a).style.display="block"}function showURL(a){document.getElementById("UrlDiv"+a).style.display="block"}function hideURL(a){document.getElementById("UrlDiv"+a).style.display="none"}function showPlayList(a){document.getElementById("myPlayList").style.display="block"}function hidePlayList(a){document.getElementById("myPlayList").style.display="none"}function changeEmbedSize(b,a){switch(b){case"1":width="720";height="570";break;case"2":width="650";height="515";break;case"3":width="580";height="460";break;default:width="650";height="515"}a=a.replace(/__width__/g,width).replace(/__width2__/g,width-8).replace(/__height__/g,height);document.getElementById("embedCode").value=a}var thumbnail_preview_org_name;var thumbnail_preview_basename;var thumbnail_preview_index=-1;var thumbnail_preview_object=null;var thumbnail_preview_timer_start;var thumbnail_preview_image=null;var thumbnail_preview_timer=null;var thumbnail_preview_run_delay=450;var thumbnail_preview_VID=null;var thumbnail_preview_premium=false;function thumbnail_preview_start_obj(d){var c=d.src;thumbnail_preview_premium=false;if(d.className.indexOf("premium_thumb")>=0){thumbnail_preview_premium=true;thumbnail_preview_object=d;thumbnail_preview_org_name=c;var a=c.lastIndexOf("_");var f=(c.lastIndexOf("/"));thumbnail_preview_basename=c.substring(0,f+1);thumbnail_preview_VID=c.substring(a+1);thumbnail_preview_index=1;thumbnail_preview_timer=setTimeout(thumbnail_preview_run,0)}else{if(c.indexOf("tnaflix")>0){var a=c.lastIndexOf("_");var b=c.lastIndexOf(".");var f=(c.lastIndexOf("/"));thumbnail_preview_object=d;thumbnail_preview_org_name=c;thumbnail_preview_index=1;thumbnail_preview_basename=c.substring(0,f+1);thumbnail_preview_VID=c.substring(a+1,b);thumbnail_preview_timer=setTimeout(thumbnail_preview_run,0)}else{if(c.indexOf("empflix")>0){var a=c.lastIndexOf("-");thumbnail_preview_object=d;thumbnail_preview_org_name=c;thumbnail_preview_index=1;thumbnail_preview_basename=c.substring(0,a);thumbnail_preview_timer=setTimeout(thumbnail_preview_run,0)}}}}function thumbnail_preview_stop(){if(thumbnail_preview_object==null){return}clearTimeout(thumbnail_preview_timer);thumbnail_preview_index=1;thumbnail_preview_object.src=thumbnail_preview_org_name;thumbnail_preview_object=null}function thumbnail_preview_run(){if(thumbnail_preview_object==null){return}thumbnail_preview_timer_start=new Date().getTime();thumbnail_preview_image=new Image();if(thumbnail_preview_premium){thumbnail_preview_image.src=thumbnail_preview_basename+thumbnail_preview_index+"_"+thumbnail_preview_VID}else{if(thumbnail_preview_basename.indexOf("tnaflix")>0){thumbnail_preview_image.src=thumbnail_preview_basename+thumbnail_preview_index+"_"+thumbnail_preview_VID+".jpg"}else{if(thumbnail_preview_basename.indexOf("empflix")>0){thumbnail_preview_image.src=thumbnail_preview_basename+"-"+thumbnail_preview_index+".jpg"}}}thumbnail_preview_timer=setTimeout(thumbnail_preview_run_img,50)}function thumbnail_preview_run_img(){if(thumbnail_preview_object==null){return}if(!thumbnail_preview_image.complete){thumbnail_preview_timer=setTimeout(thumbnail_preview_run_img,80);return}if(thumbnail_preview_image.width==0){thumbnail_preview_stop();return}var a=thumbnail_preview_index;if(thumbnail_preview_premium){thumbnail_preview_object.src=thumbnail_preview_basename+thumbnail_preview_index+"_"+thumbnail_preview_VID}else{if(thumbnail_preview_basename.indexOf("tnaflix")>0){thumbnail_preview_object.src=thumbnail_preview_basename+thumbnail_preview_index+"_"+thumbnail_preview_VID+".jpg"}else{if(thumbnail_preview_basename.indexOf("empflix")>0){thumbnail_preview_object.src=thumbnail_preview_basename+"-"+thumbnail_preview_index+".jpg"}}}if(++thumbnail_preview_index>30){thumbnail_preview_index=1}var c=new Date().getTime()-thumbnail_preview_timer_start;var b=c;if(c>thumbnail_preview_run_delay){c=50}else{c=thumbnail_preview_run_delay-c;if(c<150){c=150}}thumbnail_preview_timer=setTimeout(thumbnail_preview_run,c)}var thumbnail_preview_org_name2;var thumbnail_preview_basename2;var thumbnail_preview_index2=-1;var thumbnail_preview_src2=null;var thumbnail_preview_timer_start2;var thumbnail_preview_image2=null;var thumbnail_preview_timer2=null;var thumbnail_preview_run_delay2=450;var thumbnail_preview_VID2=null;function thumbnail_preview_start_obj2(a){var d=a;var b=d.lastIndexOf("_");var c=d.lastIndexOf(".");var f=(d.lastIndexOf("/"));thumbnail_preview_src2=a;thumbnail_preview_org_name2=d;thumbnail_preview_index2=1;thumbnail_preview_basename2=d.substring(0,f+1);thumbnail_preview_VID2=d.substring(b+1,c);thumbnail_preview_timer2=setTimeout(thumbnail_preview_run2,0)}function thumbnail_preview_stop2(){if(thumbnail_preview_src2==null){return}clearTimeout(thumbnail_preview_timer2);thumbnail_preview_index2=1;thumbnail_preview_src2=thumbnail_preview_org_name2;thumbnail_preview_src2=null;document.getElementById("multiviewStartAuto").setAttribute("src",thumbnail_preview_org_name2)}function thumbnail_preview_run2(){if(thumbnail_preview_src2==null){return}thumbnail_preview_timer_start2=new Date().getTime();thumbnail_preview_image2=new Image();thumbnail_preview_image2.src=thumbnail_preview_basename2+thumbnail_preview_index2+"_"+thumbnail_preview_VID2+".jpg";document.getElementById("multiviewStartAuto").setAttribute("src",thumbnail_preview_basename2+thumbnail_preview_index2+"_"+thumbnail_preview_VID2+".jpg");thumbnail_preview_timer2=setTimeout(thumbnail_preview_run_img2,50)}function thumbnail_preview_run_img2(){if(thumbnail_preview_src2==null){return}if(!thumbnail_preview_image2.complete){thumbnail_preview_timer2=setTimeout(thumbnail_preview_run_img2,80);return}if(thumbnail_preview_image2.width==0){thumbnail_preview_stop2();return}var a=thumbnail_preview_index2;thumbnail_preview_src2=thumbnail_preview_basename2+thumbnail_preview_index2+"_"+thumbnail_preview_VID2+".jpg";document.getElementById("multiviewStartAuto").setAttribute("src",thumbnail_preview_basename2+thumbnail_preview_index2+"_"+thumbnail_preview_VID2+".jpg");if(++thumbnail_preview_index2>30){thumbnail_preview_index2=1}var c=new Date().getTime()-thumbnail_preview_timer_start2;var b=c;if(c>thumbnail_preview_run_delay2){c=50}else{c=thumbnail_preview_run_delay2-c;if(c<150){c=150}}thumbnail_preview_timer2=setTimeout(thumbnail_preview_run2,c)}function showMyTrace(b){return false;var a=document.getElementById("mytracer");a.style.visibility="visible";a.innerHTML=b+"<br />"+a.innerHTML};
