function Postings(){
	//handle failed requests
	this.handleFailure = function( o ){
			alert("failed to retrieve data!");
	}
this.listcommunity=function(){
		comURL = GLOBAL_URI+"Posting/listCommunity/"+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("communitylistdiv").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
	}
this.getPost = function(){
		resourceURL = GLOBAL_URI+"userppsting/getPsot/"+"?ajaxcall=true";
		x = getElementId("getpost");
		handleSuccess = function( o ){
		getElementId("msgBox").innerHTML+=o.responseText;
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.setForm(x);
		YAHOO.util.Connect.asyncRequest("POST", resourceURL, callback);
		}
		this.showPassPopup = function(){
		pass.show();
		}
this.deletePost = function(id,uid){
		postURL =GLOBAL_URI+"userposting/deletePost/" + id+"/"+ uid +"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);mypost = new Postings();mypost.listPost();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",postURL,callback)
		}
this.getpostingDetail=function(subid,usid){
		userPostDetailPanel.show();
		postURL = GLOBAL_URI+"userposting/viewPostingDetail/"+subid+"/"+usid+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("Postdetail").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",postURL,callback)
	}
this.listPost = function (){
		postURL =GLOBAL_URI+"userposting/listPost/"+"?ajaxcall=true";
		handleSuccess = function( o ){getElementId("userpostDiv").innerHTML=o.responseText;}
		callback = {success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",postURL,callback);
	}
this.getcommunityForm=function(Comid,CatId){
		getElementId("communityformdiv").style.display='block';
		communityPanel.show();
		comURL = GLOBAL_URI+"Posting/getCommunityForm/"+Comid+","+CatId+"?ajaxcall=true";
		handleSuccess=function(o){
			getElementId("communityformdiv").innerHTML=o.responseText;
			tinyMCE.execCommand("mceAddControl",true, "description");
			}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
		}
this.deletePosting=function(comID,CatID){
		if(confirm("Do you really want to delete this Record?")){
		ipURL = GLOBAL_URI+"Posting/deleteCommunityPosting/"+comID+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listcommunity();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",ipURL,callback)
		}
		}
this.changeStatus=function(comid,CatID){
		comURL = GLOBAL_URI+"Posting/changeCommunityStatus/"+comid+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listcommunity();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
		}
this.getCommunityDetail=function(comid,catid){
		getElementId("communitydetail").style.display='block';
		communityDetailPanel.show();
		heading=getElementId("heading");
		heading.innerHTML="View Posting Detail";
		userURL = GLOBAL_URI+"Posting/viewCommunityDetail/"+comid+","+catid+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("communitydetail").innerHTML=o.responseText;
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",userURL,callback)
		}
this.updateCommunity=function(){
		tinyMCE.execCommand('mceRemoveControl', true, 'description');
		comURL = GLOBAL_URI+"Posting/updateCommunity/"+"?ajaxcall=true";	
		formObject=getElementId("communityform");
		handleSuccess=function(o){//alert(o.responseText);
		getElementId("communityformdiv").innerHTML=o.responseText;
		post=new Postings();post.listcommunity();
			tinyMCE.execCommand("mceAddControl",true, "description");			 
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		tinyMCE.triggerSave();
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
		}
this.SearchCommunity=function(){
		comURL = GLOBAL_URI+"Posting/SearchCommunity/"+"?ajaxcall=true";
		formObject=getElementId("search");
		handleSuccess=function(o){
		getElementId("communitylistdiv").innerHTML=o.responseText;
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
}
// jobs  start here
this.listjob=function(){
		comURL = GLOBAL_URI+"Posting/listJob/"+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("jobslistdiv").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
	}
this.getjobForm=function(Jobid,CatId){
		getElementId("communityformdiv").style.display='block';
		communityPanel.show();
		emailURL = GLOBAL_URI+"Posting/getJobForm/"+Jobid+","+CatId+"?ajaxcall=true";
		handleSuccess=function(o){
			getElementId("communityformdiv").innerHTML=o.responseText;
			tinyMCE.execCommand("mceAddControl",true, "description");
			}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",emailURL,callback)
		}
this.getJobDetail=function(jobid,catid){
		getElementId("communitydetail").style.display='block';
		communityDetailPanel.show();
		userURL = GLOBAL_URI+"Posting/viewJobDetail/"+jobid+","+catid+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("communitydetail").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",userURL,callback)
		}
this.deletejobPosting=function(jobID,CatID){
		if(confirm("Are you want to Delete this Record?.")){
		jobURL = GLOBAL_URI+"Posting/deleteJobPosting/"+jobID+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listjob();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",jobURL,callback)
		}
		}
this.changejobStatus=function(jobid,CatID){
		comURL = GLOBAL_URI+"Posting/changeJobStatus/"+jobid+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listjob();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
		}
this.searchJob=function(){
		comURL = GLOBAL_URI+"Posting/searchJob/"+"?ajaxcall=true";
		formObject=getElementId("searchJob");
		handleSuccess=function(o){
		getElementId("jobslistdiv").innerHTML=o.responseText;
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
}
this.updateJob=function(){
		tinyMCE.execCommand('mceRemoveControl', true, 'description');
		comURL = GLOBAL_URI+"Posting/updateJob/"+"?ajaxcall=true";	
		formObject=getElementId("communityform");
		handleSuccess=function(o){
		getElementId("communityformdiv").innerHTML=o.responseText;post=new Postings();post.listjob();
			tinyMCE.execCommand("mceAddControl",true, "description");}
			
		callback={success:handleSuccess,failure:this.handleFailure}
		tinyMCE.triggerSave();
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
		}
// jobs end resume statrt
this.listresume=function(){
		comURL = GLOBAL_URI+"Posting/listResume/"+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("resumelistdiv").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
	}
this.getresumeForm=function(resid,CatId){
		getElementId("communityformdiv").style.display='block';
		communityPanel.show();
		emailURL = GLOBAL_URI+"Posting/getResumeForm/"+resid+","+CatId+"?ajaxcall=true";
		handleSuccess=function(o){
			getElementId("communityformdiv").innerHTML=o.responseText;
			tinyMCE.execCommand("mceAddControl",true, "description");
			}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",emailURL,callback)
		}
this.getresumeDetail=function(resid,catid){
		getElementId("communitydetail").style.display='block';
		communityDetailPanel.show();
		userURL = GLOBAL_URI+"Posting/viewResumeDetail/"+resid+","+catid+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("communitydetail").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",userURL,callback)
		}
this.deleteresumePosting=function(resID,CatID){
		if(confirm('Are you want to Delete this Record?.')){
		jobURL = GLOBAL_URI+"Posting/deleteJobPosting/"+resID+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listresume();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",jobURL,callback)
		}
		}
this.changeresumeStatus=function(resumeid,CatID){
		comURL = GLOBAL_URI+"Posting/changeResumeStatus/"+resumeid+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listresume();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
		}
this.searchResume=function(){
		comURL = GLOBAL_URI+"Posting/searchResume/"+"?ajaxcall=true";
		formObject=getElementId("searchResume");
		handleSuccess=function(o){
		getElementId("resumelistdiv").innerHTML=o.responseText;
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
}
this.updateResume=function(){
		tinyMCE.execCommand('mceRemoveControl', true, 'description');
		comURL = GLOBAL_URI+"Posting/updateResume/"+"?ajaxcall=true";	
		formObject=getElementId("communityform");
		handleSuccess=function(o){
		getElementId("communityformdiv").innerHTML=o.responseText;post=new Postings();post.listresume();
			tinyMCE.execCommand("mceAddControl",true, "description");}
			
		callback={success:handleSuccess,failure:this.handleFailure}
		tinyMCE.triggerSave();
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
		}
// resume end housing start
this.listhousing=function(){
		comURL = GLOBAL_URI+"Posting/listHousing/"+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("housinglistdiv").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
	}
this.gethousingForm=function(housid,CatId){
		getElementId("communityformdiv").style.display='block';
		communityPanel.show();
		emailURL = GLOBAL_URI+"Posting/getHousingForm/"+housid+","+CatId+"?ajaxcall=true";
		handleSuccess=function(o){
			getElementId("communityformdiv").innerHTML=o.responseText;
			tinyMCE.execCommand("mceAddControl",true, "description");
			}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",emailURL,callback)
		}
this.gethousingDetail=function(housid,catid){
		getElementId("communitydetail").style.display='block';
		communityDetailPanel.show();
		userURL = GLOBAL_URI+"Posting/viewHousingDetail/"+housid+","+catid+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("communitydetail").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",userURL,callback)
		}
this.deletehousingPosting=function(housID,CatID){
		if(confirm('Are you want to Delete this Record?.')){
		jobURL = GLOBAL_URI+"Posting/deleteHousingPosting/"+housID+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listhousing();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",jobURL,callback)
		}
		}
this.changehousingStatus=function(housid,CatID){
		comURL = GLOBAL_URI+"Posting/changeHousingStatus/"+housid+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listhousing();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
		}
this.searchHousing=function(){
		comURL = GLOBAL_URI+"Posting/searchHousing/"+"?ajaxcall=true";
		formObject=getElementId("searchHousing");
		handleSuccess=function(o){
		getElementId("housinglistdiv").innerHTML=o.responseText;
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
}
this.updateHousing=function(){
		tinyMCE.execCommand('mceRemoveControl', true, 'description');
		comURL = GLOBAL_URI+"Posting/updateHousing/"+"?ajaxcall=true";	
		formObject=getElementId("communityform");
		handleSuccess=function(o){
		getElementId("communityformdiv").innerHTML=o.responseText;post=new Postings();post.listhousing();
		tinyMCE.execCommand("mceAddControl",true, "description");}
			
		callback={success:handleSuccess,failure:this.handleFailure}
		tinyMCE.triggerSave();
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
		}
//housing ends For sale start
this.listforsale=function(){
		comURL = GLOBAL_URI+"Posting/listForsale/"+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("forsalelistdiv").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
	}
this.getforsaleForm=function(forsale_id,CatId){
		getElementId("communityformdiv").style.display='block';
		communityPanel.show();
		emailURL = GLOBAL_URI+"Posting/getForsaleForm/"+forsale_id+","+CatId+"?ajaxcall=true";
		handleSuccess=function(o){
			getElementId("communityformdiv").innerHTML=o.responseText;
			tinyMCE.execCommand("mceAddControl",true, "description");}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",emailURL,callback)
		}
this.getforsaleDetail=function(forsale_id,catid){
		getElementId("communitydetail").style.display='block';
		communityDetailPanel.show();
		userURL = GLOBAL_URI+"Posting/viewForsaleDetail/"+forsale_id+","+catid+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("communitydetail").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",userURL,callback)
		}
this.deleteforsalePosting=function(forsale_id,CatID){
		if(confirm('Are you want to Delete this Record?.')){
		jobURL = GLOBAL_URI+"Posting/deleteForsalePosting/"+forsale_id+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listforsale();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",jobURL,callback)
		}
		}
this.changeforsaleStatus=function(forsale_id,CatID){
		comURL = GLOBAL_URI+"Posting/changeForsaleStatus/"+forsale_id+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listforsale();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
		}
this.searchForsale=function(){
		comURL = GLOBAL_URI+"Posting/searchForsale/"+"?ajaxcall=true";
		formObject=getElementId("searchForsale");
		handleSuccess=function(o){
		getElementId("forsalelistdiv").innerHTML=o.responseText;
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
}
this.updateForsale=function(){
		tinyMCE.execCommand('mceRemoveControl', true, 'description');
		comURL = GLOBAL_URI+"Posting/updateForsale/"+"?ajaxcall=true";	
		formObject=getElementId("communityform");
		handleSuccess=function(o){
		getElementId("communityformdiv").innerHTML=o.responseText;post=new Postings();post.listforsale();
			tinyMCE.execCommand("mceAddControl",true,"description");}
			callback={success:handleSuccess,failure:this.handleFailure}
		tinyMCE.triggerSave();
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
		}
// for sale end gigs start
this.listgigs=function(){
		comURL = GLOBAL_URI+"Posting/listGigs/"+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("gigslistdiv").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
	}
this.getgigsForm=function(gig_id,CatId){
		getElementId("communityformdiv").style.display='block';
		communityPanel.show();
		emailURL = GLOBAL_URI+"Posting/getGigsForm/"+gig_id+","+CatId+"?ajaxcall=true";
		handleSuccess=function(o){
			getElementId("communityformdiv").innerHTML=o.responseText;
			tinyMCE.execCommand("mceAddControl",true,"description");}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",emailURL,callback)
		}
this.getgigsDetail=function(gig_id,catid){
		getElementId("communitydetail").style.display='block';
		communityDetailPanel.show();
		heading=getElementId("heading");
		heading.innerHTML="View Posting Detail";
		userURL = GLOBAL_URI+"Posting/viewGigsDetail/"+gig_id+","+catid+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("communitydetail").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",userURL,callback)
		}
this.deletegigsPosting=function(gig_id,CatID){
		if(confirm('Are you want to Delete this Record?.')){
		jobURL = GLOBAL_URI+"Posting/deleteGigsPosting/"+gig_id+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listgigs();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",jobURL,callback)
		}
		}
this.changegigsStatus=function(gig_id,CatID){
		comURL = GLOBAL_URI+"Posting/changeGigsStatus/"+gig_id+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listgigs();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
		}
this.updateGigs=function(){
		tinyMCE.execCommand('mceRemoveControl', true, 'description');
		comURL = GLOBAL_URI+"Posting/updateGigs/"+"?ajaxcall=true";	
		formObject=getElementId("communityform");
		handleSuccess=function(o){
		getElementId("communityformdiv").innerHTML=o.responseText;post=new Postings();post.listgigs();
		tinyMCE.execCommand("mceAddControl",true, "description");}
		callback={success:handleSuccess,failure:this.handleFailure}
		tinyMCE.triggerSave();
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
		}
this.searchGigs=function(){
		comURL = GLOBAL_URI+"Posting/SearchGigs/"+"?ajaxcall=true";
		formObject=getElementId("searchGigs");
		handleSuccess=function(o){
		getElementId("gigslistdiv").innerHTML=o.responseText;
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
}
		// gigs end events start
this.listevents=function(){
		comURL = GLOBAL_URI+"Posting/listEvents/"+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("eventlistdiv").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
	}
this.geteventsForm=function(eid,CatId){
		getElementId("communityformdiv").style.display='block';
		communityPanel.show();
		emailURL = GLOBAL_URI+"Posting/getEventsForm/"+eid+","+CatId+"?ajaxcall=true";
		handleSuccess=function(o){
			getElementId("communityformdiv").innerHTML=o.responseText;
			tinyMCE.execCommand("mceAddControl",true,"description");}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",emailURL,callback)
		}
this.geteventsDetail=function(eid,catid){
		getElementId("communitydetail").style.display='block';
		communityDetailPanel.show();
		userURL = GLOBAL_URI+"Posting/viewEventsDetail/"+eid+","+catid+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("communitydetail").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",userURL,callback)
		}
this.deleteeventsPosting=function(eid,CatID){
		if(confirm('Are you want to Delete this Record?.')){
		jobURL = GLOBAL_URI+"Posting/deleteEventsPosting/"+eid+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listevents();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",jobURL,callback)
		}
		}
this.changeeventsStatus=function(eid,CatID){
		comURL = GLOBAL_URI+"Posting/changeEventsStatus/"+eid+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listevents();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
		}
this.updateEvents=function(){
		tinyMCE.execCommand('mceRemoveControl', true, 'description');
		comURL = GLOBAL_URI+"Posting/updateEvents/"+"?ajaxcall=true";	
		formObject=getElementId("communityform");
		handleSuccess=function(o){
		getElementId("communityformdiv").innerHTML=o.responseText;post=new Postings();post.listevents();
		tinyMCE.execCommand("mceAddControl",true, "description");}
		callback={success:handleSuccess,failure:this.handleFailure}
		tinyMCE.triggerSave();
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
		}
this.searchEvents=function(){
		comURL = GLOBAL_URI+"Posting/SearchEvents/"+"?ajaxcall=true";
		formObject=getElementId("searchEvents");
		handleSuccess=function(o){
		getElementId("eventlistdiv").innerHTML=o.responseText;
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
}
		// events ends services start here
		
this.listservices=function(){
		comURL = GLOBAL_URI+"Posting/listServices/"+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("serviceslistdiv").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
	}
this.getservicesForm=function(sid,CatId){
		getElementId("communityformdiv").style.display='block';
		communityPanel.show();
		emailURL = GLOBAL_URI+"Posting/getServicesForm/"+sid+","+CatId+"?ajaxcall=true";
		handleSuccess=function(o){
		getElementId("communityformdiv").innerHTML=o.responseText;
		tinyMCE.execCommand("mceAddControl",true, "description");}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",emailURL,callback)
		}
this.getservicesDetail=function(sid,catid){
		getElementId("communitydetail").style.display='block';
		communityDetailPanel.show();
		userURL = GLOBAL_URI+"Posting/viewServicesDetail/"+sid+","+catid+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("communitydetail").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",userURL,callback)
		}
this.deleteservicesPosting=function(sid,CatID){
		if(confirm('Are you want to Delete this Record?.')){
		jobURL = GLOBAL_URI+"Posting/deleteServicesPosting/"+sid+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listservices();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",jobURL,callback)
		}
		}
this.changeservicesStatus=function(sid,CatID){
		comURL = GLOBAL_URI+"Posting/changeServicesStatus/"+sid+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listservices();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
		}
this.updateServices=function(){
		tinyMCE.execCommand('mceRemoveControl', true, 'description');
		comURL = GLOBAL_URI+"Posting/updateServices/"+"?ajaxcall=true";	
		formObject=getElementId("communityform");
		handleSuccess=function(o){
		getElementId("communityformdiv").innerHTML=o.responseText;post=new Postings();post.listservices();
		tinyMCE.execCommand("mceAddControl",true, "description");}
		callback={success:handleSuccess,failure:this.handleFailure}
		tinyMCE.triggerSave();
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
		}
this.SearchServices=function(){
		comURL = GLOBAL_URI+"Posting/SearchServices/"+"?ajaxcall=true";
		formObject=getElementId("searchServices");
		handleSuccess=function(o){
		getElementId("serviceslistdiv").innerHTML=o.responseText;
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
}
// services end here personals start
		
this.listpersonals=function(){
		comURL = GLOBAL_URI+"Posting/listPersonals/"+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("personalslistdiv").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
	}
this.getpersonalsForm=function(pid,CatId){
		getElementId("communityformdiv").style.display='block';
		communityPanel.show();
		emailURL = GLOBAL_URI+"Posting/getPersonalsForm/"+pid+","+CatId+"?ajaxcall=true";
		handleSuccess=function(o){
		getElementId("communityformdiv").innerHTML=o.responseText;
		tinyMCE.execCommand("mceAddControl",true, "description");}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",emailURL,callback)
		}
this.getpersonalsDetail=function(pid,catid){
		getElementId("communitydetail").style.display='block';
		communityDetailPanel.show();
		userURL = GLOBAL_URI+"Posting/viewPersonalsDetail/"+pid+","+catid+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("communitydetail").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",userURL,callback)
		}
this.deletepersonalsPosting=function(pid,CatID){
		if(confirm('Are you want to Delete this Record?.')){
		jobURL = GLOBAL_URI+"Posting/deletePersonalsPosting/"+pid+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listpersonals();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",jobURL,callback)
		}
		}
this.changepersonalsStatus=function(pid,CatID){
		comURL = GLOBAL_URI+"Posting/changePersoanalsStatus/"+pid+","+CatID+"?ajaxcall=true";
		handleSuccess=function(o){alert(o.responseText);post=new Postings();post.listpersonals();}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",comURL,callback)
		}
this.updatePersonals=function(){
		tinyMCE.execCommand('mceRemoveControl', true, 'description');
		comURL = GLOBAL_URI+"Posting/updatePersonals/"+"?ajaxcall=true";	
		formObject=getElementId("communityform");
		handleSuccess=function(o){
		getElementId("communityformdiv").innerHTML=o.responseText;post=new Postings();post.listpersonals();
		tinyMCE.execCommand("mceAddControl",true, "description");}
		callback={success:handleSuccess,failure:this.handleFailure}
		tinyMCE.triggerSave();
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
		}
this.SearchPersonals=function(){
		comURL = GLOBAL_URI+"Posting/SearchPersonals/"+"?ajaxcall=true";
		formObject=getElementId("searchPersonals");
		handleSuccess=function(o){
		getElementId("personalslistdiv").innerHTML=o.responseText;
		}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.setForm(formObject);
		YAHOO.util.Connect.asyncRequest("POST",comURL,callback)
}
this.ViewFlags = function(comid,catid){
		communityDetailPanel.show();
		userURL = GLOBAL_URI+"Posting/viewFlagDetail/"+comid+","+catid+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("communitydetail").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",userURL,callback)
		}
this.getstoryDetail = function(story_id){
		successstoryDetailPanel.show();
		storyURL = GLOBAL_URI+"successstory/viewStoryDetail/"+story_id+"?ajaxcall=true";
		handleSuccess=function(o){getElementId("successstorydetail").innerHTML=o.responseText;}
		callback={success:handleSuccess,failure:this.handleFailure}
		YAHOO.util.Connect.asyncRequest("GET",storyURL,callback)
	}
}