﻿///=================================================fix-div.js
	 $(document).ready(function(){
	        /*FF和IE7可以通过position:fixed来定位，只有ie6需要动态设置高度.*/
			if($.browser.msie && $.browser.version == 6) {
				FollowDiv.follow();
			}
	 });
	 FollowDiv = {
			follow : function(){
				$('#cssrain').css('position','absolute');
				$(window).scroll(function(){
				    var f_top = $(window).scrollTop() + $(window).height() - $("#cssrain").height() - parseFloat($("#cssrain").css("borderTopWidth")) - parseFloat($("#cssrain").css("borderBottomWidth"));
					$('#cssrain').css( 'top' , f_top );
				});
			}
	  }
/*
此例子中:
放右下角的是时候，需要 滚动条高度+屏幕高度 - div高度（包括边框）
*/
///=================================================marquee.js
function AutoScroll(obj){
        $(obj).find("ul:first").animate({
                marginTop:"-25px"
        },500,function(){
                $(this).css({marginTop:"0px"}).find("li:first").appendTo(this);
        });
}
$(document).ready(function(){
setInterval('AutoScroll("#scrollDiv")',1000)
});
///=================================================bubbleup.js
jQuery.fn.popup = function(interval,hidetime) 
{ var hideTimer, showTimer;
	var els = this;
	var start = 0;
	var count = els.length;
	var hideTimer, showTimer;
	if(!interval) var interval = 4000;
	if(!hidetime) var hidetime = 2000;
	function sUp(el){
		if ($.browser.msie) var height=document.body.clientHeight+$("html").attr("scrollTop");
		if (!height) var height=window.innerHeight+$("html").attr("scrollTop");
		$("body").css("overflow","hidden");
		el.css("top","500px").show();
		el.animate({  
		top: '-=' + el.css("height")
		}, 400, 'swing', function() {  
		start++;
		hInt();
	});}
	function sInt(){
		clearTimeout(showTimer);
		showTimer = setInterval(function(){
		if(start==count) start = 0;
		sUp($(els[start]));
		},interval);}
	function hInt(){
		clearTimeout(hideTimer);
		hideTimer = setTimeout(function(){
			els.fadeOut(800);
			$("body").css("overflow","auto");
			},hidetime);}
	els.css("display","none");
	els.css("position","absolute");
	els.css("left","0px");
	els.hover(function(){
		clearTimeout(hideTimer);
		clearTimeout(showTimer);
		},function(){hInt(); sInt();});
	$("a.close").click(function(){
		$(this).parent("div."+els.attr("className")).hide()
		sInt();
	});
	sInt();
  return this;};
  ///=================================================popupbox.js
