/*
*******************************************************************
*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
*******************************************************************
*/
var zhj;
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.init=function(movie,wid,hei,show){
var pn='\n',fp="";
fp+='<object codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0 " width="'+wid+'" height="'+hei+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">'+pn;
fp+='<param name="_cx" value="17992">'+pn;
fp+='<param name="_cy" value="9260">'+pn;
fp+='<param name="FlashVars" value="-1">'+pn;
fp+='<param name="Movie" value="'+movie+'">'+pn;
fp+='<param name="Src" value="'+movie+'">'+pn;
fp+='<param name="WMode" value="Transparent">'+pn;
fp+='<param name="Play" value="1">'+pn;
fp+='<param name="Loop" value="1">'+pn;
fp+='<param name="Quality" value="High">'+pn;
fp+='<param name="SAlign" value="">'+pn;
fp+='<param name="Menu" value="0">'+pn;
fp+='<param name="Base" value="">'+pn;
fp+='<param name="AllowScriptAccess" value="always">'+pn;
fp+='<param name="Scale" value="ShowAll">'+pn;
fp+='<param name="DeviceFont" value="0">'+pn;
fp+='<param name="EmbedMovie" value="0">'+pn;
fp+='<param name="BGColor" value>'+pn;
fp+='<param name="SWRemote" value>'+pn;
fp+='<embed src="'+movie+'" quality="high" menu="false" loop="true" wmode="transparent" width="'+wid+'" height="'+hei+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash">'+pn;
fp+='</embed></object>'+pn;
$(show).innerHTML=fp;
fp=null;
	};
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+"="+escape(_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="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
					var _1a=this.getParams();
					for(var key in _1a){
						_19+=[key]+"=\""+_1a[key]+"\" ";
						}
					var _1c=this.getVariablePairs().join("&");
					if(_1c.length>0){
						_19+="flashvars=\""+_1c+"\"";
						}
				_19+="/>";
			}
			else{
				if(this.getAttribute("doExpressInstall")){
					this.addVariable("MMplayerType","ActiveX");
					this.setAttribute("swf",this.xiSWFPath);}
					_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";
					_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
					var _1d=this.getParams();
					for(var key in _1d){
						_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";
						}
					var _1f=this.getVariablePairs().join("&");
					if(_1f.length>0){
						_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";
						}
			return _19;
		},
		write:function(_20){
			deconcept.init(this.getAttribute("swf"),this.getAttribute("width"),this.getAttribute("height"),_20);
			if(this.getAttribute("useExpressInstall")){
				var _21=new deconcept.PlayerVersion([6,0,65]);
				if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
					this.setAttribute("doExpressInstall",true);
					this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
					document.title=document.title.slice(0,47)+" - Flash Player Installation";
					this.addVariable("MMdoctitle",document.title);
				}
			}
			if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
				var n=(typeof _20=="string")?document.getElementById(_20):_20;
				n.innerHTML=this.getSWFHTML();
				return true;
			}
			else{
				if(this.getAttribute("redirectUrl")!=""){
					document.location.replace(this.getAttribute("redirectUrl"));
					}
				}
				return false;
			}
		};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
	var _23=new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins&&navigator.mimeTypes.length){
		var x=navigator.plugins["Shockwave Flash"];
		if(x&&x.description){
			_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));
			}
		}
		else{
			if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){
				var axo=1;
				var _26=3;
				while(axo){
					try{
						_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);
						_23=new deconcept.PlayerVersion([_26,0,0]);
						}
						catch(e){
							axo=null;
						}
					}
				}
				else{
					try{
						var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
						}
						catch(e){
							try{
								var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
								_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";
								}
								catch(e){
									if(_23.major==6){
										return _23;
										}
									}
									try{
										axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
										}
										catch(e){
											}
										}
									if(axo!=null){
										_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
				}
			}
		}
	return _23;
};
deconcept.PlayerVersion=function(_29){
	this.major=_29[0]!=null?parseInt(_29[0]):0;
	this.minor=_29[1]!=null?parseInt(_29[1]):0;
	this.rev=_29[2]!=null?parseInt(_29[2]):0;
	};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
	if(this.major<fv.major){
		return false;
		}
	if(this.major>fv.major){
		return true;
		}
	if(this.minor<fv.minor){
		return false;
		}
	if(this.minor>fv.minor){
		return true;
		}
	if(this.rev<fv.rev){
		return false;
	}
	return true;
};
deconcept.util={
	getRequestParameter:function(_2b){
		var q=document.location.search||document.location.hash;
		if(_2b==null){return q;}
		if(q){
			var _2d=q.substring(1).split("&");
			for(var i=0;i<_2d.length;i++){
				if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){
					return _2d[i].substring((_2d[i].indexOf("=")+1));
					}
				}
			}
		return "";
	}
};
deconcept.SWFObjectUtil.cleanupSWFs=function(){
	var _2f=document.getElementsByTagName("OBJECT");
	for(var i=_2f.length-1;i>=0;i--){
		_2f[i].style.display="none";
		for(var x in _2f[i]){
			if(typeof _2f[i][x]=="function"){
				_2f[i][x]=function(){};
				}
			}
		}
	};
