function ajax_main(pyear,pmonth,pday,path,publish_id,cat_id,menu_id,news_type_id,view,type,news,mi){
	//fake_loader();
	//GetCount();
	if((view=='details' && (type=='single' || type=='gold' || type=='rel_news')) || (view=='details' && news!='') || (view=='details' && type=='main' && mi!='')|| (view=='details' && type=='main' && cat_id!='')){ 
	//alert(mi);
	daily_epaper(pyear,pmonth,pday,path,publish_id,view);}
	else all_menu_news(pyear,pmonth,pday,path,publish_id,cat_id,menu_id,news_type_id,type);
}
function all_menu_news(pyear,pmonth,pday,path,publish_id,cat_id,menu_id,news_type_id,type){
	var ajaxRequest; 
	//alert();// The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	//alert(path+" "+publish_id);
	document.getElementById('all_menu_news').innerHTML = '<div style="padding:50px 0 50px 0; margin-bottom:5px; border-bottom:1px dashed #ccc" align="center"><img src="images/menu_news_loader.gif" border="0" /></div>';
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('all_menu_news');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
			//ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}

	ajaxRequest.open("GET", "all_menu_news.php?path="+path+"&cat_id="+cat_id+"&menu_id="+menu_id+"&news_type_id="+news_type_id, true);
	ajaxRequest.send(null);
	//alert(type);
	if(type=='main') daily_epaper(pyear,pmonth,pday,path,publish_id);
	else
	{		
		tabloid(pyear,pmonth,pday,path,publish_id,menu_id);
	}
}
function tabloid(pyear,pmonth,pday,path,publish_id,menu_id){
	var ajaxRequest; 
	//alert();// The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	//alert(path+" "+publish_id);
	document.getElementById('tabloid').innerHTML = '<div style="padding:50px 0 50px 0; margin-bottom:5px; border-bottom:1px dashed #ccc" align="center"><img src="images/content-loader.gif" border="0" /></div>';
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('tabloid');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
			//ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}

	ajaxRequest.open("GET", "tabloid.php?path="+path, true);
	ajaxRequest.send(null);

	//editor_choice(pyear,pmonth,pday,path,publish_id,menu_id);
	world_clock(pyear,pmonth,pday,path,publish_id,menu_id);
}

function editor_choice(pyear,pmonth,pday,path,publish_id,menu_id){
	var ajaxRequest; 
	//alert();// The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	//alert(path+" "+publish_id);
	document.getElementById('editor_choice').innerHTML = '<div style="padding:50px 0 50px 0; margin-bottom:5px; border-bottom:1px dashed #ccc" align="center"><img src="images/content-loader.gif" border="0" /></div>';
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('editor_choice');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
			//ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}

	ajaxRequest.open("GET", "editor_choice.php?path="+path, true);
	ajaxRequest.send(null);

	world_clock(pyear,pmonth,pday,path,publish_id,menu_id);
}

function world_clock(pyear,pmonth,pday,path,publish_id,menu_id){
	var ajaxRequest; 
	//alert();// The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	//alert(path+" "+publish_id);
	document.getElementById('world_clock').innerHTML = '<div style="padding:50px 0 50px 0; margin-bottom:5px; border-bottom:1px dashed #ccc" align="center"><img src="images/content-loader.gif" border="0" /></div>';
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('world_clock');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
			//ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}

	ajaxRequest.open("GET", "world_clock.php", true);
	ajaxRequest.send(null);

	daily_epaper(pyear,pmonth,pday,path,publish_id);
}

function daily_epaper(pyear,pmonth,pday,path,publish_id,view){
	var ajaxRequest; 
	//alert();// The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	//alert(path+" "+publish_id);
	document.getElementById('daily_epaper').innerHTML = '<div style="padding:50px 0 50px 0; margin-bottom:5px; border-bottom:1px dashed #ccc" align="center"><img src="images/content-loader.gif" border="0" /></div>';
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('daily_epaper');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
			//ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}

	ajaxRequest.open("GET", "todays_view.php?path="+path+"&pub_no="+publish_id, true);
	ajaxRequest.send(null);
	notice(pyear,pmonth,pday,path,publish_id,view);
}

function notice (pyear,pmonth,pday,path,publish_id,view){
	var ajaxRequest; 
	//alert();// The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	//alert(path+" "+publish_id);
	document.getElementById('notice').innerHTML = '<div style="padding:50px 0 50px 0; margin-bottom:5px; border-bottom:1px dashed #ccc" align="center"><img src="images/content-loader.gif" border="0" /></div>';
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('notice');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
			//ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}

	ajaxRequest.open("GET", "notice.php?path="+path+"&pub_no="+publish_id, true);
	ajaxRequest.send(null);

	//currency_value(pyear,pmonth,pday,path,publish_id,view);
	if(view!='details') video(pyear,pmonth,pday);
	else
	{
		var url='jcalendar.php?month='+pmonth+'&year='+pyear+'&cur_date='+pyear+'-'+pmonth+'-'+pday;
		//alert(url);
		ajaxpage(url,'select_date');
	}
}

function currency_value (pyear,pmonth,pday,path,publish_id,view){
	var ajaxRequest; 
	//alert();// The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	//alert(path+" "+publish_id);
	document.getElementById('currency_value').innerHTML = '<div style="padding:50px 0 50px 0; margin-bottom:5px; border-bottom:1px dashed #ccc" align="center"><img src="images/content-loader.gif" border="0" /></div>';
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('currency_value');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
			//ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}

	ajaxRequest.open("GET", "currency_value.php?pub_no="+publish_id, true);
	ajaxRequest.send(null);
	if(view!='details') video(pyear,pmonth,pday);
	else
	{
		var url='jcalendar.php?month='+pmonth+'&year='+pyear+'&cur_date='+pyear+'-'+pmonth+'-'+pday;
		//alert(url);
		ajaxpage(url,'select_date');	
	}
}

function video(pyear,pmonth,pday){
	var ajaxRequest; 
	//alert();// The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	//alert(path+" "+publish_id);
	document.getElementById('video').innerHTML = '<div class="all_ss" style="padding:100px 0 100px 0; background:#fafafa; border:1px solid #a4c2c2" align="center"><span class="all_ss" style="display:block; background:#fff; width:30px; padding:5px"><img src="images/ajax-loader.gif" border="0" /></span></div>';
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('video');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
			//ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}

	ajaxRequest.open("GET", "video.php", true);
	ajaxRequest.send(null);

	//weather_rpt(pyear,pmonth,pday);
	var url='jcalendar.php?month='+pmonth+'&year='+pyear+'&cur_date='+pyear+'-'+pmonth+'-'+pday;
	//alert(url);
	ajaxpage(url,'select_date');
}
