﻿// JScript File
var xmlHttp
function getdynamicontent()
{
var date_now=new Date()
    var x=Math.random()
    var url="getcontent.aspx?timestamp="+date_now;
    xmlHttp=GetXmlHttpObject(statuschanged)
    xmlHttp.open("GET", url , true)
    xmlHttp.send(null)
    
    }
    
 function statuschanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		var getText=xmlHttp.responseText
		document.getElementById("getdynamicontent").innerHTML=getText;
	} 
}

/* Winners */
function getWinners()
{
    var date_now=new Date()
    var x=Math.random()
    var url="homewinners.aspx?timestamp="+date_now;
    xmlHttp=GetXmlHttpObject(statuschanged)
    xmlHttp.open("GET", url , true)
    xmlHttp.send(null)
    
 }


/* Wineers End */
/* News */
function getNews()
{
    var str="While the West Indies Cricket Board and sponsors Digicel squabble over the finer points of the terms of their contract, English cricket has made a few bold decisions as they attempt to move forward and keep abreast of modern demands.<br />"
    str=str + " <br />"
    str=str + " Noticeably the English cricket administrators sought the opinion of the viewing public before finalising plans for their new 20/20 cricket tournament to come on stream in 2010.<br />"
    str=str + " The new format, to be called the English Premier League, will start with two divisions made up of ten teams. The announcement came in the midst of a radical shake-up of the domestic game following the ECB&rsquo;s board meeting at Lord&rsquo;s<br />"
    str=str + " <br />"
    str=str + " In a unanimous decision, the format that has been agreed upon will involve all 18 first-class counties, plus two overseas sides to make up the numbers, with the matches to be played in the month of June. Allen Stanford will provide one of the teams and it is believed the other will be from India, with the winners of the IPL the likely choice.<br />"
    str=str + " <br />"
    str=str + " A separate Twenty20 League for the 18 counties will then take place, primarily on Friday nights in July and August, and will act as the qualifier for the Champions League. The current Pro40 competition will be scrapped to make way for the competition."
    document.getElementById("getdynamicontent").innerHTML=str;
}
/* News end */
function GetXmlHttpObject(handler)
{ 
	var objXmlHttp=null
	if (navigator.userAgent.indexOf("Opera")>=0)
	{
		alert("This example doesn't work in Opera") 
		return 
	}
	if (navigator.userAgent.indexOf("MSIE")>=0)
	{ 
		var strName="Msxml2.XMLHTTP"
		if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
		{
			strName="Microsoft.XMLHTTP"
		} 
		try
		{ 
			objXmlHttp=new ActiveXObject(strName)
			objXmlHttp.onreadystatechange=handler 
			return objXmlHttp
		} 
		catch(e)
		{ 
			alert("Error. Scripting for ActiveX might be disabled") 
			return 
		} 
	} 
	if (navigator.userAgent.indexOf("Mozilla")>=0)
	{
		objXmlHttp=new XMLHttpRequest()
		objXmlHttp.onload=handler
		objXmlHttp.onerror=handler 
		return objXmlHttp
	}
} 
//