// JavaScript Document
	function showNextImage(page){
		//alert(page);
		ajax.requestFile = 'modules/default/imgpage.php?page='+page;	// Specifying which file to get
		ajax.onLoading = showImageWaitMessage;	// Action when AJAX is loading the file
		ajax.onCompletion = showImageContent;	// Specify function that will be executed after file has been found
		ajax.runAJAX();	
	}
	function showImageWaitMessage(){
		$('loadImage').style.display='block';
		$('imageContent').innerHTML='';
	}
	function showImageContent(){
		var data = ajax.response;
		//alert(data);
		var news = data.split('--=+=--');
		$('loadImage').style.display='none';
		$('imageContent').innerHTML=news[2];
		
		if(image[1]!=1){
			document.getElementById('prev').style.display='inline';
		}else{
			document.getElementById('prev').style.display='none';	
			}
			document.getElementById('r'+news[1]).className='active';
		
	}
	function showNextNews(page){
		//alert(page);
		ajax.requestFile = 'modules/default/newspage.php?page='+page;	// Specifying which file to get
		ajax.onLoading = showNewsWaitMessage;	// Action when AJAX is loading the file
		ajax.onCompletion = showNewsContent;	// Specify function that will be executed after file has been found
		ajax.runAJAX();	
	}
	function showNewsWaitMessage(){
		$('loadNews').style.display='block';
		$('newsContent').innerHTML='';
	}
	function showNewsContent(){
		var data = ajax.response;
		//alert(data);
		var news = data.split('--=+=--');
		$('loadNews').style.display='none';
		$('newsContent').innerHTML=news[2];
		
		if(news[1]!=1){
			document.getElementById('prev').style.display='inline';
		}else{
			document.getElementById('prev').style.display='none';	
			}
			document.getElementById('r'+news[1]).className='active';
		
	}
	
	
	function loadCountryPage(country){
		var url = 'modules/country/'+country+'.php';
		ajax.requestFile=url;
		ajax.onLoading=showCountryWaitMessage;
		ajax.onCompletion=showCountryContent;
		ajax.runAJAX();
		}
	function showCountryWaitMessage(){
		$('loadCountry').style.display='block';
		}
	function showCountryContent(){
		var data = ajax.response;
		//alert(data);
		//alert(1);
		$('loadCountry').style.display='none';
		var output = data.split('--=+=--');
		$('c_title').innerHTML=output[0];
		$('c_program').innerHTML=output[1];
		$('abroadstudyContent').innerHTML=output[2];
		}
	function loadLanguagePage(language){
		var url = 'modules/language/'+language+'.php';
		ajax.requestFile=url;
		ajax.onLoading=showCountryWaitMessage;
		ajax.onCompletion=showCountryContent;
		ajax.runAJAX();
		}
		
	function showNews(id){
		var url = 'modules/default/viewnews.php?id='+id;
		ajax.requestFile=url;
		ajax.onLoading=showNewsViewWaitMessage;
		ajax.onCompletion=showNewsViewContent;
		ajax.runAJAX();
		}
	function showImage(id){
		var url = 'modules/default/viewimage.php?id='+id;
		ajax.requestFile=url;
		ajax.onLoading=showImageViewWaitMessage;
		ajax.onCompletion=showImageViewContent;
		ajax.runAJAX();
		}
	function showNewsViewWaitMessage(){
		$('newsLoad').style.display='block';
		$('newsOutput').style.display='none';
		}
	function showImageViewWaitMessage(){
		$('imageLoad').style.display='block';
		$('imageOutput').style.display='none';
		}
	function showImageViewContent(){
		var data = ajax.response;
		//alert(data);
		$('imageLoad').style.display='none';
		$('imageOutput').style.display='block';
		$('imageOutput').innerHTML=data;
		}
	function showNewsViewContent(){
		var data = ajax.response;
		//alert(data);
		$('newsLoad').style.display='none';
		$('newsOutput').style.display='block';
		$('newsOutput').innerHTML=data;
		}
function displayAdertisement(id,title){
		//alert(title);
		var tw=window.open('modules/default/advertisementpage.php?id='+id,null,'width=500,height=600,toolbar=no,status=no,resizable=yes');
		}