if(typeof(mandchou)!='object')var mandchou=new Object();
mandchou.VersionNumber=function(version){
if(!version){
this.fromNumber(0);}else{
this.from(version);}}
mandchou.VersionNumber.prototype={
majorLength:4,
minorLength:4,
buildLength:8,
revisionLength:8,
setVersion:function(version){
this.version=version},
getVersion:function(){
return this.version},
getMajor:function(){
return this.getFieldValue(this.majorLength,this.getMajorShift())},
setMajor:function(major){
this.setFieldValue(major,this.majorLength,this.getMajorShift())},
getMinor:function(){
return this.getFieldValue(this.minorLength,this.getMinorShift())},
setMinor:function(minor){
this.setFieldValue(minor,this.minorLength,this.getMinorShift())},
getBuild:function(){
return this.getFieldValue(this.buildLength,this.getBuildShift())},
setBuild:function(build){
this.setFieldValue(build,this.buildLength,this.getBuildShift())},
getRevision:function(){
return this.getFieldValue(this.revisionLength,0)},
setRevision:function(revision){
this.setFieldValue(revision,this.revisionLength,0)},
getMajorShift:function(){
return this.minorLength+this.buildLength+this.revisionLength},
getMinorShift:function(){
return this.buildLength+this.revisionLength},
getBuildShift:function(){
return this.revisionLength},
getFieldValue:function(partLength,partShift){
return(this.version>>partShift)&this.getFieldMaxValue(partLength)},
setFieldValue:function(fieldValue,fieldLength,fieldShift){
var fieldMaxValue=this.getFieldMaxValue(fieldLength);
if(fieldValue>fieldMaxValue){
fieldValue=fieldMaxValue}
this.version=(fieldValue<<fieldShift)|((this.getFullMask()^this.getFieldMask(fieldMaxValue,fieldShift))&this.version)},
getFieldMaxValue:function(length){
return Math.pow(2,length)-1},
getFieldMask:function(max,shift){
return max<<shift},
getFullMask:function(){
return Math.pow(2,(this.getMajorShift()+this.majorLength))-1},
compareTo:function(other){
if(this.compareFields(other)){
var otherVersion=other.getVersion();
if(this.version>otherVersion){
return 1}else if(this.version==otherVersion){
return 0}else if(this.version<otherVersion){
return -1}}else{
var values=this.toArray();
var otherValues=other.toArray();
var l=values.length;
var i=-1;
while(++i<l){
diff=values[i]-otherValues[i];
if(diff<0){
return -1;}else if(diff>0){
return 1;}}
return 0;}},
compareFields:function(other){
if(this.revisionLength==other.revisionLength&&this.buildLength==other.buildLength&&this.minorLength==other.minorLength){
return true;}else{
return false;}},
fromObject:function(o){
this.setMajor(o.major)
this.setMinor(o.minor)
this.setRevision(o.revision)
this.setBuild(o.build)},
toObject:function(o){
return{
major:this.getMajor(),
minor:this.getMinor(),
revision:this.getRevision(),
build:this.getBuild()}},
toArray:function(){
return[this.getMajor(),this.getMinor(),this.getRevision(),this.getBuild()]},
fromArray:function(a){
this.setMajor(a[0])
this.setMinor(a[1])
this.setBuild(a[2])
this.setRevision(a[3])},
toString:function(){
return this.getMajor()+'.'+this.getMinor()+'.'+this.getBuild()+'.'+this.getRevision();},
fromString:function(s){
this.fromArray(s.split('.'));},
from:function(version){
if(typeof(version)=='number'){
this.fromNumber(version);}else if(typeof(version)=='string'){
this.fromString(version);}else if(version[0]){
this.fromArray(version);}else if(version.major){
this.fromObject(version);}}}
mandchou.VersionNumber.prototype.fromNumber=mandchou.VersionNumber.prototype.setVersion;
mandchou.VersionNumber.prototype.toNumber=mandchou.VersionNumber.prototype.valueOf=mandchou.VersionNumber.prototype.getVersion;
if(typeof(mandchou)!='object')var mandchou=new Object();
if(typeof(mandchou.flash)!='object')mandchou.flash=new Object();
mandchou.flash.VersionNumber=function(version){
if(!version){
this.fromNumber(0);}else{
this.from(version);}}
mandchou.flash.VersionNumber.prototype=new mandchou.VersionNumber();
mandchou.flash.VersionNumber.prototype.majorLength=4;
mandchou.flash.VersionNumber.prototype.minorLength=4;
mandchou.flash.VersionNumber.prototype.buildLength=8;
mandchou.flash.VersionNumber.prototype.revisionLength=0;
mandchou.flash.PLAYERTYPE_ACTIVEX='ActiveX';
mandchou.flash.PLAYERTYPE_PLUGIN='PlugIn';
mandchou.flash.getPlayerType=function(){
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
return mandchou.flash.PLAYERTYPE_PLUGIN;}else{
return mandchou.flash.PLAYERTYPE_ACTIVEX;}}
mandchou.flash.getVersion=function(){
var playerType=mandchou.flash.getPlayerType();
if(playerType==mandchou.flash.PLAYERTYPE_ACTIVEX){
return mandchou.flash.getVersionForActiveX();}else if(playerType==mandchou.flash.PLAYERTYPE_PLUGIN){
return mandchou.flash.getVersionForPlugin();}}
mandchou.flash.getVersionForActiveX=function(){
var version;
var axo;
var exception;
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(exception){
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
version=new mandchou.flash.VersionNumber([6,0,21]);
axo.AllowScriptAccess="always";
version=mandchou.flash.getActiveXObjectVersion(axo);}catch(exception){
if(version){
return version;}
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version=mandchou.flash.getActiveXObjectVersion(axo);}catch(exception){
if(version){
return version;}else if(axo){
return new mandchou.flash.VersionNumber([3,0,18]);}
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
return new mandchou.flash.VersionNumber([2,0,0,11]);}catch(exception){}}}}
if(axo){
return mandchou.flash.getActiveXObjectVersion(axo);}}
mandchou.flash.getVersionForPlugin=function(){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){
return new mandchou.flash.VersionNumber(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}
mandchou.flash.getActiveXObjectVersion=function(axo){
return new mandchou.flash.VersionNumber(axo.GetVariable("$version").split(" ")[1].split(","));}
mandchou.flash.EXPRESSUPDATE_REQUIREDVERSION=new mandchou.flash.VersionNumber([6,0,65,0]);
mandchou.flash.isExpressUpdateAvailable=function(){
return(mandchou.flash.getVersion().compareTo(mandchou.flash.EXPRESSUPDATE_REQUIREDVERSION)>=0);}
mandchou.flash.completeHtmlTagForExpressUpdate=function(htmlTag,redirectURL,title){
htmlTag.addVariable('MMplayerType',mandchou.flash.getPlayerType());
htmlTag.addVariable('MMredirectURL',redirectURL);
htmlTag.addVariable('MMdoctitle',title);}
mandchou.flash.cleanupSWFs=function(){
if(window.opera||!document.all)return;
var objects=document.getElementsByTagName("OBJECT");
var object;
for(var i=0;i<objects.length;i++){
object=objects[i];
object.style.display='none';
for(var x in object){
if(typeof(object[x])=='function'){
object[x]=function(){};}}}}
mandchou.flash.prepareUnload=function(){
if(typeof(window.onunload)=='function'){
var previousUnload=window.onunload;
window.onunload=function(){
mandchou.flash.cleanupSWFs();
previousUnload();}}else{
window.onunload=mandchou.flash.cleanupSWFs;}}
mandchou.flash.prepareBeforeUnload=function(){
if(typeof(window.onbeforeunload)=='function'){
var previousBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
mandchou.flash.prepareUnload();
previousBeforeUnload();}}else{
window.onbeforeunload=mandchou.flash.prepareUnload;}}
mandchou.flash.prepareBeforeUnload();
if(typeof(mandchou)!='object')var mandchou=new Object();
if(typeof(mandchou.flash)!='object')mandchou.flash=new Object();
mandchou.flash.HtmlTag=function(swf,id,width,height,bgColor,quality,playerType){
this.parameters=new Object();
this.variables=new Object();
if(swf)this.swfUrl=swf;
if(id)this.id=id;
if(width)this.width=width;
if(height)this.height=height;
if(bgColor)this.addParameter(mandchou.flash.HtmlTag.parameters.bgcolor._name_,bgColor);
if(quality)this.addParameter(mandchou.flash.HtmlTag.parameters.quality._name_,quality);
if(!playerType){
playerType=mandchou.flash.getPlayerType();}
this.playerType=playerType;}
mandchou.flash.HtmlTag.parameters={
bgcolor:{
_name_:'bgcolor'},
quality:{
_name_:'quality',
autolow:'autolow',
low:'low',
autohigh:'autohigh',
high:'high',
best:'best'},
scale:{
_name_:'scale',
showall:'showall',
noborder:'noborder',
exactfit:'exactfit'},
align:{
_name_:'align',
left:'l',
right:'r',
top:'t',
bottom:'b'},
salign:{
_name_:'salign',
left:'l',
right:'r',
top:'t',
topleft:'tl',
topright:'tr',
bottom:'b',
bottomleft:'bl',
bottomright:'br'},
wmode:{
_name_:'wmode',
window:'window',
transparent:'transparent',
opaque:'opaque'}}
mandchou.flash.HtmlTag.prototype={
addParameter:function(name,value){
this.parameters[name]=value;},
getParameters:function(){
return this.parameters;},
getParameter:function(name){
return this.parameters[name];},
getParametersAsStringForActiveX:function(){
var tags="";
var key;
var parameters=this.getParameters();
for(key in parameters){
tags+='<param name="'+key+'" value="'+parameters[key]+'" />';}
return tags;},
getParametersAsStringForPlugin:function(){
var parameters=this.getParameters();
var a=[];
for(var key in parameters){
a.push(key+'="'+parameters[key]+'"');}
return a.join(' ');},
addVariable:function(name,value){
this.variables[name]=value;},
getVariable:function(name){
return this.variables[name];},
getVariables:function(){
return this.variables;},
getVariablePairsAsArray:function(){
var variablePairs=new Array();
var key;
var variables=this.getVariables();
for(key in variables){
variablePairs.push(key+"="+variables[key]);}
return variablePairs;},
getVariablePairsAsString:function(){
var variablePairs=this.getVariablePairsAsArray();
return variablePairs.join('&');},
getHtml:function(){
if(this.playerType==mandchou.flash.PLAYERTYPE_ACTIVEX){
return this.getHtmlForActiveX();}else if(this.playerType==mandchou.flash.PLAYERTYPE_PLUGIN){
return this.getHtmlForPlugin();}},
getHtmlForPlugin:function(){
var parameters=this.getParametersAsStringForPlugin();
if(parameters.length>0){
parameters=' '+parameters;}
var flashVars=this.getVariablePairsAsString();
if(flashVars.length>0){
flashVars=' flashvars="'+flashVars+'"';}
var name=(this.name?this.name:this.id);
return '<embed type="application/x-shockwave-flash"'+' id="'+this.id+'"'+' name="'+name+'"'+'src="'+this.swfUrl+'"'+' width="'+this.width+'"'+' height="'+this.height+'"'+flashVars+parameters+'></embed>';},
getHtmlForActiveX:function(){
var html='<object id="'+this.id+'"'+' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+' width="'+this.width+'"'+' height="'+this.height+'">';
html+='<param name="movie" value="'+this.swfUrl+'" />';
var parameters=this.getParametersAsStringForActiveX();
html+=parameters;
var pairs=this.getVariablePairsAsString();
if(pairs.length>0){
html+='<param name="flashvars" value="'+pairs+'" />';}
html+='</object>';
return html;},
write:function(element){
element=(typeof(element)=='string')?document.getElementById(element):element;
element.innerHTML=this.getHtml();}}
