function linkRedir(obj){if(obj.href.indexOf("tacomaworld.com/out.php?url")==-1){obj.href='/out.php?url='+encodeURIComponent(obj.href);obj.onmousedown=''}return true}function makeQuoteCollapsable(obj){obj.style.textDecoration='underline';obj.style.color='#00f';obj.style.cursor='pointer';obj.onclick=function(){var tobj=this.parentNode.getElementsByTagName('table')[0];if(tobj.style.display=='none'){tobj.style.display='inline'}else{tobj.style.display='none'}}}function vbCCheckPost(postid){var postdiv=document.getElementById('post_message_'+postid);var subdivs=postdiv.getElementsByTagName('div');var quotedivs;for(var x=0;x<subdivs.length;x++){quotedivs=subdivs[x].getElementsByTagName('div');if(quotedivs.length>0){if(quotedivs[0].innerHTML=='Quote:'&&subdivs[x].getElementsByTagName('table').length>0){makeQuoteCollapsable(quotedivs[0])}}}var imgs=postdiv.getElementsByTagName('img');var newurl,newdiv,subdiv,cloneimg;for(var x=0;x<imgs.length;x++){if(newurl=imageUrlReplace(imgs[x].src)){imgs[x].src=newurl;newdiv=document.createElement("div");newdiv.style.position="relative";newdiv.style.width="100%";newdiv.style.overflow="hidden";imgs[x].parentNode.insertBefore(newdiv,imgs[x]);newdiv.appendChild(imgs[x]);subdiv=document.createElement("div");subdiv.style.position="absolute";subdiv.style.top="0";subdiv.style.left="0";subdiv.style.width="100%";subdiv.style.height="5000px";subdiv.style.backgroundImage="url(/forum/clear.gif)";newdiv.appendChild(subdiv)}}var anchors=postdiv.getElementsByTagName('a');var code;for(x=0;x<anchors.length;x++){if(code=getVideoCode(anchors[x])){newdiv=document.createElement("div");newdiv.innerHTML=code;anchors[x].parentNode.replaceChild(newdiv,anchors[x]);x--}}}function fixEmbeddedVideo(embedCode){var embedLower=embedCode.toLowerCase();if(embedLower.indexOf('object ')!=-1&&embedLower.indexOf('classid')==-1){var objPos=embedLower.indexOf('object ')+'object '.length;return embedCode.substr(0,objPos)+'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '+embedCode.substr(objPos)}else{return embedCode}}function getVideoCode(anchor){var list=[['youtube.com',/http:\/\/(.*?\.)?youtube\.com\/(v\/|watch\?[^"]*v=)([^&]*).*/,/^http:/,'<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/$3&amp;rel=1&amp;color1=0x0f3874&amp;color2=0x144998&amp;border=0"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/$3&amp;rel=1&amp;color1=0x0f3874&amp;color2=0x144998&amp;border=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>'],['video.google.',/http:\/\/video\.google\.[^\/]*\/videoplay\?docid=([^&]*).*/,/^http:/,'<embed style="width:400px;height:326px" flashvars="" src="http://video.google.com/googleplayer.swf?docid=$1&hl=en" type="application/x-shockwave-flash"> </embed>'],['metacafe.com',/http:\/\/www\.metacafe\.com\/watch\/([^\/]*)\/([^\/]*).*/,/^http:/,'<embed src="http://www.metacafe.com/fplayer/$1/$2.swf" width="400" height="345" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"> </embed>'],['funnyordie.com',/http:\/\/www\.funnyordie\.com\/videos\/([^\/]*).*/,/^http:/,'<object width="512" height="328" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param name="movie" value="http://player.ordienetworks.com/flash/fodplayer.swf" /><param name="flashvars" value="key=$1" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always"></param><embed width="512" height="328" flashvars="key=$1" allowfullscreen="true" allowscriptaccess="always" quality="high" src="http://player.ordienetworks.com/flash/fodplayer.swf" type="application/x-shockwave-flash"></embed></object>'],['photobucket.com',/http:\/\/[a-z](\w+)\.photobucket\.com\/albums\/([^\?]+)\?action=view&current=(.+?\.flv).*/,/(http:\/\/.*?\.flv|<img)/i,'<embed width="448" height="361" type="application/x-shockwave-flash" wmode="transparent" src="http://i$1.photobucket.com/player.swf?file=http://vid$1.photobucket.com/albums/$2$3">'],['myspace',/http:\/\/(vidsearch\.myspace|vids\.myspace|myspacetv)\.com\/index.cfm\?fuseaction=vids\.individual&(videoid|VideoID)=(.+)/,/^http:/,'<object width="425px" height="360px"><param name="allowFullScreen" value="true"/><param name="movie" value="http://mediaservices.myspace.com/services/media/embed.aspx/m=$3,t=1,mt=video"/><embed src="http://mediaservices.myspace.com/services/media/embed.aspx/m=$3,t=1,mt=video" width="425" height="360" allowFullScreen="true" type="application/x-shockwave-flash"></embed></object>'],['spike.com',/http:\/\/www\.spike\.com\/video\/[^\/]+\/(.*)/,/^http:/,'<embed width="448" height="365" src="http://www.spike.com/efp" quality="high" bgcolor="000000" name="efp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="flvbaseclip=$1&"> </embed>'],['thedailyshow.com',/http:\/\/www\.thedailyshow\.com\/video\/index.jhtml\?videoId=([^&]*).*/,/^http:/,'<embed FlashVars="videoId=$1" src="http://www.thedailyshow.com/sitewide/video_player/view/default/swf.jhtml" quality="high" bgcolor="#cccccc" width="332" height="316" name="comedy_central_player" align="middle" allowScriptAccess="always" allownetworking="external" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'],['southparkstudios.com',/http:\/\/www\.southparkstudios\.com\/clips\/([^\/]+).*/,/^http:/,'<embed src="http://media.mtvnservices.com/mgid:cms:item:southparkstudios.com:$1:" type="application/x-shockwave-flash" wmode="window" width="480" height="360" allowFullscreen="true" scriptAccess="always"></embed>'],['liveleak.com',/http:\/\/www\.liveleak\.com\/view\?i=([^&]*).*/,/^http:/,'<object width="450" height="370"><param name="movie" value="http://www.liveleak.com/e/$1"></param><param name="wmode" value="transparent"></param><embed src="http://www.liveleak.com/e/$1" type="application/x-shockwave-flash" wmode="transparent" width="450" height="370"></embed></object>'],['tacomaworld.com',/http:\/\/www\.tacomaworld\.com\/forum\/media\/video\/([^\/]+)/,/(http:\/\/|<img)/i,'<embed width="352" height="308" flashvars="file=/forum/media/data/$1.dat&amp;image=/forum/media/data/thumbs/$1.jpg&amp;type=flv&amp;autostart=false&amp;usefullscreen=false&amp;logo=/forum/media/watermark.png" wmode="opaque" menu="false" quality="high" bgcolor="#FFFFFF" style="" src="/forum/media/dra.swf" type="application/x-shockwave-flash"/>'],['mindcrap.com',/http:\/\/(.*?\.)?mindcrap\.com\/media\/([^\/]+).*/,/^http:/,'<embed src="http://mindcrap.com/flv_player/Main.swf" quality="high" width="645" height="363" FlashVars="config=http://mindcrap.com/flv_player/data/playerConfigEmbed/$2.xml" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>'],['vimeo.com',/http:\/\/(www\.)?vimeo\.com\/(\d+).*/,/^http:/,'<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=$2&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=$2&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object>']];var code;for(var x=0;x<list.length;x++){if(anchor.href.indexOf(list[x][0])!=-1){if(anchor.innerHTML.match(list[x][2])){code=anchor.href.replace(list[x][1],list[x][3]);if(code!=anchor.href){return fixEmbeddedVideo(code)}}}}return null}function imageUrlReplace(url){var urllist=[['photobucket.com',/http:\/\/(i\w+)\.photobucket\.com\/(albums\/[^\?&=]+)/,'/p/pb/$1/$2'],['imageshack.us',/http:\/\/img\w+\.imageshack\.us\/(img\w+\/[^\?&=]+\.(jpe?g|gif|png|bmp))/,'/p/is/$1'],['facebook.com',/http:\/\/(photos[^\.]+)\.([^\.]+)\.facebook\.com\/([^\?]+\.(jpe?g|gif|png|bmp))/,'/p/fb/$1/$2/$3'],['fbcdn.net',/http:\/\/(photos[^\.]+)\.([^\.]+)\.fbcdn\.net\/([^\?]+\.(jpe?g|gif|png|bmp))/,'/p/fbc/$1/$2/$3'],['ac-images.myspacecdn.com',/http:\/\/(\w+)\.ac-images\.myspacecdn\.com\/([^\?&=]+\.(jpe?g|gif|png|bmp))/,'/p/msc/$1/$2'],['flickr.com',/http:\/\/([\w\.\-]+)\.flickr\.com\/([^\?]+\.(jpe?g|gif|png|bmp))/,'/p/f/$1/$2'],['tinypic.com',/http:\/\/(\w\d+)\.tinypic\.com\/(.+\.(jpe?g|gif|png|bmp))/,'/p/tp/$1/$2'],['imgur.com',/http:\/\/(\w+\.)?imgur\.com\/(.+\.(jpe?g|gif|png|bmp))/,'/p/iu/$2'],['picturetrail.com',/http:\/\/(pic\w+)\.picturetrail\.com\/(.+\.(jpe?g|gif|png|bmp))/,'/p/pt/$1/$2'],['fapomatic.com',/http:\/\/(www\.)?fapomatic\.com\/([^\/]+\/)([^\/]+\/)?(.+\.(jpe?g|gif|png|bmp))/,'/p/fpo/$2$3$4'],['tacomaworld.com/forum/attachments/underground/',/(http:\/\/www\.tacomaworld\.com\/forum\/attachments\/underground\/[\w]+\-)(.*)/,'$1x$2']];var newurl;for(var x=0;x<urllist.length;x++){if(url.indexOf(urllist[x][0])!=-1){newurl=url.replace(urllist[x][1],urllist[x][2]);if(newurl!=url){return newurl}}}return null}var gatid="UA-580498-6";myanmframes=['header_right3','header_right3_alt','header_right3_alt1','header_right3_alt2','header_right3_alt3','header_right3_alt4','header_right3_alt5','header_right3_alt6'];myanmlength=0;myanminterval=0;myanmcur=1;function myAnmStart(){if(!myanminterval){myanmlength=myanmframes.length;myanminterval=setInterval("myAnmDo();",1100);myAnmDo()}}function myAnmStop(){if(myanminterval){clearInterval(myanminterval);myanminterval=0}}function myAnmDo(){myanmcur++;if(myanmcur>=myanmlength){myanmcur=0}document.getElementById('featuredtruck').src='/forum/images/misc/'+myanmframes[myanmcur]+'.jpg'}