/*======================================================================*\
|| #################################################################### ||
|| # AT Movie 1.0 # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright © 2008-2009 AnhTrang.Org . All Rights Reserved. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ----------- AT MOVIE IS FREE SOFTWARE - OPEN SOURCE ------------ # ||
|| # http://www.anhtrang.org | http://www.anhtrang.org/support.html # ||
|| #################################################################### ||
\*======================================================================*/
// Change these two lines to modify your PLAY and STOP buttons.
var mp3PlayButton = "http://www.jpgsvr.com/mp3/play2.gif";
var mp3StopButton = "http://www.jpgsvr.com/mp3/stop2.gif";
// Change these two lines to modify the "playing..." font and size.
var mp3PlayingFont = "Verdana";
var mp3PlayingSize = "8pt";
//var mp3PlayButton = "http://www.jpgsvr.com/mp3/play.png";
//var mp3StopButton = "http://www.jpgsvr.com/mp3/pause.png";
if(typeof(TagTooga) == 'undefined')
TagTooga = {}
TagTooga.Mp3 =
{
playimg: null,
player: null,
go: function()
{
var all = document.getElementsByTagName('a');
for (var i = 0, o; o = all[i]; i++)
{
if(o.href.match(/\AnhTrang.Org.flv$/i))
{
var img = document.createElement('img');
img.src = mp3PlayButton;
img.title = 'Xem trailer';
//img.height = img.width = 12;
img.style.marginRight = '0.5em';
img.style.cursor = 'pointer';
img.style.zIndex = '300';
img.style.position = 'absolute';
img.onclick = TagTooga.Mp3.makeToggle(img, o.href);
o.parentNode.insertBefore(img, o);
}
}
},
toggle: function(img, url)
{
if (TagTooga.Mp3.playimg == img)
TagTooga.Mp3.destroy();
else
{
if (TagTooga.Mp3.playimg)
TagTooga.Mp3.destroy();
var a = img.nextSibling;
img.src = mp3StopButton;
TagTooga.Mp3.playimg = img;
TagTooga.Mp3.player = document.createElement('span');
TagTooga.Mp3.player.style.zIndex = '30';
TagTooga.Mp3.player.style.position = 'absolute';
TagTooga.Mp3.player.innerHTML = 'playing...
';
img.parentNode.insertBefore(TagTooga.Mp3.player, img.nextSibling);
}
},
destroy: function()
{
TagTooga.Mp3.playimg.src = mp3PlayButton;
TagTooga.Mp3.playimg = null;
TagTooga.Mp3.player.removeChild(TagTooga.Mp3.player.firstChild);
TagTooga.Mp3.player.removeChild(TagTooga.Mp3.player.firstChild);
TagTooga.Mp3.player.parentNode.removeChild(TagTooga.Mp3.player);
TagTooga.Mp3.player = null;
},
makeToggle: function(img, url)
{
return function()
{
TagTooga.Mp3.toggle(img, url);
}
}
}
TagTooga.addLoadEvent = function(f)
{
var old = window.onload;
if (typeof old != 'function')
window.onload = f;
else
{
window.onload = function() { old(); f() }
}
}
TagTooga.addLoadEvent(TagTooga.Mp3.go);
/**
* SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
*
* SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
*/
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="