//flash幻灯广告
var getFlashAdvs = function(xml,w,h,ofocus){
	var focus_width=w; //图片框的宽度 
	var focus_height=h; //图片框的高度 
	
	html = "";
	html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
	html += ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"';
	html += ' width="'+ focus_width +'" height="'+ focus_height +'">'; 
	html += '<param name="allowscriptAccess" value="sameDomain"><param name="movie" value="'+ofocus+'">';
	html += '<param name="quality" value="high"><param name="bgcolor" value="#F2F2F2">'; 
	html += '<param name="menu" value="false"><param name=wmode value="opaque">'; 
	html += '<param name="FlashVars" value="bcastr_xml_url='+xml+'">'; 
	html += '<embed src="'+ofocus+'" wmode="opaque" FlashVars="bcastr_xml_url='+xml+'" menu="false"';
	html += ' bgcolor="#F2F2F2" quality="high" width="'+ focus_width +'" height="'+ focus_height +'"'
	html += 'allowscriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
	return html;
}
//提交AJAX
var checkAjax = function(url,postData,id){
	$.post(url,postData,function(json){$(id).html(json.info);},'json');	
}
//FLASH播放javascript
function getFlash(setWidth,setHeight,setUrl){
	if(parseInt(setHeight)<1){
		setHeight = "100%";	
	}
	if(parseInt(setWidth)<1){
		setWidth = "100%";	
	}
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width='+setWidth+' height='+setHeight+'>')
	document.write('<param name="movie" value='+setUrl+'>')
	document.write('<param name="quality" value="high">')
	document.write('<param name="wmode" value="transparent" /> ')
	document.write('<embed src='+setUrl+' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width='+setWidth+' height='+setHeight+' wmode="transparent"></embed></object>')
}
//菜单切换
function nTabs(tabObj,obj){
	var tabList = document.getElementById(tabObj).getElementsByTagName("li");
	for(i=0; i <tabList.length; i++){
		if (tabList[i].id == obj.id){
			document.getElementById(tabObj+"_te_"+i).className = "sli"; 
    		document.getElementById(tabObj+"_co_"+i).style.display = "block";
		}else{
			document.getElementById(tabObj+"_te_"+i).className = ""; 
			document.getElementById(tabObj+"_co_"+i).style.display = "none";
		}
	} 
}
//清空FORM表单中的内容
var s = function(){
	var count = document.getElementsByTagName("form").length;
	for (i=0;i<count;i++){
		document.forms[i].reset()
	}
}


//新闻查询
var sonewstitle = function(weburl){
	newstitle = $("#sonewstitle").val();
	
	if(newstitle.length>1){
		window.location=weburl+"?title="+newstitle;
	}else{
		alert('请填写查询关键字！');
		$("#sonewstitle").focus();
	}
}

//微软在线播放器
function getPlay(setUrl,setWidth,setHeight){
	var strText="<object title=\"\" align=\"middle\" classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" class=\"object\" id=\"MediaPlayer\" width="+setWidth+" height="+setHeight+">";
		strText = strText+"<param name=\"AUTOSTART\" value=\"true\"/>";
		strText = strText+"<param name=\"ShowStatusBar\" value=\"-1\"/>";
		strText = strText+"<param name=\"Filename\" value="+setUrl+">";
		strText = strText+"<param name=\"DisplaySize\" value=\"0\"> ";
		strText = strText+"<param name=\"ShowCaptioning\" value=\"0\">";
		strText = strText+"<param name=\"ShowControls\" value=\"1\">";
		strText = strText+"<param name=\"ShowAudioControls\" value=\"1\">";
		strText = strText+"<param name=\"ShowGotoBar\" value=\"0\">";
		strText = strText+"<embed title=\"\" type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" flename=\"mp\" src="+setUrl+"  width=320 height=240 >";
		strText = strText+"</embed>";
		strText = strText+"</object>";
		
		return strText;
}