	var xmlHttp_new=null;
	var xmlHttp,xmlHttp1;
	var DID11 ;
	var all_path;
	var actID =null; 
	var okTest = 0;
	var typeName  = "";
	var divOpration  = "";
	var	userOperation = "";
	var TMPID = null;
	var actStatusID = null;
	var cmbName = null;
	var statusValue = null;
	var actType = null;
	var currentDivisionID=null;
	var currentDivisionParentID = null;
	var reflectPopup = null; 
	var colV = null; 
	var typeGraph = null;
	var bundleID = null;
	var resourceID = null;
	var global_no =0;
	var divisionName = null;
	var glb = eval;
	var abc_glob = null;
	var oldColV=null;
	var onChangeEvent=null;
	var premium = null;
	
	var imageN="";
	var imageName = Array();
	var cnt = 0;
	var banners=0;
	/*function widget_response_get(which)
	{
		new Ajax.Request("wt_ajax_response.php", { 
		 onSuccess : function(resp) { 
		  ////////////////
		  new Ajax.Request("http://converge.cc/widgets/wt-my-project.php", { 
		 onSuccess : function(resp) { 
			document.getElementById('projectslist').innerHTML=resp.responseText;
		 }, 
		 onFailure : function(resp) { 
		   alert("Oops, there's been an error324."); 
		 }, 
		 parameters : "name="+resp.responseText 
		});
		  
		  // resp.responseText  = resp.responseText.replace(/&amp;/g,"_");
		 
		  // top.frames[0].document.getElementById('new').innerHTML=resp.responseText; 
		 }, 
		 onFailure : function(resp) { 
		   alert("Oops, there's been an error."); 
		 }, 
		 parameters : "which="+which 
		});
	}*/
	
	//XMLHTTPOBJECT
	function GetXmlHttpObject(){
		var objXMLHttp=null;
		if(window.XMLHttpRequest){
			objXMLHttp=new XMLHttpRequest();
		}else if(window.ActiveXObject){
			objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		return objXMLHttp;
	}
	
/*	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 updateProjectHomeStatus(projID)
	{
		if(document.getElementById('list'+projID).checked == true)
		{
			val = 1;	
		}else 
		{
			val = 0;	
		}
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		var url="gethint.php";
		url=url+"?value=updateProjectHomeStatus&val="+val+"&projID="+projID;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=updateProjectHomeStatus1;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function updateProjectHomeStatus1()
	{
		if (xmlHttp.readyState==4)
		{
			//alert(xmlHttp.responseText);
		}
	}
	function updateShowhideHomePage(id,value,field)
	{
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		var url="gethint.php";
		url=url+"?value=updateShowhideHomePage&id="+id+"&showhide="+value+"&field="+field;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayupdateShowhideHomePage;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	
	}
	function displayupdateShowhideHomePage()
	{
		if (xmlHttp.readyState==4)
		{
			//alert(xmlHttp.responseText);
		}
	}
	
	function updateSelectedProject(value)
	{
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		var url="gethint.php";
		url=url+"?value=updateSelectedProject&projID="+value;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayupdateSelectedProject;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	
	}
	function displayupdateSelectedProject()
	{
		if (xmlHttp.readyState==4)
		{
			window.location = "welcomeProject.php";
			//document.getElementById("selected_project").innerHTML = xmlHttp.responseText
		}
	}
	
	
	function updateSelectedProject_toMyProject(value){
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		//alert(value);
		var temp = 0;
		temp = value.split(',');
		var url="UpdateMyProject.php";
		url=url+"?value=updateMyProject&projID="+temp[0]+"&UserID="+temp[1];
		xmlHttp.onreadystatechange=displayupdateSelectedProject_toMyProject;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	
	function displayupdateSelectedProject_toMyProject()
	{
		if (xmlHttp.readyState==4)
		{
			window.location = "file-open.php?action="+xmlHttp.responseText;
			//document.getElementById("selected_project").innerHTML = xmlHttp.responseText
		}
	}
	
	
	function getRespondingUserAndEmail(dashID)
	{
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		var url="gethint.php";
		url=url+"?value=getRespondingUserAndEmail&dashID="+dashID;
		url=url+"&sid="+Math.random();
		document.getElementById("nudgeText"+dashID).innerHTML = "nudge(s) sent"
		xmlHttp.onreadystatechange=displaygetRespondingUserAndEmail;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function displaygetRespondingUserAndEmail()
	{
		if (xmlHttp.readyState==4)
		{
			//alert(xmlHttp.responseText);
		}
	}
	function deleteDashFieldForm(dashFieldID)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		var url="gethint.php";
		url=url+"?value=deleteDashFieldForm&dashFieldID="+dashFieldID;
		url=url+"&sid="+Math.random();
		
		xmlHttp.onreadystatechange=displayDeleteDashFieldFrom;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function displayDeleteDashFieldFrom()
	{
		if (xmlHttp.readyState==4)
		{
			
		}
	}
	function deleteResourceFromTask(resourceId,taskId,bundleId,type)
	{
		
		actID = taskId;
		bundleID = bundleId;
		resourceID = resourceId;
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		var url="gethint.php";
		url=url+"?value=deleteResourceFromTask&taskId="+actID+"&resourceId="+resourceID+"&bundleID="+bundleID+"&type="+type;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayDeleteResourceFromTask;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function displayDeleteResourceFromTask()
	{
		if (xmlHttp.readyState==4)
		{
			var name = "addResourceToTaskDiv" + actID ;
			document.getElementById(name).innerHTML = xmlHttp.responseText;
		}
	}
	function addResourceToTask(taskId,resourceId,bundleId,type)
	{
		
		
		var resourceName = "resourceId"+resourceId+taskId;
		actID = taskId;
		bundleID = bundleId;
		resourceID = resourceId;
		
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			{
			  alert ("Your browser does not support AJAX!");
			  return;
			}
		var url="gethint.php";
		if(document.getElementById(resourceName).checked == true)
		{	
			url=url+"?value=addResourceToTask&taskId="+actID+"&resourceId="+resourceID+"&bundleID="+bundleID+"&type="+type;
		}else 
		{
			url=url+"?value=deleteResourceFromTask&taskId="+actID+"&resourceId="+resourceID+"&bundleID="+bundleID+"&type="+type;
		}	
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayAddResourceToTask;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
		
	}
	function displayAddResourceToTask()
	{
		if (xmlHttp.readyState==4)
		{
			var name = "addResourceToTaskDiv" + actID;
			document.getElementById(name).innerHTML = xmlHttp.responseText;
		}
	}
	function setUpGraphsProject()
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		if(document.getElementById("divProjectGraph"))
		{
			document.getElementById("divProjectGraph").innerHTML = '<p align=right class=general_font>Loading...<img src="images/ajax-loader.gif"></p>';
		}
		var url="gethint.php";
		url=url+"?value=setUpGraphs&typeGraph=Projects";
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySetUpGraphsProject;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function displaySetUpGraphsProject()
	{
		if (xmlHttp.readyState==4)
		{
			if(document.getElementById("divProjectGraph"))
			{
				document.getElementById("divProjectGraph").innerHTML = xmlHttp.responseText;
			}
			//setUpGraphsDivision();
		}
	}
	
	
	function setUpGraphsProject_Home(){
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null){
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		if(document.getElementById("showhideprojectgraph")){
			document.getElementById("showhideprojectgraph").innerHTML = '<p align=right class=general_font>Loading...<img src="images/ajax-loader.gif"></p>';
		}
		var url="gethint.php";
		url=url+"?value=setUpGraphs&typeGraph=Projects";
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySetUpGraphsProject_Home;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	
	
	function displaySetUpGraphsProject_Home(){
		if (xmlHttp.readyState==4){
			if(document.getElementById("showhideprojectgraph")){
				document.getElementById("showhideprojectgraph").innerHTML = xmlHttp.responseText;
			}
		}
	}
	
	//////////////
	function setUpDashBoard(id,dashboard){
		//alert(id +'---->'+ dashboard);
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null){
		  alert ("Your browser does not support AJAX!");
		  return;
		}
//document.getElementById("divProjectGraph").innerHTML = '<p align=right>Loading...<img src="images/ajax-loader.gif"></p>';
		var url="gethint.php";
		url=url+"?value=setUpDashBoard&type=home&id="+id+"&dashboard="+dashboard;
		url=url+"&sid="+Math.random();
		//document.getElementById("dashboardDue").innerHTML = "<img src='images/ajax-loader.gif'> Checking for due dashboards";
		
		xmlHttp.onreadystatechange=displayDashBoardHome;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	
	function setUpDashBoard_New(id){
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null){
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		var url="gethint.php";
		url=url+"?value=setUpDashBoard&type=home&id="+id+"&dashboard=1";
		url=url+"&sid="+Math.random();
		
		xmlHttp.onreadystatechange=displayDashBoardHome;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	
	function displayDashBoardHome(){
		if (xmlHttp.readyState==4){
			var ddd =null;
			ddd = xmlHttp.responseText;
			ddd = ddd.replace(/\t/g,"");
			//alert(ddd);
			if(document.getElementById("dashBoardMetrics") && ddd != null && ddd != ""){
				document.getElementById("dashBoardMetrics").style.display = "block";
				document.getElementById("dashBoardMetrics").innerHTML = xmlHttp.responseText;
			}
		}
	}
	
	function setUpGraphsDivision()
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		if(document.getElementById("divDivisionGraph"))
		document.getElementById("divDivisionGraph").innerHTML = '<p align=right class=general_font>Loading...<img src="images/ajax-loader.gif"></p>';
		
		var url="gethint.php";
		url=url+"?value=setUpGraphs&typeGraph=Divisions";
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySetUpGraphsDivision;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function displaySetUpGraphsDivision()
	{
		if (xmlHttp.readyState==4)
		{
			if(document.getElementById("divDivisionGraph"))
			document.getElementById("divDivisionGraph").innerHTML = xmlHttp.responseText;
			//setUpGraphsSub();
		}
	}
	
	function setUpGraphsDivision_Home(){
		xmlHttp=GetXmlHttpObject();
		if(xmlHttp==null){
			alert ("Your browser does not support AJAX!");
			return;
		} 
		if(document.getElementById("showhidedivisiongraph"))
			document.getElementById("showhidedivisiongraph").innerHTML = '<p align=right class=general_font>Loading...<img src="images/ajax-loader.gif"></p>';
		
		var url="gethint.php";
		url=url+"?value=setUpGraphs&typeGraph=Divisions";
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySetUpGraphsDivision_Home;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function displaySetUpGraphsDivision_Home(){
		if(xmlHttp.readyState==4){
			if(document.getElementById("showhidedivisiongraph"))
				document.getElementById("showhidedivisiongraph").innerHTML = xmlHttp.responseText;
		}
	}
	
	function setUpGraphsSub()
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		if(document.getElementById("divSubGraph"))
		document.getElementById("divSubGraph").innerHTML = '<p align=right class=general_font>Loading...<img src="images/ajax-loader.gif"></p>';	
		var url="gethint.php";
		url=url+"?value=setUpGraphs&typeGraph=Sub";
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySetUpGraphsSub;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function displaySetUpGraphsSub()
	{
		if (xmlHttp.readyState==4)
		{
			if(document.getElementById("divSubGraph"))
			document.getElementById("divSubGraph").innerHTML = xmlHttp.responseText;	
			//dashboardDue();
		}
	}
	
	
	function setUpGraphsSub_Home(){
		xmlHttp=GetXmlHttpObject();
		if(xmlHttp==null){
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		if(document.getElementById("showhidesubdivisiongraph"))
			document.getElementById("showhidesubdivisiongraph").innerHTML = '<p align=right class=general_font>Loading...<img src="images/ajax-loader.gif"></p>';
		var url="gethint.php";
		url=url+"?value=setUpGraphs&typeGraph=Sub";
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySetUpGraphsSub_Home;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function displaySetUpGraphsSub_Home(){
		if (xmlHttp.readyState==4){
			if(document.getElementById("showhidesubdivisiongraph"))
				document.getElementById("showhidesubdivisiongraph").innerHTML = xmlHttp.responseText;	
		}
	}
	
	
	function saveChangesTaskBelow(tmpActId,val,allPath)
	{
		all_path = allPath;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		//document.getElementById("childPopup").innerHTML = '<p align=right><img src="images/ajax-loader.gif"></p>';
		var url="gethint.php";
		url=url+"?value=saveTaskNumbering&tmpActId="+tmpActId+"&cmbValue="+val;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySaveChangesTaskBelow;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function displaySaveChangesTaskBelow()
	{
		if (xmlHttp.readyState==4)
		{ 
			//alert(xmlHttp.responseText);
			window.location = all_path;			
		}	
	}
	function cancelStatus()
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		//document.getElementById("childPopup").innerHTML = '<p align=right><img src="images/ajax-loader.gif"></p>';
		
		var url="gethint.php";
		url=url+"?value=saveChildPopupStatus";
		url=url+"&sid="+Math.random();
		
		xmlHttp.onreadystatechange=displayCancelStatus;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function displayCancelStatus()
	{
		if (xmlHttp.readyState==4)
		{ 
			var length = xmlHttp.responseText.length;
			if(xmlHttp.responseText.substr(length-2)=='ok')
			{
				 cancelStatusFile();
			}else 
			{
				//alert("Not working");
			}
		}	
	}
	function refreshChildPopup(tmpActId,colValue,checkDynamic,oldStatus)
	{
		actID = tmpActId;
		colV = colValue;
		oldColV = oldStatus;
		reflectPopup = checkDynamic;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		//document.getElementById("childPopup").innerHTML = '<p align=right><img src="images/ajax-loader.gif"></p>';
		var url="gethint.php";
		if(reflectPopup == "")
		{
			url=url+"?value=refreshChildPopup&tmpActId="+tmpActId+"&colValue="+colValue;
		}else 
		{
			url=url+"?value=reflectChildPopup&tmpActId="+tmpActId+"&colValue="+colValue;
		}
		url=url+"&sid="+Math.random();
		
		xmlHttp.onreadystatechange=displayRefreshChildPopup;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function displayRefreshChildPopup()
	{
		if (xmlHttp.readyState==4)
		{ 
			if(reflectPopup == "Action_Detail")
			{
			}
			else if(reflectPopup == "")
			{
				document.getElementById("childPopup").innerHTML = xmlHttp.responseText;	
			}else 
			{
				var length = xmlHttp.responseText.length;
				var strp = xmlHttp.responseText;
				strp = strp.replace(/\t/g,"");
				var pt = xmlHttp.responseText.replace(/\t/g,"");
				pt = pt.replace(/\*\*667\*\*/g,"A");
				pt = pt.replace(/Aandconversion/g,"&amp;");
				pt = pt.replace(/&amp;/g,"&");
				pt = pt.replace(/&#39;/g,"'");
				pt = pt.replace(/&quot;/g,'"');
				
				if(strp=='ok')
				{	
					POSTChildRequest(actID,null,colV,oldColV);	
				}else if(colV == "1" && pt != "NoLast" && pt!="")
				{
					var td = confirm("You are closing the last task which is subordinate to the "+pt+" task. Click 'Ok' if you would like to close the parent task");
					if(td)
					{
						POSTLASTCHILD(actID);
					}else 
					{
					}
				}
			}
		}	
	}
	function displayPOSTLASTCHILD()
	{
		if (xmlHttp.readyState==4)
		{
			var actID = xmlHttp.responseText.replace(/\t/g,"");
			var date = new Date();
			var mydate = date.format("mm/dd/yyyy");
			if(document.getElementById("inner_actdate"+actID))
			{
				document.getElementById('pencil2'+actID).style.display="block"; 
				document.getElementById('inner_actdate'+actID).style.display="none"; 
				document.getElementById('dateval2'+actID).innerHTML = mydate;
				var cmb = document.getElementById('tmpActStatus'+actID);
				var total = cmb.options.length;
				for(i=0;i<total;i++)
				{
					if(cmb.options[i].value == "1")
					{
						cmb.options[i].selected = true;
						break;
					}
				}
			}
			updateActualDate1("1", actID);
		}
	}
	function POSTLASTCHILD(actID)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		var url="gethint.php";
		url=url+"?value=POSTLASTCHILD&actID="+actID;
		url=url+"&sid="+Math.random();
		
		xmlHttp.onreadystatechange=displayPOSTLASTCHILD;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
	function contDeleteDivisions(divid,parentdiv,parentparentID)
	{
		currentDivisionID= parentdiv;
		currentDivisionParentID = parentparentID;
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		var url="gethint.php";
		url=url+"?value=contDeleteDivision&divid="+divid+"&parentdiv="+parentdiv;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayContDeleteDivisions;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function displayContDeleteDivisions()
	{
		if (xmlHttp.readyState==4)
		{ 
			var length = xmlHttp.responseText.length;
			if(xmlHttp.responseText.substr(length-2)=='ok')
			{
				
				if(currentDivisionParentID != 0 || currentDivisionParentID !="")
				{
					window.location = "delete_div_confirm.php?divid="+currentDivisionID+"&parentdivid="+currentDivisionParentID;
				}else 
				{
					window.location = "delete_div_confirm.php?divid="+currentDivisionID;
				}
			}
			else 
			{
				document.getElementById("messageDiv").innerHTML = xmlHttp.responseText;	
			}
		}	
	}
	function checkAfterUpdationStatus(tmpActId,actStatusId,comboName,statusVal,type)
	{
		TMPID = tmpActId;
		actStatusID = actStatusId;
		cmbName = comboName;
		statusValue = statusVal;
		actType = type;
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		var url="gethint.php";
		url=url+"?value=checkAfterUpdationStatus&tmpId="+TMPID+"&actStatus="+statusVal;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayCheckAfterUpdationStatus;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function displayCheckAfterUpdationStatus()
	{
		if (xmlHttp.readyState==4)
		{
			updateAction_all(actStatusID,TMPID,cmbName, statusValue,actType);
			updateActualDate(statusValue,TMPID);
		}	
	}
	function deleteIndividualDivsion(divid)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		var url="gethint.php";
		url=url+"?value=deleteIndividualDiv&divid="+divid;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayDeleteIndividualDivsion;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function displayDeleteIndividualDivsion()
	{
		if (xmlHttp.readyState==4)
		{ 
			var length = xmlHttp.responseText.length;
			if(xmlHttp.responseText.substr(length-2)=='Ok')
			{
				window.location = "edit-division.php?action=delete&divTitle="+document.getElementById('Current_Div_Title').innerHTML;
			}
		}	
	}
	function checkExistUsrProjectDiv(divid)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		var url="gethint.php";
		url=url+"?value=checkUsrDivProj&divid="+divid;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayCheckExistUsrProjectDiv;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function displayCheckExistUsrProjectDiv()
	{
		if (xmlHttp.readyState==4)
		{ 
			var length = xmlHttp.responseText.length;
			if(xmlHttp.responseText.substr(length-2)=='Ok')
			{
				document.getElementById("checkOrdinate").innerHTML = "Ok";
			}else if(xmlHttp.responseText.substr(length-2)=='pr')
			{
				document.getElementById("checkOrdinate").innerHTML = "pr";	
			}else if(xmlHttp.responseText.substr(length-2)=='no')
			{
				document.getElementById("checkOrdinate").innerHTML = "no";	
			}
			else 
			{
				document.getElementById("checkOrdinate").innerHTML = "";
			}
		}	
	}
	function saveTemplatePremium(number)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		var url="gethint.php";
		url=url+"?value=makeLearnPremium&number="+number;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySaveTemplatePremium;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function displaySaveTemplatePremium()
	{
		if (xmlHttp.readyState==4)
		{ 
			var length = xmlHttp.responseText.length;
			if(xmlHttp.responseText.substr(length-2)=='ok')
			{
				window.location  = "view-templates-premium-resource.php";			
			}
		}	
	}
	/****	Select Users from selected division	***/
	
	function saveDivPremium(tmpID)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		var priceTmp = document.getElementById("price").value;
		
		var url="gethint.php";
		url=url+"?value=premiumDate&tmpID="+tmpID+"&priceTmp="+priceTmp;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySaveDivPremium;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function displaySaveDivPremium()
	{
		if (xmlHttp.readyState==4)
		{ 
			var length = xmlHttp.responseText.length;
			if(xmlHttp.responseText.substr(length-2)=='ok')
			{
				window.location  = "view-templates-premium.php";			
			}else 
			{
				document.getElementById("priceUpdate").style.display = "none";		
			}
			
		}	
	}
	
	function getComboUserList2(divid,only,int,onchange)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		
		var url="gethint.php";
		if(only == 1 && int == null)
		{
			
			url=url+"?value=divisionUsers2&divID="+divid+"&only=1&onchange="+onchange;
		}else if(int != '' && int!=null)
		{
			url=url+"?value=divisionUsers2&divID="+divid+"&only=1&int="+int+"&onchange="+onchange;
		}
		else
		{
			url=url+"?value=divisionUsers2&divID="+divid+"&only=1&int="+int+"&onchange="+onchange;
		}
		//alert(url);
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayGetComboUserList;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function getComboUserList(divid,only,int,onchange)
	{
		onChangeEvent = onchange;
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		
		var url="gethint.php";
		if(only == 1)
		{
			url=url+"?value=divisionUsers&divID="+divid+"&only=1&onchange="+onchange;
		}else if(int != '' && int!=null)
		{
			url=url+"?value=divisionUsers&divID="+divid+"&int="+int;
		}
		else
		{
			url=url+"?value=divisionUsers&divID="+divid;	
		}
		
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayGetComboUserList;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function displayGetComboUserList()
	{
		if (xmlHttp.readyState==4)
		{ 	//alert(xmlHttp.responseText);
			document.getElementById("newUserDivShow").innerHTML = xmlHttp.responseText;	
			if(onChangeEvent != null)
			{
				test_onChangeEvent();
			}
		}else 
		{
			
		}
	}
	function deleteDivisions(divid)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		var url="gethint.php";
		url=url+"?value=deleteDivision&divid="+divid;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaydeleteDivisions;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function displaydeleteDivisions()
	{
		if (xmlHttp.readyState==4)
		{ 
			var length = xmlHttp.responseText.length;
			if(xmlHttp.responseText.substr(length-2)=='ok')
			{
				closDeleteDivison();
				// opener.location.reload(true);
				// self.close();
				/* if (window.opener && !window.opener.closed) 
				  {
						window.opener.location= self;
						window.opener.location.reload(true); 
						window.close();
				  }else
				   {
						window.opener.location.reload(true); 
						window.close();
				   }
				
				return true;*/
			}
			else 
			{
				document.getElementById("messageDiv").innerHTML = xmlHttp.responseText;	
			}
		}	
	}
	function deleteDivision(type,valueDivID,divID,parentDivID,typeValue)
	{
		var abc;
		if(type == "project")
		{
			abc = confirm("Are you sure you wish to delete the "+typeValue+" project?");	
		}else if(type == "user")
		{
			abc = confirm("Are you sure you wish to delete user "+typeValue+"?");
		}
		if(abc)
		{
			typeName = type;
			divOpration = valueDivID
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			{
			  alert ("Your browser does not support AJAX!");
			  return;
			} 
			//document.getElementById("divisiondeletion").innerHTML = '<br><br>&nbsp;&nbsp;Loading...<br><img src="images/ajax-loader-1.gif">';
			var url="gethint.php";
			if(type == "child")
			{
				url=url+"?value=deleteChildDiv&valueDivID="+valueDivID+"&parentDivID="+parentDivID+"&divID="+divID;
			}else if(type == "project")
			{
				url=url+"?value=deleteProjDiv&divID="+divID+"&parentDivID="+parentDivID+"&projID="+valueDivID;
			}else if(type == "user")
			{
				url=url+"?value=deleteUserDiv&userID="+valueDivID+"&parentDivID="+parentDivID+"&divID="+divID;	
			}
			url=url+"&sid="+Math.random();
			xmlHttp.onreadystatechange=displaydeleteDivision;
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		}
	}
	function displaydeleteDivision() 
	{
		
		if (xmlHttp.readyState==4)
		{ 
			if(typeName == "child")
			{
				var length = xmlHttp.responseText.length;
				if(xmlHttp.responseText.substr(length-2)=='ok')
				{
					document.getElementById(typeName+'_'+divOpration+'2').style.display = "none";
					//document.getElementById(typeName+'_'+divOpration+'4').style.display = "none";
					document.getElementById(typeName+'_'+divOpration+'3').style.display = "none";
					document.getElementById(typeName+'_'+divOpration+'1').innerHTML="Deleted.";
				}else 
				{
					document.getElementById("messageDiv").innerHTML =xmlHttp.responseText;
				}
			}else if(typeName == "user")
			{
				var length = xmlHttp.responseText.length;
				if(xmlHttp.responseText.substr(length-2)=='ok')
				{
					document.getElementById(typeName+'_'+divOpration+'2').style.display = "none";
					//document.getElementById(typeName+'_'+divOpration+'4').style.display = "none";
					document.getElementById(typeName+'_'+divOpration+'3').style.display = "none";
					document.getElementById(typeName+'_'+divOpration+'1').style.display="none";
				}else 
				{
					
					document.getElementById(typeName+'_'+divOpration+'2').style.display = "none";
					//document.getElementById(typeName+'_'+divOpration+'4').style.display = "none";
					document.getElementById(typeName+'_'+divOpration+'3').style.display = "none";
					document.getElementById(typeName+'_'+divOpration+'1').style.display="none";
					document.getElementById("messageDiv").innerHTML =xmlHttp.responseText;
				}
					
			}else if(typeName == "project")
			{
				document.getElementById(typeName+'_'+divOpration+'2').style.display = "none";
				//document.getElementById(typeName+'_'+divOpration+'4').style.display = "none";
				document.getElementById(typeName+'_'+divOpration+'3').style.display = "none";
				document.getElementById(typeName+'_'+divOpration+'1').style.display = "none";
			}
			
		}
	}
	function saveDivisionDelete(type,parentDivID,divID,userID)
	{
		typeName  =  type;
		divOpration  =  divID;
		userOperation = userID;
		
		if(parentDivID == '')
		{
			var selObj = document.getElementById("divisionParentId");
			parentDivID = selObj.options[selObj.selectedIndex].value;
		}
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		var url="gethint.php";
		if(type == "child")
		{
			url=url+"?value=saveChildDiv&parentDivID="+parentDivID+"&divID="+divID;
		}else if(type == "project")
		{
			url=url+"?value=saveProjDiv&parentDivID="+parentDivID+"&projID="+divID;
		}else if(type == "user")
		{
			url=url+"?value=saveUserDiv&parentDivID="+parentDivID+"&divID="+divID+"&userID="+userID;	
		}
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaysaveDivisionDelete;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	} 
	function displaysaveDivisionDelete()
	{
		if (xmlHttp.readyState==4)
		{ 
				//alert(xmlHttp.responseText);
				if(typeName == "user")
				{
					divOpration = userOperation;	
				}
				document.getElementById(typeName+'_'+divOpration+'2').style.display = "none";
				document.getElementById(typeName+'_'+divOpration+'4').style.display = "none";
				document.getElementById(typeName+'_'+divOpration+'3').style.display = "none";
				document.getElementById(typeName+'_'+divOpration+'1').innerHTML="Saved."+"<br />"+xmlHttp.responseText;
		}	
	}
	function updateChangeQuery(view,checkedValue,typeFile)
	{
		var fileType = '';
		fileType = typeFile;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		document.getElementById("sortTableSpan").innerHTML ='<br><br>&nbsp;&nbsp;Loading...<br><img src="images/ajax-loader-1.gif">';
		document.getElementById("counterDiv").innerHTML = '<p align=right><img src="images/ajax-loader.gif"></p>';
		var url="gethint.php";
		if(fileType !=""){
			url=url+"?value=changeQuery&view="+view+"&checkedValue="+checkedValue+"&editTask=editTask";	
		}else
		{ 
			url=url+"?value=changeQuery&view="+view+"&checkedValue="+checkedValue;
		}
		
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayupdateChangeQuery;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	} 
	function displayupdateChangeQuery() 
	{
		if (xmlHttp.readyState==4)
		{ 
			
			okTest =0;
			var textreceived;
			var spliarray;
			textreceived=xmlHttp.responseText;
			spliarray=textreceived.split("***_count_of_data_set_just_calculated_***");
			
			document.getElementById("sortTableSpan").innerHTML =spliarray[1];
			document.getElementById("counterDiv").innerHTML =spliarray[0];
		}
	}
	
	function updateChangeQueryCount()
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
	//	document.getElementById("counterDiv").innerHTML = '<img src="images/ajax-loader-snake.gif">';
		var url="gethint.php";
		url=url+"?value=cCount";
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayupdateChangeQueryCount;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	} 
	function displayupdateChangeQueryCount() 
	{
		if (xmlHttp.readyState==4)
		{ 
			document.getElementById("counterDiv").innerHTML = xmlHttp.responseText;
		}
	}
	function updateActualDate1(actStatusID, actId)
	{
		
		actID = actId;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		
		var url="gethint.php";
		url=url+"?value=updateActualDate1&actStatusID="+actStatusID+"&actId="+actId;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=test;
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null);
	}
	function test()
	{
		if (xmlHttp.readyState==4)
		{ 
			
		}
	}
	function updateActualDate(actStatusID, actId)
	{
		actID = actId;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		var url="gethint.php";
		url=url+"?value=updateActualDate&actStatusID="+actStatusID+"&actId="+actId;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayUpdateActualDate;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function displayUpdateActualDate() 
	{
		if (xmlHttp.readyState==4)
		{ 
			var txt = xmlHttp.responseText;
			var length = txt.length;
			if(txt.substr(length-2)=='ok')
			{
				if(document.getElementById("inner_actdate"+actID))
				{
					
					document.getElementById('pencil2'+actID).style.display="none"; 
					document.getElementById('inner_actdate'+actID).style.display="block";
					document.getElementById("inner_actdate"+actID).innerHTML = '';
				}else 
				{
					document.getElementById('pencil2'+actID).style.display="block"; 
					document.getElementById('inner_actdate'+actID).style.display="none";
					document.getElementById("dateval2"+actID).innerHTML = '';
				}
			}
		}
	}
	function sortTableTaskEdit(colName,view)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		document.getElementById("sortTableSpan").innerHTML = '<br><br>&nbsp;&nbsp;Sorting...<br><img src="images/ajax-loader-1.gif">';
		var url="gethint.php";
		url=url+"?value=sortTask&colName="+colName+"&view="+view+"&edit=edit";
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySortTableTask;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	} 
	function sortTableTemplateTask(colName,tmpId)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		document.getElementById("sortTableSpanTemplate").innerHTML = '<br><br>&nbsp;&nbsp;Sorting...<br><img src="images/ajax-loader-1.gif">';
		var url="gethint.php";
		url=url+"?value=sortTemplateTask&colName="+colName+"&tmpId="+tmpId;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySortTableTemplateTask;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
	function displaySortTableTask() 
	{
		if (xmlHttp.readyState==4)
		{ 
			var abc = xmlHttp.responseText;
			abc = abc.split("____");
			//alert(abc);
			if(document.getElementById("ShowHide")){
				document.getElementById("ShowHide").innerHTML = abc[1];
			}else{
				document.getElementById("sortTableSpan").innerHTML = abc[1];
				}
			if(document.getElementById("currentCount")){
				document.getElementById("currentCount").innerHTML = abc[0];
				}
		}
	}
	
	function displaySortTableTemplateTask() 
	{
		if (xmlHttp.readyState==4)
		{ 
			document.getElementById("sortTableSpanTemplate").innerHTML = xmlHttp.responseText;
		}
	}
	function sortTableTask(colName,view)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		
		if(document.getElementById("emailMsg"))
		{
			document.getElementById("emailMsg").innerHTML = '';	
		}
		document.getElementById("ShowHide").innerHTML = '<br><br>&nbsp;&nbsp;Sorting...<br><img src="images/ajax-loader-1.gif">';
		var url="gethint.php";
		url=url+"?value=sortTask&colName="+colName+"&view="+view;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySortTableTask;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
	
	function sortTableResource(colName,tmpId,usrID){
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null){
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		document.getElementById("sortTableResource").innerHTML = '<br><br>&nbsp;&nbsp;Sorting...<br><img src="images/ajax-loader-1.gif">';
		var url="gethint.php";
		if(usrID!=''){
			url=url+"?value=sortResource&colName="+colName+"&tmpId="+tmpId+"&usrID="+usrID;
		}else{
			url=url+"?value=sortResource&colName="+colName+"&tmpId="+tmpId;
		}
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySortTableResource;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
	function sortTableResourceType(colName,tmpId,SearchParam){
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null){
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		document.getElementById("sortTableResource").innerHTML = '<br><br>&nbsp;&nbsp;Sorting...<br><img src="images/ajax-loader-1.gif">';
		var url="gethint.php";
		if(SearchParam!='yes'){
			url=url+"?value=sortResource&colName="+colName+"&tmpId="+tmpId+"&search="+SearchParam;
		}else{
			url=url+"?value=sortResource&colName="+colName+"&tmpId="+tmpId+"&search="+SearchParam;;
		}
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySortTableResource;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	
	function sortTableResourceView(colName,tmpId,usrID){
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null){
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		document.getElementById("sortTableResource").innerHTML = '<br><br>&nbsp;&nbsp;Sorting...<br><img src="images/ajax-loader-1.gif">';
		var url="gethint.php";
		if(usrID!=''){
			url=url+"?value=sortResourceView&colName="+colName+"&tmpId="+tmpId+"&usrID="+usrID;
		}else{
			url=url+"?value=sortResourceView&colName="+colName+"&tmpId="+tmpId;
		}
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySortTableResource;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	
	function sortTableResourceTypeView(colName,tmpId,SearchParam){
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null){
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		document.getElementById("sortTableResource").innerHTML = '<br><br>&nbsp;&nbsp;Sorting...<br><img src="images/ajax-loader-1.gif">';
		var url="gethint.php";
		if(SearchParam!='yes'){
			url=url+"?value=sortResourceView&colName="+colName+"&tmpId="+tmpId+"&search="+SearchParam;
		}else{
			url=url+"?value=sortResourceView&colName="+colName+"&tmpId="+tmpId+"&search="+SearchParam;;
		}
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySortTableResource;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	
	function displaySortTableResource() 
	{
		if(xmlHttp.readyState==4){ 
			var abc = xmlHttp.responseText;
			abc = abc.split("____");
			//alert(abc);
			/*if(document.getElementById("ShowHide")){
				document.getElementById("ShowHide").innerHTML = abc[1];
			}else{*/
			document.getElementById("sortTableResource").innerHTML = abc[0];
			//}
			
		/*	if(document.getElementById("currentCount")){
				document.getElementById("currentCount").innerHTML = abc[0];
			}
		*/	
		}
	}
	
	function sortTableUser(colName,perform){
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null){
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		document.getElementById("sortTableUserRows").innerHTML = '<br><br>&nbsp;&nbsp;Sorting...<br><img src="images/ajax-loader-1.gif">';
		var url="gethint.php";
		url=url+"?value=sortUser&colName="+colName+"&param="+perform;

		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displaySortTableUser;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	
	function displaySortTableUser() 
	{
		if(xmlHttp.readyState==4){ 
			var abc = xmlHttp.responseText;
			abc = abc.split("____");
			//alert(abc);
			/*if(document.getElementById("ShowHide")){
				document.getElementById("ShowHide").innerHTML = abc[1];
			}else{*/
			document.getElementById("sortTableUserRows").innerHTML = abc[0];
			//}
			
		/*	if(document.getElementById("currentCount")){
				document.getElementById("currentCount").innerHTML = abc[0];
			}
		*/	
		}
	}
	
	function POSTChildRequest(tmpActId,isParent,value,oValue)
	{
		//alert(">>>>"+tmpActId+">>>>"+isParent+">>>>"+value+">>>>"+oValue+">>>>");
		actID = tmpActId;
		colV = value;
		oldColV = oValue;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		} 
		var url="gethint.php";
		url=url+"?value=checkChildStatus&chooseValue="+value+"&actID="+tmpActId;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=displayPOSTChildRequest;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	} 
	function displayPOSTChildRequest() 
	{ 
		var inner_actdate1=null;
		if (xmlHttp.readyState==4)
		{ 
			var responseText = xmlHttp.responseText;
			var length = xmlHttp.responseText.length;
			
			
			var inner_actdate = "inner_actdate"+actID;
			if(window.document.getElementById(inner_actdate))
			{
				window.document.getElementById('pencil2'+actID).style.display="none"; 
				window.document.getElementById('inner_actdate'+actID).style.display="block"; 
				inner_actdate1 = window.document.getElementById(inner_actdate);
				
			}else
			{
				window.document.getElementById('pencil2'+actID).style.display="block"; 
				window.document.getElementById('inner_actdate'+actID).style.display="none"; 
				inner_actdate1 = window.document.getElementById('dateval2'+actID);
			}
			//if(responseText.substr(length-2)=='in')
			if(responseText=='in')
			{
				//actID=xmlHttp.responseText;
				window.open('childActions.php?actID='+actID+'&stColV='+oldColV,'popup',"title=Child Actions File,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=0,copyhistory=no,width=900,height=370,screenX=100,screenY=100,top=100,left=100");
					
			}
			else 
			{
				if(colV == 2)
				{
					inner_actdate1.innerHTML = '';
				}else 
				{
					var date = new Date();
					var mydate = date.format("mm/dd/yyyy");
					document.getElementById('pencil2'+actID).style.display="block"; 
					document.getElementById('inner_actdate'+actID).style.display="none";
					document.getElementById('dateval2'+actID).innerHTML = 	mydate;
				}
			}
		}
	}
	function showHint(str)
	{
				
			if (str.length==0)
			 { 
					 document.getElementById("txtHint").innerHTML="";
					return;
			 }
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="gethint.php";
				url=url+"?q="+str;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChanged;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	} 
	
	
	function refreshUserDropDownCopyExistingProject(str)
	{
			document.getElementById("usrListID").innerHTML="";	
			if (str.length==0)
			 { 
					 document.getElementById("usrListID").innerHTML="";
					return;
			 }
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="gethint.php";
				url=url+"?value=updateCopyProjectDropdown&q="+str;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChangedCopyExistingProject;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	} 
	
	
	function showHinttinyMce(str)
	{
				
			if (str.length==0)
			 { 
					 document.getElementById("txtHint").innerHTML="";
					return;
			 }
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="gethint.php";
				url=url+"?q="+str;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChangeTEXTEditor;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	} 
	
	function refreshFileList(meetID)
	{
		
		
		if (meetID.length==0)
			 { 
					 document.getElementById("txtHint").innerHTML="";
					return;
			 }
			 xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="gethint.php";
				url=url+"?value=updateFileLIst"+"&meetID="+meetID;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChanged2;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	}
	function createNewFile(fileID,meetID)
	{
		var fileName;
		var currentFileName;
		fileName=document.getElementById(fileID).value;
		currentFileName=document.getElementById('currentFile').value;
		document.getElementById(fileID).value="";
		document.getElementById("txtHint").style.display="none"; 
		document.getElementById("txtHint2").innerHTML="";
		if (fileName.length==0)
			 { 
					 document.getElementById("txtHint").style.display="none"; 
					return;
			 }
			 xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="gethint.php";
				url=url+"?q="+fileName+"&value=createFile"+"&meetID="+meetID+"&currentFileName="+currentFileName;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChanged2;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	}
		function showHintTextEditor123(meetID,fileName)
		{
			
			var fileContents;
			var currentFile;
			document.getElementById('currentFile').value=fileName;
			if (fileName.length==0)
			{ 
				document.getElementById("newsText").innerHTML="";
				return;
			}
			
			//document.getElementById("newsText").innerHTML="";
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			{
				alert ("Your browser does not support AJAX!");
				return;
			} 
			var url="gethint.php";
			url=url+"?q="+fileName+"&value=changeFile"+"&meetID="+meetID+"&fileName="+fileName;
			url=url+"&sid="+Math.random();
			xmlHttp.onreadystatechange=stateChangeTEXTEditor;
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		}
	function showHintTextEditor(str)
	{
	
			if (str.length==0)
			 { 
					 document.getElementById("newsText").innerHTML="";
					return;
			 }
			 
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="getfileText.php";
				url=url+"?q="+str;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChangeTEXTEditor;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
				
	} 
	
	
	function widgetPreview(str)
	{
			var abc;	
			
			if (str.length==0)
			 { 
					 document.getElementById("txtHint").innerHTML="";
					return;
			 }
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="gethint.php?value=widget";
				url=url+"&q="+str;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChanged;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	} 
	
	function showTime11(str,str2)
	{
				
	
			
			if (str.length==0)
			 { 
					 document.getElementById("txtHint2").innerHTML="";
					
					return;
			 }
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
		
				var url="gethint.php?value=time";
				url=url+"&q="+str;
				url=url+"&q2="+str2;
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChanged2;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	} 
	
	
	
	
	function showHintSort(col,str)
	{
			if (str.length==0)
			 { 
					 document.getElementById("txtHint").innerHTML="";
					return;
			 }
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="gethintSort.php";
				url=url+"?q="+str+"&col="+col;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChanged;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	
	
				
				
	} 
	
	function AddDivision(seldiv,seltemp , seltrain , selnews , selproj , seluser,Cuser,Cdiv )
	{
		
		if (seldiv.length==0)
			 { 
					 document.getElementById("txtHint").innerHTML="";
					return;
			 }
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				
				var url="gethintAddDivision.php";
				url=url+"?seldiv="+seldiv+"&seltemp="+seltemp+"&seltrain="+seltrain+"&selnews="+selnews+"&selproj="+selproj+"&seluser="+seluser+"&Cuser="+Cuser+"&Cdiv="+Cdiv;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChangeddivapend;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
		
	} 
	function removeUserFromDivision(perID,usrID,divID,seldiv,seltemp , seltrain , selnews , selproj,seluser,Cuser,Cdiv )
	{
		

		if (seldiv.length==0)
			 { 
					 document.getElementById("txtHint").innerHTML="";
					return;
			 }
			
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
		
			document.getElementById(divID).innerHTML="";
			 

				
			
					var url="gethintAddDivision.php";
				url=url+"?seldiv="+seldiv+"&seltemp="+seltemp+"&seltrain="+seltrain+"&selnews="+selnews+"&selproj="+selproj+"&seluser="+seluser+"&Cuser="+Cuser+"&Cdiv="+Cdiv;
				
				url=url+'&perID='+perID+'&usrID=usrID&divID='+divID+'&removeDiv=true';
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChangednoresp;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
		
	} 
	
	
	function showHintSortBelow(col,str)
	{
			if (str.length==0)
			 { 
					 document.getElementById("txtHint1").innerHTML="";
					return;
			 }
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="gethintSortBelow.php";
				url=url+"?q="+str+"&col="+col;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChanged1;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	
				
				
	}
	
	function showHintSortDeleteBelow(col,str)
	{
			if (str.length==0)
			 { 
					 document.getElementById("txtHint1").innerHTML="";
					return;
			 }
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="gethintSortDeleteBelow.php";
				url=url+"?q="+str+"&col="+col;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChanged1;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	
				
				
	}
	
	
	
	function showHintSortDelete(col,str)
	{
			if (str.length==0)
			 { 
					 document.getElementById("txtHint").innerHTML="";
					return;
			 }
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="gethintSortDelete.php";
				url=url+"?q="+str+"&col="+col;
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChanged;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	} 
	
	function showEditTaskData(res,str)
	{
			if (str.length==0)
			 { 
					 document.getElementById("txtHint_"+str).innerHTML="";
					return;
			 }
			
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="getEditTaskData.php";
				url=url+"?q="+str+"&ress="+res;
				DID11 = str;
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChangedID;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	
				
				
	} 
	
	
	function showViewTaskData(res,str)
	{
			if (str.length==0)
			 { 
					 document.getElementById("txtHint_"+str).innerHTML="";
					return;
			 }
			
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="getViewTaskData.php";
				url=url+"?q="+str+"&ress="+res;
				DID11 = str;
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChangedID;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
	
				
				
	} 
		
	function Adduser(usrFirstName,usrLastName ,usrInitials , usrEmail , usrName , usrPassword)
	{
		document.getElementById("newUser").style.display="none";
		document.getElementById("newUserDivShow").style.display="block";
		document.frmProj.leadOption[1].checked = true;
		divID = document.frmProj.selectLevel1.value;
		if (usrName.length==0)
		{ 
			document.getElementById("newUserDivShow").innerHTML="";
			return;
		}
		xmlHttp=GetXmlHttpObject();
		//alert(xmlHttp);
		if (xmlHttp==null)
		{
			  alert ("Your browser does not support AJAX!");
			  return;
		} 
		var url="createuser.php?usrFirstName="+usrFirstName+"&usrLastName="+usrLastName+"&usrInitials="+usrInitials+"&usrEmail="+usrEmail+"&usrName="+usrName+"&usrPassword="+usrPassword+"&divID="+divID;
		url=url+"&sid="+Math.random();
		//var url = "test.php";
		//alert(url);
		//alert(xmlHttp);
		//xmlHttp.open('get',"test.php");
		xmlHttp.open("GET", url, true);
		//xmlHttp.onreadystatechange = testfun;
		xmlHttp.onreadystatechange = stateChangednewUser;
		xmlHttp.send(null);
	}
	
	function testfun()
	{
		//alert("In Test");	
		//alert(xmlHttp1.readyState);	
		
	}
	
	function AddUserToDivision(usrFirstName,usrLastName ,usrInitials , usrEmail , usrName , usrPassword)
	{
	
		
			document.getElementById("usrListID").style.display="none";
			document.getElementById("newUser").style.display="none";
			document.getElementById("newUserDivShow").style.display="block";
			document.frmDiv.leadOption[1].checked = true;
		
			if (usrName.length==0)
			 { 
					 document.getElementById("newUserDivShow").innerHTML="";
					return;
			 }
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			  {
				  alert ("Your browser does not support AJAX!");
				  return;
			  } 
			
				var url="createuser.php";
				url=url+"?usrFirstName="+usrFirstName+"&usrLastName="+usrLastName+"&usrInitials="+usrInitials+"&usrEmail="+usrEmail+"&usrName="+usrName+"&usrPassword="+usrPassword;
				
				url=url+"&sid="+Math.random();
				xmlHttp.onreadystatechange=stateChangednewUser;
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
		
	} 
	
	
	
	function stateChangeTEXT() 
	{ 
		 
		if (xmlHttp.readyState==4)
		{ 
			
			document.getElementById("newsText2").innerHTML=xmlHttp.responseText;
			
		}
	}
	function stateChangeTEXTEditor() 
	{ 
		 
		if (xmlHttp.readyState==4)
		{ 
			if(document.getElementById('meetingAgenda2'))
			{
				FCKeditorAPI.GetInstance('meetingAgenda2').SetHTML(xmlHttp.responseText)
			}
			if(document.getElementById("BlockUpdate"))
			document.getElementById("BlockUpdate").innerHTML = "";
		}
	}
	
	
	function stateChangedID() 
	{ 
		 
		if (xmlHttp.readyState==4)
		{ 
			//alert("<p>"+xmlHttp.responseText+"</p>");
			document.getElementById("txtHint_"+DID11).innerHTML=xmlHttp.responseText;
		}
	}
	
	
	function stateChanged1() 
	{ 
		if (xmlHttp.readyState==4)
		{ 
			document.getElementById("txtHint1").innerHTML=xmlHttp.responseText;
		}
	}
	
	function stateChangedCopyExistingProject() 
	{ 
		if (xmlHttp.readyState==4)
		{ 
			document.getElementById("usrListID").innerHTML=xmlHttp.responseText;
		}
	}
	
	
	
	function stateChanged2() 
	{ 
		if (xmlHttp.readyState==4)
		{ 
			document.getElementById("txtHint2").innerHTML=xmlHttp.responseText;
		}
	}
	
	
	
	function stateChangednoresp() 
	{ 
		if (xmlHttp.readyState==4)
		{ 
			

	
		}
	}
	function stateChanged() 
	{ 
		if (xmlHttp.readyState==4)
		{ 
			

			document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
		}
	}
	function stateChangeddivapend() 
	{ 
		if (xmlHttp.readyState==4)
		{ 
	
			var avrireceived;
			//alert(xmlHttp.responseText);
			//var already;
			//already=document.getElementById("txtHint").innerHTML;
			//text=already+"<hr><br>"+xmlHttp.responseText;
			
			//document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
			//already=document.getElementById("txtHint").innerHTML;
			//document.getElementById("txtHint").innerHTML=already+"<br>"+xmlHttp.responseText;
			avrireceived=xmlHttp.responseText;
			window.location='edit-users2.php?'+avrireceived;
		}
	}
	
	function stateChangednewUser(){
		//alert(xmlHttp.readyState);
		if(xmlHttp.readyState == 4 && xmlHttp.status == 200){
			//alert(xmlHttp.responseText);
			document.getElementById("newUserDivShow").innerHTML=xmlHttp.responseText;
		}
	}
	
	function showWtHint(query)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
			alert ("Your browser does not support AJAX!");
			return;
		} 
		
		var url="wt_ajax_response.php";
		url=url+"?query="+query;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedWt;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	} 
	function stateChangedWt() 
	{ 
		if (xmlHttp.readyState==4)
		{ 
			/*var queryResult = new Array();
			//queryResult = xmlHttp.responseText;
			//xmlHttp=GetXmlHttpObject();
			var url="wt-meeting.php";
			url=url+"?redirectResponse=Ok";
			url=url+"&sid="+Math.random();
			xmlHttp.onreadystatechange=stateChangedWtResponse;
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);*/
			//alert(xmlHttp.responseText);
			top.frames[0].document.getElementById("meeting_meeting").innerHTML = xmlHttp.responseText;
		}
	}
	function stateChangedWtResponse()
	{
		if (xmlHttp.readyState==4)
		{
			top.frames[0].document.getElementById("meeting_meeting").innerHTML = xmlHttp.responseText;
		}
	}
	function insertTaskByAjax(tmpActTitle,datEnd,datBegin,tmpActLead,tmpActPriority,tmpActMandatory,tmpActCorearea,tmpActParent,tmpActDisplayID,resourceIDs,addNewResources,newsText)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
			alert ("Your browser does not support AJAX!");
			return;
		} 
		
		var url="insertTaskBlankProject.php";
		url = url + "?tmpActTitle="+tmpActTitle+"&datEnd="+datEnd+"&datBegin="+datBegin+"&tmpActLead="+tmpActLead+"&tmpActPriority="+tmpActPriority+"&tmpActMandatory="+tmpActMandatory+"&tmpActCorearea="+tmpActCorearea+"&tmpActParent="+tmpActParent+"&tmpActDisplayID="+tmpActDisplayID+"&resourceIDs="+resourceIDs+"&addNewResources="+addNewResources+"&newsText="+newsText;
	
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=insertTaskByAjaxResult;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function insertTaskByAjaxResult()
	{
		if (xmlHttp.readyState==4)
		{
			window.location = "insert-tasks-createblank.php?msg=Task added successfully";
			//document.getElementById("newTest").innerHTML = xmlHttp.responseText;
		}
	}
	function updateCoreaArea(VALUE,ID)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
			alert ("Your browser does not support AJAX!");
			return;
		} 
		var url="gethint.php";
		url = url + "?value=updateCorearea&coreName="+VALUE+"&coreID="+ID;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=updateCoreaAreaResult;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function updateCoreaAreaResult()
	{
		if (xmlHttp.readyState==4)
		{
			document.getElementById("corIDDiv").innerHTML = xmlHttp.responseText;
		}
	}
	function insertTaskByAjaxTemplate(tmpActTitle,noofdays,tmpActPriority,tmpActMandatory,tmpActCorearea,tmpActParent,resourceIDs,addNewResources,newsText,tmpActDisplayID)
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
			alert ("Your browser does not support AJAX!");
			return;
		} 
		
		var url="insertTaskBlankTemplate.php";
		url = url + "?tmpActTitle="+tmpActTitle+"&noofdays="+noofdays+"&tmpActPriority="+tmpActPriority+"&tmpActMandatory="+tmpActMandatory+"&tmpActCorearea="+tmpActCorearea+"&tmpActParent="+tmpActParent+"&resourceIDs="+resourceIDs+"&addNewResources="+addNewResources+"&newsText="+newsText+"&tmpActDisplayID="+tmpActDisplayID;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=insertTaskByAjaxTemplateResult;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function insertTaskByAjaxTemplateResult()
	{
		if (xmlHttp.readyState==4)
		{
			//document.getElementById("tmpHtmlTD").innerHTML = xmlHttp.responseText
			window.location = "template-tasks-createblank.php?msg=Task added successfully";
		}
	}
	
	
	function getMenuByAjax(divName)
	{
		divisionName = divName;
		xmlHttp_new=GetXmlHttpObject();
		if (xmlHttp_new==null)
		{
			alert ("Your browser does not support AJAX!");
			return;
		}
		var url="viewDivision_Old.php";
		url=url+"?sid="+Math.random();
		xmlHttp_new.onreadystatechange =getMenuByAjaxResult;		
		xmlHttp_new.open("GET",url,false);
		xmlHttp_new.send(null);
	}
	function getMenuByAjaxResult()
	{   
		if(xmlHttp_new.readyState==4)
		{
			_scrollAmount=5;		// Used for Netscape 4 scrolling
			_scrollDelay=10;		// Used for Netscape 4 scrolling
			_menuCloseDelay=500;	// The delay for menus to remain visible on mouse off
			_menuOpenDelay=150;		// The delay for opening menus on mouse over
			_subOffsetTop=0;		// Sub menu offset Top position
			_subOffsetLeft=0;		// Sub menu offset Left position
			treeOffset=17;			// Used to set the offset of sub menus
			singleMasterMenu=false;	// Informs the system to only have one menu open at a time
			clickfunction="";
			with(tstyle1=new mm_style()){
				oncolor="#ffffff"; 
				offcolor="#000000"; 
				onbgcolor="#316ac5"; 
				offbgcolor="#ffffff"; 
				bordercolor="#000000"; 
			 
				borderwidth=1; 
				padding=2; 
				fontsize="100%"; 
				fontstyle="normal"; 
				fontfamily="Verdana, Tahoma, Arial"; 
				status=""; 
				clickfunction="changeParentText();"; 
			}
			with(new menuname("ucdb")){
				top=60;
				left=60;
				style=tstyle1;
				alwaysvisible=1;
				orientation="horizontal";
				position="relative";
				aI("text="+divisionName+";showmenu=UcDivisions;offclass=treeBeginItemCollapsed;onclass=test_func();clickclass=treeBeginItemExpanded;");
			}
			eval(xmlHttp_new.responseText);
			drawMenus();
		}
		
	}
	function test_func()
	{
		_i=getParentItemByItem(_itemRef)
		global_no = _i;
	}	 
	function changeParentText123()
	{
		_i=getParentItemByItem(_itemRef)
		global_no = _i;
		_mi[_i][1]=_mi[_itemRef][1] 
	   _item=gmobj("el"+_i) 
	   _item.innerHTML=BDMenu(_mi[_i][0])
	   itemOn(_i)    
	}
	function changeParentText()
	{ 
		if(global_no == 0)
		{
		}
		else
		{
			_i = global_no ;
		}
	   _mi[_i][1]=_mi[_itemRef][1] 
	   _item=gmobj("el"+_i) 
	   _item.innerHTML=BDMenu(_mi[_i][0])
	   itemOn(_i)    
	} 
	function saveDashBoardForm()
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
			alert ("Your browser does not support AJAX!");
			return;
		} 
		editorTextTask = tinyMCE.getInstanceById('newsText').getContent();
		editorTextTask = editorTextTask.replace(/&amp;/g,"**667**andconversion");
		editorTextTask = editorTextTask.replace(/&nbsp;/g,"**667**spaceconversion");
		editorTextTask = editorTextTask.replace(/&#39;/g,"\'");
		editorTextTask = editorTextTask.replace(/&quot;/g,"\"");
		editorTextTask = editorTextTask.replace(/&lt;/g,"<");
		editorTextTask = editorTextTask.replace(/&gt;/g,">");
		dashDesc = editorTextTask;
		dashName= document.getElementById("dashName").value;
		fieldLabel = document.getElementById("fieldLabel").value;
		fieldDesc  = document.getElementById("fieldDesc1").value;
		usrIDs = document.getElementById('usrIDs');
		dashboadFrequency = document.getElementById('dashboadFrequency').value;
		if(document.getElementById('email').checked == true && document.getElementById('homePage').checked == true )
		{
			dashRemainder = 'Both';
		}else if(document.getElementById('email').checked == true)
		{
			dashRemainder = 'Email';
		}else if(document.getElementById('homePage').checked == true)
		{
			dashRemainder = 'Home';
		}
		var usrList = document.getElementById('usrIDs_permission');
		for (var i = 0; i < usrList.length; i++) {
			if (usrList.options[i].selected) {
				users += usrList.options[i].value+ ",";
			}
		}
		if(document.getElementById('me').checked == true)
		{
			permission = 'me';
		}else if(document.getElementById('users').checked == true)
		{
			var crt = document.getElementById('usrIDs_permission');
			for (var i = 0; i < crt.length; i++) {
				if (crt.options[i].selected) {
					permission += crt.options[i].value+ ",";
				}
			}
		}else if(document.getElementById('allUsers').checked == true)
		{
			permission = '-1';
		}
		
		var url="create-dashboard-indicator2.php";
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=responseSaveDashBoardForm;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function responseSaveDashBoardForm()
	{
		if(xmlHttp.readyState==4)
		{
			
		}
	}
	function dashboardDue()
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
			alert ("Your browser does not support AJAX!");
			return;
		} 
		var url="gethint.php";
		url = url+"?value=kkppttyyyuu";
		url=url+"&sid="+Math.random();		
		xmlHttp.onreadystatechange=dashboardDueDisplay;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	function dashboardDueDisplay()
	{
		if (xmlHttp.readyState==4)
		{
			//document.getElementById("dashboardDue").innerHTML = xmlHttp.responseText;
		}
	}
	function cycleUpdate()
	{
		xmlHttp1=GetXmlHttpObject();
		if (xmlHttp1==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		var url="gethint.php";
		url=url+"?value=updateHeaderBanner";
		url=url+"&sid="+Math.random();
		xmlHttp1.onreadystatechange=displayCycleUpdate;
		xmlHttp1.open("GET",url,true);
		xmlHttp1.send(null);	
	}
	function displayCycleUpdate()
	{
		if (xmlHttp1.readyState==4)
		{
			var bnrs = xmlHttp1.responseText;
			bnrs = bnrs.replace(/\t/g,"");
			imageName = bnrs.split(",");
			cnt = imageName.length -1;
			//document.banner1.src=imageName[0];
			//setInterval('loadbanners();',7000);
		}
	}
	function cycle()
	{
		xmlHttp1=GetXmlHttpObject();
		if (xmlHttp1==null)
		{
		  alert ("Your browser does not support AJAX!");
		  return;
		}
		var url="gethint.php";
		url=url+"?value=updateHeaderBanner";
		url=url+"&sid="+Math.random();
		xmlHttp1.onreadystatechange=updateCycle;
		xmlHttp1.open("GET",url,true);
		xmlHttp1.send(null);	
	}
	
	function updateCycle()
	{
		if (xmlHttp1.readyState==4)
		{
			var bnrs = xmlHttp1.responseText;
			bnrs = bnrs.replace(/\t/g,"");
			
			imageName = bnrs.split(",");
			if(imageName != "")
			{
				cnt = imageName.length -1;
				document.banner1.src=imageName[0];
				if(cnt > 0)
				setInterval('loadbanners();',7000);
			}
		}
	}
	
	function loadbanners() 
	{
		if (banners < cnt) // define the number of banners here (3 in this example)
		{
			document.banner1.src=imageName[banners++];
			document.getElementById("bannerHRF").onclick = null;
			document.getElementById("bannerHRF").href = imageName[banners];
			banners++;
		}
		else
		{
			banners=0;
			loadbanners();
		}
	}