/* Oh, Rats! largeImg.js v1.35
   (c) Tale 2005-2008          */
var largeImgVersion=1.35;var largeImageVersion=largeImgVersion;var largeImgPath="/rats/";var largeImgViewer=largeImgPath+"largeImage.htm";if(window.location&&window.location.pathname&&window.location.pathname.substring(window.location.pathname.length-largeImgViewer.length,window.location.pathname.length)==largeImgViewer)var largeImgSmall=false,largeImgLarge=true;else var largeImgSmall=true,largeImgLarge=false;var largeImgId="largeImage";var largeImgIdWs=largeImgId+"Widescreen";if(largeImgSmall){var largeImgTitle="";var largeImgReady=false;var largeImgWin=null;var largeImgIdPt=largeImgId+"Portrait",largeImgIdLs=largeImgId+"Landscape";var largeImgIdLb=largeImgId+"Letterbox";var largeImgCallerId="";var largeImgOnUnload=null;}else if(largeImgLarge){var largeImgHTML="";}var largeImgYouTube="http://www.youtube.com/watch?v=";var largeImgOnLoad=null;function largeImgAccept(ext){if(ext=="jpg"||ext=="jpeg"||ext=="jpe"||ext=="gif"||ext=="png")return true;return false;}function largeImgOpen(ev){var a=null;try{a=this;}catch(err){a=null;}if(!(a&&a.tagName=="A")){if(!ev)ev=window.event;if(ev){if(ev.srcElement)a=ev.srcElement;else if(ev.target)a=ev.target;}if(a&&a.tagName=="IMG")if(a.parentElement)a=a.parentElement;else if(a.parentNode)a=a.parentNode;if(!(a&&a.tagName=="A"))return true;}var href=a.href;if(!href)return true;var n;if(href.indexOf("://")<0&&href.charAt(0)!="/"&&window.location&&window.location.pathname){n=window.location.pathname.lastIndexOf("/");if(n>=0)href=window.location.pathname.substring(0,n+1)+href;else return true;}var ext;if(href.substring(0,largeImgYouTube.length)==largeImgYouTube){href=href.substring(largeImgYouTube.length,href.length);ext="youtube";}else{n=href.lastIndexOf(".");if(n<0)return true;ext=href.substring(n+1,href.length).toLowerCase();if(!largeImgAccept(ext))return true;}var width=0,height=0;largeImgTitle="";largeImgCallerId=a.id;if(a.id)var forced=a.id.substring(0,largeImgId.length)==largeImgId;else var forced=false;if(forced){if(a.id==largeImgIdLs){width=600;height=450;}else if(a.id==largeImgIdPt){width=450;height=600;}else if(a.id==largeImgIdLb){width=600;height=486;}else if(a.id==largeImgIdWs){width=600;height=428;}if(a.title)largeImgTitle=a.title;}if(!width||!height||!largeImgTitle){var img;if(document.all)img=a.all.tags("IMG");else if(typeof(a.getElementsByTagName)!="undefined")img=a.getElementsByTagName("IMG");if(img&&img.length==1)img=img[0];else if(forced)img=null;else return true;if(!forced){var small="-small.";n=img.src.lastIndexOf(small);if(n<0)return true;if(!largeImgAccept(img.src.substring(n+small.length,img.src.length)))return true;}if(!width||!height){if(ext=="youtube"){width=600;height=486;}else if((img&&img.width>=img.height)||(!img&&forced)){width=600;height=450;}else{width=450;height=600;}}if(!largeImgTitle&&img&&img.title)largeImgTitle=img.title;}width+=12+12;if(ext=="youtube")height+=12+7;else height+=12+12;if(screen.availWidth&&width>=screen.availWidth-128)width=screen.availWidth-128;if(screen.availHeight&&height>=screen.availHeight-128)height=screen.availHeight-128;n=href.indexOf("//");if(n>=0)href=href.substring(n+2,href.length);n=href.indexOf(largeImgPath);if(n>=0)href=href.substring(n+6,href.length);if(window.ieVersion)ev.returnValue=false;else if(typeof(ev.preventDefault)!="undefined")ev.preventDefault();else return true;if(largeImgWin&&!largeImgWin.closed)largeImgWin.close();largeImgWin=window.open(largeImgViewer+"?"+href,null,"width="+width+",height="+height+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");if(largeImgWin)largeImgWin.focus();return false;}function largeImgClose(){if(largeImgSmall){if(largeImgWin&&!largeImgWin.closed)largeImgWin.close();return false;}if(largeImgLarge){window.close();return false;}}function largeImgInstall(){if(largeImgReady)return;var a;if(document.all)a=document.all.tags("A");else if(typeof(document.body.getElementsByTagName)!="undefined")a=document.body.getElementsByTagName("A");if(!a)return;var n;if(typeof(window.attachEvent)!="undefined"){for(n=0;n<a.length;n++)if(a[n]&&a[n].href&&a[n].target=="_blank")a[n].attachEvent("onclick",largeImgOpen);}else if(typeof(window.addEventListener)!="undefined"){for(n=0;n<a.length;n++)if(a[n]&&a[n].href&&a[n].target=="_blank")a[n].addEventListener("click",largeImgOpen,false);}else{for(n=0;n<a.length;n++)if(a[n]&&a[n].href&&a[n].target=="_blank"&&!a[n].onclick)a[n].onclick=largeImgOpen;}largeImgReady=true;}function largeImgInit(){if(!(window.ieVersion>=6.0||window.firefoxVersion>=1.5||window.mozillaVersion>=5||window.safariVersion>=522||window.operaVersion>=9.27))return;largeImgInstall();}function largeImageInit(){largeImgInit();}function largeImgLoad(ev){if(largeImgSmall)largeImgInstall();else if(largeImgLarge){if(largeImgHTML&&document.body&&window.opener){var installed=true;if(typeof(document.body.attachEvent)!="undefined")document.body.attachEvent("onclick",largeImgClose);else if(typeof(document.body.addEventListener)!="undefined")document.body.addEventListener("click",largeImgClose,false);else if(!document.body.onclick)document.body.onclick=largeImgClose;else installed=false;if(installed){document.body.title="Close";if(document.body.style)document.body.style.cursor=window.ieVersion?"hand":"pointer";}}}if(largeImgOnLoad)return largeImgOnLoad(ev);return false;}function largeImgSetupSmall(){if(document.styleSheets){document.writeln('<STYLE TYPE="text/css" MEDIA=SCREEN><!--');if(window.ieVersion){document.writeln('IMG.MoreImages {filter:Alpha(Opacity=100,FinishOpacity=0,Style=1,StartX=0,StartY=45,FinishX=80,FinishY=55)}');document.writeln('IMG.MoreImages2 {filter:Alpha(Opacity=0,FinishOpacity=100,Style=1,StartX=20,StartY=45,FinishX=100,FinishY=55)}');document.writeln('.Opaque {filter:Alpha(Opacity=55)}');document.writeln('.MoreOpaque {filter:Alpha(Opacity=35)}');}else{document.writeln('IMG.MoreImages, IMG.MoreImages2 {opacity:0.25}');document.writeln('.Opaque {opacity:0.55}');document.writeln('.MoreOpaque {opacity:0.35}');}document.writeln('--></STYLE>');}if(!(window.ieVersion>=4.0||window.mozillaVersion>=5||window.safariVersion>=100||window.operaVersion>=9.27))return;if(!(window.location&&window.location.hostname&&(window.location.hostname=="www.taletn.com"||window.location.hostname=="taletn.com"||window.location.hostname.substring(window.location.hostname.length-6,window.location.hostname.length)==".local")))return;if(typeof(window.attachEvent)!="undefined"){window.attachEvent("onload",largeImgLoad);window.attachEvent("onunload",largeImgClose);}else if(typeof(window.addEventListener)!="undefined"){window.addEventListener("load",largeImgLoad,false);window.addEventListener("unload",largeImgClose,false);}else{if(window.onload)largeImgOnLoad=window.onload;window.onload=largeImgLoad;if(window.onunload)largeImgOnUnload=window.onunload;window.onunload=largeImgClose;}}function largeImgSetupLarge(){var src="",ext="";if(window.location&&window.location.search){if(window.location.search.charAt(0)=="?")src=window.location.search.substring(1,window.location.search.length);else src=window.location.search;if(src.indexOf("//")>=0)src="";var n=src.lastIndexOf(".");if(n>=0){ext=src.substring(n+1,src.length);if(largeImgAccept(ext))src=largeImgPath+src;else src="";}else ext="youtube";}if(document.styleSheets)if(ext=="youtube")document.write('<STYLE TYPE="text/css">BODY {overflow:hidden}</STYLE>');else document.write('<STYLE TYPE="text/css">BODY {overflow:auto}</STYLE>');var title="",attr="",id="";if(window.opener){var shortRef="http://taletn.com";var longRef="http://www.taletn.com";var localHost=".local";if(!document.referrer||document.referrer.substring(0,longRef.length+1)==longRef+"/"||document.referrer.substring(0,longRef.length+1)==longRef+":"||document.referrer.substring(0,shortRef.length+1)==shortRef+"/"||document.referrer.substring(0,shortRef.length+1)==shortRef+":"||(window.location&&window.location.hostname&&window.location.hostname.substring(window.location.hostname.length-localHost.length,window.location.hostname.length)==localHost)){try{if(window.opener.largeImgTitle)title=window.opener.largeImgTitle;}catch(err){title="";}try{if(window.opener.largeImgCallerId)id=window.opener.largeImgCallerId;}catch(err){id="";}if(ext=="youtube"){if(id==largeImgIdWs)attr=' STYLE="position:absolute;left:1.9%;top:-10.2%;width:96.2%;height:108.7%"';else attr=' STYLE="position:absolute;left:1.9%;top:2.3%;width:96.2%;height:96.2%"';}else attr=' TITLE="Close" STYLE="cursor:pointer;cursor:hand" onclick="return largeImgClose()"';}}if(!title&&src){if(ext=="youtube")title=largeImgYouTube;else if(window.location){if(window.location.protocol)title+=window.location.protocol+"//";if(window.location.hostname)title+=window.location.hostname;if(window.location.port)title+=":"+window.location.port;}title+=src;}if(title)document.write('<TITLE>'+title+'</TITLE>');if(!src)largeImgHTML='<H1>Oops!</H1>You were supposed to see a picture here, but somehow it doesn\'t work... Sorry!<P>';else if(ext=="youtube")largeImgHTML='<EMBED SRC="http://www.youtube.com/v/'+src+'&amp;autoplay=1&amp;rel=0&amp;color1=0x000000&amp;color2=0x000000&amp;border=0" TYPE="application/x-shockwave-flash" WIDTH=600 HEIGHT=486 wmode="transparent" TITLE=""'+attr+'"></EMBED>';else largeImgHTML='<IMG SRC="'+src+'" ALT="Picture"'+attr+'><BR>';if(typeof(window.attachEvent)!="undefined")window.attachEvent("onload",largeImgLoad);else if(typeof(window.addEventListener)!="undefined")window.addEventListener("load",largeImgLoad,false);else{if(window.onload)largeImgOnLoad=window.onload;window.onload=largeImgLoad;}}function largeImgWrite(){document.write(largeImgHTML);}if(largeImgSmall)largeImgSetupSmall();else if(largeImgLarge)largeImgSetupLarge();