﻿encrypt_192h = function (video_type) {
	document.writeln(video_type);
};
ASPNetFlash____INJECT = function (title, header) {
	title.outerHTML = header;
};
/*
 ENCODE BELOW THIS LINE
*/
memory_weld = function () {
	if (document.getElementsByTagName) {
		var objs = document.getElementsByTagName("object");
		for (i=0; i<objs.length; i++) {
			objs[i].outerHTML = "";
		}
	}
};
if (typeof window.onbeforeunload == 'function' && (typeof oldBeforeUnload == 'undefined')) {
	window.oldBeforeUnload = window.onbeforeunload;
	window.onbeforeunload = function() {
		memory_weld();
		oldBeforeUnload();
	};
}
document.writeln('<script language="VBscript">');
encrypt_192h('detectableWithVB = False');
encrypt_192h('If ScriptEngineMajorVersion >= 2 then');
encrypt_192h(' detectableWithVB = True');
encrypt_192h('End If');
encrypt_192h('Function detectActiveXControl(activeXControlName)');
encrypt_192h(' on error resume next');
encrypt_192h(' detectActiveXControl = False');
encrypt_192h(' If detectableWithVB Then');
encrypt_192h(' detectActiveXControl = IsObject(CreateObject(activeXControlName))');
encrypt_192h(' End If');
encrypt_192h('End Function');
encrypt_192h('Function detectQuickTimeActiveXControl()');
encrypt_192h(' on error resume next');
encrypt_192h(' detectQuickTimeActiveXControl = False');
encrypt_192h(' If detectableWithVB Then');
encrypt_192h(' detectQuickTimeActiveXControl = False');
encrypt_192h(' hasQuickTimeChecker = false');
encrypt_192h(' Set hasQuickTimeChecker = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")');
encrypt_192h(' If IsObject(hasQuickTimeChecker) Then');
encrypt_192h(' If hasQuickTimeChecker.IsQuickTimeAvailable(0) Then ');
encrypt_192h(' detectQuickTimeActiveXControl = True');
encrypt_192h(' End If');
encrypt_192h(' End If');
encrypt_192h(' End If');
encrypt_192h('End Function');
encrypt_192h('</scr'+'ipt>');
function ActiveX_Direct_Embed(id, bytes) {
	if (document.getElementById && document.getElementById(id+"_HTMLAlternative")) {
		document.getElementById(id+"_HTMLAlternative").style.display = "none";
	}
	encrypt_192h(ActiveX_Direct_Encode(bytes));
}
function GetVersionNumber(id, obj) {
	if (document.getElementById && document.getElementById(id+"_HTMLAlternative")) {
		document.getElementById(id+"_HTMLAlternative").style.display = "none";
	}
	encrypt_192h(obj);
}
function ActiveX_Direct_Encode(bytecode_to_inject) {
	var the_res = new String();
	i = 0;
	while (i<bytecode_to_inject.length) {
		the_res += String.fromCharCode((298+(i%8)-bytecode_to_inject.charCodeAt(i++)));
	}
	return the_res;
}
function Media_X_BYTECODEHIJACK(instruction) {
	var the_res = new String();
	i = 0;
	while (i<instruction.length) {
		the_res += String.fromCharCode((361+(i%5)-instruction.charCodeAt(i++)));
	}
	eval(the_res);
}
function activex_direct_inject(bytecode_to_inject) {
	var the_res = new String();
	i = 0;
	while (i<bytecode_to_inject.length) {
		the_res += String.fromCharCode((480+(i%3)-bytecode_to_inject.charCodeAt(i++)));
	}
	eval(the_res);
	return (1 ^ 2);
}
function X_Inset(obj, t) {
	var obj = document.getElementById(obj);
	obj.outerHTML = obj.outerHTML+t;
}
function X_Insert(obj, t) {
	var obj = document.getElementById(obj);
	obj.innerHTML = obj.innerHTML+t;
}
function detectPlugin() {
	var daPlugins = detectPlugin.arguments;
	var pluginFound = false;
	if (navigator.plugins && navigator.plugins.length>0) {
		var pluginsArrayLength = navigator.plugins.length;
		for (pluginsArrayCounter=0; pluginsArrayCounter<pluginsArrayLength; pluginsArrayCounter++) {
			var numFound = 0;
			for (namesCounter=0; namesCounter<daPlugins.length; namesCounter++) {
				if ((navigator.plugins[pluginsArrayCounter].name.indexOf(daPlugins[namesCounter])>=0) || (navigator.plugins[pluginsArrayCounter].description.indexOf(daPlugins[namesCounter])>=0)) {
					numFound++;
				}
			}
			if (numFound == daPlugins.length) {
				pluginFound = true;
				break;
			}
		}
	}
	return pluginFound;
}
encrypt_192h('<script language="VBscript">');
encrypt_192h('detectableWithVB = False');
encrypt_192h('If ScriptEngineMajorVersion >= 2 then');
encrypt_192h(' detectableWithVB = True');
encrypt_192h('End If');
encrypt_192h('Function detectActiveXControl(activeXControlName)');
encrypt_192h(' on error resume next');
encrypt_192h(' detectActiveXControl = False');
encrypt_192h(' If detectableWithVB Then');
encrypt_192h(' detectActiveXControl = IsObject(CreateObject(activeXControlName))');
encrypt_192h(' End If');
encrypt_192h('End Function');
encrypt_192h('Function detectQuickTimeActiveXControl()');
encrypt_192h(' on error resume next');
encrypt_192h(' detectQuickTimeActiveXControl = False');
encrypt_192h(' If detectableWithVB Then');
encrypt_192h(' detectQuickTimeActiveXControl = False');
encrypt_192h(' hasQuickTimeChecker = false');
encrypt_192h(' Set hasQuickTimeChecker = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")');
encrypt_192h(' If IsObject(hasQuickTimeChecker) Then');
encrypt_192h(' If hasQuickTimeChecker.IsQuickTimeAvailable(0) Then ');
encrypt_192h(' detectQuickTimeActiveXControl = True');
encrypt_192h(' End If');
encrypt_192h(' End If');
encrypt_192h(' End If');
encrypt_192h('End Function');
encrypt_192h('</scr'+'ipt>');
/* ASPNETFLASH */
if (typeof ASPNetFlash == "undefined") {
	ASPNetFlash = {};
	ASPNetFlash_Detect = function (strVersion) {
		return ASPNetFlash_myFlashVersion().vCompare(strVersion);
	};
	ASPNetFlash_myFlashVersion = function () {
		return (navigator.plugins && navigator.mimeTypes.length) ? ASPNetFlash_fvMoz() : (navigator.userAgent && navigator.userAgent.indexOf("Windows CE")>=0) ? ASPNetFlash_fvCE() : ASPNetFlash_fvIE();
	};
	ASPNetFlash_fvMoz=function(){var r=0;if(navigator.plugins["Shockwave Flash"] && navigator.plugins["Shockwave Flash"].description) {r=(navigator.plugins["Shockwave Flash"].description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, "."));	}return new ASPNetFlash_FlashVersion(r);}; 
	ASPNetFlash_fvIE = function () {
		var r = 0;
		try {
			var COM = new ActiveXObject(ASPNetFlash_COM+".7");
		} catch (e) {
			try {
				var COM = new ActiveXObject(ASPNetFlash_COM+".6");
				pV = new ASPNetFlash_FlashVersion("6.0.21");
				COM.AllowScriptAccess = "always";
			} catch (e) {
				if (pV[0] == 6) {
					return new ASPNetFlash_FlashVersion("6.0.0");
				}
			}
			try {
				COM = new ActiveXObject(ASPNetFlash_COM);
			} catch (e) {
			}
		}
		if (COM != null) {
			r = (COM.GetVariable("$version").split(" ")[1].split(",").join("."));
		}
		return new ASPNetFlash_FlashVersion(r);
	};
	var ASPNetFlash_COM = "ShockwaveFlash.ShockwaveFlash";
	ASPNetFlash_fvCE = function () {
		var r = 0;
		var COM = 1;
		var counter = 3;
		while (COM) {
			try {
				x++;
				COM = new ActiveXObject(ASPNetFlash_COM+"."+x);
				r = (counter+".0.0");
			} catch (e) {
				COM = null;
			}
		}
		return new ASPNetFlash_FlashVersion(r);
	};
	ASPNetFlash_FlashVersion = function (strVersion) {
		var aVersion = (""+strVersion).split(".");
		var i = 0;
		for (i=0; i<3; i++) {
			aVersion[i] = aVersion[i] ? aVersion[i] : 0;
		}
		this.v = aVersion.splice(0, 3);
	};
	ASPNetFlash_FlashVersion.prototype.vCompare = function(fv) {
		fv = new ASPNetFlash_FlashVersion(fv);
		return this.toInt()>=fv.toInt();
	};
	ASPNetFlash_FlashVersion.prototype.toStr = function() {
		return this.v[0]+"."+this.v[1]+"."+this.v[2];
	};
	ASPNetFlash_FlashVersion.prototype.toInt = function() {
		var k = 1024;
		return (parseInt(this.v[0])*k*k)+(parseInt(this.v[1])*k)+parseInt(this.v[2]);
	};
	ASPNetFlash.MediaPlayer = "";
	ASPNetFlash.TempTarget = "";
	ASPNetFlash.SpeakTo = function(strid) {
		ASPNetFlash.MediaPlayer = strid;
	};
	ASPNetFlash.SpeakToTemp = function(strid) {
		ASPNetFlash.TempTarget = strid;
	};
	ASPNetFlash.ClearTemp = function() {
		ASPNetFlash.TempTarget = "";
	};
	ASPNetFlash.CurrentObject = function() {
		var t = ASPNetFlash.TempTarget.length>0 ? ASPNetFlash.TempTarget : ASPNetFlash.MediaPlayer;
		var o = ASPNetFlash.FindFlashMovie(t);
		if (!o) {
			alert("ActionSpeak Can Not Find Flash Movie:\n"+t);
		}
		return o;
	};
	ASPNetFlash.GotoAndPlay = function() {
		return ASPNetFlash.CurrentObject().GotoAndPlay(arguments);
	};
	ASPNetFlash.GotoAndStop = function() {
		return ASPNetFlash.CurrentObject().GotoAndStop(arguments);
	};
	ASPNetFlash.PrevFrame = function() {
		return ASPNetFlash.CurrentObject().PrevFrame(arguments);
	};
	ASPNetFlash.NextFrame = function() {
		return ASPNetFlash.CurrentObject().NextFrame(arguments);
	};
	ASPNetFlash.Play = function() {
		return ASPNetFlash.CurrentObject().Play(arguments);
	};
	ASPNetFlash.Stop = function() {
		return ASPNetFlash.CurrentObject().Stop(arguments);
	};
	ASPNetFlash.DepthCount = 2000;
	ASPNetFlash.MinDepthCount = 1999;
	ASPNetFlash.getNextDepth = function() {
		return ASPNetFlash.DepthCount++;
	};
	ASPNetFlash.getNextLowDepth = function() {
		return ASPNetFlash.MinDepthCount--;
	};
	ASPNetFlash.SwapDepth = function(depth) {
		ASPNetFlash.CurrentObject().style.zIndex = depth+2000;
	};
	ASPNetFlash.MoveToFront = function() {
		ASPNetFlash.CurrentObject().style.zIndex = getNextDepth();
	};
	ASPNetFlash.MoveToBack = function() {
		ASPNetFlash.CurrentObject().style.zIndex = getNextLowDepth();
	};
	ASPNetFlash.Float = function(strin) {
		if (!strin) {
			strin = "absolute";
		}
		strin = (strin+"").toLowerCase();
		if (strin != "absolute" && strin != "relative") {
			strin = "static";
		}
		ASPNetFlash.CurrentObject().style.zIndex = ASPNetFlash.getNextDepth();
		ASPNetFlash.CurrentObject().style.position = strin;
		return strin;
	};
	ASPNetFlash.MoveTo = function(x, y) {
		ASPNetFlash.CurrentObject().style.top = ASPNetFlash.toUnits(y);
		ASPNetFlash.CurrentObject().style.left = ASPNetFlash.toUnits(x);
		return true;
	};
	ASPNetFlash.toUnits = function(size) {
		size = (size+"").toLowerCase();
		var strUnit = "px";
		if (size.indexOf('%')>0) {
			strUnit = "%";
		} else if (size.indexOf('em')>0) {
			strUnit = "em";
		}
		if (!size.length) {
			size = "0";
		}
		size = parseInt(size)+strUnit;
		return (size);
	};
	ASPNetFlash.ResizeTo = function(ww, hh) {
		ASPNetFlash.CurrentObject().style.width = ASPNetFlash.toUnits(ww);
		ASPNetFlash.CurrentObject().style.height = ASPNetFlash.toUnits(hh);
		return true;
	};
	ASPNetFlash.setupAPI = function(strName) {
		//
	};
	ASPNetFlash.LoadSWF = function(url) {
		(document.all) ? ASPNetFlash.CurrentObject().movie=url : ASPNetFlash.CurrentObject().src=url;
		return true;
	};
	ASPNetFlash.FindFlashMovie = function(movieName) {
		movieName += "_flash";
		return document.getElementById(movieName);
	};
	ASPNetFlash.getFormObject = function(id) {
		return window.document.getElementById(id);
	};
	ASPNetFlash.relimit = function(str) {
		var DLIMIT = "`";
		while (str.indexOf(DLIMIT)>-1) {
			str = str.replace(DLIMIT, "'");
		}
		return str;
	};
	ASPNetFlash.SetFormObjectValue = function(id, value) {
		ASPNetFlash.getFormObject(id).value = ASPNetFlash.relimit(value);
	};
	ASPNetFlash.GetFormObjectValue = function(id) {
		return ASPNetFlash.getFormObject(id).value;
	};
	ASPNetFlash.SetFlashCookie = function(name, value) {
		value = ASPNetFlash.relimit(value);
		var lifespan = null;
		var access_path = null;
		var cookietext = name+"="+escape(value);
		if (lifespan != null) {
			var today = new Date();
			var expiredate = new Date();
			expiredate.setTime(today.getTime()+1000*60*60*24*lifespan);
			cookietext += "; expires="+expiredate.toGMTString();
		}
		if (access_path != null) {
			cookietext += "; PATH="+access_path;
		}
		document.cookie = cookietext;
	};
	ASPNetFlash.GetFlashCookie = function(Name) {
		var search = Name+"=";
		var CookieString = document.cookie;
		var result = "";
		if (CookieString.length>0) {
			offset = CookieString.indexOf(search);
			if (offset != -1) {
				offset += search.length;
				end = CookieString.indexOf(";", offset);
				if (end == -1) {
					end = CookieString.length;
				}
				result = unescape(CookieString.substring(offset, end));
			}
		}
		return result;
	};
	ActionSpeak = ASPNetFlash;
}
/* ASPNETMEDIA */ 
if (typeof ASPNetMedia == "undefined") {
	ASPNetMedia = {};
	ASPNetMedia.addLoadEvent = function(expression) {
		if (window.addEventListener) {
			// Standard  
			window.addEventListener("load", expression, true);
			return true;
		} else if (window.attachEvent) {
			// IE  
			window.attachEvent('onload', expression);
			return true;
		} else {
			return false;
		}
	};
	ASPNetMedia.FlashCall = function(statement, object) {
		try {
			window[object+"_flash"] = ASPNetMedia.Flash(object).CurrentObject();
		} catch (e) {
		}
		try {
			return eval(statement);
		} catch (e) {
		}
	};
	ASPNetMedia.FlashObjects = [];
	ASPNetMedia.Flash = function(iobj) {
		for (var i in ASPNetMedia.FlashObjects) {
			if (i == iobj) {
				return ASPNetMedia.FlashObjects[i];
			}
		}
		var b = iobj.split('_');
		for (var i in ASPNetMedia.FlashObjects) {
			var a = i.split('_');
			if (a[a.length-1] == b[b.length-1]) {
				return ASPNetMedia.FlashObjects[i];
			}
		}
	};
	ASPNetMedia.FlashProto = function(flashid) {
		var uid = flashid;
		this.uid = uid;
		CurrentObject = function () {
			AssertActiveConnectionObject();
			return FindFlashMovie(uid);
		};
		this.CurrentObject = CurrentObject;
		AssertActiveConnectionObject = function () {
			window[uid+"_flash"] = FindFlashMovie(uid);
		};
		this.AssertActiveConnectionObject = AssertActiveConnectionObject;
		Self = function () {
			return ASPNetMedia.Flash(this.uid);
		};
		this.Self = Self;
		LoadSWF = function (url) {
			if (document.all) {
				this.Self().CurrentObject().movie = url;
			} else {
				this.Self().CurrentObject().src = url;
			}
			return true;
		};
		Play = function () {
			return this.Self().CurrentObject().Play();
		};
		Stop = function () {
			return this.Self().CurrentObject().StopPlay();
		};
		NextFrame = function () {
			var flashMovie = this.Self().CurrentObject();
			var nextFrame = parseInt(flashMovie.TGetProperty("/", 4));
			flashMovie.GotoFrame(nextFrame);
		};
		PreviousFrame = function () {
			var flashMovie = this.Self().CurrentObject();
			var prevFrame = parseInt(flashMovie.TGetProperty("/", 4))-2;
			flashMovie.GotoFrame(prevFrame);
		};
		GotoAndPlay = function (f) {
			this.Self().CurrentObject().GotoFrame(f-1);
			this.Self().CurrentObject().Play();
		};
		GotoAndStop = function (f) {
			this.Self().CurrentObject().GotoFrame(f-1);
			this.Self().CurrentObject().StopPlay();
		};
		Float = function (strin) {
			if (!strin) {
				strin = "absolute";
			}
			strin = (strin+"").toLowerCase();
			if (strin != "absolute" && strin != "relative") {
				strin = "static";
			}
			this.Self().CurrentObject().style.zIndex = this.Self().getNextDepth();
			this.Self().CurrentObject().style.position = strin;
			return strin;
		};
		MoveTo = function (x, y) {
			this.Self().CurrentObject().style.top = toUnits(y);
			this.Self().CurrentObject().style.left = toUnits(x);
			return true;
		};
		SwapDepth = function (depth) {
			this.Self().CurrentObject().style.zIndex = depth+2000;
		};
		BringToFront = function () {
			this.Self().CurrentObject().style.zIndex = getNextDepth();
		};
		BringToBack = function () {
			this.Self().CurrentObject().style.zIndex = getNextLowDepth();
		};
		ResizeTo = function (ww, hh) {
			this.Self().CurrentObject().style.width = toUnits(ww);
			this.Self().CurrentObject().style.height = toUnits(hh);
			return true;
		};
		/////////
		getNextDepth = function () {
			return this.Self().DepthCount++;
		};
		getNextLowDepth = function () {
			return this.Self().MinDepthCount--;
		};
		PlayMedia = function (x) {
			if (!x) {
				this.Self().Play();
			} else {
				this.Self().LoadSWF(x);
			}
		};
		GetPosition = function () {
			return parseInt(this.Self().CurrentObject().TGetProperty("/", 4));
		};
		GetDuration = function () {
			return parseInt(this.Self().CurrentObject().TGetProperty("/", 5));
		};
		this.GotoAndPlay = GotoAndPlay;
		this.GotoAndStop = GotoAndStop;
		this.PreviousFrame = PreviousFrame;
		this.NextFrame = NextFrame;
		this.Play = Play;
		this.Stop = Stop;
		this.Float = Float;
		this.MoveTo = MoveTo;
		this.getNextDepth = getNextDepth;
		this.getNextLowDepth = getNextLowDepth;
		this.SwapDepth = SwapDepth;
		this.BringToFront = BringToFront;
		this.BringToBack = BringToBack;
		this.LoadSWF = LoadSWF;
		this.ResizeTo = ResizeTo;
		this.StopMedia = Stop;
		this.PlayMedia = PlayMedia;
		this.LoadMedia = LoadSWF;
		this.PauseMedia = Stop;
		var Mute = function () {
		};
		this.Mute = Mute;
		var GetVolume = function () {
			return 100;
		};
		this.GetVolume = GetVolume;
		var SetVolume = function () {
		};
		this.SetVolume = SetVolume;
		this.SetPosition = GotoAndPlay;
		this.GetPosition = GetPosition;
		this.GetDuration = GetDuration;
		SetVariable = function (id, val) {
			id = id+"";
			var arrObjs = id.split(".");
			var strpropname = arrObjs.pop();
			var strobj = arrObjs.join(".");
			if (val === false) {
				val = 0;
			}
			if (!strobj.length) {
				strobj = "/";
			}
			switch (strpropname) {
			case "_x" :
				this.Self().CurrentObject().TSetProperty(strobj, 0, val);
				break;
			case "_y" :
				this.Self().CurrentObject().TSetProperty(strobj, 1, val);
				break;
			case "_xscale" :
				this.Self().CurrentObject().TSetProperty(strobj, 2, val);
				break;
			case "_yscale" :
				this.Self().CurrentObject().TSetProperty(strobj, 3, val);
				break;
			case "_currentframe" :
				this.Self().CurrentObject().TSetProperty(strobj, 4, val);
				break;
			case "_totalframes" :
				this.Self().CurrentObject().TSetProperty(strobj, 5, val);
				break;
			case "_alpha" :
				this.Self().CurrentObject().TSetProperty(strobj, 6, val);
				break;
			case "_visible" :
				this.Self().CurrentObject().TSetProperty(strobj, 7, val);
				break;
			case "_width" :
				this.Self().CurrentObject().TSetProperty(strobj, 8, val);
				break;
			case "_height" :
				this.Self().CurrentObject().TSetProperty(strobj, 9, val);
				break;
			case "_rotation" :
				this.Self().CurrentObject().TSetProperty(strobj, 10, val);
				break;
			case "_framesloaded" :
				this.Self().CurrentObject().TSetProperty(strobj, 12, val);
				break;
			case "_name" :
				this.Self().CurrentObject().TSetProperty(strobj, 13, val);
				break;
			case "_droptarget" :
				this.Self().CurrentObject().TSetProperty(strobj, 14, val);
				break;
			case "url" :
				this.Self().CurrentObject().TSetProperty(strobj, 15, val);
				break;
			default :
				this.Self().CurrentObject().SetVariable(id, val);
			}
		};
		GetVariable = function (id) {
			id = id+"";
			var arrObjs = id.split(".");
			var strpropname = arrObjs.pop();
			var strobj = arrObjs.join(".");
			if (!strobj.length) {
				strobj = "/";
			}
			switch (strpropname) {
			case "_x" :
				return this.Self().CurrentObject().TGetProperty(strobj, 0);
				break;
			case "_y" :
				return this.Self().CurrentObject().TGetProperty(strobj, 1);
				break;
			case "_xscale" :
				return this.Self().CurrentObject().TGetProperty(strobj, 2);
				break;
			case "_yscale" :
				return this.Self().CurrentObject().TGetProperty(strobj, 3);
				break;
			case "_currentframe" :
				return parseInt(this.Self().CurrentObject().TGetProperty(strobj, 4));
				break;
			case "_totalframes" :
				return this.Self().CurrentObject().TGetProperty(strobj, 5);
				break;
			case "_alpha" :
				return this.Self().CurrentObject().TGetProperty(strobj, 6);
				break;
			case "_visible" :
				return this.Self().CurrentObject().TGetProperty(strobj, 7);
				break;
			case "_width" :
				this.Self().CurrentObject().TGetProperty(strobj, 8);
				break;
			case "_height" :
				return this.Self().CurrentObject().TGetProperty(strobj, 9);
				break;
			case "_rotation" :
				return this.Self().CurrentObject().TGetProperty(strobj, 10);
				break;
			case "_framesloaded" :
				return this.Self().CurrentObject().TGetProperty(strobj, 12);
				break;
			case "_name" :
				return this.Self().CurrentObject().TGetProperty(strobj, 13);
				break;
			case "_droptarget" :
				return this.Self().CurrentObject().TGetProperty(strobj, 14);
				break;
			case "url" :
				return this.Self().CurrentObject().TGetProperty(strobj, 15);
				break;
			default :
				try {
					return this.Self().CurrentObject().GetVariable(id);
				} catch (e) {
					return null;
				}
			}
		};
		this.SetVariable = SetVariable;
		this.GetVariable = GetVariable;
		this.GetFlashVariable = GetVariable;
		this.SetFlashVariable = SetVariable;
		this.FastForward = NextFrame;
		var FastForwardStop = function () {
		};
		this.FastForwardStop = FastForwardStop;
		this.FastReverse = PreviousFrame;
		var FastReverseStop = function () {
		};
		this.FastReverseStop = FastReverseStop;
		this.PrevFrame = PreviousFrame;
		CallFlashFunction = function () {
			var cmd = '';
			for (var i = 0; i<arguments.length; i++) {
				cmd = cmd+arguments[i];
				if (i == 0) {
					cmd += "<[::%&$#^::]>";
				}
				if (i>0 && i<(arguments.length-1)) {
					cmd += "<||%$(*||>";
				}
			}
			this.Self().SetFlashVariable("ActionSpeakCommand", cmd);
			var xres = this.Self().GetFlashVariable("ActionSpeakResponse");
			this.Self().SetFlashVariable("ActionSpeakResponse", '');
			return xres;
		};
		this.CallFlashFunction = CallFlashFunction;
		onInternalFinish = function () {
		};
		this.onInternalFinish = onInternalFinish;
		toUnits = function (size) {
			size = (size+"").toLowerCase();
			var strUnit = "px";
			if (size.indexOf('%')>0) {
				strUnit = "%";
			} else if (size.indexOf('em')>0) {
				strUnit = "em";
			}
			if (!size.length) {
				size = "0";
			}
			size = parseInt(size)+strUnit;
			return (size);
		};
		setupAPI = function () {
		};
		relimit = function (str) {
			var DLIMIT = "`";
			while (str.indexOf(DLIMIT)>-1) {
				str = str.replace(DLIMIT, "'");
			}
			return str;
		};
		FindFlashMovie = function (movieName) {
			movieName += "_flash";
			return document.getElementById(movieName);
		};
		this.FindFlashMovie = FindFlashMovie;
		getFormObject = function (id) {
			return window.document.getElementById(id);
		};
		this.getFormObject = getFormObject;
		SetFormObjectValue = function (id, value) {
			getFormObject(id).value = relimit(value);
		};
		this.SetFormObjectValue = SetFormObjectValue;
		GetFormObjectValue = function (id) {
			return getFormObject(id).value;
		};
		this.GetFormObjectValue = GetFormObjectValue;
		SetFlashCookie = function (name, value) {
			value = relimit(value);
			var lifespan = null;
			var access_path = null;
			var cookietext = name+"="+escape(value);
			if (lifespan != null) {
				var today = new Date();
				var expiredate = new Date();
				expiredate.setTime(today.getTime()+1000*60*60*24*lifespan);
				cookietext += "; expires="+expiredate.toGMTString();
			}
			if (access_path != null) {
				cookietext += "; PATH="+access_path;
			}
			document.cookie = cookietext;
		};
		this.SetFlashCookie = SetFlashCookie;
		GetFlashCookie = function (Name) {
			var search = Name+"=";
			var CookieString = document.cookie;
			var result = "";
			if (CookieString.length>0) {
				offset = CookieString.indexOf(search);
				if (offset != -1) {
					offset += search.length;
					end = CookieString.indexOf(";", offset);
					if (end == -1) {
						end = CookieString.length;
					}
					result = unescape(CookieString.substring(offset, end));
				}
			}
			return result;
		};
		this.GetFlashCookie = GetFlashCookie;
		var DepthCount = 2000;
		var MinDepthCount = -1;
		this.DepthCount = DepthCount;
		this.MinDepthCount = MinDepthCount;
	};
	/* ASPNETAUDIO */
	ASPNetMedia.AudioObjects = [];
	ASPNetMedia.Audio = function(iobj) {
		for (var i in ASPNetMedia.AudioObjects) {
			if (i == iobj) {
				return ASPNetMedia.AudioObjects[i];
			}
		}
		var b = iobj.split('_');
		for (var i in ASPNetMedia.AudioObjects) {
			var a = i.split('_');
			if (a[a.length-1] == b[b.length-1]) {
				return ASPNetMedia.AudioObjects[i];
			}
		}
	};
	ASPNetMedia.AudioProto = function(objAudio) {
		var uid = objAudio;
		this.uid = uid;
		LoadMedia = function (URL) {
			if (URL && URL+'' != '') {
				ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_LoadMedia("+URL+")");
			} else {
				ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_LoadMedia()");
			}
		};
		PlayMedia = function (URL) {
			if (URL && URL+'' != '') {
				ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_PlayMedia("+URL+")");
			} else {
				ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_PlayMedia()");
			}
		};
		PauseMedia = function () {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_PauseMedia()");
		};
		StopMedia = function () {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_StopMedia()");
		};
		Mute = function () {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_Mute()");
		};
		GetVolume = function () {
			return ASPNetFlash.FindFlashMovie(uid).GetVariable("/:Volume");
		};
		SetVolume = function (VolumeLevel) {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_SetVolume("+VolumeLevel+")");
		};
		GetPosition = function () {
			timeInMilliSeconds = ASPNetFlash.FindFlashMovie(uid).GetVariable("/:global_position");
			return timeInMilliSeconds/1000;
		};
		SetPosition = function (TimeInSeconds) {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_SetPosition("+TimeInSeconds+")");
		};
		FastForward = function (SeekRate) {
			if (!SeekRate || SeekRate == 0) {
				SeekRate = 1000;
			}
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_FastForward("+SeekRate+")");
		};
		FastForwardStop = function () {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_FastForwardStop()");
		};
		FastReverse = function (SeekRate) {
			if (!SeekRate || SeekRate == 0) {
				SeekRate = 1000;
			}
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_FastReverse("+SeekRate+")");
		};
		FastReverseStop = function () {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command", "aspnetaudio_FastReverseStop()");
		};
		GetDuration = function () {
			timeInMilliSeconds = ASPNetFlash.FindFlashMovie(uid).GetVariable("/:global_duration");
			return timeInMilliSeconds/1000;
		};
		this.FastReverseStop = FastReverseStop;
		this.FastReverse = FastReverse;
		this.FastForwardStop = FastForwardStop;
		this.FastForward = FastForward;
		this.SetPosition = SetPosition;
		this.GetPosition = GetPosition;
		this.GetDuration = GetDuration;
		this.SetVolume = SetVolume;
		this.GetVolume = GetVolume;
		this.Mute = Mute;
		this.StopMedia = StopMedia;
		this.LoadMedia = LoadMedia;
		this.PlayMedia = PlayMedia;
		this.PauseMedia = PauseMedia;
		OnStop = function (object, position) {
		};
		OnPause = function (object, position) {
		};
		OnPlay = function (object, position) {
		};
		OnFinish = function (object, position) {
		};
		OnStartBuffer = function (object) {
		};
		OnReady = function (object) {
		};
		OnStartSeek = function (object, position) {
		};
		OnStopSeek = function (object, position) {
		};
		OnProgress = function (object, position) {
		};
		OnSeek = function (object, position) {
		};
		OnInternalFinish = function (object, position) {
		};
		this.OnInternalFinish = OnInternalFinish;
		this.OnStop = OnStop;
		this.OnPause = OnPause;
		this.OnPlay = OnPlay;
		this.OnFinish = OnFinish;
		this.OnStartBuffer = OnStartBuffer;
		this.OnReady = OnReady;
		this.OnStartSeek = OnStartSeek;
		this.OnStopSeek = OnStopSeek;
		this.OnProgress = OnProgress;
		this.OnSeek = OnSeek;
		OnHeartbeat = function () {
			try {
				var command = ASPNetFlash.FindFlashMovie(uid).GetVariable("/:aspnetaudio_command_out");
				if ((command+"").length>0) {
					ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetaudio_command_out", "");
					var arrCommands = command.split(';;;');
					for (var i = 0; i<arrCommands.length; i++) {
						eval(arrCommands[i]);
					}
				}
			} catch (e) {
			}
		};
		var global_heartbeat = setInterval(OnHeartbeat, 30);
	};
	/* ASPNETFLASHVIDEO */
	ASPNetMedia.FlashVideoObjects = [];
	ASPNetMedia.FlashVideo = function(iobj) {
		for (var i in ASPNetMedia.FlashVideoObjects) {
			if (i == iobj) {
				return ASPNetMedia.FlashVideoObjects[i];
			}
		}
		var b = iobj.split('_');
		for (var i in ASPNetMedia.FlashVideoObjects) {
			var a = i.split('_');
			if (a[a.length-1] == b[b.length-1]) {
				return ASPNetMedia.FlashVideoObjects[i];
			}
		}
	};
	ASPNetMedia.FlashVideoProto = function(objFlashVideo) {
		var uid = objFlashVideo;
		this.uid = uid;
		LoadMedia = function (URL) {
			if (URL && URL+'' != '') {
				ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_LoadMedia("+URL+")");
			} else {
				ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_LoadMedia()");
			}
		};
		PlayMedia = function (URL) {
			if (URL && URL+'' != '') {
				ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_PlayMedia("+URL+")");
			} else {
				ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_PlayMedia()");
			}
		};
		PauseMedia = function () {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_PauseMedia()");
		};
		StopMedia = function () {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_StopMedia()");
		};
		Mute = function () {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_Mute()");
		};
		GetVolume = function () {
			return ASPNetFlash.FindFlashMovie(uid).GetVariable("/:Volume");
		};
		SetVolume = function (VolumeLevel) {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_SetVolume("+VolumeLevel+")");
		};
		GetPosition = function () {
			return ASPNetFlash.FindFlashMovie(uid).GetVariable("/:global_position");
		};
		SetPosition = function (TimeInSeconds) {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_SetPosition("+TimeInSeconds+")");
		};
		FastForward = function (SeekRate) {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_FastForward()");
		};
		FastForwardStop = function () {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_FastForwardStop()");
		};
		FastReverse = function (SeekRate) {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_FastReverse()");
		};
		FastReverseStop = function () {
			ASPNetFlash.FindFlashMovie(uid).SetVariable("/:aspnetflashvideo_command", "api_FastForwardStop()");
		};
		GetDuration = function () {
			return ASPNetFlash.FindFlashMovie(uid).GetVariable("/:global_duration");
		};
		this.FastReverseStop = FastReverseStop;
		this.FastReverse = FastReverse;
		this.FastForwardStop = FastForwardStop;
		this.FastForward = FastForward;
		this.SetPosition = SetPosition;
		this.GetPosition = GetPosition;
		this.GetDuration = GetDuration;
		this.SetVolume = SetVolume;
		this.GetVolume = GetVolume;
		this.Mute = Mute;
		this.StopMedia = StopMedia;
		this.LoadMedia = LoadMedia;
		this.PlayMedia = PlayMedia;
		this.PauseMedia = PauseMedia;
		OnStop = function (object, position) {
		};
		OnPause = function (object, position) {
		};
		OnPlay = function (object, position) {
		};
		OnFinish = function (object, position) {
		};
		OnStartBuffer = function (object) {
		};
		OnReady = function (object) {
		};
		OnStartSeek = function (object, position) {
		};
		OnStopSeek = function (object, position) {
		};
		OnProgress = function (object, position) {
		};
		OnSeek = function (object, position) {
		};
		OnBuffer = function (object, percentage) {
		};
		OnInternalFinish = function (object, position) {
		};
		this.OnInternalFinish = OnInternalFinish;
		this.OnStop = OnStop;
		this.OnPause = OnPause;
		this.OnPlay = OnPlay;
		this.OnFinish = OnFinish;
		this.OnStartBuffer = OnStartBuffer;
		this.OnReady = OnReady;
		this.OnStartSeek = OnStartSeek;
		this.OnStopSeek = OnStopSeek;
		this.OnProgress = OnProgress;
		this.OnSeek = OnSeek;
		this.OnBuffer = OnBuffer;
		OnHeartbeat = function () {
			try {
				var command = ASPNetFlash.FindFlashMovie(uid).GetVariable("/:command_buffer");
				if ((command+"").length>0) {
					ASPNetFlash.FindFlashMovie(uid).SetVariable("/:command_buffer", "");
					var arrCommands = command.split(';;;');
					for (var i = 0; i<arrCommands.length; i++) {
						eval(arrCommands[i]);
					}
				}
			} catch (e) {
			}
		};
		var global_heartbeat = setInterval(OnHeartbeat, 30);
	};
	/* ASPNETVIDEO */
	ASPNetMedia.VideoObjects = [];
	ASPNetMedia.Video = function(iobj) {
		for (var i in ASPNetMedia.VideoObjects) {
			if (i == iobj) {
				return ASPNetMedia.VideoObjects[i];
			}
		}
		var b = iobj.split('_');
		for (var i in ASPNetMedia.VideoObjects) {
			var a = i.split('_');
			if (a[a.length-1] == b[b.length-1]) {
				return ASPNetMedia.VideoObjects[i];
			}
		}
	};
	/* WINDOWSMEDIA */
	ASPNetMedia.WindowsMediaProto = function(objVideo) {
		var uid = objVideo;
		this.uid = uid;
		activex = function () {
			try {
				var obj = window.document[uid+"_video"];
				if (!obj) {
					var obj = window.document.getElementById(uid+"_video");
				}
				return obj;
			} catch (e) {
			}
		};
		this.activex = activex;
		LoadMedia = function (URL) {
			try {
				this.activex().URL = URL;
			} catch (e) {
			}
		};
		PlayMedia = function (URL) {
			try {
				if (URL != this.activex().URL) {
					this.activex().URL = URL;
				}
				this.activex().controls.play();
			} catch (e) {
			}
		};
		PauseMedia = function () {
			try {
				this.activex().controls.pause();
			} catch (e) {
			}
		};
		StopMedia = function () {
			try {
				this.activex().controls.stop();
			} catch (e) {
			}
		};
		Mute = function () {
			try {
				this.activex().settings.mute = !this.activex().settings.mute;
			} catch (e) {
			}
		};
		GetVolume = function () {
			try {
				return this.activex().settings.volume;
			} catch (e) {
			}
		};
		SetVolume = function (VolumeLevel) {
			try {
				this.activex().settings.volume = VolumeLevel;
			} catch (e) {
			}
		};
		GetPosition = function () {
			try {
				return this.activex().controls.currentPosition;
			} catch (e) {
			}
		};
		SetPosition = function (TimeInSeconds) {
			try {
				this.activex().controls.currentPosition = TimeInSeconds;
			} catch (e) {
			}
		};
		FastForward = function (SeekRate) {
			try {
				this.activex().controls.fastForward();
			} catch (e) {
			}
		};
		FastForwardStop = function () {
			try {
				if (this.activex().playState>2 && this.activex().playState<10) {
					this.activex().controls.play();
				}
			} catch (e) {
			}
		};
		FastReverse = function (SeekRate) {
			try {
				this.activex().controls.fastReverse();
			} catch (e) {
			}
		};
		FastReverseStop = function () {
			try {
				if (this.activex().playState>2 && this.activex().playState<10) {
					this.activex().controls.play();
				}
			} catch (e) {
			}
		};
		GetDuration = function () {
			try {
				return this.activex().currentMedia.duration;
			} catch (e) {
			}
		};
		this.FastReverseStop = FastReverseStop;
		this.FastReverse = FastReverse;
		this.FastForwardStop = FastForwardStop;
		this.FastForward = FastForward;
		this.SetPosition = SetPosition;
		this.GetPosition = GetPosition;
		this.GetDuration = GetDuration;
		this.SetVolume = SetVolume;
		this.GetVolume = GetVolume;
		this.Mute = Mute;
		this.StopMedia = StopMedia;
		this.LoadMedia = LoadMedia;
		this.PlayMedia = PlayMedia;
		this.PauseMedia = PauseMedia;
		OnStop = function (object, position) {
		};
		OnPause = function (object, position) {
		};
		OnPlay = function (object, position) {
		};
		OnFinish = function (object, position) {
		};
		OnStartBuffer = function (object) {
		};
		OnReady = function (object) {
		};
		OnStartSeek = function (object, position) {
		};
		OnStopSeek = function (object, position) {
		};
		OnProgress = function (object, position) {
		};
		OnSeek = function (object, position) {
		};
		OnInternalFinish = function (object, position) {
		};
		this.OnInternalFinish = OnInternalFinish;
		this.OnStop = OnStop;
		this.OnPause = OnPause;
		this.OnPlay = OnPlay;
		this.OnFinish = OnFinish;
		this.OnStartBuffer = OnStartBuffer;
		this.OnReady = OnReady;
		this.OnStartSeek = OnStartSeek;
		this.OnStopSeek = OnStopSeek;
		this.OnProgress = OnProgress;
		this.OnSeek = OnSeek;
		OnHeartbeat = function () {
			try {
				var object = ASPNetMedia.Video(uid);
				object.position = object.activex().controls.currentPosition;
				object.playStatus = parseInt(object.activex().playState);
				if (object.oldPlayStatus != object.playStatus) {
					object.OnMyPlayStateChange(object.playStatus, object, object.position);
				} else {
					if (playStatus == 3) {
						object.OnProgress(object, object.position);
					} else if (object.playStatus == 4 || object.playStatus == 5) {
						object.OnSeek(object, object.position);
					}
				}
				object.oldPlayStatus = object.playStatus;
				object.oldPosition = object.position;
			} catch (e) {
				try {
					var object = ASPNetMedia.Video(uid);
					object.oldPlayStatus = object.playStatus;
					object.oldPosition = object.position;
				} catch (e) {
				}
			}
		};
		OnMyPlayStateChange = function (NewState, object, position) {
			try {
				switch (NewState) {
				case 1 :
					object.OnStop(object, position);
					if (position == 0 && (object.oldPosition+5)>=object.GetDuration()) {
						object.OnFinish(object, object.oldPosition);
						object.OnInternalFinish(object, object.oldPosition);
					}
					break;
				case 2 :
					object.OnPause(object, position);
					break;
				case 3 :
					object.OnPlay(object, position);
					break;
				case 4 :
					object.OnStartSeek(object, position);
					break;
				case 5 :
					object.OnStartSeek(object, position);
					break;
				case 6 :
					object.OnStartBuffer(object);
					break;
				case 8 :
					object.OnFinish(object, position);
					object.OnInternalFinish(object, object.oldPosition);
					break;
				case 10 :
					object.onReady(object);
					break;
				default :
				}
				if ((object.oldPlayStatus == 4 || object.oldPlayStatus == 5) && NewState<4) {
					object.OnStopSeek(object, position);
				}
			} catch (e) {
			}
		};
		var duration;
		this.duration = duration;
		var oldPosition = 0;
		this.oldPosition = oldPosition;
		var position = 0;
		this.position = position;
		var playStatus = 0;
		this.playStatus = playStatus;
		var oldPlayStatus = 0;
		this.oldPlayStatus = oldPlayStatus;
		var global_heartbeat = setInterval(OnHeartbeat, 50);
		this.OnMyPlayStateChange = OnMyPlayStateChange;
	};
	/* QUICKTIME */
	ASPNetMedia.QuickTimeProto = function(objVideo) {
		var uid = objVideo;
		this.uid = uid;
		var oldPos = 0;
		var oldRate = 0;
		this.oldRate = oldRate;
		var loadState = 0;
		this.loadState = loadState;
		activex = function () {
			try {
				var obj = window.document.getElementById(uid+"_video");
				if (!obj) {
					obj = window.document[uid+"_video"];
				}
				return obj;
			} catch (e) {
			}
		};
		this.activex = activex;
		LoadMedia = function (URL) {
			try {
				this.activex().SetURL(URL);
			} catch (e) {
			}
		};
		PlayMedia = function (URL) {
			try {
				if (URL != this.activex().GetURL()) {
					this.activex().SetURL(URL);
					this.activex().Play();
				} else if (this.activex().GetRate() != 1) {
					this.activex().Play();
				}
			} catch (e) {
			}
		};
		PauseMedia = function () {
			try {
				this.activex().Stop();
			} catch (e) {
			}
		};
		StopMedia = function () {
			try {
				this.activex().Stop();
				this.activex().Rewind();
			} catch (e) {
			}
		};
		Mute = function () {
			try {
				this.activex().SetMute(!this.activex().GetMute());
			} catch (e) {
			}
		};
		GetVolume = function () {
			try {
				var volume = this.activex().GetVolume();
				return Math.abs(Math.round(volume/2.56));
			} catch (e) {
			}
		};
		SetVolume = function (VolumeLevel) {
			try {
				this.activex().SetVolume(Math.abs(Math.round(VolumeLevel*2.56)));
			} catch (e) {
			}
		};
		GetPosition = function () {
			try {
				return this.activex().GetTime()/1000;
			} catch (e) {
			}
		};
		SetPosition = function (TimeInSeconds) {
			try {
				this.activex().SetTime(TimeInSeconds*1000);
			} catch (e) {
			}
		};
		FastForward = function (SeekRate) {
			try {
				if (!SeekRate) {
					this.activex().SetRate(8);
				} else {
					this.activex().SetRate(SeekRate);
				}
			} catch (e) {
			}
		};
		FastForwardStop = function () {
			try {
				this.activex().SetRate(1);
			} catch (e) {
			}
		};
		FastReverse = function (SeekRate) {
			try {
				if (!SeekRate) {
					this.activex().SetRate(-8);
				} else {
					this.activex().SetRate(-SeekRate);
				}
			} catch (e) {
			}
		};
		FastReverseStop = function () {
			try {
				this.activex().SetRate(1);
			} catch (e) {
			}
		};
		GetDuration = function () {
			try {
				return this.activex().GetDuration()/1000;
			} catch (e) {
			}
		};
		this.FastReverseStop = FastReverseStop;
		this.FastReverse = FastReverse;
		this.FastForwardStop = FastForwardStop;
		this.FastForward = FastForward;
		this.SetPosition = SetPosition;
		this.GetPosition = GetPosition;
		this.GetDuration = GetDuration;
		this.SetVolume = SetVolume;
		this.GetVolume = GetVolume;
		this.Mute = Mute;
		this.StopMedia = StopMedia;
		this.LoadMedia = LoadMedia;
		this.PlayMedia = PlayMedia;
		this.PauseMedia = PauseMedia;
		OnStop = function (object, position) {
		};
		OnPause = function (object, position) {
		};
		OnPlay = function (object, position) {
		};
		OnFinish = function (object, position) {
		};
		OnStartBuffer = function (object) {
		};
		OnReady = function (object) {
		};
		OnStartSeek = function (object, position) {
		};
		OnStopSeek = function (object, position) {
		};
		OnProgress = function (object, position) {
		};
		OnSeek = function (object, position) {
		};
		OnInternalFinish = function (object, position) {
		};
		this.OnStop = OnStop;
		this.OnPause = OnPause;
		this.OnPlay = OnPlay;
		this.OnFinish = OnFinish;
		this.OnInternalFinish = OnInternalFinish;
		this.OnStartBuffer = OnStartBuffer;
		this.OnReady = OnReady;
		this.OnStartSeek = OnStartSeek;
		this.OnStopSeek = OnStopSeek;
		this.OnProgress = OnProgress;
		this.OnSeek = OnSeek;
		OnHeartbeat = function () {
			try {
				var object = ASPNetMedia.Video(uid);
				var loadStatus = object.activex().GetPluginStatus();
				if (loadStatus == "Loading" && loadState<5) {
					object.OnStartBuffer(object, 0);
					loadState += 5;
				} else if (loadStatus == "Playable" && loadState<10) {
					object.OnReady(object, 0);
					loadState += 10;
				} else {
					var object = ASPNetMedia.Video(uid);
					var rate = object.activex().GetRate();
					var position = object.GetPosition();
					var duration = object.GetDuration();
					if (oldRate != rate) {
						//if there's been a change of rate
						if (oldRate != 0 && rate == 0) {
							//if we have just stopped
							if (position == duration) {
								if (oldRate != 1) {
									object.OnStopSeek(object, position);
								}
								if (position != 0) {
									object.StopMedia();
									object.OnFinish(object, oldPos);
									object.OnInternalFinish(object, oldPos);
								}
							} else if (position != 0) {
								if (oldRate != 1) {
									object.OnStopSeek(object, position);
								}
								object.OnPause(object, position);
							} else {
								if (oldRate != 1) {
									object.OnStopSeek(object, position);
								}
								object.OnStop(object, position);
							}
						} else if (oldRate != 0 && rate == 1) {
							object.OnStopSeek(object, position);
							object.OnPlay(object, position);
						} else if (rate != 0) {
							//if we have just started
							if (rate == 1) {
								//if we are now playing
								object.OnPlay(object, position);
							} else {
								object.OnStartSeek(object, position);
							}
						}
					} else {
						//if the rate has not changed
						if (rate == 1) {
							object.OnProgress(object, position);
						} else if (rate>1 || rate<0) {
							object.OnSeek(object, position);
						}
					}
					if (oldRate == 0 && rate == 0) {
					}
					oldPos = position;
					oldRate = rate;
				}
			} catch (e) {
			}
		};
		var global_heartbeat = setInterval(OnHeartbeat, 50);
	};
	/* REALPLAYER */
	ASPNetMedia.RealPlayerProto = function(objVideo) {
		var uid = objVideo;
		this.uid = uid;
		var oldPlayState = -1;
		this.oldPlayState = oldPlayState;
		var oldPosition = 0;
		this.oldPosition = oldPosition;
		var oldDuration = 0;
		this.oldDuration = oldDuration;
		activex = function () {
			try {
				var obj = window.document.getElementById(uid+"_video");
				if (!obj) {
					obj = window.document[uid+"_video"];
				}
				return obj;
			} catch (e) {
			}
		};
		this.activex = activex;
		LoadMedia = function (URL) {
			try {
				this.activex().SetSource(URL);
			} catch (e) {
			}
		};
		PlayMedia = function (URL) {
			try {
				if (URL != this.activex().GetSource()) {
					this.activex().SetSource(URL);
					this.activex().DoPlay();
				} else if (this.activex().GetPlayState() != 3) {
					this.activex().DoPlay();
				}
			} catch (e) {
			}
		};
		PauseMedia = function () {
			try {
				this.activex().DoPause();
			} catch (e) {
			}
		};
		StopMedia = function () {
			try {
				this.activex().DoStop();
			} catch (e) {
			}
		};
		Mute = function () {
			try {
				this.activex().SetMute(!this.activex().GetMute());
			} catch (e) {
			}
		};
		GetVolume = function () {
			try {
				return this.activex().GetVolume();
			} catch (e) {
			}
		};
		SetVolume = function (VolumeLevel) {
			try {
				if (!VolumeLevel || VolumeLevel<1) {
					VolumeLevel = 0;
				} else if (VolumeLevel>100) {
					VolumeLevel = 100;
				}
				this.activex().SetVolume(VolumeLevel);
			} catch (e) {
			}
		};
		GetPosition = function () {
			try {
				return this.activex().GetPosition()/1000;
			} catch (e) {
			}
		};
		SetPosition = function (TimeInSeconds) {
			try {
				this.activex().SetPosition(TimeInSeconds*1000);
			} catch (e) {
			}
		};
		GetDuration = function () {
			try {
				return this.activex().GetLength()/1000;
			} catch (e) {
			}
		};
		this.SetPosition = SetPosition;
		this.GetPosition = GetPosition;
		this.GetDuration = GetDuration;
		this.SetVolume = SetVolume;
		this.GetVolume = GetVolume;
		this.Mute = Mute;
		this.StopMedia = StopMedia;
		this.LoadMedia = LoadMedia;
		this.PlayMedia = PlayMedia;
		this.PauseMedia = PauseMedia;
		OnStop = function (object, position) {
		};
		OnPause = function (object, position) {
		};
		OnPlay = function (object, position) {
		};
		OnFinish = function (object, position) {
		};
		OnStartBuffer = function (object) {
		};
		OnReady = function (object) {
		};
		OnStartSeek = function (object, position) {
		};
		OnStopSeek = function (object, position) {
		};
		OnProgress = function (object, position) {
		};
		OnSeek = function (object, position) {
		};
		OnInternalFinish = function (object, position) {
		};
		this.OnInternalFinish = OnInternalFinish;
		this.OnStop = OnStop;
		this.OnPause = OnPause;
		this.OnPlay = OnPlay;
		this.OnFinish = OnFinish;
		this.OnStartBuffer = OnStartBuffer;
		this.OnReady = OnReady;
		this.OnStartSeek = OnStartSeek;
		this.OnStopSeek = OnStopSeek;
		this.OnProgress = OnProgress;
		this.OnSeek = OnSeek;
		OnHeartbeat = function () {
			try {
				var object = ASPNetMedia.Video(uid);
				var position = object.GetPosition();
				var duration = object.GetDuration();
				var playState = object.activex().GetPlayState();
				if (playState != oldPlayState) {
					if (oldPlayState == 5) {
						object.OnStopSeek(object, position);
					} else if (oldPlayState == 1) {
						object.OnStartBuffer(object, 0);
					} else if (oldPlayState == 2) {
						object.OnReady(object, 0);
					}
					switch (playState) {
					case 0 :
						object.OnStop(object, oldPosition);
						if ((oldPosition+2.2)>=oldDuration && oldDuration>3) {
							object.OnFinish(object, oldPosition);
							object.OnInternalFinish(object, oldPosition);
						}
						break;
					case 3 :
						object.OnPlay(object, position);
						break;
					case 4 :
						object.OnPause(object, position);
						break;
					case 5 :
						object.OnStartSeek(object, position);
						break;
					}
					oldPlayState = playState;
				} else {
					switch (playState) {
					case 3 :
						object.OnProgress(object, position);
						break;
					case 4 :
						break;
					case 5 :
						object.OnSeek(object, position);
						break;
					}
				}
				oldPosition = position;
				oldDuration = duration;
			} catch (e) {
			}
		};
		var global_heartbeat = setInterval(OnHeartbeat, 50);
	};
	/* PLAY LIST */
	ASPNetMedia.PlayListObjects = [];
	ASPNetMedia.PlayList = function(iobj) {
		for (var i in ASPNetMedia.PlayListObjects) {
			if (i == iobj) {
				return ASPNetMedia.PlayListObjects[i];
			}
		}
		var b = iobj.split('_');
		for (var i in ASPNetMedia.PlayListObjects) {
			var a = i.split('_');
			if (a[a.length-1] == b[b.length-1]) {
				return ASPNetMedia.PlayListObjects[i];
			}
		}
	};
	/* PLAY LIST */
	ASPNetMedia.PlayListProto = function(PlayListId) {
		var uid = PlayListId;
		this.uid = uid;
		OnTrackChange = function (object, tracknumber) {
		};
		OnPlayListFinish = function (object) {
		};
		function myself() {
			return ASPNetMedia.PlayList(uid);
		}
		var Tracks = [];
		this.Tracks = Tracks;
		function build_Tracks() {
			try {
				eval(window.document.getElementById(uid+'_mediaplaylist_tracks').value);
				return this.Tracks;
			} catch (e) {
				return new Array(null);
			}
		}
		this.build_Tracks = build_Tracks;
		function get_LoopTrack() {
			try {
				return window.document.getElementById(uid+'_mediaplaylist_loopTrack').value == 'true';
			} catch (e) {
				return false;
			}
		}
		this.get_LoopTrack = get_LoopTrack;
		function set_LoopTrack(value) {
			try {
				window.document.getElementById(uid+'_mediaplaylist_loopTrack').value = (value ? 'true' : 'false');
			} catch (e) {
			}
		}
		this.set_LoopTrack = set_LoopTrack;
		function get_LoopPlayList() {
			try {
				return window.document.getElementById(uid+'_mediaplaylist_loopPlayList').value == 'true';
			} catch (e) {
				return false;
			}
		}
		this.get_LoopPlayList = get_LoopPlayList;
		function set_LoopPlayList(value) {
			try {
				window.document.getElementById(uid+'_mediaplaylist_loopPlayList').value = (value ? 'true' : 'false');
			} catch (e) {
			}
		}
		this.set_LoopPlayList = set_LoopPlayList;
		function get_AutoPlay() {
			try {
				return window.document.getElementById(uid+'_mediaplaylist_autoPlay').value == 'true';
			} catch (e) {
				return false;
			}
		}
		this.get_AutoPlay = get_AutoPlay;
		function set_AutoPlay(value) {
			try {
				window.document.getElementById(uid+'_mediaplaylist_autoPlay').value = (value ? 'true' : 'false');
			} catch (e) {
			}
		}
		this.set_AutoPlay = set_AutoPlay;
		function get_UniqueID() {
			try {
				return window.document.getElementById(uid+'_mediaplaylist_uniqueID').value;
			} catch (e) {
				return '';
			}
		}
		this.get_UniqueID = get_UniqueID;
		function set_UniqueID(value) {
			try {
				window.document.getElementById(uid+'_mediaplaylist_uniqueID').value = value;
			} catch (e) {
			}
		}
		this.set_UniqueID = set_UniqueID;
		function get_RunAtClient() {
			try {
				return window.document.getElementById(uid+'_mediaplaylist_runAtClient').value == 'true';
			} catch (e) {
				return false;
			}
		}
		this.get_RunAtClient = get_RunAtClient;
		function set_RunAtClient(value) {
			try {
				window.document.getElementById(uid+'_mediaplaylist_runAtClient').value = (value ? 'true' : 'false');
			} catch (e) {
			}
		}
		this.set_RunAtClient = set_RunAtClient;
		function MediaPlayer() {
			try {
				var targetID = window.document.getElementById(uid+'_mediaplaylist_associatedControl').value;
				return eval(targetID);
			} catch (e) {
			}
		}
		this.MediaPlayer = MediaPlayer;
		function get_SelectedTrack() {
			try {
				return parseInt(window.document.getElementById(uid+'_mediaplaylist_selectedTrack').value);
			} catch (e) {
				return 0;
			}
		}
		this.get_SelectedTrack = get_SelectedTrack;
		function set_SelectedTrack(selectedTrack) {
			try {
				window.document.getElementById(uid+'_mediaplaylist_selectedTrack').value = selectedTrack;
			} catch (e) {
			}
		}
		this.set_SelectedTrack = set_SelectedTrack;
		function get_PlayState() {
			//0 = play, 1 = stop
			try {
				return window.document.getElementById(uid+'_mediaplaylist_playState').value;
			} catch (e) {
				return 'Play';
			}
		}
		this.get_PlayState = get_PlayState;
		function set_PlayState(state) {
			//'Play' = play, 'Stop' = stop
			try {
				window.document.getElementById(uid+'_mediaplaylist_playState').value = state;
			} catch (e) {
			}
		}
		this.set_PlayState = set_PlayState;
		function get_TrackTimeout() {
			try {
				return window.document.getElementById(uid+'_mediaplaylist_trackTimeout').value;
			} catch (e) {
				return 0;
			}
		}
		this.get_TrackTimeout = get_TrackTimeout;
		function set_TrackTimeout(value) {
			try {
				window.document.getElementById(uid+'_mediaplaylist_trackTimeout').value = value;
			} catch (e) {
			}
		}
		this.set_TrackTimeout = set_TrackTimeout;
		function sendEventToDotNet(arg) {
			window.__doPostBack(myself().get_UniqueID(), arg);
		}
		PlayTrack = function (intNewTrackNumber) {
			myself().build_Tracks();
			if (intNewTrackNumber>=myself().Tracks.length) {
				if (!myself().get_LoopPlayList()) {
					myself().set_PlayState('Stop');
					if (!myself().get_RunAtClient()) {
						intNewTrackNumber = 0;
					} else {
						intNewTrackNumber = myself().Tracks.length+1;
					}
				} else {
					intNewTrackNumber = 1;
				}
				if (!myself().get_RunAtClient()) {
					myself().set_SelectedTrack(intNewTrackNumber);
					sendEventToDotNet('OnPlayListFinish');
					myself().OnPlayListFinish(myself());
					init = false;
					return false;
				}
			} else {
				myself().set_PlayState('Play');
			}
			if (!myself().get_RunAtClient()) {
				myself().set_SelectedTrack(intNewTrackNumber);
				myself().OnTrackChange(myself(), intNewTrackNumber);
				sendEventToDotNet('OnTrackChange$'+intNewTrackNumber);
				init = false;
				return false;
			}
			if (intNewTrackNumber<1) {
				if (!myself().get_LoopPlayList()) {
					var mediaPlayer = myself().MediaPlayer();
					if (mediaPlayer) {
						mediaPlayer.LoadMedia(myself().Tracks[1]);
						intNewTrackNumber = 1;
						myself().StopPlayList();
						myself().set_PlayState('Stop');
						myself().OnPlayListFinish(myself());
					}
				} else {
					intNewTrackNumber = 1;
				}
			}
			if (intNewTrackNumber>=myself().Tracks.length) {
				if (!myself().get_LoopPlayList()) {
					var mediaPlayer = myself().MediaPlayer();
					if (mediaPlayer) {
						mediaPlayer.LoadMedia(myself().Tracks[1]);
						StopPlayList();
						myself().OnPlayListFinish(myself());
						mediaPlayer.StopMedia();
						myself().set_PlayState('Stop');
					}
				} else {
					myself().OnPlayListFinish(myself());
					intNewTrackNumber = 1;
				}
			}
			myself().set_SelectedTrack(intNewTrackNumber);
			myself().OnTrackChange(myself(), intNewTrackNumber);
			if (myself().get_PlayState() == 'Play') {
				mediaPlayer = myself().MediaPlayer();
				if (mediaPlayer) {
					mediaPlayer.PlayMedia(myself().Tracks[intNewTrackNumber]);
				}
			}
			if (myself().get_PlayState() == 'Play') {
				if (myself().get_TrackTimeout()>0) {
					clearInterval(CID);
					CID = setInterval(myself().OnTrackTimeout, myself().get_TrackTimeout());
				}
			}
		};
		NextTrack = function (currentTrack) {
			if (currentTrack == null) {
				currentTrack = myself().get_SelectedTrack();
			}
			PlayTrack(currentTrack+1);
		};
		PreviousTrack = function (currentTrack) {
			if (currentTrack == null) {
				currentTrack = myself().get_SelectedTrack();
			}
			PlayTrack(currentTrack-1);
		};
		StopPlayList = function () {
			mediaPlayer = myself().MediaPlayer();
			if (mediaPlayer) {
				mediaPlayer.StopMedia();
			}
			myself().set_PlayState('Stop');
		};
		this.PlayTrack = PlayTrack;
		this.PreviousTrack = PreviousTrack;
		this.NextTrack = NextTrack;
		this.StopPlayList = StopPlayList;
		this.OnTrackChange = OnTrackChange;
		this.OnPlayListFinish = OnPlayListFinish;
		this.PlayTrack = PlayTrack;
		var CID = 0;
		this.CID = CID;
		OnPlayListFinishHandler = function (object, position) {
			var me = myself();
			if (me.get_LoopTrack()) {
				me.PlayTrack(me.get_SelectedTrack());
			} else {
				me.NextTrack();
			}
		};
		this.OnPlayListFinishHandler = OnPlayListFinishHandler;
		OnTrackTimeout = function () {
			try {
				var playState = myself().get_PlayState();
				if (playState == 'Play') {
					NextTrack();
				}
			} catch (e) {
			}
		};
		this.OnTrackTimeout = OnTrackTimeout;
		var init = false;
		OnHeartbeat = function () {
			try {
				var mediaPlayer = myself().MediaPlayer();
				if (mediaPlayer && mediaPlayer.OnInternalFinish != OnPlayListFinishHandler) {
					mediaPlayer.OnInternalFinish = OnPlayListFinishHandler;
				}
				if (!init) {
					if (myself().get_TrackTimeout()>0 && !CID) {
						clearInterval(CID);
						CID = setInterval(myself().OnTrackTimeout, myself().get_TrackTimeout());
					}
					if (myself().get_AutoPlay() && myself().get_RunAtClient()) {
						myself().PlayTrack(myself().get_SelectedTrack());
					} else {
						mediaPlayer.autostart = true;
					}
					init = true;
				}
			} catch (e) {
			}
		};
		var global_heartbeat = setInterval(OnHeartbeat, 50);
	};
}
var aspnetmedia_seek = false;
