function swapImg(a,b){document.images[a].src=b}function getCookie(c){var d=document.cookie.indexOf(c+"=");var a=d+c.length+1;if((!d)&&(c!=document.cookie.substring(0,c.length))){return null}if(d==-1){return null}var b=document.cookie.indexOf(";",a);if(b==-1){b=document.cookie.length}return unescape(document.cookie.substring(a,b))}function setCookie(c,e,a,h,d,g){var b=new Date();b.setTime(b.getTime());if(a){a=a*1000*60*60*24}var f=new Date(b.getTime()+(a));document.cookie=c+"="+escape(e)+((a)?";expires="+f.toGMTString():"")+((h)?";path="+h:"")+((d)?";domain="+d:"")+((g)?";secure":"")}function deleteCookie(a,c,b){if(getCookie(a)){document.cookie=a+"="+((c)?";path="+c:"")+((b)?";domain="+b:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}function refreshPage(a,c){var b=a+c;top.location.href=b;return true}function toggle_display(a){div_field=document.getElementById(a);if(div_field.style.display=="none"){div_field.style.display="";return 1}else{div_field.style.display="none";return 0}}function changeClass(a,b){if(document.getElementById(a)){div_field=document.getElementById(a);div_field.className=b;return true}else{return false}}function hideDiv(a){div_field=document.getElementById(a);if(div_field){if(div_field.style.display!="none"){div_field.style.display="none";return 1}else{return 0}}}function showDiv(a){div_field=document.getElementById(a);if(div_field){if(div_field.style.display!=""){div_field.style.display="";return 1}else{return 0}}}function changeTabs(b,a,c){if(a==1){changeClass(b+"1_left","link_tab_left_on");changeClass(b+"1_center","link_tab_center_on");changeClass(b+"1_right","link_tab_right_on_overlap");changeClass(b+"2_center","link_tab_center_off");changeClass(b+"2_right","link_tab_right_off");return 1}else{if(a==2){changeClass(b+"1_left","link_tab_left_off");changeClass(b+"1_center","link_tab_center_off");changeClass(b+"1_right","link_tab_right_off_overlap");changeClass(b+"2_center","link_tab_center_on");changeClass(b+"2_right","link_tab_right_on");return 1}}return 0}function update_statusbar(b,a){window.status=b;return true}function clear_statusbar(){window.status=""}function urlencode(a){return escape(a).replace(/\+/g,"%2B").replace(/\"/g,"%22").replace(/\'/g,"%27").replace(/\//g,"%2F")}function textClear(a){if(a.value==a.defaultValue){a.value=""}}function textRestore(a){if(a.value==""){a.value=a.defaultValue}}Array.prototype.inArray=function(b){var a;for(a=0;a<this.length;a++){if(this[a]===b){return true}}return false};function addEvent(e,d,b,a){if(e.addEventListener){e.addEventListener(d,b,a);return true}else{if(e.attachEvent){var c=e.attachEvent("on"+d,b);return c}else{e["on"+d]=b}}}function addLoadEvent(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){b();a()}}}function getElementsByClass(g,e,a){var d=new Array();if(e==null){e=document}if(a==null){a="*"}var c=e.getElementsByTagName(a);var b=c.length;var f=new RegExp("(^|\\\\s)"+g+"(\\\\s|$)");for(i=0,j=0;i<b;i++){if(f.test(c[i].className)){d[j]=c[i];j++}}return d}function getURLParam(e){var d="";var c=window.location.href.toString();c=c.replace(/\#.*$/,"");if(c.indexOf("?")>-1){var b=c.substr(c.indexOf("?")).toLowerCase();var f=b.split("&");for(var a=0;a<f.length;a++){if(f[a].indexOf(e.toLowerCase()+"=")>-1){var g=f[a].split("=");d=g[1];break}}}return unescape(d)}function isset(c){var b=0,d=arguments.length,a=arguments,e=true;for(b=0;b<d;b++){if(a[b]==undefined){e=false;break}}return e}function capLock(a,b){kc=a.keyCode?a.keyCode:a.which;sk=a.shiftKey?a.shiftKey:((kc==16)?true:false);if(((kc>=65&&kc<=90)&&!sk)||((kc>=97&&kc<=122)&&sk)){document.getElementById(b).style.visibility="visible"}else{document.getElementById(b).style.visibility="hidden"}}function trailer_popup(){window.open(this.href,"mult_popup","toolbar=no, width=998, height=726, scrollbars=auto, resizable=yes, screenX=0, screenY=0, top=0, left=0");return false};function rt_fbs_click(srvr_url,srvr_title,elt){var t=(typeof(srvr_title)=="undefined" || srvr_title.length ==0)?document.title:srvr_title;var u=(typeof(srvr_url)=="undefined" || srvr_url.length ==0)?location.href.toString():srvr_url;window.open('http://www.facebook.com/share.php?u='+encodeURIComponent(url_live_version(u))+'&t='+escape(t),'facebookshare');return false;};function twtr_click(server_url){var u=(server_url.length==0)?location.href.toString():server_url;var t=document.title;window.open("http://www.addthis.com/bookmark.php?v=250&winname=addthis&pub=rottentomatoes&s=twitter&url="+encodeURIComponent(url_live_version(u))+"&title="+encodeURIComponent(t));return false;};function rt_bookmark_myspace(srvr_title,srvr_url){var T=(typeof(srvr_title)=="undefined" || srvr_title.length ==0)?document.title:srvr_title;var U=(typeof(srvr_url)=="undefined" || srvr_url.length ==0)?location.href.toString():srvr_url;var C='<p><a href="'+U+'">'+T+'</a></p>';var L=3;var targetUrl='http://www.myspace.com/index.cfm?fuseaction=postto&'+'t='+encodeURIComponent(T)+'&c='+encodeURIComponent(C)+'&u='+encodeURIComponent(url_live_version(U))+'&l='+L;window.open(targetUrl,'myspaceshare');}function url_live_version(url){var regexp=new RegExp("(.+?)\.rottentomatoes\.com(.+)", "g");return url.replace(regexp,"http://www.rottentomatoes.com$2");}
