function wdg_mediaviewer_init(){$("posts").set("html",wdg_mediaviewer_replaceURLWithHTMLLinks($("posts").get("html")));}function wdg_mediaviewer_replaceURLWithHTMLLinks(text){var exp=/[<a]*[^>]href="..([^"]+(\.pdf|\.doc|\.xls|\.ppt))['|"].*?(<\/a>)/ig;var title="";var base=window.location.href;base=base.substring(0,base.indexOf("/",8));var _34a4="&amp;auto_size=false&amp;title="+title+"&amp;privacy=1&amp;url="+base+"$1&amp;publisher_id=pub-38698668863255027730";if(!Browser.Engine.trident){var embed="<embed width=\"100%\" height=\"600px\" align=\"middle\" type=\"application/x-shockwave-flash\" salign=\"\" allowscriptaccess=\"always\" allowfullscreen=\"true\" menu=\"true\" name=\"embedded_flash_embed1\" bgcolor=\"#ffffff\" devicefont=\"false\" wmode=\"opaque\" scale=\"showall\" loop=\"true\" play=\"true\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" quality=\"high\" src=\"http://d1.scribdassets.com/ScribdViewer.swf\" flashvars=\"&amp;auto_size=false&amp;title="+title+"&amp;privacy=1&amp;url="+base+"$1&amp;publisher_id=pub-38698668863255027730\"/>";}else{var embed="<OBJECT width=\"100%\" height=\"600\"  id=embedded_flash_embed2272449405 name=embedded_flash_embed2272449405 codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 width=\"100%\" align=middle height=600><PARAM NAME=\"_cx\" VALUE=\"16430\"><PARAM NAME=\"_cy\" VALUE=\"15875\"><PARAM NAME=\"FlashVars\" VALUE=\""+_34a4+"\"><PARAM NAME=\"Movie\" VALUE=\"http://d1.scribdassets.com/ScribdViewer.swf\"><PARAM NAME=\"Src\" VALUE=\"http://d1.scribdassets.com/ScribdViewer.swf\"><PARAM NAME=\"WMode\" VALUE=\"Opaque\"><PARAM NAME=\"Play\" VALUE=\"-1\"><PARAM NAME=\"Loop\" VALUE=\"-1\"><PARAM NAME=\"Quality\" VALUE=\"High\"><PARAM NAME=\"SAlign\" VALUE=\"LT\"><PARAM NAME=\"Menu\" VALUE=\"-1\"><PARAM NAME=\"Base\" VALUE=\"\"><PARAM NAME=\"AllowScriptAccess\" VALUE=\"always\"><PARAM NAME=\"Scale\" VALUE=\"NoScale\"><PARAM NAME=\"DeviceFont\" VALUE=\"0\"><PARAM NAME=\"EmbedMovie\" VALUE=\"0\"><PARAM NAME=\"BGColor\" VALUE=\"FFFFFF\"><PARAM NAME=\"SWRemote\" VALUE=\"\"><PARAM NAME=\"MovieData\" VALUE=\"\"><PARAM NAME=\"SeamlessTabbing\" VALUE=\"1\"><PARAM NAME=\"Profile\" VALUE=\"0\"><PARAM NAME=\"ProfileAddress\" VALUE=\"\"><PARAM NAME=\"ProfilePort\" VALUE=\"0\"><PARAM NAME=\"AllowNetworking\" VALUE=\"all\"><PARAM NAME=\"AllowFullScreen\" VALUE=\"true\"></OBJECT>";}embed+="<br/><a href=\"$1\">Download</a><br/>";text=text.replace(exp,embed);text=text.replace("<a target=\"_blank\"","");var _34a6="";if(Browser.Engine.gecko){_34a6="duration=999999&amp;";}exp=/[<a]*[^>]href="([^?"]+(.mp3)[^>]).*?(<\/a>)/ig;embed="<embed width=\"300\" height=\"20\" type=\"application/x-shockwave-flash\" src=\"../images/player.swf\" id=\"flashPlay\" name=\"jstest3\" quality=\"high\" allowscriptaccess=\"always\" allowfullscreen=\"false\" flashvars=\"width=300&amp;height=20&amp;displaywidth=300&amp;autostart=true&amp;"+_34a6+"repeat=true&amp;javascriptid=jstest3&amp;enablejs=true&amp;file=$1&amp;\" wmode=\"transparent\"/>";embed+="<br/><a href=\"$1\">Download</a><br/>";text=text.replace(exp,embed);exp=/[<a]*[^>]href="([^?"]+(.flv|.swf|.mp4)[^>]).*?(<\/a>)/ig;embed="<embed width=\"650\" height=\"500\" type=\"application/x-shockwave-flash\" src=\"../images/player.swf\" id=\"flashPlay\" name=\"jstest3\" quality=\"high\" allowscriptaccess=\"always\" allowfullscreen=\"true\"  flashvars=\"width=650&amp;height=500&amp;displaywidth=650&amp;autostart=false&amp;"+_34a6+"repeat=true&amp;javascriptid=jstest3&amp;enablejs=true&amp;file=$1\" wmode=\"transparent\"/>";embed+="<br/><a href=\"$1\">Download</a><br/>";text=text.replace(exp,embed);exp=/[<a]*[^>]href=\"http:\/\/www.youtube.com\/watch\?v\=(.*?)".*?<\/a>/ig;embed="<object height=\"400\" width=\"500\"><param value=\"http://www.youtube.com/v/$1&fs=1\" name=\"movie\"><param value=\"true\" name=\"allowFullScreen\"><param value=\"always\" name=\"allowscriptaccess\"><embed height=\"400\" width=\"500\" allowfullscreen=\"true\" allowscriptaccess=\"always\" type=\"application/x-shockwave-flash\" src=\"http://www.youtube.com/v/$1&fs=1\"></object>";text=text.replace(exp,embed);exp=/[<a]*[^>]href="([^?"]+(.wma|.wmv|.avi)[^>]).*?(<\/a>)/ig;if(!Browser.Engine.trident){var embed="<embed width=\"100%\" height=\"500px\" align=\"middle\" type=\"application/x-mplayer2\" salign=\"\" allowscriptaccess=\"always\" allowfullscreen=\"true\" menu=\"true\" name=\"embedded_flash_embed1\" bgcolor=\"#ffffff\" devicefont=\"false\" wmode=\"opaque\" scale=\"showall\" loop=\"true\" play=\"true\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\"  quality=\"high\" src=\"$1\" />";}else{embed="<OBJECT width=\"100%\" height=\"500\"  classid=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" standby=\"Loading Windows Media Player components...\" type=\"application/x-mplayer2\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112\" width=\"100%\" align=middle height=500><PARAM NAME=\"filename\" VALUE=\"$1\"><PARAM NAME=\"Showcontrols\" value=\"True\"><PARAM NAME=\"Loop\" VALUE=\"-1\"><PARAM NAME=\"Quality\" VALUE=\"High\"><PARAM NAME=\"AllowScriptAccess\" VALUE=\"always\"><PARAM NAME=\"DeviceFont\" VALUE=\"0\"><PARAM NAME=\"BGColor\" VALUE=\"FFFFFF\"><PARAM NAME=\"AllowFullScreen\" VALUE=\"true\"></OBJECT>";}embed+="<br/><a href=\"$1\">Download</a><br/>";text=text.replace(exp,embed);return text;}