function my(varurl,widt,heigt,left,top) {
  var sWidth,sHeight;
  sWidth=document.body.offsetWidth;
  sHeight=document.body.offsetHeight;   
   var bgObj=document.createElement("div"); 
   bgObj.setAttribute('id','bgDiv');
   bgObj.style.position="absolute";
   bgObj.style.background="#777";
   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
   bgObj.style.top="0";   
   bgObj.style.opacity="0.6";
   bgObj.style.left="0";
   bgObj.style.width=sWidth + "px";
   bgObj.style.height=sHeight + "px";
   bgObj.style.zIndex = "9999999"; 
   document.body.appendChild(bgObj);  
   var msgBox=document.createElement("div");
   msgBox.setAttribute("id","msgBox1");
   msgBox.setAttribute("align","center");
   msgBox.style.background="white"; 
   msgBox.style.border="3px solid #8EA344";
   msgBox.style.position = "absolute"; 
   msgBox.style.left = left; 
   msgBox.style.top = top; 
   msgBox.style.font="12px/1.4em Verdana, Geneva, Arial, Helvetica, sans-serif"; 
   msgBox.style.marginLeft = "-525px" ;
   msgBox.style.marginTop = -80+document.documentElement.scrollTop+"px"; 
   msgBox.style.width = widt; 
   msgBox.style.height =heigt;
   msgBox.style.textAlign = "center"; 
   msgBox.style.lineHeight ="15px"; 
   msgBox.style.zIndex = "9999999";  
    var title=document.createElement("h4"); 
     title.setAttribute("id","msgTitle"); 
     title.setAttribute("align","right"); 
     title.style.margin="0"; 
     title.style.padding="2px";  
     title.style.opacity="75%";
     title.style.background="#8EA344"; 
     title.style.border="1px solid #8EA344"; 
     title.style.height="15px"; 
     title.style.font="12px/1.4em Verdana, Geneva, Arial, Helvetica, sans-serif"; 
     title.style.color="white";
     title.style.cursor="hand"; 
     var guanbi=document.createElement("strong");
     guanbi.setAttribute("id","close"); 
     guanbi.innertHTML="关闭"; 
     title.onclick=function(){
      document.body.removeChild(bgObj); 
      document.body.removeChild(msgBox);}
     title.innerHTML="关闭"; 
     document.body.appendChild(msgBox); 
     var txt=document.createElement("p"); 
     txt.style.margin="0" 
     txt.setAttribute("id","msgTxt");  
     txt.innerHTML=" <iframe src="+varurl+" width=100% height=100% marginWidth='0' marginHeight='0'  frameBorder='0' noResize scrolling='no' ></iframe> "; 
     document.getElementById("msgBox1").appendChild(title); 
     document.getElementById("msgBox1").appendChild(txt);   
 } 
