function loadXML1(XMLf,xslt){
	try{
		if (navigator.userAgent.indexOf('MSIE') >= 0) {
		var myXML=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
		myXML.async=false;
		myXML.load(XMLf);
		var myxsl=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
		myxsl.async=false;
		myxsl.load(xslt);
		HTML=myXML.transformNode(myxsl);
		document.write(HTML);
document.getElementById("votehtml").value = HTML;
//alert(HTML);
		}
	else if (navigator.userAgent.indexOf('Firefox') >= 0) {
		var myXML=document.implementation.createDocument("","",null);
		myXML.async=false;
		myXML.load(XMLf);
		var myxsl=document.implementation.createDocument("","",null);
		myxsl.async=false;  
		myxsl.load(xslt);
		var oProcessor = new XSLTProcessor();
		oProcessor.importStylesheet(myxsl);
		oResultDom=oProcessor.transformToFragment(myXML, document);
		var serializer = new XMLSerializer();
		HTML=serializer.serializeToString(oResultDom);
		//var index = HTML.indexOf('id="appmenu"');
		//HTML = HTML.substring(0, index+12) + ' style="width:100%;" ' + HTML.substring(index+12);
		//var td = document.getElementById('Menu').getElementsByTagName('td')[0];
		//var range = td.ownerDocument.createRange();
		//range.selectNodeContents(td);
		//range.deleteContents();
		//var fragment = range.createContextualFragment(HTML);
		//td.appendChild(fragment); 
		document.write(HTML);
document.getElementById("votehtml").value = HTML;
//alert("FF");
}else if (navigator.userAgent.toLowerCase().indexOf("safari") >= 0) 
{
  
  var xmlhttp = new XMLHttpRequest();
  xmlhttp.open("GET", "SiteMapXslt.aspx?xml=" + XMLf + "&xsl=" + xslt, false);
  xmlhttp.async = false;
  xmlhttp.send(null);
  var HTML = xmlhttp.responseText;
  document.write(HTML);
document.getElementById("votehtml").value = HTML;
//alert("SF");

}





}
catch (exception){
alert(exception.Message);
		$('.slide_body').css('display', 'none');
}

}






function loadXML2(XMLf){
try{



var myXML=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
myXML.async=false;
myXML.load(XMLf);
var myxsl=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
myxsl.async=false;


myxsl.load("../flib/NewsRealtime.xsl");

;

HTML=myXML.transformNode(myxsl);



document.write(HTML);


}



catch (exception){
alert('There is nothing under the group');}}

///////////////////////////////////////////
function ScrollText(content,btnPrevious,btnNext,autoStart,timeout,isSmoothScroll)
{
    this.aa=0;
    this.Speed = 10;
    this.Timeout = timeout;
	this.stopscroll =false;//是否停止滚动的标志位
	this.isSmoothScroll= isSmoothScroll;//是否平滑连续滚动
    this.LineHeight = 20;//默认高度。可以在外部根据需要设置
    this.NextButton = this.$(btnNext);
    this.PreviousButton = this.$(btnPrevious);
    this.ScrollContent = this.$(content);
    
    for(i=0;i<4;i++)
    {
    this.ScrollContent.innerHTML += this.ScrollContent.innerHTML;
    }
 
	if(this.PreviousButton)
	{
		this.PreviousButton.onclick = this.GetFunction(this,"Previous"); 
		this.PreviousButton.onmouseover = this.GetFunction(this,"MouseOver");
		this.PreviousButton.onmouseout = this.GetFunction(this,"MouseOut");
	}
	if(this.NextButton){
		this.NextButton.onclick = this.GetFunction(this,"Next");
		this.NextButton.onmouseover = this.GetFunction(this,"MouseOver");
		this.NextButton.onmouseout = this.GetFunction(this,"MouseOut");
    }
    this.ScrollContent.onmouseover = this.GetFunction(this,"MouseOver");
    this.ScrollContent.onmouseout = this.GetFunction(this,"MouseOut");

    if(autoStart)
    {
        this.Start();
    }
}

ScrollText.prototype = {

	$:function(element)
	{
		return document.getElementById(element);
	},
	Previous:function()
	{
		this.stopscroll = true;
		this.Scroll("up");
	},
	Next:function()
	{
		this.stopscroll = true;
		this.Scroll("down");
	},
	Start:function()
	{
               
               // alert(this.ScrollContent.scrollTop);
                this.ScrollContent.scrollTop=0;
		if(this.isSmoothScroll)
		{
			this.AutoScrollTimer = setInterval(this.GetFunction(this,"SmoothScroll"), this.Timeout);
		}
		else
		{		
			this.AutoScrollTimer = setInterval(this.GetFunction(this,"AutoScroll"), this.Timeout);
		}
	},
	Stop:function()
	{
		clearTimeout(this.AutoScrollTimer);
		this.DelayTimerStop = 0;
	},
	MouseOver:function()
	{	
		this.stopscroll = true;
	},
	MouseOut:function()
	{
		this.stopscroll = false;
	},
	AutoScroll:function()
	{
		if(this.stopscroll) 
		{
			return;
		}
		this.ScrollContent.scrollTop++;
		if(parseInt(this.ScrollContent.scrollTop) % this.LineHeight != 0)
		{
			this.ScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Speed);
		}
		else
		{
			if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2)
			{
				this.ScrollContent.scrollTop = 0;
			}
			clearTimeout(this.ScrollTimer);
			//this.AutoScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Timeout);
		}
	},
	SmoothScroll:function()
	{
		//if(this.stopscroll) 
		//{
		//	return;
		//}
   
                
		var a=this.ScrollContent.scrollTop++;
                
                 
                var c =this.aa++;

                                                  
               
                 
              




               if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2)
		{
			this.ScrollContent.scrollTop = 0;
		}
 

            
	},
	Scroll:function(direction)
	{

		if(direction=="up")
		{
			this.ScrollContent.scrollTop--;
		}
		else
		{
			this.ScrollContent.scrollTop++;
		}
		if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2)
		{
			this.ScrollContent.scrollTop = 0;
		}
		else if(parseInt(this.ScrollContent.scrollTop)<=0)
		{
			this.ScrollContent.scrollTop = parseInt(this.ScrollContent.scrollHeight) / 2;
		}
		
		if(parseInt(this.ScrollContent.scrollTop) % this.LineHeight != 0)
		{
			this.ScrollTimer = setTimeout(this.GetFunction(this,"Scroll",direction), this.Speed);
		}
	},
	GetFunction:function(variable,method,param)
	{
		return function()
		{
			variable[method](param);
		}
	}
}

function ignoreError() {
  return true;
}
//window.onerror = ignoreError; 

