function showAbout() {
	var swf_width = 200;
	var swf_height = 122;
	var files = 'images/about1.jpg|images/about2.jpg|images/about3.jpg|images/about4.jpg|images/about5.jpg'
	var links = 'about.asp|about.asp|about.asp|about.asp|about.asp'
	var texts = '||||'
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
	document.write('<param name="movie" value="images/show1.swf"><param name="quality" value="high">');
	document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
	document.write('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'&bcastr_config=0x66cc00:文字颜色|2:文字位置|0xeeeeee:文字背景颜色|00:文字背景透明度|0xffffff:按键文字颜色|0x66cc00:按键默认颜色|0x000033:按键当前颜色|4:自动播放时间(秒)|3:图片过渡效果|1:是否显示按钮|_blank:打开窗口">');
	document.write('<embed src="images/show1.swf" wmode="opaque" FlashVars="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="' + swf_height +'&bcastr_config=0x66cc00:文字颜色|1:文字位置|0xeeeeee:文字背景颜色|00:文字背景透明度|0xffffff:按键文字颜色|0x66cc00:按键默认颜色|0x000033:按键当前颜色|6:自动播放时间(秒)|3:图片过渡效果|1:是否显示按钮|_blank:打开窗口" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>'); 
}



function showCase() {
	var imgUrl = new Array();
	var imgLink = new Array();
	var adNum = 0;
	var it = 1;

	imgUrl[it] = 'images/ss.jpg'; imgLink[it] = '#'; it++;
	imgUrl[it] = 'images/ss.jpg'; imgLink[it] = '#'; it++;
	imgUrl[it] = 'images/ss.jpg'; imgLink[it] = '#'; it++;
	imgUrl[it] = 'images/ss.jpg'; imgLink[it] = '#'; it++;
	imgUrl[it] = 'images/ss.jpg'; imgLink[it] = '#'; it++;
	
	adNum = imgUrl.length - 1
	var currentAD = 1;

}

function doPlay(cur){
	var o = document.getElementById("tdShow");
	var str = "<a href=\"" + linkurl + "\" target=_blank><img src=" + filename + " width=450 height=140 border=0></a>"
	currentAD >= adNum ? currentAD = 1 : currentAD++;
	
	if(cur==undefined){
		//淡入淡出效果
		o.filters.blendTrans.duration=2;
		o.filters.blendTrans.apply();
		o.innerHTML=str;
		o.filters.blendTrans.play();
	}else{
		//普通效果
		o.filters.revealTrans.duration=1;
		o.filters.revealTrans.Transition=cur;
		o.filters.revealTrans.apply();
		o.innerHTML=str;
		o.filters.revealTrans.play();
	}
	var theTimer=setTimeout("doPlay(26)",6000);
}

function gotoPlay(n){
	currentAD+=n;
	doPlay(26);

}

function UrlEncode(str) {//标准UrlEncode
  window.execScript("function reHex(str)\
  reHex=hex(asc(str))\
  end function \r\n\
  function jsChr(str)\
  jsChr=Chr(str)\
  end function", "vbscript")

  String.prototype.UrlEncode = function() {
    glbEncode = {};
    return escape(this).replace(/%u(.{4})/g,
    function(a, b, c, d) {
      return reHex(String.fromCharCode(eval("0x" + b))).replace(/(.{2})(.{2})/, "%$1%$2")
    }).replace(/\+/g, "%2B").replace(/%20/g, "+");
  }
  return str.UrlEncode();
}


function doSearch(){
	var skey = document.getElementById('skey').value;
	if(skey == null || skey == '') {
		return;
	}
	else {
		window.location = '?skey=' + UrlEncode(skey);
	}
}

function chkTextArea(ota, len){
	if(ota.value.length >= len){
		alert('已达到最大输入限制');
		event.returnValue= false;
	}
}

function chkEmail(strm){
	var regm = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; //验证Mail的正则表达式,^[a-zA-Z0-9_-]:开头必须为字母,下划线,数字,
	if (!strm.match(regm) && strm != ""){
		alert("请输入正确的邮箱地址");
	}
} 
