	/************************************************************************
	*	File Name: 			offramperuser.php								*
	*	Author Name: 		Nabeel Bin Ezad									*
	*	Description:		Used for off ramper javascript functionality	*	
	*	Created Date:		25 February 2007.								*
	*	Modified Date: 		22 Sept 2008.							 		*
	*	Last Modified By:	Ramish Hashmi  				    		    	*
	*																		*
	*************************************************************************/	
	var intSkillNo;
	var intEduNo;
	var intOnOfStatus=0;
	/************************************************************************
	*
	*	Function Name:	GetDashBoad									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	function GetOffDashBoad(pIntUserId,pStrUserName,pStrPassword,pIntCompanyId)
	{
		
		var url = 'GUIService/OffRamperService.php?action=select&uid='+pIntUserId+'&un='+pStrUserName+'&ut='+pStrPassword+'&compid='+pIntCompanyId+'&type='+pStrPassword; 
		document.getElementById("divDashBoard").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
		var myRequest= new Ajax.Request(
			url, 
		{   
			method: 'post',
			onSuccess: function(transport) 
			{     
				var strResponse=transport.responseText;
				strResponse=strResponse.split("+");
				document.getElementById("divDashBoard").innerHTML=strResponse[0];
				var strEventsDate=strResponse[1];
				strEventsDate=strEventsDate.split(",");
				var dA = new Array(); 
				var x=0;
				for (j=0;j<strEventsDate.length-1;j++)
				{
				
					dA[x++] = strEventsDate[j];
				}
				loaded('calendar',start,dA);
			} 
		});
		
	}
	/************************************************************************
	*
	*	Function Name:	showPopup									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	var baseText = null; 
	function showPopup(pIntJobId,pIntUserId,pIntStatus,w,h,pStrJobTitle,pStrJobDescription,pIntCompanyId,pIntDashBoardStatus,pStart,pEnd,pPage)
	{   
		
		var e = window.event;
		var y=200;
		var x=400;
		var popUp = document.getElementById("popupcontent");    
		popUp.style.top = y+"px";   
		popUp.style.left =x+"px";   
		popUp.style.width = w + "px";   
		popUp.style.height = h + "px";    
		if (baseText == null) 
		baseText = popUp.innerHTML;   
		var strText='<div id=\"statusbar\" valign="top">';
			strText+='<table border=0 cellspacing=2 cellpading=2 width=525>';
		strText+='<tr>';
		strText+='<td valign="top" align=center colspan=2 width=525>';
		strText+='<span class="BodyHeadingOne">Job Details</span>';
		strText+='</td>';
		strText+='</tr>';
		
		strText+='<tr>';
		strText+='<td valign=top align=left width=150>';
		strText+='<span class="BodyHeadingTwo">Job Title:</span>';
		strText+='</td>';
		strText+='<td valign=top align=left><span class="BodyText">';
		strText+=pStrJobTitle;
		strText+='</span></td>';
		strText+='</tr>';
		
		strText+='<tr>';
		strText+='<td valign=top align=left>';
		strText+='<span class="BodyHeadingTwo">Job Description:</span>';
		strText+='</td>';
		strText+='<td valign=top align=left><span class="BodyText">';
		strText+=pStrJobDescription;
		strText+='</span></td>';
		strText+='</tr>';
		
		strText+='<tr>';
		strText+='<td valign=top align=left>';
		strText+='<span class="BodyHeadingTwo">Cover Letter:</span>';
		strText+='</td>';
		strText+='<td valign=top align=left><span class="BodyText">';
		strText+='<textarea id="txtCoverLetter" name="txtCoverLetter" rows=10 cols=50></textarea>';
		strText+='</span></td>';
		strText+='</tr>';
		
		strText+='<tr>';
		strText+='<td valign=top align=center colspan=2 width=525>';
		strText+='<span class="BodyTextMessageError">';
		strText+='Are you sure you want to apply?';
		strText+='</span></td>';
		strText+='</tr>';
		strText+='<tr>';
		strText+='<td valign=top align=center colspan=2 width=525 height=10>';
		strText+='<span class="BodyText">';
		strText+='';
		strText+='</span></td>';
		strText+='</tr>';
		strText+='<tr>';
		strText+='<td valign=top align=center width=525 colspan=2>';

		strText+='<a href="#" onClick="ApplyForJob('+pIntJobId+','+pIntUserId+','+pIntStatus+','+pIntCompanyId+','+pIntDashBoardStatus+','+pStart+','+pEnd+','+pPage+')"><img src="../IncludeFiles/CSS/images/yes-button.jpg"></a>';
		strText+='&nbsp;<a href="#" onclick=hidePopup();><img src="../IncludeFiles/CSS/images/no-button.jpg"></a>';
		strText+='</td>';
		strText+='</tr>';
	
		strText+='</table></div>';
		popUp.innerHTML = baseText+strText;
		
		//<input type="button" onclick=\"hidePopup();\">Close window<button></div>";
		var sbar = document.getElementById("statusbar");   
		sbar.style.marginTop = 0 + "px";  
		 popUp.style.visibility = "visible";
	}
	function hidePopup()
	{   
		var popUp = document.getElementById("popupcontent");   
		popUp.style.visibility = "hidden";
	}
	/************************************************************************
	*
	*	Function Name:	ApplyForJob									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	function ApplyForJob(pIntJobId,pIntUserId,pIntStatus,pIntCompanyId,pIntDashBoardStatus,pStart,pEnd,pPage)
	{
	
		
		var strCoverLetter=document.getElementById("txtCoverLetter").value;
		var strResponse='';
		document.getElementById("OffRampMessage").innerHTML="";
		var url = 'GUIService/OffRamperService.php?action=add&func=apply&userid='+pIntUserId+'&jobid='+pIntJobId+'&compid='+pIntCompanyId+'&pStart='+pStart+'&pEnd='+pEnd+'&pPage='+pPage; 
		var par='cover='+strCoverLetter;
		document.getElementById("OffRampMessage").innerHTML="";
		document.getElementById("OffRampMessage").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
		var myRequest= new Ajax.Request(
		url, 
		{   
			method: 'post',
			parameters:par,
			onSuccess: function(transport) 
			{    

				hidePopup();
				
				strResponse=transport.responseText;
				strResponse=strResponse.split("+");

				if(strResponse[0]==-1)
				{
					document.getElementById("OffRampMessage").innerHTML="";
					document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessageError>Error</span>";	
				}
				else if(strResponse[0]==-2)
				{
					document.getElementById("OffRampMessage").innerHTML="";
					document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessageError>You have already applied for this job</span>";	
				}
				
				else
				{
					if(pIntStatus==1)
					{
						document.getElementById("OffRampMessage").innerHTML="";
						document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessage>Your application has been submitted</span>";
					}
					else
					{
						if(pIntDashBoardStatus==0)
						{
							document.getElementById("divJobOpportunities").innerHTML=strResponse[0];
							
							document.getElementById("DivMyJobs").innerHTML=strResponse[1];
							document.getElementById("DivJobsWishList").innerHTML=strResponse[2];
							document.getElementById("OffRampMessage").innerHTML="";
							document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessage>Your application has been submitted</span>";
						}
						else if(pIntDashBoardStatus==1)
						{
							document.getElementById("OffRampMessage").innerHTML="";
							document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessage>Your application has been submitted</span>";
						}
					}
				}
			} 
		});
	}
	/************************************************************************
	*
	*	Function Name:	AddWishList									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	function AddWishList(pIntJobId,pIntUserId,pIntStatus,pIntCompanyId)
	{

		document.getElementById("OffRampMessage").innerHTML="";
		document.getElementById("OffRampMessage").innerHTML="<img src=ImageFiles/indicator_medium.gif>";	
		var strResponse='';
		var url = 'GUIService/OffRamperService.php?action=add&func=wishlist&userid='+pIntUserId+'&jobid='+pIntJobId+'&compid='+pIntCompanyId; 
		var myRequest= new Ajax.Request(
			url, 
		{   
			method: 'post',
			onSuccess: function(transport) 
			{     
				strResponse=transport.responseText;//;
			
				if(strResponse==-1)
				{
					document.getElementById("OffRampMessage").innerHTML="";
					document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessageError>Error</span>";	
				}
				else if(strResponse==-2)
				{
					document.getElementById("OffRampMessage").innerHTML="";
					document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessageError>Job is already in wishlist</span>";	
				}
				
				else 
				{
					if(pIntStatus==0)
					{
						document.getElementById("DivJobsWishList").innerHTML=strResponse;
						document.getElementById("OffRampMessage").innerHTML="";
						document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessage>Job has been saved in wish list</span>";
					}
					else if(pIntStatus==1)
					{
						document.getElementById("OffRampMessage").innerHTML="";
						document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessage>Job has been saved in wish list</span>";						
					}
				}
			} 
		});
	}
	/************************************************************************
	*
	*	Function Name:	DeleteMyJob									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	function DeleteMyJob(pIntMyJobId,pIntJobId,pIntUserId,pIntStatus)
	{
		if(confirm('Are you sure want to delete?'))
		{	
			var strResponse='';
			document.getElementById("OffRampMessage").innerHTML="";
			var url = 'GUIService/OffRamperService.php?action=delete&func=myjob&userid='+pIntUserId+'&jobid='+pIntJobId+'&myJobId='+pIntMyJobId; 
			document.getElementById("OffRampMessage").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
			var myRequest= new Ajax.Request(
				url, 
			{   
				method: 'post',
				onSuccess: function(transport) 
				{     
					strResponse=transport.responseText;//;
				
					if(strResponse==-1)
					{
						document.getElementById("OffRampMessage").innerHTML="";
						document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessageError>Error</span>";	
					}
					else 
					{
						
						if(pIntStatus==0)
						{
							document.getElementById("DivMyJobs").innerHTML=strResponse;
							document.getElementById("OffRampMessage").innerHTML="";
							document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessage>Record deleted from My Jobs.</span>";
						}
						else if(pIntStatus==1)
						{
							document.getElementById("OffRampMessage").innerHTML="";
							document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessage>Record deleted from My Jobs.</span>";
						}
					}
				} 
			});
		}
	}
	/************************************************************************
	*
	*	Function Name:	DeleteWishlistJob									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	function DeleteWishlistJob(pIntJobWishListId,pIntUserId,pIntStatus)
	{
		if(confirm('Are you sure want to delete?'))
		{
			document.getElementById("OffRampMessage").innerHTML="";
			var strResponse='';
			var url = 'GUIService/OffRamperService.php?action=delete&func=wishlist&jobwishid='+pIntJobWishListId+'&uid='+pIntUserId; 
			document.getElementById("OffRampMessage").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
			var myRequest= new Ajax.Request(
				url, 
			{   
				method: 'post',
				onSuccess: function(transport) 
				{     
					strResponse=transport.responseText;
	
					
					if(strResponse==-1)
					{
						document.getElementById("OffRampMessage").innerHTML="";
						document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessageError>Error</span>";	
					}
					else 
					{
						if(pIntStatus==0)
						{
							document.getElementById("DivJobsWishList").innerHTML=strResponse;
							document.getElementById("OffRampMessage").innerHTML="";
							document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessage>Record deleted from My Wishlist.</span>";
						}
						else if (pIntStatus==1)
						{
							document.getElementById("OffRampMessage").innerHTML="";
							document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessage>Record deleted from My Wishlist.</span>";
						}
					}
					
				} 
			});
		}
	}
	/************************************************************************
	*
	*	Function Name:	GetMoreJobOpp									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function GetMoreJobOpp()
	{
			var url = 'GUIService/OffRamperService.php?action=morejob'; 
			// notice the use of a proxy to circumvent the Same Origin Policy. 
			document.getElementById("divMainContainer").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
			var myRequest= new Ajax.Request(
				url, 
			{   
				method: 'post',
				
				onSuccess: function(transport) 
				{     
					
					document.getElementById("divMainContainer").innerHTML=transport.responseText;
				} 
			});
	}
	
	/****************************************************************************************************
    * 	Function Name	: 	editLoginInfoForm() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	Gets the login info form along with the info from database
	*****************************************************************************************************/
	function editLoginInfoForm(pIntUserId)
	{
		
		//document.getElementById("personal").innerHTML="";
		var par ='userid='+pIntUserId;
		var url = 'GUIService/UserInfoService.php?action=loginInfoForm'; 
	
		document.getElementById("divDashBoard").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						}); 	
	}
	/****************************************************************************************************
    * 	Function Name	: 	editLoginInfo() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	Saves the editted login info to the database
	*****************************************************************************************************/
	/*
	function editLogInfo()
	{
		
		document.getElementById("passwordError").innerHTML="";
		document.getElementById("rePasswordError").innerHTML="";
		document.getElementById("emailError").innerHTML="";
		var strEmail= document.getElementById("email").value;
		if(document.getElementById("password").value=='')
		 {
			document.getElementById("passwordError").innerHTML="Field Required";
			return;
		 }
		
		else if(!CheckSpaces(document.getElementById("password").value))
		 {
				document.getElementById("passwordError").innerHTML="Invalid Data Entry";
				return;
		 }
		
		else if(document.getElementById("rePassword").value=='')
		 {
			document.getElementById("rePasswordError").innerHTML="Field Required";
			return;
		 }
		else if(!CheckSpaces(document.getElementById("rePassword").value))
		 {
				document.getElementById("rePasswordError").innerHTML="Invalid Data Entry";
				return;
		 }
		
		else if((document.getElementById("password").value)!=(document.getElementById("rePassword").value))
		 {
				document.getElementById("rePasswordError").innerHTML="Password fields do not match, please re-enter password";
				return;
		 }
	    else if(strEmail=='')
		{
			document.getElementById("emailError").innerHTML="Field Required";
			return;
		}
		else if(strEmail.indexOf('@')==-1) //arslanyahoo.com no @ aign
		{
			document.getElementById("emailError").innerHTML="Invalid email address";
			return;
		}
		else if(strEmail.indexOf('@')!=strEmail.lastIndexOf('@'))
		{
			document.getElementById("emailError").innerHTML="Invalid email address";
			return;
		}
		else
		{
			var chunks=strEmail.split('@');
			var user=chunks[0];
			if(!user || user.length==0)
			{
				document.getElementById("emailError").innerHTML="Invalid email address";
				return;
			}
			//get the user part of the email address and check it should not start with '.' or '-' also should not end with '.'
			if(user.substring(0,1)=='.'||user.substring(0,1)=='-'||user.substr(user.length-1,1)=='.')	
			{
				document.getElementById("emailError").innerHTML="Invalid email address";
				return;
			}
			if(!CheckValidCharacters(user))//check user name contains all valid characters
			{
				document.getElementById("emailError").innerHTML="Invalid email address";
				return;		
			}					
			//now get the domain part of the email address
			domain=chunks[1];
			if(!CheckDomain(domain))
			{
				document.getElementById("emailError").innerHTML="Invalid email address";
				return;
			}
			else
			{
				var url = 'GUIService/UserInfoService.php?action=editLoginInfo'; 
				var par='userName='+document.getElementById("username").value+'&password='+document.getElementById("password").	
				value+'&email='+document.getElementById("email").value;
				var myRequest= new Ajax.Request(
									url, 
									{   
										method: 'post',
										parameters:par,
										onSuccess: function(transport) 
										{   
											if(transport.responseText==1)
											{
												window.location="index.php?q=offramperuser";	
											}
										} 
									});
			}//else ends
		}//outer else ends

	}
	*/
	/****************************************************************************************************
    * 	Function Name	: 	editPersonalInfoForm() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	Gets the personal info form along with the info from database
	*****************************************************************************************************/
	/*function editPersonalInfoForm(pIntUserId)
	{
		//document.getElementById("login").innerHTML="";
		var par='userId='+pIntUserId;
		var url = 'GUIService/UserInfoService.php?action=personalInfoForm'; 
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
									strResponse=transport.responseText;//;
									strResponse=strResponse.split("+");
							 		document.getElementById("divDashBoard").innerHTML=strResponse[2];
									GetStatesByCountryId(strResponse[0],strResponse[1]);
									//GetCitiesByStateId(strResponse[1]);
							} 
						}); 
	}
	*/
	/****************************************************************************************************
    * 	Function Name	: 	editProfessionalInfoForm() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	Gets the professional info form along with the info from database
	*****************************************************************************************************/
	function editProfessionalInfoForm(pIntUserId)
	{
		//document.getElementById("login").innerHTML="";
		var par='userId='+pIntUserId;
		var url = 'GUIService/OffRamperService.php?action=professionalInfoForm'; 
		
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						}); 
	}
		
	/****************************************************************************************************
    * 	Function Name	: 	viewProfessionalInfoForm() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	Gets the professional info form along with the info from database
	*****************************************************************************************************/
	function viewProfessionalInfoForm(pIntUserId)
	{
		//document.getElementById("login").innerHTML="";
		var par='userId='+pIntUserId;
		var url = 'GUIService/OffRamperService.php?action=professionalInfoView'; 
		
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						}); 
	}
	/****************************************************************************************************
    * 	Function Name	: 	addEducationRecordForm() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	Gets the educational info form to add educational record
	*****************************************************************************************************/
	function addEducationRecordForm(pIntUserId)
	{
		var par='userId='+pIntUserId;
		var url = 'GUIService/EducationService.php?action=educationAddForm';  
		
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						}); 
	}
	/****************************************************************************************************
    * 	Function Name	: 	addWorkRecordForm() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	work record info form						              
	*************************************************************************************************/ 
	function addWorkRecordForm(pIntUserId)
	{
			
		var url = 'GUIService/ProgramManagerService.php?action=workRecord'; 
		var par='userId='+pIntUserId;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						});
	}
	/****************************************************************************************************
    * 	Function Name	: 	addProfRecord() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	add professional record to database						              
	*************************************************************************************************/ 
	function  addProfRecord(pIntUserId)
	{
		document.getElementById('empNameError').innerHTML="";
		 document.getElementById('fromDateError').innerHTML="";
		 document.getElementById('toDateError').innerHTML="";
		 document.getElementById('titleError').innerHTML="";
		 document.getElementById('industryError').innerHTML="";
		 document.getElementById('industryExpError').innerHTML="";
		 document.getElementById('accomplishmentError').innerHTML="";
		
		
		if(document.getElementById("empName").value=='')
		{
			document.getElementById("empNameError").innerHTML="Field Required";
			return;
		}
		else if(!CheckSpaces(document.getElementById("empName").value))
		 {
				document.getElementById("empNameError").innerHTML="Invalid Data Entry";
				return;
		 }
		else if(document.getElementById("fromDate").value=='')
		{
			document.getElementById("fromDateError").innerHTML="Field Required";
			return;
		}
		else if(document.getElementById("toDate").value=='')
		{
			document.getElementById("toDateError").innerHTML="Field Required";
			return;
		}
		else if(document.getElementById("title").value=='')
		{
			document.getElementById("titleError").innerHTML="Field Required";
			return;
		}
		else if(!CheckSpaces(document.getElementById("title").value))
		 {
				document.getElementById("titleError").innerHTML="Invalid Data Entry";
				return;
		 }

		else if(document.getElementById("cmbIndustry").value=='')
		{
			document.getElementById("industryError").innerHTML="Field Required";
			return;
		}
		else if(document.getElementById("industryExp").value=='')
		{
			document.getElementById("industryExpError").innerHTML="Field Required";
			return;
		}
		
		else if(document.getElementById("acomplishments").value=='')
		{
			document.getElementById("accomplishmentError").innerHTML="Field Required";
			return;
		}
		else if(!CheckSpaces(document.getElementById("acomplishments").value))
		 {
				document.getElementById("accomplishmentError").innerHTML="Invalid Data Entry";
				return;
		 }

		else
		{
			var url = 'GUIService/ProgramManagerService.php?action=addProfInfo'; 
			 var par='userId='+pIntUserId
			 		 +'&empName='+document.getElementById("empName").value	
			 		 +'&fromDate='+document.getElementById("fromDate").value
			 		 +'&toDate='+document.getElementById("toDate").value
					 +'&title='+document.getElementById("title").value
					 +'&cmbIndustry='+document.getElementById("cmbIndustry").value
					 +'&industryExp='+document.getElementById("industryExp").value
					 +'&acomplishments='+document.getElementById("acomplishments").value;
			
			
			var myRequest= new Ajax.Request(
				url, 
				{   
					method: 'post',
					parameters:par,
					onSuccess: function(transport) 
					{
						if(transport.responseText==1)
						{
							window.location="index.php?q=offramperuser";
						}
					} 
				});
			} 
	}
	/************************************************************************
	*	Function Name:	GetStatesByCountryId									
	*	Author Name: 	Ramish Hashmi										
	*************************************************************************/	
	/*function GetStatesByCountryId(pIntCountryId,pIntStateId)
	{
		if(pIntCountryId==0)
		{
			pIntCountryId=document.getElementById("cmbCountry").value;	
		}
		var url = 'GUIService/CountryService.php?action=editstate&cid='+pIntCountryId+'&sid='+pIntStateId;
		document.getElementById("DivState").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
		var myRequest= new Ajax.Request(
			url, 
		{   
			method: 'post',
			onSuccess: function(transport) 
			{     
				document.getElementById("DivState").innerHTML=transport.responseText;
				//GetCitiesByStateId(document.getElementById("cmbState").value);
			} 
		});
		
		
	}*/
	
	
	/************************************************************************
	*
	*	Function Name:	GetCitiesByStateId									
	*	Author Name: 	Ramish Hashmi
	*																		
	*************************************************************************/	
