
$a=function($b){return $c($b).join('');};$c=function($b,$d){$d=$d||new Array();var u;switch(typeof $b){case 'object':if($b){if($b.constructor==Array){$d.push('[');for(var i=0;i<$b.length;++i){if(i>0)$d.push(',\n');$c($b[i],$d);};$d.push(']');return $d;}else if(typeof $b.toString !='undefined'){$d.push('{');var $e=true;for(var i in $b){var $f=$d.length;if(!$e)$d.push(',\n');$c(i,$d);$d.push(':');$c($b[i],$d);if($d[$d.length-1]==u)$d.splice($f,$d.length-$f);else $e=false;};$d.push('};');return $d;};return $d;};$d.push('null');return $d;case 'unknown':case 'undefined':case 'function':$d.push(u);return $d;case 'string':$d.push('"');$d.push($b.replace(/(["\\])/g,'\\$1').replace(/\r/g,'').replace(/\n/g,'\\n'));$d.push('"');return $d;default:$d.push(String($b));return $d;}};if(typeof(admtv_urlAdmotiontv)=="undefined")var admtv_urlAdmotiontv="http:\/\/iq.dmmotion.com\/";if(typeof(admtv_urlPlatform)=="undefined")var admtv_urlPlatform="http:\/\/fs.dmmotion.com\/";var $g=admtv_urlAdmotiontv+"PlayerConfig.aspx";if(typeof(admtv)=="undefined"){function addToConfigObj($h){var $i=admtv.Players[$h];admtv.addToObject(cfg,$i,false);if($i.goStandBy)$i.goStandBy=false;else $i.Initialize();};function addPlayerPlatform($h,$j){var p=admtv.Players[$h];p.Content=$j;p.Index=$h;try{onPlayerInit($h);}catch(e){};};function createNewPlayer($k){var $l=new admPlayer($k["id"],$k["width"],$k["height"],(typeof($k["fileServer"])=="undefined")?"":$k["fileServer"]);var $m=admtv.queryToObj(location.search.substring(1));if(typeof($m.v)!="undefined"){$l.setStartByFromPermalink($m.v.toString());$k["rotateItems"]=null;$k["autoInit"]=1;};admtv.addToObject($k,$l,true);if(admtv.Players.length!=0)$l.autoInit=0;if(typeof($l.div_id)=="undefined"||admtv.getObj($l.div_id)==null){$l.div_id="atvD_"+$l.unique_id;document.write('<div id="'+$l.div_id+'" width="'+$l.width+'" height="'+$l.height+'"><\/div>');};$l.Index=admtv.Players.push($l)-1;return $l;};var $n=$o=$p=false;if(window.createPopup)$n=true;var admtv={Players:new Array(),getPlayerById:function($q){var $r;try{$r=admtv.Players[admtv.getIndexByParam(admtv.Players,"Id",$q)];}catch(e){};return $r;},getPlayerByPlatformId:function($s){var $r;try{var i=admtv.Players.length;while(i--&&(admtv.Players[i].Content.Id!=$s)){};if(i!=admtv.Players.length)$r=admtv.Players[i];}catch(e){};return $r;},getPlayerIndexById:function($q){var $r;try{$r=admtv.getIndexByParam(admtv.Players,"id",$q);}catch(e){};return $r;},addToObject:function($t,$u,$v){if(typeof($v)=="undefined")$v=false;for(var i in $t){if(typeof($u[i])=="undefined"||$v)$u[i]=$t[i];}},alertObj:function($j){var d="";for(var i in $j)d+=i+" : "+$j[i]+": "+typeof($j[i])+"\n";alert(d);},fireEvent:function($q,ev,eo){var po=admtv.getPlayerById($q);try{eval("po."+ev+"(eo)");}catch(e){}},getIndexByParam:function($w,$x,$y){var $r;try{var i=$w.length;while(i--&&($w[i][$x]!=$y)){};if(i!=$w.length)$r=i;}catch(e){};return $r;},getObj:function(id){return document.getElementById(id);},getItemRange:function($z,$A){var $B=($z.RangeVoting.Votes>0)?$z.RangeVoting.Total/$z.RangeVoting.Votes:0;return($A*$B)/10;},getImageHostCounter:1,getImageHost:function($s){if(this.getImageHostCounter>10)this.getImageHostCounter=1;var h=this.getPlayerByPlatformId($s).getFileServer();var sh="http:\/\/"+h.substr(7,h.indexOf(".")-7)+"-"+this.getImageHostCounter+h.substr(h.indexOf("."))+$s+"\/";this.getImageHostCounter++;return sh;},getImageURL:function($C,id,$D){$D=$D.toLowerCase();if(($D!="l")&&($D!="m")&&($D!="s"))$D="l";return($C+$D+"\/"+id+".jpg");},getThumbnailURL:function($s,$z,$D){var $E=$z.Assets[admtv.getIndexByParam($z.Assets,"Type",1)];return admtv.getImageURL(this.getImageHost($s)+"t\/",$E.Id,$D);},getPlaylistThumbnailURL:function($s,$F,$D){return admtv.getImageURL(this.getImageHost($s)+"p\/",$F,$D);},getChannelThumbnailURL:function($s,$G,$D){return admtv.getImageURL(this.getImageHost($s)+"c\/",$G,"l");},getValidationImg:function(){return admtv_urlAdmotiontv+"tv_get_validation_keyword.aspx?r="+Math.floor(Math.random()*9999);},generateSWF:function($H,$I,$J){var $K='';$K+='<object ';for(var i in $H)$K+=i+'="'+$H[i]+'" ';$K+='>';for(var i in $I)$K+='<param name="'+i+'" value="'+$I[i]+'" \/> ';$K+='<embed ';for(var i in $J)$K+=i+'="'+$J[i]+'" ';$K+='><\/embed>';$K+='<\/object>';return $K;},queryToObj:function($L){var $m=new Object(),$M=$L.split("&");var i=$M.length;while(i--){var $N=$M[i].indexOf("=");if($N==-1)continue;var $O=$M[i].substring(0,$N),$B=$M[i].substring($N+1);$m[$O]=unescape($B);};return $m;}};function admPlayer(Id,$P,$Q,fs){var ap=this;ap.autoInit;ap.urlPlayer;ap.Content=new Object();ap.fileServer=fs;if(typeof($P)!="undefined")ap.width=$P;if(typeof($Q)!="undefined")ap.height=$Q;ap.Id=Id;ap.Index;ap.unique_id=new Date().getTime();ap.searchingFor="";if(eval("typeof(admtv_goStandBy_"+Id+")")=="undefined")ap.goStandBy=false;else ap.goStandBy=eval("admtv_goStandBy_"+Id);ap.Continue=function(){if(this.goStandBy)this.goStandBy=false;else this.Initialize();};ap.getFileServer=function(){return(this.fileServer!="")?this.fileServer:admtv_urlPlatform;};ap.setStartByFromPermalink=function($R){if($R!=""){this.startBy=$R.split("z");var i=this.startBy.length;while(i--)this.startBy[i]=parseInt(this.startBy[i],35);}};ap.getRSSFeed=function(){return admtv_urlAdmotiontv+"newitems.aspx?py="+this.Id;};ap.addRSSFeed=function(){var $S=document.createElement("link");$S.rel="alternate";$S.type="application\/rss+xml";$S.href=this.getRSSFeed();$S.title="Video Platform "+this.Id;var $T=document.documentElement.childNodes;for(var i in $T){try{if($T[i].nodeName.toLowerCase()=="head"){$T[i].insertBefore($S,null);break;}}catch(e){};}};ap.Initialize=function(){if(typeof(this.urlPlayer)!="undefined"){if(typeof(this.width)=="undefined")this.width=400;if(typeof(this.height)=="undefined")this.height=342;this.addRSSFeed();this.insertPlayer();}};ap.insertPlayer=function(){var fv="";fv+="urlAdmotiontv="+admtv_urlAdmotiontv+"&";if(typeof(admtv_urlAdserver)!="undefined")fv+="urlAdserver="+admtv_urlAdserver+"&";fv+="urlPermalink="+((typeof(admtv_urlPermalink)!="undefined")?admtv_urlPermalink:document.URL.split("?")[0]);fv+="&";for(var i in this){if(typeof(this[i])!="function"&&typeof(this[i])!="null"&&typeof(this[i])!="undefined"){if(typeof(this[i])=="object"){try{fv+="fv_"+i+"="+$a(this[i]);}catch(e){}}else fv+="fv_"+i+"="+this[i];fv+="&";}};var id="atvO_"+this.unique_id;var $U=this.getFileServer()+((typeof(admtv_corePlayer)!="undefined")?admtv_corePlayer:this.urlPlayer);var $H=new Object();$H.width=this.width;$H.height=this.height;$H.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";$H.codebase="http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=8,0,0,0";$H.id=id;var $I=new Object();$I.movie=$U;$I.menu="false";$I.allowfullscreen="true";$I.allowscriptaccess="always";$I.flashvars=fv;$I.wmode="window";$I.bgcolor="#000000";var $J=new Object();$J.width=this.width;$J.height=this.height;$J.src=$U;$J.pluginspage="http:\/\/www.macromedia.com\/go\/getflashplayer";$J.name=id;$J.type="application\/x-shockwave-flash";$J.bgcolor=$I.bgcolor;$J.flashvars=$I.flashvars;$J.menu=$I.menu;$J.allowfullscreen=$I.allowfullscreen;$J.allowscriptaccess=$I.allowscriptaccess;$J.wmode=$I.wmode;admtv_corePlayer=undefined;var $V=admtv.getObj(this.div_id);var $W=admtv.generateSWF($H,$I,$J);$V.innerHTML=$W;};ap.getSwf=function(){var $X="atvO_"+this.unique_id;return(navigator.appName.indexOf("Microsoft")!=-1)?window[$X]:document[$X];};ap.userCheck=function($Y){return this.getSwf().userCheck($Y);};ap.userRegister=function($Z,$00,$01){return this.getSwf().userRegister($Z,$00,$01);};ap.userLogin=function($Z,$00){try{return this.getSwf().userLogin($Z,$00);}catch(e){return false;}};ap.userLogout=function(){try{this.getSwf().userLogout();}catch(e){return false;}};ap.userGetUploadData=function($02){return this.getSwf().userGetUploadData($02);};ap.userIsLogged=function(){return this.getSwf().userIsLogged();};ap.userConfirmWebcam=function($03,$04){return this.getSwf().userConfirmWebcam($03,$04);};ap.getCustomlist=function(){return this.getSwf().getCustomlist();};ap.playCustomVideo=function($05){return this.getSwf().playCustomVideo($05);};ap.removeFromCustomlist=function($06){return this.getSwf().removeFromCustomlist($06);};ap.addToCustomlist=function($07,$08){return this.getSwf().addToCustomlist($07,$08);};ap.cleanCustomlist=function(){this.getSwf().cleanCustomlist();};ap.reorderCustomlistItems=function(a,b){return this.getSwf().reorderCustomlistItems(a,b);};ap.generatePermalink=function($07){return this.getSwf().generatePermalink($07);};ap.getCurrentItemInfo=function(){try{return this.getSwf().getCurrentItemInfo();}catch(e){return[0,0,0];}};ap.getCurrentItemData=function(){try{return this.getSwf().getCurrentItemData();}catch(e){return{$09:0,$0a:0,Id:0,$0b:{$0c:false}};}};ap.playVideo=function($07){return this.getSwf().playVideo($07);};ap.playingItem=function(){return this.getSwf().playingItem();};ap.setRepeatMode=function(b){this.getSwf().setRepeatMode(b);};ap.setVolume=function($0d){this.getSwf().setVolume($0d);};ap.pause=function(fl){this.getSwf().pauseItem(fl);};ap.getTopRated=function($0e,$0f){return this.getSwf().getTopRated($0e,$0f);};ap.getItemRange=function($07,$A){return admtv.getItemRange(this.getItemById($07.ChannelId,$07.PlaylistId,$07.Id),$A);};ap.voteAllowed=function($07){var $0g=this.getChannelById($07.ChannelId);var $z=this.getItemById($07.ChannelId,$07.PlaylistId,$07.Id);return(typeof($z.RangeVoting.User)=="undefined"&&($0g.RangeVoting==2||($0g.RangeVoting==3&&this.userIsLogged())));};ap.vote=function($07,$B,$A){try{var $z=this.getItemById($07.ChannelId,$07.PlaylistId,$07.Id);if(this.voteAllowed($07)&&typeof($z)!="undefined"){$z.RangeVoting.User=(10*$B)/$A;$z.RangeVoting.Total+=$z.RangeVoting.User;$z.RangeVoting.Votes++;this.getSwf().vote($z.Id,$B,$A);};return this.getItemRange($07,$A);}catch(e){return -1;}};ap.search=function(t){this.searchingFor=t;return this.getSwf().search(t);};ap.getHighlights=function(){return this.Content.Highlights;};ap.getMostViewed=function($0e,$0f){return this.getSwf().getMostViewed($0e,$0f);};ap.getMostSent=function($0e,$0f){return this.getSwf().getMostSent($0e,$0f);};ap.getMostRecent=function($0e){return this.getSwf().getMostRecent($0e);};ap.getComments=function($07){return this.getSwf().getComments($07);};ap.postCommentAllowed=function($07){var $0g=this.getChannelById($07.ChannelId);return($0g.Comments==2||($0g.Comments==3&&this.userIsLogged()));};ap.postComment=function($07,kw,co,un,um,uu){if(this.postCommentAllowed($07))return this.getSwf().postComment($07,kw,co,un,um,uu);};ap.sendToFriend=function($07,$0h,$0i,$0j){return this.getSwf().sendToFriend($07,$0h,$0i,$0j);};ap.getChannelIndexById=function($G){var $r;if(typeof(this.Content.Channels)!="undefined"){try{$r=admtv.getIndexByParam(this.Content.Channels,"Id",$G);}catch(e){}};return $r;};ap.getPlaylistIndexById=function($G,$F){var $0k=this.getChannelById($G);var $r;if($0k!=undefined){try{$r=admtv.getIndexByParam($0k.Playlists,"Id",$F);}catch(e){}};return $r;};ap.getItemIndexById=function($G,$F,$0l){var $0m=this.getPlaylistById($G,$F);var $r;if($0m!=undefined){try{$r=admtv.getIndexByParam($0m.Items,"Id",$0l);}catch(e){}};return $r;};ap.getAssetIndexById=function($G,$F,$0l,$0n){var $0o=this.getItemById($G,$F,$0l);return admtv.getIndexByParam($0o.Assets,"Id",$0n);};ap.getChannelsByCategoryId=function($0p){var a=new Array();var i=this.Content.Channels.length;while(i--){var j=this.Content.Channels[i].Categories.length;while(j--){if(this.Content.Channels[i].Categories[j].Id==$0p){a.push(this.Content.Channels[i]);break;}}};return(a.length>0)?a.reverse():undefined;};ap.getChannelById=function($G){var $r;try{$r=this.Content.Channels[admtv.getIndexByParam(this.Content.Channels,"Id",$G)];}catch(e){};return $r;};ap.getPlaylistById=function($G,$F){var $0q;var $r;try{$0q=this.getChannelById($G).Playlists;$r=$0q[admtv.getIndexByParam($0q,"Id",$F)];}catch(e){};return $r;};ap.getItemById=function($G,$F,$0l){var $0q;var $r;try{$0q=this.getPlaylistById($G,$F).Items;$r=$0q[admtv.getIndexByParam($0q,"Id",$0l)];}catch(e){};return $r;};ap.getAssetById=function($G,$F,$0l,$0n){var $0q;var $r;try{$0q=this.getItemById($G,$F,$0l).Assets;$r=$0q[admtv.getIndexByParam($0q,"Id",$0n)];}catch(e){};return $r;};ap.getAssetByType=function($G,$F,$0l,$0r){var $r;try{var $0s=this.getItemById($G,$F,$0l).Assets;$r=$0s[admtv.getIndexByParam($0s,"Type",$0r)];}catch(e){};return $r;};ap.getItemThumbnail=function($07,$D){var $r;try{var $z=this.getItemById($07.ChannelId,$07.PlaylistId,$07.Id);$r=admtv.getThumbnailURL(this.Content.Id,$z,$D);}catch(e){};return $r;};ap.getPlaylistThumbnail=function($F,$D){var $r;try{$r=admtv.getPlaylistThumbnailURL(this.Content.Id,$F,$D);}catch(e){};return $r;};ap.getChannelThumbnail=function($G,$D){var $r;try{$r=admtv.getChannelThumbnailURL(this.Content.Id,$G,$D);}catch(e){};return $r;};ap.enableDoubleClick=function($y){this.getSwf().enableDoubleClick($y);};}};if(typeof(admtv_cfg)!="undefined"){if(typeof(admtv_cfg["id"])!="undefined"){var $l=createNewPlayer(admtv_cfg);var cfg=new Array();var $0t=(typeof(admtv_cfg["debug"])!="undefined")?'&debug='+admtv_cfg["debug"]:'';document.write('<scr','ipt language="JavaScr','ipt" src="',$g,'?py=',$l.id,'&index='+$l.Index+$0t+'" type="text/javascr','ipt"><\/scr','ipt>');}}

