	/*
		Id: adRotator.js
		
		(c) Rovan Software Solutions (P) Ltd.
		www.4CJobs.Com
	*/
	function adRotator(){
		file="adRotator.xml";
		var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
		var top_ad_content;
		xmlDoc.async="false";	
		xmlDoc.onreadystatechange=function()
		{
			if(xmlDoc.readyState!=4)
			return false; 
		};
		xmlDoc.load(file);
		// Top Advertisement
		top_adv=xmlDoc.documentElement.childNodes[0];
		total_top_ads=top_adv.childNodes.length;
		index=Math.ceil(Math.random()*Number(total_top_ads));

		imgsrc=top_adv.childNodes[index-1].childNodes[0].text;
		weburl=top_adv.childNodes[index-1].childNodes[1].text;
		
		top_ad_content="<a href='"+weburl+"'><img src='"+imgsrc+"'></a>";
		document.getElementById('ad').innerHTML=top_ad_content;

		t=setTimeout('adRotator()',4000);
	}

