﻿<!--
var browser=navigator.appName  
var b_version=navigator.appVersion  
var version=b_version.split(";");  
var trim_Version=version[1].replace(/[ ]/g,"");  
if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE6.0")  
{
  document.execCommand("BackgroundImageCache", false, true);
}

function trim() {
return this.replace(/\s+$|^\s+/g,"");
}
String.prototype.trim=trim;

function LoadFlash(url,wmode,width,Height)
{ 
document.write(
  '<object width="' + width +'" height="' + Height + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"><param name="movie" value="' + url + '"><param name="wmode" value="'+wmode+'"><param name="quality" value="autohigh"><param name="menu" value="false"><embed width="' + width +'" height="' + Height + '" src="' + url + '"  quality="autohigh" wmode="' + wmode + '" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>');   
}

function Newsfocus(w, h, it, th, ta, bc, ps, ls, ts)
{
var interval_time= it.toString()!="" ? it : 5; //图片停顿时间，单位为秒，为0则停止自动切换
var focus_width= w; //宽度
var focus_height= h; //高度
var text_height= th.toString()!="" ? th : 20; //标题高度
var text_align= ta.toString()!="" ? th : "center";; //标题文字对齐方式(left、center、right)
var swf_height = focus_height+text_height //相加之和最好是偶数,否则数字会出现模糊失真的问题

var pics= ps; //图片地址
var links= ls; //相对于图片的链接地址
var texts= ts; //标题文字
 
document.write('<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="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="movie" value="images/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="'+bc+'">');
document.write('<param name="menu" value="false"><param name="wmode" value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'&text_align='+text_align+'&interval_time='+interval_time+'">');
document.write('<embed src="images/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'&text_align='+text_align+'&interval_time='+interval_time+'" menu="false" bgcolor="'+bc+'" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}

function LoadVideo(url,xml,width,Height)
{ 
document.write(
  '<object width="' + width +'" height="' + Height + '" type="application/x-shockwave-flash" data=" '+ url +' "><param name="movie" value=" '+ url +' "/><param name="allowFullScreen" value="false" /><param name="bgColor" value="#000000" /><param name="menu" value="false"><param name="FlashVars" value="xml='+ xml +'" /></object>');   
}

function alignHeight(obj1,obj2) {
	if (document.getElementById(obj1) && document.getElementById(obj2)) {
		if ( document.getElementById(obj1).scrollHeight < document.getElementById(obj2).scrollHeight) {
			//document.getElementById(obj2).style.height = document.getElementById(obj2).scrollHeight + "px";
			document.getElementById(obj1).style.height = document.getElementById(obj2).scrollHeight + "px";
		}
		else {
			document.getElementById(obj2).style.height = document.getElementById(obj1).scrollHeight + "px";
			//document.getElementById(obj1).style.height = document.getElementById(obj1).scrollHeight + "px";
		}
	}
}
//-->