/*	function GetCitiesByStateId(pIntStateId)
	{
		if(pIntStateId==0)
		{
			pIntStateId=document.getElementById("cmbState").value;	
		}
		var url = 'GUIService/CountryService.php?action=city&sid='+pIntStateId;
		document.getElementById("DivCity").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
		var myRequest= new Ajax.Request(
			url, 
		{   
			method: 'post',
			
			onSuccess: function(transport) 
			{     
				document.getElementById("DivCity").innerHTML=transport.responseText;
			} 
		});
		
		
	}*/
	/************************************************************************
	*	Function Name:	GetStatesByCountryId									
	*	Author Name: 	Ramish Hashmi										
	*************************************************************************/	
	/*function GetStatesByCountryId(pIntStateId)
	{
		//if(pIntCountryId==0)
		//{
			pIntCountryId=document.getElementById("country").value;	
		//}
		
		var url = 'GUIService/OffRamperService.php?action=state&cid='+pIntCountryId;//+'&sid=+'pIntStateId;
		var par='sId='+pIntStateId;
		document.getElementById("DivState").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
		var myRequest= new Ajax.Request(
			url, 
		{   
			method: 'post',
			parameters:par,
			onSuccess: function(transport) 
			{     
				document.getElementById("DivState").innerHTML=transport.responseText;
				GetCitiesByStateId(1,pIntStateId);
			} 
		});
		
	}
	
	*/
	/************************************************************************
	*
	*	Function Name:	GetCitiesByStateId									
	*	Author Name: 	Ramish Hashmi
	*																		
	*************************************************************************/	
	/*function GetCitiesByStateId(pIntCityId,pIntStateId)
	{
		if(pIntStateId==0)
		{
			pIntStateId=document.getElementById("cmbState").value;	
		}
		var url = 'GUIService/OffRamperService.php?action=statecity&cid='+pIntCityId;
		var par='sId='+pIntStateId;
		document.getElementById("DivCity").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
		var myRequest= new Ajax.Request(
			url, 
		{   
			method: 'post',
			parameters:par,
			onSuccess: function(transport) 
			{     
				document.getElementById("DivCity").innerHTML=transport.responseText;
			} 
		});
		
	}*/
	/****************************************************************************************************
    * 	Function Name	: 	editPerInfo() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	Updates the personal info in the database
	*****************************************************************************************************/
    /* function editPerInfo(pIntUserId)
	 {
		
		 document.getElementById('firstNameError').innerHTML="";
		 document.getElementById('middleNameError').innerHTML="";
		 document.getElementById('lastNameError').innerHTML="";
		 document.getElementById('address1Error').innerHTML="";
		 document.getElementById('address2Error').innerHTML="";
		 document.getElementById('phone1Error').innerHTML="";
		 document.getElementById('cityError').innerHTML="";
		 document.getElementById('stateError').innerHTML="";
		
		if(document.getElementById("firstName").value=='')
		 {
			document.getElementById("firstNameEror").innerHTML="Field Required";
			return;
		 }
		 
		else if(!CheckSpaces(document.getElementById("firstName").value))
		 {
				document.getElementById("firstNameError").innerHTML="Invalid Data Entry";
				return;
		 }
		 
		else if(document.getElementById("middleName").value!='')
		 {
			if(!CheckSpaces(document.getElementById("middleName").value))
		 	 {
				document.getElementById("middleNameError").innerHTML="Invalid Data Entry";
				return;
		 	}
		 }	 
	   else if(document.getElementById("lastName").value=='')
		{
			document.getElementById("lastNameEror").innerHTML="Field Required";
			return;
		}
		
	   else if(!CheckSpaces(document.getElementById("lastName").value))
	    {
			document.getElementById("lastNameError").innerHTML="Invalid Data Entry";
			return;
		}	
	   
	   else if(document.getElementById("address1").value=='')
		{
			document.getElementById("address1Error").innerHTML="Field Required";
			return;
		}
	   else if(!CheckSpaces(document.getElementById("address1").value))
		{
				document.getElementById("address1Error").innerHTML="Invalid Data Entry";
				return;
		}
	   
	   else if(document.getElementById("address2").value!='')
		 {
		    if(!CheckSpaces(document.getElementById('address2').value))
		 	  {
				document.getElementById("address2Error").innerHTML="Invalid Data Entry";
				return;
			 }
	    }	
	  
	   if(document.getElementById('city').value=='')
		 {	
			document.getElementById("cityError").innerHTML="Field Required";
			return;
	     }
		   
	  else if(!CheckSpaces(document.getElementById('city').value))
		 {
			document.getElementById("cityError").innerHTML="Invalid Data Entry";
			return;
		 }
	   else if((document.getElementById('cmbCountry').value==3)&&(document.getElementById('cmbState').value==''))
		 {
			document.getElementById("stateError").innerHTML="Field Required";
			return;
		 }	 
	  else if(document.getElementById("zipCode").value=='')
		{
			document.getElementById("zipCodeError").innerHTML="Field Required";
			return;
		}
	   else if(document.getElementById("zipCode").value.length<5)
		{
			document.getElementById("zipCodeError").innerHTML="Invalid Zip Code";
			return;
		}
	  else if(document.getElementById("phone1").value=='')
		{
			document.getElementById("phone1Error").innerHTML="Field Required";
			return;
		}
	  else if(!CheckSpaces(document.getElementById('phone1').value))
		{
			document.getElementById("phone1Error").innerHTML="Invalid Data Entry";
			return;
		}	 	
	  else //save to the database... HERE!!!!
		{

			 var url = 'GUIService/UserInfoService.php?action=editPersonalInfo&uid='+pIntUserId; 
			
			var par='userName='+pIntUserId
			 		 +'&firstName='+document.getElementById("firstName").value
			 		 +'&middleName='+document.getElementById("middleName").value
					 +'&lastName='+document.getElementById("lastName").value
					 +'&suffix='+document.getElementById("suffix").value
					 +'&address1='+document.getElementById("address1").value
					 +'&address2='+document.getElementById("address2").value
					 +'&country='+document.getElementById("cmbCountry").value
					 +'&city='+document.getElementById("city").value
					 +'&state='+document.getElementById("cmbState").value
					 +'&zipCode='+document.getElementById("zipCode").value
					 +'&phone1='+document.getElementById("phone1").value
					 +'&phone2='+document.getElementById("phone2").value;

			
			 var myRequest= new Ajax.Request(
				url, 
				{   
					method: 'post',
					parameters:par,
					onSuccess: function(transport) 
					{   
						if(transport.responseText==1)
						{
							window.location="index.php?q=offramperuser";
						}
						
					} 
				});
		}
	}*/
	/****************************************************************************************************
    * 	Function Name	: 	editProfInfo() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	Updates the profesional info in the database
	*****************************************************************************************************/
	function editProfInfo(pIntUserId)
	{
		 document.getElementById('hireDateError').innerHTML="";
		 document.getElementById('departureDateError').innerHTML="";
		 document.getElementById('titleError').innerHTML="";
		 document.getElementById('departmentError').innerHTML="";
		 document.getElementById('managerError').innerHTML="";
		 document.getElementById('acomplishmentError').innerHTML="";
		// document.getElementById('reasonError').innerHTML="";
		
		if(document.getElementById("hireDate").value=='')
		{
			document.getElementById("hireDateError").innerHTML="Field Required";
			return;
		}
		else if(document.getElementById("departureDate").value=='')
		{
			document.getElementById("departureDateError").innerHTML="Field Required";
			return;
		}
		else if(document.getElementById("title").value=='')
		{
			document.getElementById("titleError").innerHTML="Field Required";
			return;
		}
		else if(document.getElementById("department").value=='')
		{
			document.getElementById("departmentError").innerHTML="Field Required";
			return;
		}
		else if(document.getElementById("manager").value=='')
		{
			document.getElementById("managerError").innerHTML="Field Required";
			return;
		}
		else if(document.getElementById("acomplishment").value=='')
		{
			document.getElementById("acomplishmentError").innerHTML="Field Required";
			return;
		}
		
		else
		{
			var url = 'GUIService/OffRamperService.php?action=edit&uid='+pIntUserId; 
			 var par='userId='+pIntUserId
			 		 +'&hireDate='+document.getElementById("hireDate").value
			 		 +'&departureDate='+document.getElementById("departureDate").value
					 +'&title='+document.getElementById("title").value
					 +'&department='+document.getElementById("department").value
					 +'&manager='+document.getElementById("manager").value
					 +'&acomplishment='+document.getElementById("acomplishment").value
					 +'&reason='+document.getElementById("cmbReason").value;
			 var myRequest= new Ajax.Request(
				url, 
				{   
					method: 'post',
					parameters:par,
					onSuccess: function(transport) 
					{   
					
						if(transport.responseText==1)
						{
							window.location="index.php?q=offramperuser";
						}
						
						//document.getElementById("divDashBoard").innerHTML=transport.responseText;
					} 
				});
		}
	}
	/****************************************************************************************************
    * 	Function Name	: 	addEdRecord() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	Adds the Educational Record for the
	*****************************************************************************************************/
   	function addEdRecord(pIntUserId)
   	{
		document.getElementById('collegeError').innerHTML="";
		 document.getElementById('degreeTypeError').innerHTML="";
		 document.getElementById('conAreaError').innerHTML="";
		 document.getElementById('certificationsError').innerHTML="";
		 document.getElementById('eduLevelError').innerHTML="";
		
		if(document.getElementById("eduLevel").value=='')
		{
			document.getElementById("eduLevelError").innerHTML="Field Required";
			return;
		}
		else if(!CheckSpaces(document.getElementById('eduLevel').value))
		{
			document.getElementById("eduLevelError").innerHTML="Invalid Data Entry";
			return;
		}
		else if(document.getElementById("college").value=='')
		{
			document.getElementById("collegeError").innerHTML="Field Required";
			return;
		}
		else if(!CheckSpaces(document.getElementById('college').value))
		{
			document.getElementById("collegeError").innerHTML="Invalid Data Entry";
			return;
		}
		else if(document.getElementById("degreeType").value=='')
		{
			document.getElementById("degreeTypeError").innerHTML="Field Required";
			return;
		}
		else if(!CheckSpaces(document.getElementById('degreeType').value))
		{
			document.getElementById("degreeTypeError").innerHTML="Invalid Data Entry";
			return;
		}
		else if(document.getElementById("conArea").value=='')
		{
			document.getElementById("conAreaError").innerHTML="Field Required";
			return;
		}
		else if(!CheckSpaces(document.getElementById('conArea').value))
		{
			document.getElementById("conAreaError").innerHTML="Invalid Data Entry";
			return;
		}
		
	    if(document.getElementById("certifications").value!='')
		{
			if(!CheckSpaces(document.getElementById('certifications').value))
			{
				document.getElementById("certificationsError").innerHTML="Invalid Data Entry";
				return;
			}
		}
		
		//else
		//{
			var url = 'GUIService/EducationService.php?action=addEducationInfo&uid='+pIntUserId; 
			 var par='userId='+pIntUserId
			 		 +'&eduLevel='+document.getElementById("eduLevel").value	
			 		 +'&college='+document.getElementById("college").value
			 		 +'&degreeType='+document.getElementById("degreeType").value
					 +'&conArea='+document.getElementById("conArea").value
					 +'&certifications='+document.getElementById("certifications").value
					 +'&awards='+document.getElementById("awards").value
					 +'&experience='+document.getElementById("experience").value;
			
			 var myRequest= new Ajax.Request(
				url, 
				{   
					method: 'post',
					parameters:par,
					onSuccess: function(transport) 
					{   
						if(transport.responseText==1)
						{
							window.location="index.php?q=offramperuser";
						}
						//document.getElementById("divDashBoard").innerHTML=transport.responseText;
					} 
				});
			//}
		}
	/****************************************************************************************************
    * 	Function Name	: 	viewEducationForm() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	Gets the eductional record from the database
	*****************************************************************************************************/
	function viewEducationForm(pIntUserId)
	{
		var par='userId='+pIntUserId;
		var url = 'GUIService/EducationService.php?action=educationalInfoView'; 
	
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						}); 
		
	}
	/****************************************************************************************************
    * 	Function Name	: 	ViewEducationRecord() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	Gets one single eductional record from the database
	*****************************************************************************************************/
	 function ViewEducationRecord(pEducationId)
	 {
		var url = 'GUIService/EducationService.php?action=educationalInfoComplete'; 
		var par='edId='+pEducationId;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						}); 
		 }
	/****************************************************************************************************
    * 	Function Name	: 	EditEducationRecord() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	gets the educational record edit form						              
	*************************************************************************************************/	 
	function EditEducationRecord(pEducationId)
	{
		var url = 'GUIService/EducationService.php?action=editEducationInfoForm'; 
		var par='edId='+pEducationId;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						}); 
		 }
	
	/****************************************************************************************************
    * 	Function Name	: 	editEdRecord() 
	* 	Author			: 	Ramish Hashmi
	* 	Synopsis		: 	edit the educational record and save to  database					              
	*************************************************************************************************/	 
	/* function editEdRecord(pEducationId)
	 {
		  document.getElementById('collegeError').innerHTML="";
		 document.getElementById('degreeTypeError').innerHTML="";
		 document.getElementById('conAreaError').innerHTML="";
		 document.getElementById('certificationsError').innerHTML="";
		 document.getElementById('eduLevelError').innerHTML="";
		
		if(document.getElementById("eduLevel").value=='')
		{
			document.getElementById("eduLevelError").innerHTML="Field Required";
			return;
		}
		
		else if(!CheckSpaces(document.getElementById('eduLevel').value))
		{
			document.getElementById("eduLevelError").innerHTML="Invalid Data Entry";
			return;
		}
		
		else if(document.getElementById("college").value=='')
		{
			document.getElementById("collegeError").innerHTML="Field Required";
			return;
		}
		
		else if(!CheckSpaces(document.getElementById('college').value))
		{
			document.getElementById("collegeError").innerHTML="Invalid Data Entry";
			return;
		}
		
		else if(document.getElementById("degreeType").value=='')
		{
			document.getElementById("degreeTypeError").innerHTML="Field Required";
			return;
		}
		
		else if(!CheckSpaces(document.getElementById('degreeType').value))
		{
			document.getElementById("degreeTypeError").innerHTML="Invalid Data Entry";
			return;
		}
		
		else if(document.getElementById("conArea").value=='')
		{
			document.getElementById("conAreaError").innerHTML="Field Required";
			return;
		}
		
		else if(!CheckSpaces(document.getElementById('conArea').value))
		{
			document.getElementById("conAreaError").innerHTML="Invalid Data Entry";
			return;
		}
		
	   if(document.getElementById("certifications").value!='')
		{
			 if(!CheckSpaces(document.getElementById('certifications').value))
			 {
				document.getElementById("certificationsError").innerHTML="Invalid Data Entry";
				return;
			 }
		}
		else
		{
			var url = 'GUIService/EducationService.php?action=editEducation'; 
			 var par='pEducationId='+pEducationId
			 		 +'&eduLevel='+document.getElementById("eduLevel").value	
			 		 +'&college='+document.getElementById("college").value
			 		 +'&degreeType='+document.getElementById("degreeType").value
					 +'&conArea='+document.getElementById("conArea").value
					 +'&certifications='+document.getElementById("certifications").value
					 +'&awards='+document.getElementById("awards").value
					 +'&experience='+document.getElementById("experience").value;
			
			var myRequest= new Ajax.Request(
				url, 
				{   
					method: 'post',
					parameters:par,
					onSuccess: function(transport) 
					{
						if(transport.responseText==1)
						{
							window.location="index.php?q=offramperuser";
						}
					} 
				});
			} 
		 
	 }*/
	
	/***************************************************************************
    * 	Function Name	: 	CheckDomain() 
	* 	Synopsis		: 	Check for valid domain
	****************************************************************************/
	function CheckDomain(domain)
	{
		var flag = true;
		if(!domain || domain.length==0)
			flag = false;
		
		/*domain name should not start or end with . or -*/
		if(domain.substring(0,1)=='.' || domain.substring(0,1)=='-' || domain.substr(domain.length-1,1)=='.' || domain.substr(																														
		   domain.length-1,1)=='-')
			flag =  false;
		
		if(domain.indexOf('.')==-1)/*msn.co.uk , yahoo.com*/
			flag =  false;
		
		/*domain name should contain valid characters*/
		if(!CheckValidCharacters(domain))
			flag =  false;
		
		return flag;
	}//end function
			
	/***************************************************************************
    * 	Function Name	: 	CheckValidCharacters() 
	* 	Synopsis		: 	Check for valid input string charecters
	****************************************************************************/
	function CheckValidCharacters(string)
	{
		if(!string || string.length==0)
		{
			return false;
		}
		for(var i=0;i<string.length;i++)
		{
			code=string.charCodeAt(i);
			/*if user name has . or - or _ in anywhere in user name, and also between a-z,0-9, caps does not matter*/
			if(code==45 || code==46 || code==95 || (code>47 && code<58) || (code>96 && code<123) || (code>64 && code<91))
			{
				continue;
			}
			else
			{
				return false;
			}		
		}
		return true;
	}//end function
	/***************************************************************************
    * 	Function Name	: 	CheckNumbers() 
	* 	Synopsis		: 	Check for valid input string charecters
	****************************************************************************/
	function CheckNumbers(string)
	{
		
		
		for(var i=0;i<string.length;i++)
		{
			code=string.charCodeAt(i);
			/*if user name has . or - or _ in anywhere in user name, and also between a-z,0-9, caps does not matter*/
			
			if((code>=48) &&(code<=57))
			{
				continue;
			}
			else
			{
				return false;
			}		
		}
		return true;
	}//end function
	/************************************************************************
	*
	*	Function Name:	PaggingJobOpportunities									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function PaggingJobOpportunities(pIntUserId,pIntStartIndex,pIndeEndIndex,pIntPageNo,pIntTotalPage,pStatus,pIntTotalRecord,pIntLimit,pIntDashBoard,pIntCompanyId)
	{
		
		if(pStatus==2)
		{
				pIntPageNo=pIntPageNo-1;
				pIntStartIndex=pIntStartIndex-pIntLimit;
				pIndeEndIndex=pIntLimit;
		}
		else
		{
			if(pIntPageNo==pIntTotalPage)
			{
				pIntStartIndex=pIntTotalRecord-pIntLimit;
				pIndeEndIndex=pIntLimit;
			}
			else
			{
				pIntPageNo=pIntPageNo+1;
				pIntStartIndex=pIntStartIndex+pIntLimit;
				pIndeEndIndex=pIntLimit;
			}	
		}
		
		if(pStatus==4)
		{
			pIntStartIndex=pIntTotalPage*pIntLimit-pIntLimit;	
			
		}
		if(pStatus==1)
		{
			pIntStartIndex=0;	
			pIndeEndIndex=pIntLimit;
			
		}
		
		if(pIntDashBoard==0)
		{
			document.getElementById("divJobOpportunities").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
		else
		{
			document.getElementById("divDashBoard").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
		var url = 'GUIService/JobsService.php?action=joboppoff&pStart='+pIntStartIndex+'&pEnd='+pIndeEndIndex+'&uid='+pIntUserId+'&pPid='+pIntPageNo+'&pStatus='+pIntDashBoard+'&compid='+pIntCompanyId; 
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							onSuccess: function(transport) 
							{ 
								if(pIntDashBoard==0)
								{	
									document.getElementById("divJobOpportunities").innerHTML=transport.responseText;
								}
								else
								{
									document.getElementById("divDashBoard").innerHTML=transport.responseText;
								}
								
							} 
						}); 
	}
	/************************************************************************
	*
	*	Function Name:	GetJobDetail									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function GetJobDetail(pIntUserId,pIntJobId)
	{
		var url = 'GUIService/JobsService.php?action=jobdetail&jobId='+pIntJobId+'&uid='+pIntUserId; 
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							onSuccess: function(transport) 
							{ 
								
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						}); 
	}
	/************************************************************************
	*
	*	Function Name:	GetResponseDetail									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	/*
	function GetResponseDetail(pIntScheduleId)
	{
		
		var url = 'GUIService/OffRamperService.php?action=responsedetail&schid='+pIntScheduleId; 
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							onSuccess: function(transport) 
							{ 
								
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						}); 
			
	}*/
	/************************************************************************
	*
	*	Function Name:	UpdateScheduleStatus									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	/*
	function UpdateScheduleStatus(pIntScheduleId,pIntStatus,pIntUserId)
	{
		var url = 'GUIService/OffRamperService.php?action=updateschedule&scheId='+pIntScheduleId+'&intStatus='+pIntStatus+'&uid='+pIntUserId; 
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							onSuccess: function(transport) 
							{ 
								if(pIntStatus==2)
								{
									document.getElementById("DivMsgResponses").innerHTML="<span class=successmsg>Accepted</span>";
								}
								else if (pIntStatus==3)
								{
									document.getElementById("DivMsgResponses").innerHTML="<span class=successmsg>Rejected</span>";
								}
							
							} 
						}); 	
	}
	*/
	/************************************************************************
	*
	*	Function Name:	GetScheduleUpdateHtml									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	/*function GetScheduleUpdateHtml(pIntScheduleId,pIntStatus)
	{
		var strHtml='';
		strHtml+='<form id="frmUpdateSchedule" name="frmUpdateSchedule">';
		strHtml+='<table width="100%" border="0" cellspacing="0" cellpadding="2">';
		strHtml+='<tr>';
		strHtml+='<td width="35%" align="left" valign="top" class="BodyHeadingTwo">Interview Date:</td>';
		strHtml+='<td width="65%" align="left"><input type="text" value="2008-08-05" id="txtInterviewDate" name="txtInterviewDate" class="BodyInputTextOne" />';
		strHtml+='&nbsp;<input type="button" value="....." onclick="displayCalendar(document.forms[0].txtInterviewDate,\'yyyy/mm/dd\',this)" class="ButtonStyle">';
		strHtml+='</td>';
		strHtml+='</tr>';
		strHtml+='<tr>';
		strHtml+='<td align="left" valign="top" class="BodyHeadingTwo">Interview Time:</td>';
		strHtml+='<td><span class="BodyText">Hours : ';
		strHtml+='<select name="cmbHours" id="cmbHours" class="BodyText">';
		
		strHtml+='<option value="00">00</option>';
		strHtml+='<option value="01">01</option>';
		strHtml+='<option value="02">02</option>';
		strHtml+='<option value="03">03</option>';
		strHtml+='<option value="04">04</option>';
		strHtml+='<option value="05">05</option>';
		strHtml+='<option value="06">06</option>';
		strHtml+='<option value="07">07</option>';
		strHtml+='<option value="08">08</option>';
		strHtml+='<option value="09">09</option>';
		strHtml+='<option value="10">10</option>';
		strHtml+='<option value="11">11</option>';
		strHtml+='<option value="12">12</option>';
		strHtml+='<option value="13">13</option>';
		strHtml+='<option value="14">14</option>';
		strHtml+='<option value="15">15</option>';
		strHtml+='<option value="16">16</option>';
		strHtml+='<option value="17">17</option>';
		strHtml+='<option value="18">18</option>';
		strHtml+='<option value="19">19</option>';
		strHtml+='<option value="20">20</option>';
		strHtml+='<option value="21">21</option>';
		strHtml+='<option value="22">22</option>';
		strHtml+='<option value="23">23</option>';
		strHtml+='</select>';
		strHtml+='&nbsp;';
		strHtml+='Minutes :</span>';
		strHtml+='<select class="eBodyText" name="cmbMinutes" id="cmbMinutes">';
			
		for(var i=0;i<60;i+=15)
		{
			if(i==0)
			{
				 strHtml+='<option value="00">00</option>';
			}
			else
			{
				 strHtml+='<option value='+i+'>'+i+'</option>';
			}	
		}
			
		strHtml+='</select></td>';
		strHtml+='</tr>';
		strHtml+='<tr>';
		strHtml+='<td>&nbsp;</td>';
		strHtml+='<td>&nbsp;</td>';
		strHtml+='</tr>';
		strHtml+='</table></form>';
		
		document.getElementById("DivScheHtml").innerHTML=strHtml;
		var strButtonHtml='<a href="#" onClick="UpdateInterivew('+pIntScheduleId+','+pIntStatus+')"><img src="../../IncludeFiles/CSS/images/update-button.jpg"></a>&nbsp;';
		strButtonHtml+='<a href="#" onClick="BackDashBoard()"><img src="../../IncludeFiles/CSS/images/backtoboard-button.jpg"></a>';
	
		document.getElementById("DivButton").innerHTML=strButtonHtml;
	}
	*/
	/************************************************************************
	*
	*	Function Name:	UpdateInterivew									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	/*
	function UpdateInterivew(pIntScheduleId,pIntStatus)
	{
	
		var url = 'GUIService/ResponsesService.php?action=changeschedule'; 
		var strNtime=document.getElementById("cmbHours").value+':'+document.getElementById("cmbMinutes").value;
		var par='sceid='+pIntScheduleId+'&status='+pIntStatus+'&ndate='+document.getElementById("txtInterviewDate").value+'&ntime='+strNtime;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{ 
								
								document.getElementById("DivMsgResponses").innerHTML="<span class='BodyTextMessage'>Your schedule has been updated successfully.</span>";
							} 
						}); 	
	}*/
	/************************************************************************
	*
	*	Function Name:	BackDashBoard									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	/*
	function BackDashBoard()
	{
		window.location="index.php?q=offramperuser";	
	}
	*/
	/***************************************************************************
    * 	Function Name	: 	CheckSpaces() 
	* 	Synopsis		: 	Check for spaces and valid string input
	*	Author			:	Ramish Hashmi
	****************************************************************************/
	function CheckSpaces(string)
	{
		if(!string || string.length==0)
		{
			return false;
		}
		code=string.charCodeAt(0);
		if(code == 32)
		{
			return false
		}
		else
		{
			return true;
		}
	}
	/************************************************************************
	*
	*	Function Name:	GetEventDetailById									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	function GetEventDetailById(pIntEventId, pIntUserId)
	{
		var currentLgdInUsr = 0;
		if(document.getElementById('info'))
			currentLgdInUsr = document.getElementById('info').innerHTML;
		var url = 'GUIService/EventService.php?action=eventdetail&eventid='+pIntEventId+'&uid='+pIntUserId+'&cuid='+currentLgdInUsr;
		var myRequest= new Ajax.Request(
		url, 
		{   
			method: 'post',
			onSuccess: function(transport) 
			{     
				document.getElementById("divDashBoard").innerHTML=transport.responseText;
			} 
		});
	}
	/************************************************************************
	*
	*	Function Name:	AcceptRejectNetwork									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/	
	function AcceptRejectNetwork(pIntInvitationId,pIntStatus,pIntUserId,pIntNetworkId)
	{
		
		var url = 'GUIService/NetworkService.php?action=invitationstatus&inviteid='+pIntInvitationId+'&statusid='+pIntStatus+'&networkid='+pIntNetworkId+'&userid='+pIntUserId;
		var myRequest= new Ajax.Request(
		url, 
		{   
			method: 'post',
			onSuccess: function(transport) 
			{     
				window.location="index.php?q=offramperuser";
			} 
		});
	}
	/************************************************************************
	*
	*	Function Name:	GetNewtorkUserByNetworkId									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/						
	function GetNewtorkUserByNetworkId(pIntUserId,pIntNetworkId)
	{
			
		var url = 'GUIService/NetworkService.php?action=networkuser&userid='+pIntUserId+'&network='+pIntNetworkId;
		var myRequest= new Ajax.Request(
		url, 
		{   
			method: 'post',
			onSuccess: function(transport) 
			{     
				document.getElementById("divDashBoard").innerHTML=transport.responseText;
			} 
		});
	}
	/************************************************************************
	 *	Function Name:	backToDashboard									
	 *	Author Name: 	Nabeel Bin Ezad																		
	 *************************************************************************/
	/*function backToDashboard()
	 {
		window.location="index.php?q=offramperuser";	
	 }*/
	 /************************************************************************
	*
	*	Function Name:	PaggingMyJobs									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function PaggingMyJobs(pIntUserId,pIntStartIndex,pIndeEndIndex,pIntPageNo,pIntTotalPage,pStatus,pIntTotalRecord,pIntLimit,pIntDashBoard)
	{
		if(pStatus==2)
		{
				pIntPageNo=pIntPageNo-1;
				pIntStartIndex=pIntStartIndex-pIntLimit;
				pIndeEndIndex=pIntLimit;
		}
		else
		{
			if(pIntPageNo==pIntTotalPage)
			{
				pIntStartIndex=pIntTotalRecord-pIntLimit;
				pIndeEndIndex=5;
			}
			else
			{
				pIntPageNo=pIntPageNo+1;
				pIntStartIndex=pIntStartIndex+pIntLimit;
				pIndeEndIndex=pIntLimit;
			}	
		}
		
		if(pStatus==4)
		{
			pIntStartIndex=pIntTotalPage*pIntLimit-pIntLimit;	
			
		}
		if(pStatus==1)
		{
			pIntStartIndex=0;	
			pIndeEndIndex=pIntLimit;
			
		}
		
		if(pIntDashBoard==0)
		{
			document.getElementById("DivMyJobs").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
		else
		{
			document.getElementById("divDashBoard").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
		var url = 'GUIService/JobsService.php?action=pagemyjob&pStart='+pIntStartIndex+'&pEnd='+pIndeEndIndex+'&uid='+pIntUserId+'&pPid='+pIntPageNo+'&pStatus='+pIntDashBoard; 
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							onSuccess: function(transport) 
							{ 
								if(pIntDashBoard==0)
								{	
									document.getElementById("DivMyJobs").innerHTML=transport.responseText;
								}
								else
								{
									document.getElementById("divDashBoard").innerHTML=transport.responseText;
								}
							} 
						}); 
	}
	/************************************************************************
	*
	*	Function Name:	GetAllMyJobs									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function GetAllMyJobs(pIntUserId)
	{
		var url = 'GUIService/JobsService.php?action=getAllMyJobs';
		var par = 'userId='+pIntUserId;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						});	
	}
	/************************************************************************
	*	Function Name	:	SearchJobRfrsh									
	*	Author Name		: 	Adil Khan
	*	Description		:	Refreshes the Job Opportunities Panel 																
	*************************************************************************/	
	function SearchJobRfrsh(pIntUserId, pIntCompId)
	{	
		var url = 'GUIService/JobsService.php?action=offjobssort&pStatus=1&compId='+pIntCompId +'&uid='+pIntUserId + '&pStart=0'  + '&pEnd=5' + '&pPid=1' + '&pSort=0'; 
		var par= '';
		
		var myRequest= new Ajax.Request(
					url, 
					{   
						method: 'post',
						parameters:par,
						onSuccess: function(transport) 
						{	
							document.getElementById("divJobOpportunities").innerHTML=transport.responseText;							
						} 
					}); 
	}	

	/************************************************************************
	*	Function Name	:	SearchJobRfrsh									
	*	Author Name		: 	Adil Khan
	*	Description		:	Refreshes the Search Job Panel on Offrampers panel 																
	*************************************************************************/	
	function SearchJobRfrsh(pIntUserId, pIntCompId)
	{
		var url = 'GUIService/JobsService.php?action=srchjobrfrsh&uid=' + pIntUserId + '&compid=' + pIntCompId; 
				var par='';
		
		var myRequest= new Ajax.Request(
					url, 
					{   
						method: 'post',
						parameters:par,
						onSuccess: function(transport) 
						{ 
							if(document.getElementById("divJobOpportunities"))
								document.getElementById("divJobOpportunities").innerHTML=transport.responseText;
							else
							   document.getElementById("divDashBoard").innerHTML=transport.responseText;

							
						} 
					});
			
	}
	/************************************************************************
	*	Function Name	:	SearchJob									
	*	Author Name		: 	Ramish Hashmi
	*	 Synopsis		:	 Searches various jobs posted on the portal 																
	*************************************************************************/	
	function SearchJob(pIntUserId)
	{
		var keyword = document.getElementById("txtJobSearch").value;
		
		if(keyword=='')
		   {
			   alert("Please enter keyword for search");
			   document.getElementById("txtCandidateSearch").focus();		
			   return false;
		   }
		   
		else
			{
				var url = 'GUIService/JobsService.php?action=searchjob'; 
				var dsplyLocStatus = 0;
				if(document.getElementById("jobDshBrdDsply"))
					dsplyLocStatus = document.getElementById("jobDshBrdDsply").value;
				
				var par='keyword='+keyword
						+'&userId='+pIntUserId+'&fullDsply='+dsplyLocStatus;
				
				if( dsplyLocStatus == 1 )
				{
					
					document.getElementById("divDashBoard").innerHTML="";
					document.getElementById("divDashBoard").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
				}
				else
				{						
					if(document.getElementById("divJobOpportunities"))
					{
						document.getElementById("divJobOpportunities").innerHTML="";
						document.getElementById("divJobOpportunities").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
					}
					else
					{
						
						document.getElementById("divDashBoard").innerHTML="";
						document.getElementById("divDashBoard").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
					}
				}
				
				var myRequest= new Ajax.Request(
					url, 
					{   
						method: 'post',
						parameters:par,
						onSuccess: function(transport) 
						{ 
							if( dsplyLocStatus == 1 )							
								   document.getElementById("divDashBoard").innerHTML=transport.responseText;
								 
							else
								
								  document.getElementById("divJobOpportunities").innerHTML=transport.responseText;
								
							
						} 
					}); 
				
		}
		
	}

	/************************************************************************
	*
	*	Function Name:	PaggingSrchJobOpportunities									
	*	Author Name: 	Adil Khan
	*																		
	*************************************************************************/		
	function PaggingSrchJobOpportunities(pIntUserId,pIntStartIndex,pIndeEndIndex,pIntPageNo,pIntTotalPage,pStatus,pIntTotalRecord,pIntLimit,pIntDashBoard,pIntCompanyId,pStrKeyword)
	{
		
		if(pStatus==2)
		{
				pIntPageNo=pIntPageNo-1;
				pIntStartIndex=pIntStartIndex-pIntLimit;
				pIndeEndIndex=pIntLimit;
		}
		else
		{
			if(pIntPageNo==pIntTotalPage)
			{
				pIntStartIndex=pIntTotalRecord-pIntLimit;
				pIndeEndIndex=pIntLimit;
			}
			else
			{
				pIntPageNo=pIntPageNo+1;
				pIntStartIndex=pIntStartIndex+pIntLimit;
				pIndeEndIndex=pIntLimit;
			}	
		}
		
		if(pStatus==4)
		{
			pIntStartIndex=pIntTotalPage*pIntLimit-pIntLimit;	
			
		}
		if(pStatus==1)
		{
			pIntStartIndex=0;	
			pIndeEndIndex=pIntLimit;
			
		}
		
		if(pIntDashBoard==0)
		{
			document.getElementById("divJobOpportunities").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
		else
		{
			document.getElementById("divDashBoard").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
		
		var url = 'GUIService/JobsService.php?action=searchjob&pStart='+ pIntStartIndex +'&pEnd='+ pIndeEndIndex +'&pPid='+ pIntPageNo +'&pStatus='+ pIntDashBoard +'&compid='+ pIntCompanyId; 
		var par = 'keyword=' + pStrKeyword  + '&userId=' + pIntUserId;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters: par,
							onSuccess: function(transport) 
							{ 
								if(pIntDashBoard==0)
								{	
									document.getElementById("divJobOpportunities").innerHTML=transport.responseText;
								}
								else
								{
									document.getElementById("divDashBoard").innerHTML=transport.responseText;
								}
								
							} 
						}); 
	}


	/************************************************************************
	*
	*	Function Name:	GetAllJobsOppertunities									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function GetAllJobsOppertunities(pIntUserId,pIntCompanyId)
	{
		var url = 'GUIService/JobsService.php?action=morejoboff&compid='+pIntCompanyId;
		var par = 'userId='+pIntUserId;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						});	
	}
	
	/************************************************************************
	*
	*	Function Name:	GetAllSrchJobsOppertunities									
	*	Author Name: 	Adil Khan
	*																		
	*************************************************************************/		
	function GetAllSrchJobsOppertunities(pIntUserId,pIntCompanyId,pStrKeyword)
	{
		
		if(document.getElementById("fullViewSrchIdentifier"))
		{	if(document.getElementById("fullViewSrchIdentifier").value == 1 )
				pStrKeyword = document.getElementById("txtJobSearch").value;
		}
		else if(pStrKeyword == '')
		{
			pStrKeyword = document.getElementById("txtJobSearch").value;
		}
		
		if( pStrKeyword == '')
		{	alert("Please Enter At Least One Character");
			return false;
		}
		
		var url = 'GUIService/JobsService.php?action=searchjob&compid='+pIntCompanyId;
		var par = 'userId='+pIntUserId + '&keyword=' + pStrKeyword + '&fullDsply=1' ;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						});	
	}
	
	
	/************************************************************************
	*
	*	Function Name:	PaggingMyJobs									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function PaggingJobsWishList(pIntUserId,pIntStartIndex,pIndeEndIndex,pIntPageNo,pIntTotalPage,pStatus,pIntTotalRecord,pIntLimit,pIntDashBoard)
	{
		if(pStatus==2)
		{
				pIntPageNo=pIntPageNo-1;
				pIntStartIndex=pIntStartIndex-pIntLimit;
				pIndeEndIndex=pIntLimit;
		}
		else
		{
			if(pIntPageNo==pIntTotalPage)
			{
				pIntStartIndex=pIntTotalRecord-pIntLimit;
				pIndeEndIndex=5;
			}
			else
			{
				pIntPageNo=pIntPageNo+1;
				pIntStartIndex=pIntStartIndex+pIntLimit;
				pIndeEndIndex=pIntLimit;
			}	
		}
		
		if(pStatus==4)
		{
			pIntStartIndex=pIntTotalPage*pIntLimit-pIntLimit;	
			
		}
		if(pStatus==1)
		{
			pIntStartIndex=0;	
			pIndeEndIndex=pIntLimit;
			
		}
		
		if(pIntDashBoard==0)
		{
			document.getElementById("DivJobsWishList").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
		else
		{
			document.getElementById("divDashBoard").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
		var url = 'GUIService/JobsService.php?action=pagejobwishlist&pStart='+pIntStartIndex+'&pEnd='+pIndeEndIndex+'&uid='+pIntUserId+'&pPid='+pIntPageNo+'&pStatus='+pIntDashBoard; 
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							onSuccess: function(transport) 
							{ 
								if(pIntDashBoard==0)
								{	
									document.getElementById("DivJobsWishList").innerHTML=transport.responseText;
								}
								else
								{
									document.getElementById("divDashBoard").innerHTML=transport.responseText;
								}
							} 
						}); 
	}
	/************************************************************************
	*
	*	Function Name:	GetAllMyJobs									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function GetAllJobsWishList(pIntUserId,pIntCompanyId)
	{
		var url = 'GUIService/JobsService.php?action=getAllJobsWishList';
	
		var par = 'userId='+pIntUserId+'&compid='+pIntCompanyId;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						});	
	}
	/************************************************************************
	*	Function Name	:	keywords									
	*	Author Name		: 	Ramish Hashmi																		
	*************************************************************************/	
	function keywords(pIntUserId)
	{
		var url = 'GUIService/UserInfoService.php?action=getkeywords&uid='+pIntUserId;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							//parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						});	
	}
	/************************************************************************
	*	Function Name	:	editKeywords									
	*	Author Name		: 	Ramish Hashmi																		
	*************************************************************************/	
	function editKeywords(pIntUserId)
	{
		
		document.getElementById("keywordError").innerHTML="";
		
		if(document.getElementById("keywords").value=='')
		 {
			document.getElementById("keywordError").innerHTML="Field Required";
			return;
		 }
		
		else if(!CheckSpaces(document.getElementById("keywords").value))
		 {
			document.getElementById("keywordError").innerHTML="Invalid Data Entry";
			return;
		 }
		 
		 var url = 'GUIService/UserInfoService.php?action=editKeywords';
		 var par = 'userId='+pIntUserId+
		 			'&keywords='+document.getElementById("keywords").value;
		
		 var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{ 
							//document.getElementById("divDashBoard").innerHTML=transport.responseText;
								if(transport.responseText==1)    
								  {
									  window.location="index.php?q=onramper";
								  }
							} 
						});	
	   }
	   
	   /************************************************************************
	   *		Function Name	:	RegisterForEvent									
	   *		Author Name		: 	Ramish Hashmi																		
	   *************************************************************************/	
	  /* function RegisterForEvent(pIntEventId, pIntUserId)
	   {
		    
		 var url = 'GUIService/EventService.php?action=eventregister';
		 var par = 'userId='+pIntUserId+'&eventid='+pIntEventId;
		
		 var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{ 
							  //document.getElementById("divDashBoard").innerHTML=transport.responseText;
							  if(transport.responseText==1)    
							    {
								  window.location="index.php?q=onramper";
								}
							} 
						});	 
	   }*/
	   /************************************************************************
	   *		Function Name	:	WithdrawFromEvent									
	   *		Author Name		: 	Ramish Hashmi																		
	   *************************************************************************/
	/*   function WithdrawFromEvent(pIntEventId,pIntUserId)
	   {
		if(confirm("Are you sure you want to wirhdraw from the event?"))
		  {
			var pIntStatus = -2;
			var url = 'GUIService/EventService.php?action=eventwithdraw';
		 	var par = 'userId='+pIntUserId+'&eventid='+pIntEventId+'&status='+pIntStatus;
		 	var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{ 
								//document.getElementById("divDashBoard").innerHTML=transport.responseText;
							  if(transport.responseText==1)    
							    {
								  window.location="index.php?q=onramper";
								}
							} 
						});	 
			  }
		   
	   }*/
	   /************************************************************************
 	    *
	    *	Function Name:	DeleteResumeId									
	    *	Author Name: 	Nabeel Bin Ezad
	    *																		
	    *************************************************************************/	
		function WithdrawJobApp(pIntUserId,pIntMyJobId,pIntJobId,pIntStatus)
		{
			
			if(confirm("Are you sure you want to withdraw job application"))
			{
				document.getElementById("OffRampMessage").innerHTML="";
				document.getElementById("OffRampMessage").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
				
				if(document.getElementById("DivMyJobs"))
				{
					document.getElementById("DivMyJobs").innerHTML="";
					document.getElementById("DivMyJobs").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
				}
				var url = 'GUIService/JobsService.php?action=withdrawjob&userId='+pIntUserId+'&myJobId='+pIntMyJobId+'&jobId='+pIntJobId;
				var myRequest= new Ajax.Request(
					url, 
					{   
					   method: 'post',
					   onSuccess: function(transport) 
						{ 

							var strResponse=transport.responseText;
							strResponse=strResponse.split("+");
		
							
							if(strResponse[1]==1)    
							{
								document.getElementById("OffRampMessage").innerHTML="";
								document.getElementById("OnRampMessage").innerHTML="";
								document.getElementById("OffRampMessage").innerHTML="<span class=BodyTextMessage>Your status has been changed.</span>";
							}
							else
							{
								document.getElementById("OffRampMessage").innerHTML="";
								document.getElementById("OnRampMessage").innerHTML="";
							document.getElementById("OffRampMessage").innerHTML="<span class='BodyTextMessageError'>Error.</span>";
							}
							
							document.getElementById("DivMyJobs").innerHTML=strResponse[0];
						} 
				  });	 	 
			}	
			
		}
		/************************************************************************
	*
	*	Function Name:	PaggingEvents									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function PaggingUserEvents(pIntUserId,pIntStartIndex,pIndeEndIndex,pIntPageNo,pIntTotalPage,pStatus,pIntTotalRecord,pIntLimit,pIntDashBoard,pIntCompanyId)
	{
		
		if(pStatus==2)
		{
				pIntPageNo=pIntPageNo-1;
				pIntStartIndex=pIntStartIndex-pIntLimit;
				pIndeEndIndex=pIntLimit;
		}
		else
		{
			if(pIntPageNo==pIntTotalPage)
			{
				pIntStartIndex=pIntTotalRecord-pIntLimit;
				pIndeEndIndex=5;
			}
			else
			{
				pIntPageNo=pIntPageNo+1;
				pIntStartIndex=pIntStartIndex+pIntLimit;
				pIndeEndIndex=pIntLimit;
			}	
		}
		
		if(pStatus==4)
		{
			pIntStartIndex=pIntTotalPage*pIntLimit-pIntLimit;	
			
		}
	
		if(pIntDashBoard==0)
		{
			document.getElementById("DivEvents").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
		else
		{
			document.getElementById("divDashBoard").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
		var url = 'GUIService/EventService.php?action=pageuserevent&pStart='+pIntStartIndex+'&pEnd='+pIndeEndIndex+'&uid='+pIntUserId+'&pPid='+pIntPageNo+'&pStatus='+pIntDashBoard+'&compid='+pIntCompanyId; 
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							onSuccess: function(transport) 
							{ 
								if(pIntDashBoard==0)
								{	
								//	document.getElementById("DivEvents").innerHTML=transport.responseText;
									var strResponse=transport.responseText;
								
									strResponse=strResponse.split("+");
									document.getElementById("DivEvents").innerHTML=strResponse[0];
									var strEventsDate=strResponse[1];
									strEventsDate=strEventsDate.split(",");
								
									var dA = new Array(); 
									var x=0;
									for (j=0;j<strEventsDate.length-1;j++)
									{
										dA[x++] = strEventsDate[j];
									}
									
									loaded('calendar',start,dA);
								}
								else
								{
									var strResponse=transport.responseText;
								
									strResponse=strResponse.split("+");
									document.getElementById("divDashBoard").innerHTML=strResponse[0];
									var strEventsDate=strResponse[1];
									strEventsDate=strEventsDate.split(",");
								
									var dA = new Array(); 
									var x=0;
									for (j=0;j<strEventsDate.length-1;j++)
									{
										dA[x++] = strEventsDate[j];
									}
									
									loaded('calendar',start,dA);
								}
							
							} 
						}); 
	}
	/************************************************************************
	*
	*	Function Name:	GetAllEvents									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function GetUserAllEvents(pIntUserId,pIntStatus,pIntCompanyId)
	{
		
		var url = 'GUIService/EventService.php?action=alluserevent&compid='+pIntCompanyId;
		var par = 'userId='+pIntUserId;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
									var strResponse=transport.responseText;
									strResponse=strResponse.split("+");
									document.getElementById("divDashBoard").innerHTML=strResponse[0];
									var strEventsDate=strResponse[1];
									strEventsDate=strEventsDate.split(",");
									var dA = new Array(); 
									var x=0;
									for (j=0;j<strEventsDate.length-1;j++)
									{
										dA[x++] = strEventsDate[j];
									}
									
									loaded('calendar',start,dA);							
								
								//document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						});	
	}
	/************************************************************************
	*
	*	Function Name:	GetOffJobsWishList									
	*	Author Name: 	Ramish Hashmi
	*																		
	*************************************************************************/		
	function GetOffJobsWishList(pIntUserId,pIntStartIndex,pIntEndIndex,pIntStatus,pIntPageNo,pIntCompanyId,pIntSort)
	{
		var yPos =  document.documentElement.scrollTop;
		var url = 'GUIService/JobsService.php?action=offwishlistsort&pStart='+pIntStartIndex+'&pEnd='+pIntEndIndex+'&uid='+pIntUserId+'&pPid='+pIntPageNo+'&pStatus='+pIntStatus+'&pSort='+pIntSort+'&compId='+pIntCompanyId; 
		document.getElementById("DivJobsWishList").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
		var myRequest= new Ajax.Request(
					url, 
					{   
						method: 'post',
						onSuccess: function(transport) 
						{      
							window.scroll(0,yPos);
							document.getElementById("DivJobsWishList").innerHTML=transport.responseText;
						} 
					});	
	}
	/************************************************************************
	*
	*	Function Name:	GetOffJobsSort									
	*	Author Name: 	Ramish Hashmi
	*																		
	*************************************************************************/		
	function GetOffJobsSort(pIntUserId,pIntStartIndex,pIntEndIndex,pIntStatus,pIntPageNo,pIntCompanyId,pIntSort)
	{
		var yPos =  document.documentElement.scrollTop;
		var url = 'GUIService/JobsService.php?action=offjobssort&pStart='+pIntStartIndex+'&pEnd='+pIntEndIndex+'&uid='+pIntUserId+'&pPid='+pIntPageNo+'&pStatus='+pIntStatus+'&pSort='+pIntSort+'&compId='+pIntCompanyId; 
		document.getElementById("divJobOpportunities").innerHTML="<img src=ImageFiles/indicator_medium.gif>";
		var myRequest= new Ajax.Request(
					url, 
					{   
						method: 'post',
						onSuccess: function(transport) 
						{      
							window.scroll(0,yPos);
							document.getElementById("divJobOpportunities").innerHTML=transport.responseText;
						} 
					});	
	}
	/************************************************************************
	*
	*	Function Name:	PagingOnOffUserResponses									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function PagingOnOffUserResponses(pIntUserId,pIntStartIndex,pIndeEndIndex,pIntPageNo,pIntTotalPage,pStatus,pIntTotalRecord,pIntLimit,pIntDashBoard,pIntCompanyId,pIntOrder)
	{
		xPos = document.documentElement.scrollTop;
		if(pStatus==2)
		{
				pIntPageNo=pIntPageNo-1;
				pIntStartIndex=pIntStartIndex-pIntLimit;
				pIndeEndIndex=pIntLimit;
		}
		else
		{
			if(pIntPageNo==pIntTotalPage)
			{
				pIntStartIndex=pIntTotalRecord-pIntLimit;
				pIndeEndIndex=5;
			}
			else
			{
				pIntPageNo=pIntPageNo+1;
				pIntStartIndex=pIntStartIndex+pIntLimit;
				pIndeEndIndex=pIntLimit;
			}	
		}
		
		if(pStatus==4)
		{
			pIntStartIndex=pIntTotalPage*pIntLimit-pIntLimit;	
			
		}
		if(pStatus==1)
		{
			pIntStartIndex=0	
			pIndeEndIndex=pIntLimit;	
			
		}
		
		if(pIntDashBoard==0)
		{
			document.getElementById("DivResponses").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
		else
		{
			document.getElementById("divDashBoard").innerHTML="<img src=ImageFiles/indicator_medium.gif>"; 
		}
	
		var url = 'GUIService/ResponsesService.php?action=pageuseronoffresponse&pStart='+pIntStartIndex+'&pEnd='+pIndeEndIndex+'&pPid='+pIntPageNo+'&pStatus='+pIntDashBoard+'&uid='+pIntUserId+'&compid='+pIntCompanyId+'&pOrder='+pIntOrder;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							onSuccess: function(transport) 
							{ 
								window.scroll(0,xPos);
	
								if(pIntDashBoard==0)
								{	
									document.getElementById("DivResponses").innerHTML=transport.responseText;
								}
								else
								{
									document.getElementById("divDashBoard").innerHTML=transport.responseText;
								}
								
							} 
						});
		
	}
	
	/************************************************************************
	*
	*	Function Name:	GetAllOnOffResponses									
	*	Author Name: 	Nabeel Bin Ezad
	*																		
	*************************************************************************/		
	function GetAllOnOffResponses(pIntUserId,pIntCompanyId)
	{
		
		var url = 'GUIService/ResponsesService.php?action=allonoffresponses'+'&compid='+pIntCompanyId;
		var par = 'userId='+pIntUserId;
		var myRequest= new Ajax.Request(
						url, 
						{   
							method: 'post',
							parameters:par,
							onSuccess: function(transport) 
							{      
								document.getElementById("divDashBoard").innerHTML=transport.responseText;
							} 
						});	
	}