///=================================================del txt area.js
$(document).ready(function(){
	$(".pane .delete").click(function(){
		$(this).parents(".pane").animate({ opacity: 'hide' }, "slow");
	});
});
///=================================================slide down txt area.js
$(document).ready(function()
{
	$("#firstpane p.menu_head").click(function()
    {
		$(this).css({backgroundImage:"url(down.png)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
       	$(this).siblings().css({backgroundImage:"url(left.png)"});
	});
	$("#secondpane p.menu_head").mouseover(function()
    {
	     $(this).css({backgroundImage:"url(down.png)"}).next("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp("slow");
         $(this).siblings().css({backgroundImage:"url(left.png)"});
	});
});
///=================================================drag txt area.js
(function($){var textarea,staticOffset;var iLastMousePos=0;var iMin=32;var grip;$.fn.TextAreaResizer=function(){return this.each(function(){textarea=$(this).addClass('processed'),staticOffset=null;$(this).wrap('<div class="resizable-textarea"><span></span></div>').parent().append($('<div class="grippie"></div>').bind("mousedown",{el:this},startDrag));var grippie=$('div.grippie',$(this).parent())[0];grippie.style.marginRight=(grippie.offsetWidth-$(this)[0].offsetWidth)+'px'})};function startDrag(e){textarea=$(e.data.el);textarea.blur();iLastMousePos=mousePosition(e).y;staticOffset=textarea.height()-iLastMousePos;textarea.css('opacity',0.25);$(document).mousemove(performDrag).mouseup(endDrag);return false}function performDrag(e){var iThisMousePos=mousePosition(e).y;var iMousePos=staticOffset+iThisMousePos;if(iLastMousePos>=(iThisMousePos)){iMousePos-=5}iLastMousePos=iThisMousePos;iMousePos=Math.max(iMin,iMousePos);textarea.height(iMousePos+'px');if(iMousePos<iMin){endDrag(e)}return false}function endDrag(e){$(document).unbind('mousemove',performDrag).unbind('mouseup',endDrag);textarea.css('opacity',1);textarea.focus();textarea=null;staticOffset=null;iLastMousePos=0}function mousePosition(e){return{x:e.clientX+document.documentElement.scrollLeft,y:e.clientY+document.documentElement.scrollTop}}})(jQuery);
///=================================================
/*/////////////////////////////////////////////////--------------count textarea text ----------------count textarea text
可以输入<span id="counter">140</span>字<br/>
<textarea id="status"  name="status" rows="6" cols="40" onkeydown='countChar("status","counter",140);' onkeyup='countChar("status","counter");'></textarea>
*/
function countChar(textareaName,spanName,max)
{  document.getElementById(spanName).innerHTML = max - document.getElementById(textareaName).value.length;}  
/*/////////////////////////////////////////////////--------------menu-open/close----------------menu-open/close.js
<a href="#" title="查看信息" onclick="javascript:menu_tree('left_3');">see</a>
<div id='left_3' style="display:none;">text</div>
*/
function menu_tree(meval){var left_n=eval(meval);if (left_n.style.display=="none"){ eval(meval+".style.display='';"); }else{ eval(meval+".style.display='none';"); }}
/////////////////////////////////////////////////--------------bubbleinfor----------------bubbleinfor.js
    $(function () {
        $('.bubbleInfo').each(function () {
            var distance = 10;
            var time = 250;
            var hideDelay = 500;
            var direction="-";//   “+”向下滑动，“-”向上滑动
            var hideDelayTimer = null;
            var beingShown = false;
            var shown = false;
            var trigger = $('.trigger', this);
            var info = $('.popup', this).css('opacity', 0);
            $([trigger.get(0), info.get(0)]).mouseover(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                if (beingShown || shown) {
                    return;
                } else {
                    beingShown = true;
                    info.css({
                        top: -290,
                        left: -40,
                        display: 'block'
                    }).animate({
                        top: direction+'=' + distance + 'px',
                        opacity: 1
                    }, time, 'swing', function() {
                        beingShown = false;
                        shown = true;
                    });
                }
                return false;
            }).mouseout(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                hideDelayTimer = setTimeout(function () {
                    hideDelayTimer = null;
                    info.animate({
                        top: direction+'=' + distance + 'px',
                        opacity: 0
                    }, time, 'swing', function () {
                        shown = false;
                        info.css('display', 'none');
                    });
                }, hideDelay);
                return false;
            });
        });
    });
/////////////////////////////////////////////////--------------Gallery----------------Gallery.js
jQuery.fn.imageScroller = function(params){
	var p = params || {
		next:"buttonNext",
		prev:"buttonPrev",
		frame:"viewerFrame",
		child:"a",
		auto:true}; 
	var _btnNext = $("#"+ p.next);
	var _btnPrev = $("#"+ p.prev);
	var _imgFrame = $("#"+ p.frame);
	var _child = p.child;
	var _auto = p.auto;
	var _itv;
	var turnLeft = function(){
		_btnPrev.unbind("click",turnLeft);
		if(_auto) autoStop();
		_imgFrame.animate( {marginLeft:-100}, 'fast', '', function(){
			_imgFrame.find(_child+":first").appendTo( _imgFrame );
			_imgFrame.css("marginLeft",0);
			_btnPrev.bind("click",turnLeft);
			if(_auto) autoPlay();
		});};
	var turnRight = function(){
		_btnNext.unbind("click",turnRight);
		if(_auto) autoStop();
		_imgFrame.find(_child+":last").clone().show().prependTo( _imgFrame );
		_imgFrame.css("marginLeft",-100);
		_imgFrame.animate( {marginLeft:0}, 'fast' ,'', function(){
			_imgFrame.find(_child+":last").remove();
			_btnNext.bind("click",turnRight);
			if(_auto) autoPlay(); 
		});};
	_btnNext.css("cursor","hand").click( turnRight );
	_btnPrev.css("cursor","hand").click( turnLeft );
	var autoPlay = function(){
	  _itv = window.setInterval(turnLeft, 3000);};
	var autoStop = function(){
		window.clearInterval(_itv);};
	if(_auto)	autoPlay();};
/////////////////////////////////////////////////--------------选卡显示----------------tabs.js
function selectTag(showContent,selfObj){
	// 操作标签
	var tag = document.getElementById("info_ordnum").getElementsByTagName("div");
	var taglength = tag.length;
	for(i=0; i<taglength; i++){
		tag[i].className = "unsub_bg";
	}
	selfObj.parentNode.className = "sub_bg";
	// 操作内容
	for(i=0; j=document.getElementById("tagContent"+i); i++){
		j.style.display = "none";
	}
	document.getElementById(showContent).style.display = "block";
}
/////////////////////////////////////////////////--------------友情链接----------------weblink.js
/*
sfHover = function() {
  var sfEls;
  var sfEls = document.getElementById("jumpmenu").getElementsByTagName("LI");
  for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
      this.className+=" sfhover";
    }
    sfEls[i].onmouseout=function() {
      this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    }
  }
}
window.onload=sfHover;
*/
/*--使用方法/////////////////////////////////////////////////--------------弹出窗口----------------windows.js
onClick="WinOpenDialog('{$=get_nurlpath()}/?type=view&id={$vid}','350','400')" 
*/
function WinOpenDialog(url,t,w,h)
{
    var feature = "dialogWidth:"+w+"px;dialogHeight:"+h+"px;center:yes;status:no;help:no";
    showModalDialog(url,window,feature);
}
/*---使用方法/////////////////////////////////////////////////--------------中间广告代码-----------------middle.js
<div id="panel">
	test
</div><p class="slide"><a href="#" class="btn-slide">OPEN</a></p></table>
*/
$(document).ready(function(){
	$(".btn-slide").click(function(){
		$("#panel").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});
		$(".see-flink").click(function(){
		$("#panel1").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

});
/////////////////////////////////////////////////--------------用作广告代码-----------------tab1.js
jQuery.fn.extend({
  haccordion: function(params){
    var jQ = jQuery;
    var params = jQ.extend({
      speed: 500,
      headerclass: "tab1",
      contentclass: "t_content",
      contentwidth: 250
    },params);
    return this.each(function(){
      jQ("."+params.headerclass,this).click(function(){
        var p = jQ(this).parent()[0];
        if (p.opened != "undefined"){
          jQ(p.opened).next("div."+params.contentclass).animate({
            width: "0px"
          },params.speed);
        }
        p.opened = this;
        jQ(this).next("div."+params.contentclass).animate({
          width: params.contentwidth + "px"
        }, params.speed);
      });
    });
  }
});
/*---使用方法///////////////////////////////////////////////////----------无极限菜单---------lim_menu_.js
<ul class="dropdown"><!------left menu begin------>
<!--{loop}-->   
        <li><a href="" title="">test</a>
        <ul class="sub_menu">
          <!--{loop}-->
          <li><a href="" title="">test</a></li>
          <!--{/loop}-->
         </ul>
        </li>          
<!--{/loop}-->
</ul><!------left menu end------>
*/
$(function(){
    $("ul.dropdown li").hover(function(){
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    }, function(){
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    });
    $("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");
});
//////////////////////////////////////////////////////-----顶部下拉显示网站信息-----top_download.js
(function($){
	$.fn.slideBox = function(params){
		var content = $(this).html();
		var defaults = {
			width: "100%",
			height: "200px",
			position: "bottom"			// Possible values : "top", "bottom"
		}
		if(params) $.extend(defaults, params);
		var divPanel = $("<div class='slide-panel'>");
		var divContent = $("<div class='top_content'>");
		$(divContent).html(content);
		$(divPanel).addClass(defaults.position);
		$(divPanel).css("width", defaults.width);
		// centering the slide panel
		$(divPanel).css("left", (100 - parseInt(defaults.width))/2 + "%");
		// if position is top we're adding 
		if(defaults.position == "top")
			$(divPanel).append($(divContent));
		// adding buttons
		$(divPanel).append("<div class='slide-button'>Open</div>");
		$(divPanel).append("<div style='display: none' id='close-button' class='slide-button'>Close</div>");
		if(defaults.position == "bottom")
			$(divPanel).append($(divContent));
		$(this).replaceWith($(divPanel));
		// Buttons action
		$(".slide-button").click(function(){
			if($(this).attr("id") == "close-button")
				$(divContent).animate({height: "0px"}, 1000);
			else
				$(divContent).animate({height: defaults.height}, 1000);
			$(".slide-button").toggle();
		});
	};
})(jQuery);
/*--使用方法//////////////////////////////////////////////////////-------------------------------添加到收藏夹----addfavor.js
<a href="#" onclick="addbookmark()">test</a>
*/
function addbookmark()
{
   //var nome_sito = "{$site_name}";
   // var url_sito = "{$site_url}/";
    if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt
        (navigator.appVersion) >= 4))
        window.external.AddFavorite(url_sito, nome_sito);
    else if (navigator.appName == "Netscape")
        window.sidebar.addPanel(nome_sito, url_sito, '');
    else
        alert("Sorry!Cann't Add this site to your favorite!.");
}
/*---使用方法/////////////////////////////////////////////////---------------超级链接提示（带图片）-------alt-tips.js
<a href="#" target="_blank" class="screenshot" rel="s.jpg" title="test">test</a>
<a href="#" target="_self" class="screenshot" title="test" >test</a>
*/
this.screenshotPreview = function(){	
		xOffset = 10;
		yOffset = 30;
	$("a.screenshot").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		if(this.rel !=""){
		$("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");	
		} else{$("body").append("<div id='screenshot' >"+ this.t +"</div>");}							 
		$("#screenshot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#screenshot").remove();
    });	
	$("a.screenshot").mousemove(function(e){
		$("#screenshot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};
$(document).ready(function(){
	screenshotPreview();
});
/*---使用方法///////////////////////////////////////////////-----------------------------------自动读取文件类型------auto.readfileclass.js
直接运行   *****************与xheader编辑器/postbox有冲突所以取消该功能
$(document).ready(function(){
	$("a[@href$=pdf]").addClass("pdf");
  $("a[@href$=jpg]").addClass("image");
	$("a[@href$=zip]").addClass("zip");
	$("a[@href$=gif]").addClass("image");
	$("a[@href$=swf]").addClass("flash");
	$("a[@href$=avi]").addClass("av");
	$("a[@href$=rar]").addClass("zip");
//	$("a[@href$=html]").addClass("html");
	$("a[@href$=txt]").addClass("text");
	$("a[@href$=png]").addClass("image");
	$("a[@href$=mp3]").addClass("av");
	$("a[@href$=wmv]").addClass("av");
	$("a[@href$=ppt]").addClass("ms");
	$("a[@href$=doc]").addClass("ms");
	$("a[@href$=xls]").addClass("ms");
	//$("a:not([@href*=http://d500.com.cn])").not("[href^=#]")
	//	.addClass("unknow")
	//	.attr({ target: "_blank" });
});
*/
/*----使用方法///------------------------------------输入框提示----------------------------input-help.js
 <script type="text/javascript">
	  $().ready(function(){
	$('#jslogin_username').textboxhelp({help:'test'});
 </script>
*/
(function($) {
  $.fn.textboxhelp = function(options){
    var defaults = {help: 'Help me!', focuscls:'focus'};
    var opts = $.extend(defaults, options);
    $(this).val(opts.help);
    $(this).focus(function(){
      var t = $(this).val();
      if(t.length > 0 && t == opts.help)
        $(this).addClass(opts.focuscls).val('');
    }).blur(function() { 
      var t = $(this).val();
      if('' == t)
         $(this).removeClass(opts.focuscls).val(opts.help);
    });
  }
})(jQuery); 
///------------------------------------Flash.js----------------------------Flash.js
function writeFlashHTML2(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('=')
      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)
}

