function getForumDrop(baseUrl, catID){
	xmlHttp=GetXmlHttpObject();

	if (xmlHttp==null) {
  	alert ("Your browser does not support AJAX!");
  	return;
	}	
	xmlHttp.onreadystatechange = function(){
   		//Check page is completed and there were no problems.
		if ((xmlHttp.readyState == 4) && (xmlHttp.status == 200)) {
			document.getElementById('subForum').innerHTML=xmlHttp.responseText;
		}else{
			document.getElementById('subForum').innerHTML='Please wait...';
		}
    }
	var url=baseUrl+"index.php/backadmin/AJAX_forumlist/"+catID+"/";
	url=url+Math.random()
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function GetXmlHttpObject(){
var xmlHttp=null;
try{
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e){
  // Internet Explorer
  try{
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e){
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function deleteItem(baseUrl, method, id){
	
	var ss=confirm("Are you sure you want to delete this record?");
	if(ss){
		window.location.href= baseUrl+"index.php/backadmin/"+method+"/"+id+"/";
	}
}
var SearhPage;
function submitSearchForm(baseURL){
	if(document.getElementById("searchText").value!=""){
		window.location.href = baseURL+"index.php/main/search/1/"+document.getElementById("searchText").value+"/";
	}else{
		alert("Search field is blank.");
	}
}

var popUpWin=0;
var left, top;
function popUpWindow(URLStr, width, height){
left 	= (screen.width/2)-(width/2)
top		= (screen.height/2)-(height/2)
  if(popUpWin){
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function showTabs(id){
	document.getElementById('missionvision').style.display='none';	
	document.getElementById('emi').style.display='none';	
	document.getElementById('braemi').style.display='none';	
	document.getElementById('uae').style.display='none';	
	document.getElementById('location').style.display='none';	
	
	document.getElementById(id).style.display='block';
}