if(deconcept.SWFObject.doPrepUnload){
	if(!deconcept.unloadSet){
		deconcept.SWFObjectUtil.prepUnload=function(){
			__flash_unloadHandler=function(){};
			__flash_savedUnloadHandler=function(){};
			window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);
		};
	window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);
	deconcept.unloadSet=true;
	}
}
if(!document.getElementById&&document.all){
	document.getElementById=function(id){
		return document.all[id];
		};
	}
var Request=deconcept.util.getRequestParameter;
var FlashObject=SWFObject=deconcept.SWFObject;
/*
*********************************************************************
****ObjectName:News Picture Show
****Writen:Hong Jun Zhang
****Web:http://www.ic98.com
*********************************************************************
*/
function Newspictureplaye(width,height,textheight,pictable,output){
var PicWidth=width;
var PicHeight=height;
var TextHeight=textheight;
var FlashHeight = PicHeight+TextHeight;
var t=$(pictable);
var rl=t.rows.length;
var BaseUrl=document.location.href.replace(/(http.*\/)(.*)/, "$1")+"upload/picture/";
var LinkPic="",LinkUrl="",LinkText="",FlashView;
for (var i=0;i<rl;i++) {
LinkPic+=BaseUrl+t.rows[i].cells[0].innerHTML.replace(/\/.*\//, "")+"|";
LinkUrl+=t.rows[i].cells[2].innerText+"|";
LinkText+=t.rows[i].cells[1].innerText+"|";
}
LinkPic=LinkPic.substr(0,LinkPic.length-1);
LinkUrl=LinkUrl.substr(0,LinkUrl.length-1);
LinkText=LinkText.substr(0,LinkText.length-1);
FlashView='pics='+LinkPic+'&links='+LinkUrl+'&texts='+LinkText+'&borderwidth='+PicWidth+'&borderheight='+PicHeight+'&textheight='+TextHeight;
var html='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+PicWidth+'" height="'+FlashHeight+'">';
html+='<param name="movie" value="Image/PicShow.swf"> <param name="quality" value="high"><param name="allowScriptAccess" value="sameDomain"><param name="menu" value="false"><param name="bgcolor" value="#ffffff"><param name="border" value="#ffffff solid 1px"><param name="color" value="#ffffff"><param name="wmode" value="opaque">';
html+='<param name="flashvars" value="'+FlashView+'"></object>';
$(output).innerHTML=html;
html=null;
}
/*
*********************************************************************
Description:
Code:Move right succession
Function:MoveRightStart
Writen:Zhang Hong Jun
Date:2007-04-02
Browser Test:IE7.0 , FireFox2.0
*********************************************************************
*/
function MoveRightStart(a,b,c,velo){
	var me=this,zhj;
	this.para={
		velocity:velo,
		a:$(a),
		b:$(b),
		c:$(c),
		timer:null
	};
	this.marquee=function(){
		if(me.para.a.scrollLeft<=0){
			me.para.a.scrollLeft+=me.para.c.offsetWidth;
		}
        else{
            me.para.a.scrollLeft--;
        }
	};
	try{
		this.para.c.innerHTML=this.para.b.innerHTML;
		this.para.b.innerHTML="";
		this.para.a.scrollLeft=this.para.a.scrollWidth;
		this.para.timer=setInterval(this.marquee,this.para.velocity);
		this.para.a.onmouseover=function() {clearInterval(me.para.timer);}
		this.para.a.onmouseout=function() {me.para.timer=setInterval(me.marquee,me.para.velocity);}
	}
	catch(zhj){
		alert(zhj.description);
	}
}
/*
*********************************************************************
Description:
Code:Move Left succession
Function:MoveLeftStart
Writen:Zhang Hong Jun
Date:2007-04-02
Browser Test:IE7.0 , FireFox2.0
*********************************************************************
*/
function MoveLeftStart(a,b,c,velo){
	var me=this,zhj;
	this.para={
		velocity:velo,
		a:$(a),
		b:$(b),
		c:$(c),
		timer:null
	};
	this.marquee=function(){
		if((me.para.c.offsetWidth-me.para.a.scrollLeft)<=0){
			me.para.a.scrollLeft-=me.para.b.offsetWidth;
		}
        else{
			//alert(me.para.a.scrollLeft);
            me.para.a.scrollLeft++;
        }
	};
	try{
		this.para.c.innerHTML=this.para.b.innerHTML;
		this.para.a.scrollLeft=this.para.a.scrollWidth;
		this.para.timer=setInterval(this.marquee,this.para.velocity);
		this.para.a.onmouseover=function() {clearInterval(me.para.timer);}
		this.para.a.onmouseout=function() {me.para.timer=setInterval(me.marquee,me.para.velocity);}
	}
	catch(zhj){
		alert(zhj.description);
	}
}
/*
*********************************************************************
Description:
Code:Intervalic Up And Down Move
Function:MoveUpStop
Writen:Zhang Hong Jun
Date:2007-04-02
Browser Test:IE7.0 , FireFox2.0
*********************************************************************
*/
function MoveUpStop(){
	this.$=function(element){
		return(document.getElementById(element));
	};
	this.para={
		div:"MoveUpStopDiv",//DIV对象ID
		table:"MoveUpStop",//TABLE对象ID
		time:30,//移动速度，越大越慢(单位：MS)
		interval:5,//每次滚动的时间间隔(单位：S)
		timer:null,//定时器名称(程序自动检测，无需设置)
		height:120,//TABLE对象TD高度值(程序自动检测，无需设置)
		top:null,//DIV对象初始scrollTop值(程序自动检测，无需设置)
		number:3,//TABLE对象TD数量值(程序自动检测，无需设置)
		action:0,//滚动TABLE对象TD值(程序自动检测，无需设置)
		memory:0,//当前滚动TABLE对象TD值高度存储器(程序自动检测，无需设置)
		direction:0,//当前滚动方向(程序自动检测，无需设置)
		stop:false //滚动是否处在暂停状态(程序自动检测，无需设置)
	};
	this.set=function(Arg){
		for (property in Arg) {
			me.para[property] = Arg[property];
			}
		if(typeof(me.para.div)=="string"){
			me.para.div=me.$(me.para.div);
		}
		if(typeof(me.para.table)=="string"){
			me.para.table=me.$(me.para.table);
		}
		me.para.number=me.para.table.rows.length;
		if (me.para.number>1){
			me.para.height=me.para.table.rows[0].cells[0].offsetHeight;
			me.para.top=me.para.table.scrollTop;
			me.para.div.onmouseover=me.stop;
			me.para.div.onmouseout=me.start;
			me.init();
		}
		else{
			return;
		}
	};
	this.init=function(){
		if(me.para.action>=me.para.number){
			me.para.direction=1;
		}
		else{
			if(!me.para.action){
				me.para.direction=0;
			}
		}
		if(me.para.direction){
			me.para.action--;
			window.setTimeout(me.movedown,me.para.interval*1000);
		}
		else{
			me.para.action++;
			window.setTimeout(me.moveup,me.para.interval*1000);
		}
	};
	this.stop=function(){
		clearTimeout(me.para.timer);
		me.para.stop=true;
	},
	this.start=function(){
		if(me.para.stop){
			if(me.para.direction){
				me.movedown();
			}
			else{
				me.moveup();
			}
			me.para.stop=false;
		}
		return(true);
	},
	this.moveup=function(){
		if(me.para.memory>=me.para.height){
			me.para.memory=0;
			clearTimeout(me.para.timer);
			me.init();
			return;
		}
		me.para.memory++;
		me.para.div.scrollTop++;
		me.para.timer=setTimeout(me.moveup,me.para.time);
	};
	this.movedown=function(){
		if(me.para.memory>=me.para.height){
			me.para.memory=0;
			clearTimeout(me.para.timer);
			me.init();
			return;
		}
		me.para.memory++;
		me.para.div.scrollTop--;
		me.para.timer=setTimeout(me.movedown,me.para.time);
	};
	var arg=arguments[0],me=this;
	if (typeof(arg)!="object"){
		alert("Setting Error !");
		return;
	}
	else{
		this.set(arg);
	}
	arg=null;
};
/*
*********************************************************************
Description:
Code:Move up succession
Function:MoveUpStart
Writen:Zhang Hong Jun
Date:2007-04-02
Browser Test:IE7.0 , FireFox2.0
*********************************************************************
*/
function MoveUpStart(a,b,c,velo) {
	var me=this,zhj,temp;
	this.para={
		velocity:velo,//moving velocity setting
		a:document.getElementById(a),
		b:document.getElementById(b),
		c:document.getElementById(c),
		timer:null
	};
	this.marquee=function(){
		if(me.para.c.offsetTop-me.para.a.scrollTop<=0) {
			me.para.a.scrollTop-=me.para.b.offsetHeight;
		}else{
			me.para.a.scrollTop++;
		}
	};
	try {
		temp=this.para.a.style.height.toLocaleString().replace("px","");
		if (parseInt(temp)>=this.para.c.offsetTop) {
				this.para.a.style.height = this.para.c.offsetTop+"px";
				temp=null;
				return;
			}
		temp=null;
		this.para.c.innerHTML=this.para.b.innerHTML;
		this.para.timer=setInterval(this.marquee,this.para.velocity);
		this.para.a.onmouseover=function() {clearInterval(me.para.timer)};
		this.para.a.onmouseout=function() {me.para.timer=setInterval(me.marquee,me.para.velocity)};
	}
	catch(zhj){
		alert(zhj.description);
	}
}
var openwin=function(){
	var me=this;
	me.para={
		win:window, //Open window name or para
		width:300, //Open window width
		height:300, //Open window height
		reobj:"", //Open window retuenValue target element ID (FireFox compatible)
		type:"value", //Open window retuenValue quote method(value:Retuen Form Element value；html or text: Update Element HTML；function:Execute Function And retuenValue)
		title:"Open Window Test" //Open window Document Title
	};
	this.set=function(){
		var Arg=arguments[0];
		if(typeof(Arg)=="object"){
			for (property in Arg) {
				me.para[property] = Arg[property];
			}
		}
		else{
			return;
		}
	};
	this.open=function(url){
		url=(url.indexOf("?")!=-1)?url+"&":url+"?";
		var aw=parseInt((screen.availWidth/2)-(me.para.width/2));
		var ah=parseInt((screen.availHeight/2)-(me.para.height/2));
		if (document.all){
			var retValues=window.showModalDialog(url+"title="+me.para.title,me.para.win, "dialogWidth:"+me.para.width+"px; dialogHeight:"+me.para.height+"px; dialogLeft:"+aw+"px; dialogTop:"+ah+"px; status:no; directories:no; menubar:no; scrollbars:no; Resizable:no; location:no;toolbar:no;");
			if (me.para.type=="value"){
				document.getElementById(me.para.reobj).value=retValues;
			}
			else{
				if (me.para.type=="html" || me.para.type=="text"){
					document.getElementById(me.para.reobj).innerHTML=retValues;
				}
				else{
					try{
						eval(me.para.reobj+"('"+retValues+"')");
					}
					catch(e){
						alert(e.description);
					}
				}
			}
			retValues=null;
			//IE End
		}
		else{
			window.open(url+"return="+me.para.reobj+"&type="+me.para.type+"&title="+me.para.title, me.para.win, "top="+aw+",left="+ah+",scrollbars=no,dialog=yes,modal=yes,width="+me.para.width+",height="+me.para.height+",resizable=no,location=no,menubar=no,toolbar=no,status=no");
		}
		aw=null;
		ah=null;
	};
};
//代码开始
function writeflashhtml( arg )
{
var parm = []
var _default_version = "8,0,24,0";
var _default_quality = "high";
var _default_align = "middle";
var _default_menu = "false";

for(i = 0; i < arguments.length; i ++)
{
parm[i] = arguments[i].split(' ').join('').split('=')
for (var j = parm[i].length-1; j > 1; j --){
parm[i][j-1]+="="+parm[i].pop();
}
switch (parm[i][0])
{
case '_version' : var _version = parm[i][1] ; break ; 
case '_swf' : var _swf = parm[i][1] ; break ; 
case '_base' : var _base = parm[i][1] ; break ; 
case '_quality' : var _quality = parm[i][1] ; break ; 
case '_loop' : var _loop = parm[i][1] ; break ; 
case '_bgcolor' : var _bgcolor = parm[i][1] ; break ; 
case '_wmode' : var _wmode = parm[i][1] ; break ; 
case '_play' : var _play = parm[i][1] ; break ; 
case '_menu' : var _menu = parm[i][1] ; break ; 
case '_scale' : var _scale = parm[i][1] ; break ; 
case '_salign' : var _salign = parm[i][1] ; break ; 
case '_height' : var _height = parm[i][1] ; break ; 
case '_width' : var _width = parm[i][1] ; break ; 
case '_hspace' : var _hspace = parm[i][1] ; break ; 
case '_vspace' : var _vspace = parm[i][1] ; break ; 
case '_align' : var _align = parm[i][1] ; break ; 
case '_class' : var _class = parm[i][1] ; break ; 
case '_id' : var _id = parm[i][1] ; break ; 
case '_name' : var _name = parm[i][1] ; break ; 
case '_style' : var _style = parm[i][1] ; break ; 
case '_declare' : var _declare = parm[i][1] ; break ; 
case '_flashvars' : var _flashvars = parm[i][1] ; break ; 
default :;
}
}
var thtml = ""
thtml += "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" + ((_version)?_version:_default_version) + "'"
if(_width) thtml += " width='" + _width + "'"
if(_height) thtml += " height='" + _height + "'"
if(_hspace) thtml += " hspace='" + _hspace + "'"
if(_vspace) thtml += " vspace='" + _vspace + "'"
if(_align) thtml += " align='" + _align + "'"
else thtml += " align='" + _default_align + "'"
if(_class) thtml += " class='" + _class + "'"
if(_id) thtml += " id='" + _id + "'"
if(_name) thtml += " name='" + _name + "'"
if(_style) thtml += " style='" + _style + "'"
if(_declare) thtml += " " + _declare
thtml += ">"
if(_swf) thtml += "<param name='movie' value='" + _swf + "'>"
if(_quality) thtml += "<param name='quality' value='" + _quality + "'>" 
else thtml += "<param name='quality' value ='" + _default_quality + "'>"
if(_loop) thtml += "<param name='loop' value='" + _loop + "'>"
if(_bgcolor) thtml += "<param name='bgcolor' value='" + _bgcolor + "'>"
if(_play) thtml += "<param name='play' value='" + _play + "'>"
if(_menu) thtml += "<param name='menu' value='" + _menu + "'>"
else thtml += "<param name='menu' value='" + _default_menu + "'>"
if(_scale) thtml += "<param name='scale' value='" + _scale + "'>"
if(_salign) thtml += "<param name='salign' value='" + _salign + "'>"
if(_wmode) thtml += "<param name='wmode' value='" + _wmode + "'>"
if(_base) thtml += "<param name='base' value='" + _base + "'>"
if(_flashvars) thtml += "<param name='flashvars' value='" + _flashvars + "'>"
thtml += "<embed pluginspage='http://www.macromedia.com/go/getflashplayer'"
if(_width) thtml += " width='" + _width + "'"
if(_height) thtml += " height='" + _height + "'"
if(_hspace) thtml += " hspace='" + _hspace + "'"
if(_vspace) thtml += " vspace='" + _vspace + "'"
if(_align) thtml += " align='" + _align + "'"
else thtml += " align='" + _default_align + "'"
if(_class) thtml += " class='" + _class + "'"
if(_id) thtml += " id='" + _id + "'"
if(_name) thtml += " name='" + _name + "'"
if(_style) thtml += " style='" + _style + "'"
thtml += " type='application/x-shockwave-flash'"
if(_declare) thtml += " " + _declare 
if(_swf) thtml += " src='" + _swf + "'"
if(_quality) thtml += " quality='" + _quality + "'"
else thtml += " quality='" + _default_quality + "'"
if(_loop) thtml += " loop='" + _loop + "'"
if(_bgcolor) thtml += " bgcolor='" + _bgcolor + "'"
if(_play) thtml += " play='" + _play + "'"
if(_menu) thtml += " menu='" + _menu + "'"
else thtml += " menu='" + _default_menu + "'"
if(_scale) thtml += " scale='" + _scale + "'"
if(_salign) thtml += " salign='" + _salign + "'"
if(_wmode) thtml += " wmode='" + _wmode + "'"
if(_base) thtml += " base='" + _base + "'"
if(_flashvars) thtml += " flashvars='" + _flashvars + "'"
thtml += "></embed>"
thtml += "</object>"
document.write(thtml)
}

//代码结束

//修改图片大小
function DrawImage(ImgD,width,height){
   	var image=new Image();
   	image.src=ImgD.src;
   	if(image.width>0 && image.height>0){
    	flag=true;
    	if(image.width/image.height>= width/height){
     		if(image.width>width){  
     			ImgD.width=width;
     			ImgD.height=(image.height*width)/image.width;
     				}else{
     			ImgD.width=image.width;  
     			ImgD.height=image.height;
     		}
     		ImgD.alt=image.width+"×"+image.height;
     			}else{
     		if(image.height>height){  
     		ImgD.height=height;
     		ImgD.width=(image.width*height)/image.height;     
     			}else{
     		ImgD.width=image.width;  
     		ImgD.height=image.height;
     		}
     		ImgD.alt=image.width+"×"+image.height;
     	}
    }
   /*else{
    ImgD.src="";
    ImgD.alt=""
    }*/
} 
