localStorage['serviceURL']="http://localhost/HR/cash/HR/"

var serviceURL =localStorage['serviceURL'];



//////////////////////////////////////////////////////Profile///////////////////////////////////////////////////////////////



	function profile()
	  {
	
		$.getJSON(serviceURL+"profile.php?id=3",function(data){
											
				   profile = data.employee;
					
					$('.new').append('<li class="catmenuitems">'+
					'<h1><center><translate>PROFILE</translate></center></h1>'+
					'<table class="Grid" cellspacing="0" cellpadding="6" id="dgOrder" style="border-width:1px;border-style:Solid;width:100%;border-collapse:collapse;">'+
					'<tbody><tr class="GridHeader">'+
										 
					'</tr>');
			
					$.each(profile, function(index, profile) 
					{
												   
										
												   
										$('.Grid').append('<tr class="catmenuitems">'+
											  '</td></tr><tr><td align="center" scope="col" style="width:15%;"><img src="'+serviceURL+'upload/thumb/'+profile.photo+'"                                               style="height:5px,width:5px">'+
  											  '</td></tr><tr><td><translate>NAME:</translate><td align="left" scope="col" style="width:15%;">'+ profile.e_fname+'  '+profile.e_mname+'  '+ profile.e_lname+
								     		  '</td></td></tr><tr><td><translate>ADDRESS:</translate><td align="left" scope="col" style="width:15%;">'+profile.e_add+
											  '</td></td></tr><tr><td><translate>STATE:</translate></td><td align="left" scope="col" style="width:15%;">'+profile.e_state+
											  '</td></td></tr><tr><td><translate>COUNTRY:</translate></td><td align="left" scope="col" style="width:15%;">'+profile.e_country+
											  '</td></td></tr><tr><td><translate>ZIP CODE:</translate></td><td align="left" scope="col" style="width:15%;">'+profile.e_zip+
											  '</td></tr><tr><td><translate>CONTACT NO:</translate><td align="left" scope="col" style="width:15%;">'+profile.e_phone+'  / '+profile.e_mob +
											  '</td></td></tr><tr><td><translate>EM@IL:</translate><td align="left" scope="col" style="width:15%;">'+profile.e_mail+
                                              '</td></td></tr><tr><td><translate>DATE OF BIRTH:</translate></td><td align="left" scope="col" style="width:15%;">'+profile.e_dob+
											  '</td></td></tr><tr><td><translate>GENDER:</translate></td><td align="left" scope="col" style="width:15%;">'+profile.e_gender+
											  '</td></td> </tr><tr><td><a href="'+serviceURL+'upload/'+profile.resume+'" title="'+profile.resume+'" id="resume"><translate>View Resume</translate></a>'+
											  '<tr><td><div id="resume"></div></td></tr>'+
     										  '</td></td></tr><tr><td><a href="#" id="addNew1"><translate>View Idproof</translate></a>'+'<tr><td><div id="proof"></div></td></tr>'+
											  '</td></td></tr><tr><td><a href="#" id="lang"><translate>View Languages</translate></a>'+'<tr><td><div id="language"></div></td></tr>'+
											  '</td></td></tr> <tr><td><a href="#" id="exp"><translate>View Experience</translate></a>'+'<tr><td><div id="experience"></div></td></tr>'+
											  '</td></tr>');	
					});	
				
				

	
	       });
}



///////////////////////////////////////////////////////////////////////End Of Profile////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////List Idproof(edit page)///////////////////////////////////////////////////////////////////////

$('#addNew1').live('click',function(msg){
									alert("d");
	showidproof();
});
function showidproof()
	  {
alert("s");
		$.getJSON(serviceURL+'profile.php?id1=3',function(data){
			
											
				   showidproof = data.employ;
			
					$.each(showidproof, function(index, showidproof) 
					{
									
										$('#proof').append('<ul class="catmenuitems">'+
											  
	         								 '<span id="lblHeadline"><p></br></br><strong ><translate>PROOF TYPE </translate>:</strong>  '+showidproof.filetype+
											 '</span><span id="lblHeadline"></br><strong><translate>PROOF </translate>:</strong>  <img src="'+serviceURL+'upload/thumb/'+showidproof.file+
											 '" style="height:5px,width:5px"><a href="#" id="proof"><translate>HIDE</translate></a></p>');	

	         								
							});       
							
					
	       });
}
$(document).ready(function()
{ 
	$('#proof').live('click',function(){
		$(this).parents('p').toggle();
	
			
	})
	 
   		
 	
	 
	
});

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////language//////////////////////////////////////////////////////////////////////////////////////////////

