﻿
//载入flash
function loadflash(width,height){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="scriptmain" name="scriptmain" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">')
document.write('<param name="movie" value="js/bcastr.swf?bcastr_xml_url=js/bcastr.xml" />')
document.write('<param name="quality" value="high" />')
document.write('<param name="scale" value="noscale" />')
document.write('<param name="LOOP" value="false" />')
document.write('<param name="menu" value="false" />')
document.write('<param name="wmode" value="transparent" />')
document.write('<embed src="js/bcastr.swf?bcastr_xml_url=js/bcastr.xml" width="'+width+'" height="'+height+'" loop="False" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" salign="T" name="scriptmain" menu="false" wmode="transparent"></embed>')
document.write('</object>')
}


	/**ajax功能*/
var g_xmlHttp;
function createg_xmlHttpRequest(){
	if(window.ActiveXObject){
		g_xmlHttp = new ActiveXObject('Msxml2.XMLHTTP') || new ActiveXObject('Microsoft.XMLHTTP');
	}
	else if(window.XMLHttpRequest){
		g_xmlHttp = new XMLHttpRequest();
		}
}

function get_html(url,id){
	//var url = url.replace(".inc",".html");
	createg_xmlHttpRequest();
	try{
		g_xmlHttp.open("GET", url, false);
		g_xmlHttp.send(null);
		//document.writeln(g_xmlHttp.responseText);
		document.getElementById(id).innerHTML = g_xmlHttp.responseText
		
	}
	catch(e)
	{
		document.getElementById(id).innerHTML = "<p style='background:#fde7da;border:1px solid #fd8949;padding:6px 10px;margin:10px 0;'>"+e.message+"</p>"
		//document.writeln("<p style='background:#fde7da;border:1px solid #fd8949;padding:6px 10px;margin:10px 0;'>"+e.message+"</p>")
		//alert(e.message);
	}

}
