<!--
			function fnAddEvent(obj, eventype , fnlistener , usecapture  )
			{
				if(typeof(usecapture)=="undefined") usecapture = true;
			
				if(obj.addEventListener)
				{
					obj.addEventListener(eventype, fnlistener , usecapture);
					return true;
				}
				
				if(obj.attachEvent)
				{
					var ret = obj.attachEvent("on" + eventype , fnlistener );
					return ret
				}
				
				return false;
			
			}



			//check MSIE
			//return true | false
			function fnIsMSIE(){
				var appname = window.navigator.appName.toLowerCase();
				return (appname.indexOf("explorer")>-1)
			}

			//class for <embed> attribute
			function clsNameValueWithEmBed(name, value, embedname){
				 if(typeof(embedname)=="undefined") embedname = name;

				 this.name = name;
				 this.value = value;
				 this.embedname = embedname;
			}

			//class object
			function clsCreateObjectTag(){
				this.attrs = {};
				this.params = {};
				this.embedattrs = {};
				this.obj = document.createElement("object");
				this.embedobj = null;
				this.isuseembed = false;
				this.isMSIE = fnIsMSIE();
				this.objtarget = null;
			}

			//define clsCreateObjectTag prototypes
			clsCreateObjectTag.prototype = {

				//get objectarray value
				getnamevalue : function(objarray, name){
					return (typeof(objarray[name])=="undefined")?"":objarray[name].value;
				},

				//set objectarray name,value
				setnamevalue : function(objarray, name, value ,embedname){
					if(typeof(value)!="undefined") objarray[name] = new clsNameValueWithEmBed(name,value,embedname);
				},

				// set attrs object array
				// if embedname == false not mapping <embed>
				attr : function(name, value ,embedname){
					if(typeof(value)=="undefined") return this.getnamevalue(this.attrs, name);
					this.setnamevalue(this.attrs, name, value ,embedname);
				},

				// set params object array
				param : function(name, value ,embedname){
					if(typeof(value)=="undefined") return this.getnamevalue(this.params, name);
					this.setnamevalue(this.params, name, value ,embedname);
				},

				// set embedattrs object array
				// only use in <embed>
				embedattr : function(name, value ,embedname){
					if(typeof(value)=="undefined") return this.getnamevalue(this.embedattrs, name);
					this.setnamevalue(this.embedattrs, name, value ,embedname);
				},
				
				// create <param>
				getparamelement : function(name,value){
					var objparam = document.createElement("param");
					objparam.setAttribute("name",name);
					objparam.setAttribute("value",value);

					return objparam;
				},
				
				// create <embed>
				getembedelement : function(){
					var objparam = document.createElement("embed");
					var attrsarr = new Array();
					var itemattr = null;

					attrsarr.push(this.attrs);
					attrsarr.push(this.params);
					attrsarr.push(this.embedattrs);

					for(var i=0;i<attrsarr.length;i++)
					{
						itemattr = attrsarr[i];
						
						for(var item in itemattr)
						{
							var tempitem = itemattr[item];
							
							if(typeof(tempitem.embedname)=="boolean"&&!tempitem.embedname) continue;
							objparam.setAttribute(tempitem.embedname,tempitem.value);	
						}
					}

					return objparam;
				},
				
				// crea <object>
				getobject : function()
				{
					var objobject = document.createElement("object");
					var objparam = null;
					var objembed = null;

					for(var itemkey in this.attrs)
					{
						objobject.setAttribute(itemkey,this.attrs[itemkey].value);
					}
					
					for(var itemkey in this.params)
					{
						objparam = this.getparamelement(itemkey,this.params[itemkey].value);
						objobject.appendChild(objparam);
					}
					
					if(!this.isMSIE&&this.isuseembed)
					{
						objembed = this.getembedelement();
						this.embedobj = objembed;
						objobject.appendChild(objembed);
					}
					
					this.obj = objobject;
					

					switch(this.attr("classid").toLowerCase())
					{
						case "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" : 
							this.obj.wmode=this.param("wmode");
							break;

						case "clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" :
							break;
					}					
					
				},

				// <object> tag document.write()
				write : function()
				{
					this.getobject();
					var tempobj = document.createElement("div");
					tempobj.appendChild(this.obj);
					this.play();

					document.writeln(tempobj.innerHTML);
					tempobj = null;
				},


				// flash or media play
				play : function()
				{
					switch(this.attr("classid").toLowerCase())
					{
						case "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" : 
							this.obj.movie=this.param("movie");
							break;
							
						case "clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" :
							this.obj.url=this.param("url");
							break;
					}
					
					this.obj.style.display="block";
				},

				// bind <object>
				bind : function()
				{
					this.getobject();

					if(this.objtarget!=null){
						
						this.objtarget.appendChild(this.obj);
						this.play();
					}
				}
				
			}


			// class
			// media <object>
			function clsCreateMediaObjectTag(objname){
/*
			<OBJECT classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" VIEWASTEXT>
				<PARAM NAME="URL" VALUE="">
				<PARAM NAME="rate" VALUE="1">
				<PARAM NAME="balance" VALUE="0">
				<PARAM NAME="currentPosition" VALUE="0">
				<PARAM NAME="defaultFrame" VALUE="">
				<PARAM NAME="playCount" VALUE="1">
				<PARAM NAME="autoStart" VALUE="-1">
				<PARAM NAME="currentMarker" VALUE="0">
				<PARAM NAME="invokeURLs" VALUE="-1">
				<PARAM NAME="baseURL" VALUE="">
				<PARAM NAME="volume" VALUE="50">
				<PARAM NAME="mute" VALUE="0">
				<PARAM NAME="uiMode" VALUE="full">
				<PARAM NAME="stretchToFit" VALUE="0">
				<PARAM NAME="windowlessVideo" VALUE="0">
				<PARAM NAME="enabled" VALUE="-1">
				<PARAM NAME="enableContextMenu" VALUE="-1">
				<PARAM NAME="fullScreen" VALUE="0">
				<PARAM NAME="SAMIStyle" VALUE="">
				<PARAM NAME="SAMILang" VALUE="">
				<PARAM NAME="SAMIFilename" VALUE="">
				<PARAM NAME="captioningID" VALUE="">
				<PARAM NAME="enableErrorDialogs" VALUE="0">
				<PARAM NAME="_cx" VALUE="26">
				<PARAM NAME="_cy" VALUE="26">
			</OBJECT>
				<embed src="http://user.chol.com/~ksh4715/video/x_note1_30s.wmv" autostart="false" width=600 height=500 controller=1&nbsp;&nbsp; ShowStatusBar=1 EnableTracker=1 ShowControls=1 ShowAudioControls=1 EnableContextMenu=1 CurrentPosition=1 EnablePositionControls=1 VideoBorder3D=1><br />
*/
				var objtarget = null;
				
				if(typeof(objname)!="undefined") objtarget = document.getElementById(objname);
				
				var clsobj = new clsCreateObjectTag();
				
				clsobj.isuseembed = true;
				
				clsobj.attr("classid","clsid:6bf52a52-394a-11d3-b153-00c04f79faa6",false);

				clsobj.attr("isbind","true");
				clsobj.attr("id","mediaplayer1");
				clsobj.attr("name","mediaplayer1");
				clsobj.attr("width","100");
				clsobj.attr("height","100");

				clsobj.param("URL","http://user.chol.com/~ksh4715/video/x_note1_30s.wmv","src");
				clsobj.param("autostart","true");
				clsobj.param("volume","80");

				clsobj.objtarget = objtarget;

				return clsobj;
			}

			// class
			// flash <object>
			function clsCreateFlashObjectTag(objname){

/*

			<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" VIEWASTEXT>
				<PARAM NAME="_cx" VALUE="5080">
				<PARAM NAME="_cy" VALUE="5080">
				<PARAM NAME="FlashVars" VALUE="">
				<PARAM NAME="Movie" VALUE="">
				<PARAM NAME="Src" VALUE="">
				<PARAM NAME="WMode" VALUE="Window">
				<PARAM NAME="Play" VALUE="-1">
				<PARAM NAME="Loop" VALUE="-1">
				<PARAM NAME="Quality" VALUE="High">
				<PARAM NAME="SAlign" VALUE="">
				<PARAM NAME="Menu" VALUE="-1">
				<PARAM NAME="Base" VALUE="">
				<PARAM NAME="AllowScriptAccess" VALUE="">
				<PARAM NAME="Scale" VALUE="ShowAll">
				<PARAM NAME="DeviceFont" VALUE="0">
				<PARAM NAME="EmbedMovie" VALUE="0">
				<PARAM NAME="BGColor" VALUE="">
				<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">
			</OBJECT>

*/
				var objtarget = null;
				
				if(typeof(objname)!="undefined") objtarget = document.getElementById(objname);
				
				var clsobj = new clsCreateObjectTag();
				
				clsobj.isuseembed = true;
				
				clsobj.attr("classid","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",false);
				clsobj.attr("codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0",false);

				clsobj.attr("isbind","true");
				clsobj.attr("id","flash1");
				clsobj.attr("name","flash1");
				clsobj.attr("width","100");
				clsobj.attr("height","100");

				clsobj.param("play","true");
				clsobj.param("allowscriptaccess","always");
				clsobj.param("menu","false");
				clsobj.param("quality","high");
				clsobj.param("wmode","transparent");
				clsobj.param("movie","none.swf","src");

				clsobj.embedattr("type","application/x-shockwave-flash");
				clsobj.embedattr("pluginspage","http://www.macromedia.com/go/getflashplayer");

				clsobj.objtarget = objtarget;

				return clsobj;
			}
			
		function funcChangeObjectTag()
    {
			var objobjects = document.getElementsByTagName("object");
			var objobject = null;
			var objembeds = null;
			var objembed = null;
			
			var objparams = null;
			
			var objparentnode = null;
			var objreplace = null;
			var typeobj = "";
			
			var varclassid = "";
			var isvaildobj = false;
			
			for(var i=0;i<objobjects.length;i++)
			{
				objreplace=null;
				typeobj = "";
				objobject = objobjects[i];
				objembed = null;
				objparentnode = null;
				varclassid = objobjects[i].classid || "";
				
				if(objobject.isbind || false) continue;
				
				objparams = objobject.getElementsByTagName("param");
				objembeds = objobject.getElementsByTagName("embed");

				if(!fnIsMSIE()&&!objembeds.length==0)
				{
					objembed = objembeds[0];
					varclassid = objembed.type || "";
				}

				switch(varclassid.toLowerCase())
				{
					case "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" :
					case "application/x-shockwave-flash" :

						objreplace = clsCreateFlashObjectTag();
						objreplace.attr("codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0",false);

						typeobj = "flash";
						isvaildobj = true;
						break;

					case "clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" :	
					
						objreplace = clsCreateMediaObjectTag();
						typeobj = "media";
						isvaildobj = true;
						break;

					default :
						isvaildobj = false;
						break;
				}

				if(!isvaildobj) continue;
			
				objreplace.attr("id",objobject.id);
				objreplace.attr("name",objobject.id);
				objreplace.attr("width",objobject.width);
				objreplace.attr("height",objobject.height);
				objreplace.attr("align",objobject.align);

				for(var j=0;j<objparams.length;j++)
				{
					var tempparamname = objparams[j].name;
				
					switch(tempparamname.toLowerCase())
					{
						case "movie" :
							objreplace.param(objparams[j].name,objparams[j].value,"src");
							break;

						case "url" :
							objreplace.param(objparams[j].name,objparams[j].value,"src");
							break;

						default :
							objreplace.param(objparams[j].name,objparams[j].value);
							break;
					}
				}

				switch(typeobj)
				{
					case "flash" :
						objreplace.param("movie",objobject.movie,"src");
						break;
					case "media" :
						objreplace.param("url",objobject.url,"src");
						break;
				}
				
				objreplace.getobject();
				objparentnode = objobjects[i].parentNode;
				objparentnode.replaceChild(objreplace.obj,objobject);
				objreplace.play();
				
				
			}
    }
    
    //call funcChangeObjectTag
    fnAddEvent(window , "load" , funcChangeObjectTag , false);
//-->