$('#lang').live('click',function(msg){
		//alert('d');
	showlanguage();
});
function showlanguage()
	  {
//alert('s');
	
		$.getJSON(serviceURL+'profile.php?id3=3',function(data){
			
											
				   showlanguage = data.employee2;
					
					
			
					$.each(showlanguage, function(index, showlanguage) 
					{
						
												   
										
												   
										$('#language').append('<table id="reference'+showlanguage.lan_id+'" class="catmenuitems">'+
											  
	         								 '<p1><td align="left" valign="middle">LANGUAGE : '+showlanguage.e_lang+
											 '<tr><td align="left" valign="middle">LEVEL : '+showlanguage.e_level+' <a href="#" id="language">HIDE</a></p1></tr></option><option>Poor</option><option>Average</option>'+
'<option>Good</option></select></td></table>');	
				});	
				
				

	
	       });
}
$(document).ready(function()
{ 
	$('#language').live('click',function(){
		$(this).parents('p1').toggle();
	
			
	})
	 
   		
 	
	 
	
});


//////////////////////////////////////////////////////////////////////////experience///////////////////////////////////////
$('#exp').live('click',function(msg){
	showexperience();
});
function showexperience()
	  {

	
		$.getJSON(serviceURL+'profile.php?id4=3',function(data){
			
											
				   showexperience = data.employee1;
					
					
			
					$.each(showexperience, function(index, showexperience) 
					{
						
												   
										
												   
										$('#experience').append('<table id="reference'+showexperience.eid+'" class="catmenuitems">'+
											  
	         								 '<p2><tr><td width="10%" height="38" align="left" valign="middle"><p><font color="#FF0000"><translate>Number</translate></font></p></td><td width="7%" align="left" valign="middle">'+
											 ':</td><td width="33%" align="left" valign="middle">'+showexperience.eid+
											 '</td></tr><tr><td width="10%" height="38" align="left" valign="middle"><p><translate>Company Name</translate></p></td><td width="7%" align="left" valign="middle">'+
											 ':</td><td width="33%" align="left" valign="middle">'+showexperience.refer+
											 '</td></tr><tr><td height="37" align="left" valign="middle"><translate>Address</translate></td><td align="left" valign="middle">'+
											 ':</td><td align="left" valign="middle">'+showexperience.emp+'</td></tr><tr>'+
											 '<td height="28" align="left" valign="middle"><translate>Contact No</translate></td><td align="left" valign="middle">:</td>'+
											 '<td align="left" valign="middle">'+showexperience.phno+'</td></tr><tr>'+
											 '<td height="28" align="left" valign="middle"><translate>Email</translate></td><td align="left" valign="middle">:</td>'+
											 '<td align="left" valign="middle">'+showexperience.email+'</td><td height="28" align="left" valign="middle"><translate>From</translate></td><td align="left" valign="middle">:</td><td align="left" valign="middle">'+showexperience.from+'</td><td width="1%" height="28" align="left" valign="middle"><translate>To</translate></td><td width="0%" align="left" valign="middle">:</td><td width="14%" align="left" valign="middle">'+showexperience.to+'</td></tr><tr><td height="30" align="left" valign="middle"><translate>Position</translate></td><td align="left" valign="middle">:</td><td align="left" valign="middle">'+showexperience.posi+'</td><td height="31" align="left" valign="middle"><translate>Salary</translate></td><td align="left" valign="middle">:</td><td align="left" valign="middle">'+showexperience.sal+'</td><td height="34" align="left" valign="middle"><translate>Reason for leaving</translate></td><td align="left" valign="middle">:</td><td align="left" valign="middle">'+showexperience.rfl+' <td><a href="#" id="experience">HIDE</td</a></p2></td></tr></table>');	
				});	
				
	
	       });
}
$(document).ready(function()
{ 
	$('#experience').live('click',function(){
		$(this).parents('p2').toggle();
	
			
	})
	 
   		
 	
	 
	
});