/* Showing Submenu */
		function SSS_Fn_Show_SubMenu(Menu_ID){
			HideCareersFlag=false; //for resetting careers form as unvisited
			if(Last_Menu_ID){
				document.getElementById("Sub"+Last_Menu_ID).style.visibility="hidden";
				//document.getElementById(Last_Menu_ID).style.color="#000";
			}
			document.getElementById("Sub"+Menu_ID).style.visibility="visible";
			//document.getElementById(Menu_ID).style.color="#FFF";
			Last_Menu_ID=Menu_ID;
			HideMenuFlag=true;
		}
		
		function SSS_Fn_Parent_Menu_Highlight(MenuID){
			document.getElementById(MenuID).style.background="url('images/focus.png') no-repeat";
			//document.getElementById(MenuID).style.color="#FFF";
		}
	
/*Hiding Submenu*/
		function SSS_Fn_Hide_SubMenu(Menu_ID){
			if(Menu_ID==1){
				if(HideMenuFlag==true){
					for(i=1; i<=document.getElementById("MenuCount").getElementsByTagName("td").length; i++){
						document.getElementById("SubMenu"+i).style.visibility="hidden";
					}
					HideMenuFlag=false;
				}
				return false;
			}
			document.getElementById(Menu_ID).style.visibility="hidden";
		}

/*function to display error msg*/
	function SSS_Fn_Display_Error(ErrorMsgContainer)
	{
		ErrorMsg+="</ul>";
		document.getElementById(ErrorMsgContainer).innerHTML = ErrorMsg;
		document.getElementById(ErrorMsgContainer).style.visibility="visible";
		ErrorMsg="Please fill all the fields marked with <b>*</b><ul style='padding-top: 5px; padding-left: 25px;'>";
		ErrorFlag=false;
	}
/*function for validating contacts form */			
		function SSS_Fn_Validate_Contacts_Form(){			
			SSS_Fn_Required_Field("CU_Firstname","Enter Firstname");
			SSS_Fn_Required_Field("CU_Lastname","Enter Lastname");
			SSS_Fn_Required_Field("CU_Companyname","Enter Company Name");
			SSS_Fn_Required_Field("CU_Company_Business","Enter Company Business Details");
			SSS_Fn_Required_Field("CU_Address","Enter Address");
			SSS_Fn_Required_Field("CU_City","Enter City");
			SSS_Fn_Required_Field("CU_Country","Select Country");
			SSS_Fn_Required_Field("CU_EmailID","Enter Valid Email ID",2);
			SSS_Fn_Required_Field("CU_Phone_Country","Enter Valid Country Code",1);
			SSS_Fn_Required_Field("CU_Phone_Area","Enter Valid Area Code",1);
			SSS_Fn_Required_Field("CU_Phone_Number","Enter Valid Phone Number",1);
			SSS_Fn_Required_Field("CU_Description","Enter Some Description");
			if(ErrorFlag==true){
				SSS_Fn_Display_Error('ErrorMsg');
				return false;
			}
			SSS_Fn_Post_Contacts_Form();
			return false;
		}	
		
/*function for validating careers form */
		function SSS_Fn_Validate_Careers_Form(){			
			SSS_Fn_Required_Field("CA_Aim","Enter Aim");
			SSS_Fn_Required_Field("CA_Name","Enter Name");
			SSS_Fn_Required_Field("CA_Gender","Select Gender",3);
			SSS_Fn_Required_Field("CA_DOB_Date","Select Date for DOB");
			SSS_Fn_Required_Field("CA_DOB_Month","Select Month for DOB");
			SSS_Fn_Required_Field("CA_DOB_Year","Select Year for DOB");
			SSS_Fn_Required_Field("CA_POB","Enter Place of Birth");
			SSS_Fn_Required_Field("CA_Religion","Select Religion");
			SSS_Fn_Required_Field("CA_Caste","Select Caste");
			SSS_Fn_Required_Field("CA_Phone","Enter Valid Phone Number",1);
			SSS_Fn_Required_Field("CA_Email","Enter Valid Email Id",2);
			SSS_Fn_Required_Field("CA_C_Address","Enter Contact Address");
			SSS_Fn_Required_Field("CA_C_Pincode","Enter Pincode",1);
			SSS_Fn_Required_Field("CA_ShortTermPlan","Enter Your Short term goal");
				for(i=0; i<Tab_FD; i++){ //for validating family details field
					var ErrStr1 = document.getElementById("CA_FD_Tab_Button"+i).value;
					for(j=0; j<5; j++){
						var ErrStr = document.getElementById("CA_FD_Field"+i+""+j+"").parentNode.previousSibling.innerHTML;
							ErrStr = ErrStr.substr(0,ErrStr.indexOf(":"));
						SSS_Fn_Required_Field("CA_FD_Field"+i+""+j+"","Enter "+ErrStr+" for "+ErrStr1);		
					}	
					SSS_Fn_Required_Field("CA_FD_Field"+i+"1","Enter Valid Age for "+ErrStr1+"",1);
				}		
				for(i=0; i<Tab_AD; i++){ //for validating academic details field
					var ErrStr1 = document.getElementById("CA_AD_Tab_Button"+i).value;
					for(j=0; j<11; j++){
						var ErrStr = document.getElementById("CA_AD_Field"+i+""+j+"").parentNode.previousSibling.innerHTML;
							ErrStr = ErrStr.substr(0,ErrStr.indexOf(":"));
						SSS_Fn_Required_Field("CA_AD_Field"+i+""+j+"","Enter "+ErrStr+" for "+ErrStr1);		
					}	
				}						
			if(CA_Permanent_Address_Flag == true){
				SSS_Fn_Required_Field("CA_P_Address","Enter Contact Address");
				SSS_Fn_Required_Field("CA_P_Pincode","Enter Pincode",1);
			}
			if(ErrorFlag==true){
				SSS_Fn_Display_Error('ErrorMsg');
				return false;
			}
			document.getElementById("ErrorMsg").innerHTML="";
			document.getElementById("ErrorMsg").style.visibility="hidden";
				SSS_Js_Fn_Store_CA_FD_Values((Tab_FD+1),"CA_FD_Field",9);
				SSS_Js_Fn_Store_CA_FD_Values((Tab_AD+1),"CA_AD_Field",11);
				SSS_Js_Fn_Store_CA_FD_Values((Tab_WE+1),"CA_WE_Field",9);
				SSS_Fn_Post_Careers_Form();
			return false;
		}
/*function for validating login fields */		
		function SSS_Fn_Validate_Login()
		{
			SSS_Fn_Required_Field("Login_Username","Enter Username");
			SSS_Fn_Required_Field("Login_Password","Enter Password");
			if(ErrorFlag==true){
				SSS_Fn_Display_Error('LoginErrorMsg');
				return false;
			}
			//SSS_Fn_Post_Login();
			//return false;
		}
/* function for validating change password */
		function SSS_Fn_Validate_Change_Password()
		{
			SSS_Fn_Required_Field("Ch_Old_Pwd","Enter Old Password");
			SSS_Fn_Required_Field("Ch_New_Pwd","Enter New Password");
			SSS_Fn_Required_Field("Ch_C_New_Pwd","Confirm New Password");
			SSS_Fn_Required_Field("Ch_C_New_Pwd","Password Missmatch",4);
			if(ErrorFlag==true){
				SSS_Fn_Display_Error('ErrorMsg');
				return false;
			}
			SSS_AJAX_Fn_Change_Password();
			return false;
		}
				
/*function for validating news addition*/				
		function SSS_Fn_Validate_Add_News(flag)
		{
			SSS_Fn_Required_Field("News_Entered_By","Entered By:");	
			SSS_Fn_Required_Field("News_Description","Entered News Description");	
			if(ErrorFlag==true){
				SSS_Fn_Display_Error('ErrorMsg');
				return false;
			}
			SSS_AJAX_Fn_Add_News(flag);
			return false;
		}
/* Function for Required Field Validation */
		function SSS_Fn_Required_Field(FieldObj,ErrMsg,TypeCheck){	
				if(TypeCheck == 3){
					if((document.getElementById("CA_Gender1").checked == false)	&& (document.getElementById("CA_Gender2").checked == false)){
						ErrorFlag=true;
						ErrorMsg+="<li>"+ErrMsg+"</li>";
						return false;
					}
					return false;
				}
			var FieldObjValue = document.getElementById(FieldObj).value;
			if(FieldObjValue == ""){
				ErrorFlag=true;
				ErrorMsg+="<li>"+ErrMsg+"</li>";
				return false;
			}else{
				if(TypeCheck==1){
					if(isNaN(FieldObjValue)){
						ErrorFlag=true;
						ErrorMsg+="<li>"+ErrMsg+"</li>";
						return false;
					}
				}
				if(TypeCheck==2){
					var RegEx = /[\w]+(\D{5})+@+[\w+]+(\D{3})+.[\w+]+(\D{1})/;
					if(!RegEx.test(FieldObjValue)){
						ErrorFlag=true;
						ErrorMsg+="<li>"+ErrMsg+"</li>";
						return false;
					}
				}
				if(TypeCheck==4){
					var f1 = document.getElementById("Ch_New_Pwd").value;
					var f2 = document.getElementById(FieldObj).value;
					if(f1 != f2){
						ErrorFlag=true;
						ErrorMsg+="<li>"+ErrMsg+"</li>";
						return false;
					}
				}
			}
	}	
/* Function for Swapping Images */
		function SSS_Fn_Swap_Image(ImgId,ImgSrc,flag){
				if(flag==1){
					document.getElementById(Active_Menu_ID).style.background = 'url('+ Active_Menu_Src +') no-repeat';
					document.getElementById(Active_Menu_ID).style.color = "#FFF";
					return false;
				}
				document.getElementById(ImgId).style.background = 'url('+ ImgSrc +') no-repeat';
				document.getElementById(Active_Menu_ID).style.background = 'url('+ Active_Menu_Src +') no-repeat';
				//document.getElementById(Active_Menu_ID).style.color="#000";
			}
					
/* function for loading the careers form*/
		function SSS_Fn_Show_Careers_Form(PostID,DivID){
			//alert(HideCareersFlag);
			Tab_FD=0;	//for reseting the Family Details tab index
			Tab_AD=0;   //for reseting the Academic Details tab index
			Tab_WE=0;   //for reseting the work experience Details tab index
			if(Last_DivID != "" && Last_DivID != DivID){
				document.getElementById(Last_DivID).innerHTML="";
				document.getElementById(Last_DivID).style.display="none";
				HideCareersFlag = false;
				//alert(1);
			}
			if(HideCareersFlag == false){
				document.getElementById(DivID).style.display="block";
				document.getElementById(DivID).innerHTML = SSS_Fn_Careers_Load_Table(PostID);
				document.getElementById("CA_FD_Tabs_Content").innerHTML = SSS_JS_Fn_strRelationDetails('Father','disabled','DisabledStyle','selected') + SSS_JS_Fn_strRelationDetails('Mother','disabled','DisabledStyle','selected');
				document.getElementById("CA_AD_Tabs_Content").innerHTML = SSS_JS_Fn_AD_strRelationDetails();
				document.getElementById("CA_WE_Tabs_Content").innerHTML = SSS_JS_Fn_WE_strRelationDetails();
				SSS_JS_Fn_Show_FD_Tab("CA_FD_Tab0","CA_FD_Tab_Button0",false,1);	
				SSS_JS_Fn_Show_FD_Tab("CA_AD_Tab0","CA_AD_Tab_Button0",false,2);
				SSS_JS_Fn_Show_FD_Tab("CA_WE_Tab0","CA_WE_Tab_Button0",false,4);
				Last_DivID=DivID;
				HideCareersFlag=true;
				//alert(2);
			}else{
				document.getElementById(DivID).style.display="none";
				HideCareersFlag=false;
				//alert(3);
			}
		
			
		}
/*function for swapping skillset list values*/
	function add_remove(obj,obj1,obj2)
			{
				if(obj2.selectedIndex < 0 ){
					alert("Select any Item");
					return false;
				}
				var opt = document.createElement("OPTION");
				obj1.appendChild(opt);
				opt.text = obj.options[obj.selectedIndex].text;
				opt.value = obj.options[obj.selectedIndex].value;
				obj.remove(obj.selectedIndex);
			}		
	
/* function for displaying table in careers form */
		function SSS_Fn_Careers_Load_Table(PostID){
			var txtForm="";	
			txtForm += "<form name='Form_Careers' id='Form_Careers' method='post' action='#' enctype='multipart/form-data'>"; //onsubmit='return SSS_Fn_Validate_Careers_Form()'>";
			txtForm += "<table style='width: 100%; margin: 0 auto; margin-bottom: 10px; background-color: #F2F2F0; border: solid 1px #bfbfbf;' class='TextStyle' border='0' cellspacing='5' cellpadding='0'>";
				txtForm += "<colgroup>";
					txtForm += "<col width='200px' />";	
					txtForm += "<col width='*' />";	
				txtForm += "</colgroup>";
				txtForm += "<tr>";	
					txtForm += "<td class='StyleMainHeading'>Post Applying For:</td>";
					txtForm += "<td><b>"+PostID+"</b><input type='hidden' id='CA_Post_Name' name='CA_Post_Name' value='"+PostID+"' /></td>"
				txtForm += "</tr>";
				txtForm += "<tr>";	
					txtForm += "<td class='StyleMainHeading'>Note:</td>";
					txtForm += "<td>All fields marked with <span style='color: red;'>*</span> are mandatory.<br />All information will be kept confidential</td>"
				txtForm += "</tr>";
				txtForm += "<tr>";
					txtForm += "<td>Aim/Objective:<span style='color: red;'>*</span></td>";
					txtForm += "<td><textarea name='CA_Aim' id='CA_Aim' class='TextAreaStyle' cols='40' rows='3' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;'></textarea></td>";
				txtForm += "</tr>";
				txtForm += "<tr>";
					txtForm += "<td valign='top'>Photo Attachment:</td>";
					txtForm += "<td>";
						txtForm += "<input class='TextBoxStyle' type='file' name='Careers_ImageUpload' onchange='SSS_Fn_Upload(&quot;Iframe_Image_Upload&quot;,&quot;Form_Careers&quot;,&quot;"+UploadPageRequest+"?reqUp=img&quot;)' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /><br />";
						txtForm += "<iframe id='Iframe_Image_Upload' name='Iframe_Image_Upload' allowtransparency='true' frameborder='0' scrolling='no' style='width: 200px; height: 50px; display: none; overflow: hidden;' src='inc/uploading.php'></iframe>";
					txtForm+= "</td>";
				txtForm += "</tr>";
					
				txtForm += "<tr>";
					txtForm += "<td colspan='2' class='StyleMainHeading'>Personal Details:</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Name:<span style='color: red;'>*</span></td>";
					txtForm += "<td><input name='CA_Name' id='CA_Name'  class='TextBoxStyle' type='text' size='35' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Gender:<span style='color: red;'>*</span></td>";
					txtForm += "<td><input type='radio' name='CA_Gender' id='CA_Gender1' value='m' />&nbsp;<label for='CA_Gender1'>Male</label>&nbsp;<input type='radio' name='CA_Gender' id='CA_Gender2' value='f' />&nbsp;<label for='CA_Gender2'>Female</label></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Date of Birth:<span style='color: red;'>*</span></td>";
					txtForm += "<td>"+SSS_Fn_Load_Calender()+"</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Place of Birth:<span style='color: red;'>*</span></td>";
					txtForm += "<td><input name='CA_POB' id='CA_POB' class='TextBoxStyle' type='text' size='35' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Passport</td>";
					txtForm += "<td>";
						txtForm += "<input type='radio' onclick='SSS_Fn_Show_Field(this.value,&quot;SSS_Careers_Passport_No&quot;)' name='radio2' id='CA_Passport_Radio1' value='1' />&nbsp;<label for='CA_Passport_Radio1'>Available</label>&nbsp;";
						txtForm += "<input type='radio' onclick='SSS_Fn_Show_Field(this.value,&quot;SSS_Careers_Passport_No&quot;)' name='radio2' id='CA_Passport_Radio2' />&nbsp;<label for='CA_Passport_Radio2'>Applied</label>&nbsp;";
						txtForm += "<input type='radio' onclick='SSS_Fn_Show_Field(this.value,&quot;SSS_Careers_Passport_No&quot;)' name='radio2' id='CA_Passport_Radio3' />&nbsp;<label for='CA_Passport_Radio3'>Not Applied</label>";
					txtForm += "</td>";
				txtForm += "</tr>";
				
				txtForm	+= "<tr>";
					txtForm	+= "<td colspan='2'>";
						txtForm	+= "<table id='SSS_Careers_Passport_No' style='display: none; width: 100%;' class='TextStyle' border='0' cellspacing='0' cellpadding='0'>";
							txtForm += "<colgroup>";
								txtForm += "<col width='205px' />";	
								txtForm += "<col width='*' />";	
							txtForm += "</colgroup>";
							txtForm += "<tr>";
								txtForm += "<td>Passport No.</td>";
								txtForm += "<td><input type='text' id='CA_Passport_No' name='CA_Passport_No' class='TextBoxStyle' size='35' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
							txtForm += "</tr>";			
						txtForm	+= "</table>";
					txtForm	+= "</td>";
				txtForm	+= "</tr>";
					
				txtForm += "<tr>";
					txtForm += "<td>Religion:<span style='color: red;'>*</span></td>";
					txtForm += "<td>"+ SSS_Fn_Load_Religion() +"</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Marital Status</td>";
					txtForm += "<td><input type='radio' name='CA_Marital_Status' id='CA_Marital_Status1' checked='checked' value='sing' />&nbsp;<label for='CA_Marital_Status1'>Single</label>&nbsp;<input type='radio' name='CA_Marital_Status' id='CA_Marital_Status2' value='marr' />&nbsp;<label for='CA_Marital_Status2'>Married</label>&nbsp;</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Caste:<span style='color: red;'>*</span></td>";
					txtForm += "<td>"+ SSS_Fn_Load_Caste() +"</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Physically Handicapped</td>";
					txtForm += "<td><input type='radio' name='CA_Physical' />&nbsp;Yes&nbsp;<input type='radio' name='CA_Physical' checked='checked' />&nbsp;No&nbsp;</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Mobile:</td>";
					txtForm += "<td><input id='CA_Mobile' name='CA_Mobile'  class='TextBoxStyle' type='text' size='35' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Phone No:<span style='color: red;'>*</span></td>";
					txtForm += "<td><input name='CA_Phone' id='CA_Phone'  class='TextBoxStyle' type='text' size='35' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Email:<span style='color: red;'>*</span></td>";
					txtForm += "<td><input name='CA_Email' id='CA_Email'  class='TextBoxStyle' type='text' size='35' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
				txtForm += "</tr>";
				txtForm += "<tr>";
					txtForm += "<td>Contact Address:<span style='color: red;'>*</span></td>";
					txtForm += "<td><textarea name='CA_C_Address' id='CA_C_Address' class='TextAreaStyle' cols='40' rows='3' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;'></textarea></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>State:<span style='color: red;'>*</span></td>";
					txtForm += "<td><input type='text' class='TextBoxStyle' id='CA_C_State' name='CA_C_State' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>District/City:<span style='color: red;'>*</span></td>";
					txtForm += "<td><input type='text' class='TextBoxStyle' id='CA_C_City' name='CA_C_City' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Country:</td>";
					txtForm += "<td><input type='text' id='CA_C_Country' name='CA_C_Country' readonly='true' class='TextBoxStyle'  value='India' size='35'  /></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Pincode:<span style='color: red;'>*</span></td>";
					txtForm += "<td><input name='CA_C_Pincode' id='CA_C_Pincode'  class='TextBoxStyle' type='text' size='35' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Is Permanent Address Same as<br />the Contact Address ?</td>";
					txtForm += "<td>";
						txtForm += "<input type='radio' name='radio5' id='radio51' onclick='SSS_Fn_Show_Field(this.value,&quot;SSS_Careers_Permanent_Addr&quot;)' checked='checked'  />&nbsp;<label for='radio51'>Yes</label>&nbsp;";
						txtForm += "<input type='radio' name='radio5' id='radio52' onclick='SSS_Fn_Show_Field(this.value,&quot;SSS_Careers_Permanent_Addr&quot;,1)'  value='1' />&nbsp;<label for='radio52'>No</label>&nbsp;";
						txtForm += "<input type='hidden' id='CA_H_PAddr' name='CA_H_PAddr' value='false' />";
					txtForm+= "</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td colspan='2'>";
						txtForm += "<table id='SSS_Careers_Permanent_Addr' style='display: none;width: 100%;' class='TextStyle' border='0' cellspacing='5' cellpadding='0'>";
							txtForm += "<colgroup>";
								txtForm += "<col width = '200px'>";
								txtForm += "<col width = '*'>";
							txtForm += "</colgroup>";
							txtForm += "<tr>";
							txtForm += "<td>Address:<span style='color: red;'>*</span></td>";
							txtForm += "<td><textarea id='CA_P_Address' name='CA_P_Address' class='TextAreaStyle' cols='40' rows='3' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;'></textarea></td>";
							txtForm += "</tr>";
							
							txtForm += "<tr>";
								txtForm += "<td>State:<span style='color: red;'>*</span></td>";
								txtForm += "<td><input type='text' class='TextBoxStyle' id='CA_P_State' name='CA_P_State' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
							txtForm += "</tr>";
							
							txtForm += "<tr>";
								txtForm += "<td>District/City:<span style='color: red;'>*</span></td>";
								txtForm += "<td><input type='text' class='TextBoxStyle' id='CA_P_City' name='CA_P_City' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
							txtForm += "</tr>";
							
							txtForm += "<tr>";
								txtForm += "<td>Country:</td>";
								txtForm += "<td><input name='CA_P_Country' id='CA_P_Country'  class='TextBoxStyle' readonly='true' value='India' type='text' size='35'  /></td>";
							txtForm += "</tr>";
							
							txtForm += "<tr>";
								txtForm += "<td>Pincode:<span style='color: red;'>*</span></td>";
								txtForm += "<td><input name='CA_P_Pincode' id='CA_P_Pincode' class='TextBoxStyle' type='text' size='35' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /></td>";
							txtForm += "</tr>";				
						txtForm += "</table>";
					txtForm += "</td>";
				txtForm += "</tr>";
									
				txtForm += "<tr>";
					txtForm += "<td colspan='2' class='StyleMainHeading'>Family Details:</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td id='CA_Family_Details' colspan='2'>";
						txtForm += "<div id='CA_FD_Tabs'>";
							txtForm += "<input type='button' id='CA_FD_Tab_Button0' class='ButtonStyle1' onclick='SSS_JS_Fn_Show_FD_Tab(&quot;CA_FD_Tab0&quot;,this.id,false,1)' value='Father' />";
							txtForm += "<input type='button' id='CA_FD_Tab_Button1' class='ButtonStyle' onclick='SSS_JS_Fn_Show_FD_Tab(&quot;CA_FD_Tab1&quot;,this.id,false,1)' value='Mother' />";
							txtForm += "<input class='ButtonStyle' type='button' value='+' onclick='SSS_JS_Fn_Add_Relation()' />";
							txtForm += "<input id='Bt_CA_FD_Remove_Relation' style='visibility: hidden;'  type='button' class='ButtonStyle' value='-' onclick='SSS_JS_Fn_Remove_Relation()'  />";
						txtForm += "</div>";
						txtForm += "<div id='CA_FD_Tabs_Content'>";
						
						txtForm += "</div>";
					txtForm += "</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td colspan='2' class='StyleMainHeading'>Academic Details:</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td id='CA_Academic_Details' colspan='2'>";
						txtForm += "<div id='CA_AD_Tabs'>";
							txtForm += "<input type='button' id='CA_AD_Tab_Button0' class='ButtonStyle1' onclick='SSS_JS_Fn_Show_FD_Tab(&quot;CA_AD_Tab0&quot;,this.id,false,2)' value='SSLC' />";
							txtForm += "<input class='ButtonStyle' type='button' value='+' onclick='SSS_JS_Fn_Add_AD_Relation()' />";
							txtForm += "<input id='Bt_CA_AD_Remove_Relation' style='visibility: hidden;'  type='button' class='ButtonStyle' value='-' onclick='SSS_JS_Fn_Remove_AD_Relation()'  />";
						txtForm += "</div>";
						txtForm += "<div id='CA_AD_Tabs_Content'>";
						
						txtForm += "</div>";
					txtForm += "</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td colspan='2' class='StyleMainHeading PaddTop10'>Skillset Details:</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td id='CA_Skillset_Details' colspan='2'>";
						txtForm += "<div id='CA_SS_Tabs'>";
							txtForm += "<input type='button' id='CA_SS_Tab_Button0' class='ButtonStyle' onclick='SSS_JS_Fn_Show_FD_Tab(&quot;CA_SS_Tab0&quot;,this.id,false,3)' value='Skill Set' />";
							txtForm += "<input type='button' id='CA_SS_Tab_Button1' class='ButtonStyle1' onclick='SSS_JS_Fn_Show_FD_Tab(&quot;CA_SS_Tab1&quot;,this.id,false,3)' value='Office Tools' />";
							txtForm += "<input type='button' id='CA_SS_Tab_Button2' class='ButtonStyle1' onclick='SSS_JS_Fn_Show_FD_Tab(&quot;CA_SS_Tab2&quot;,this.id,false,3)' value='Work Experience' />";
							txtForm += "<input type='button' id='CA_SS_Tab_Button3' class='ButtonStyle1' onclick='SSS_JS_Fn_Show_FD_Tab(&quot;CA_SS_Tab3&quot;,this.id,false,3)' value='Other Details' />";
							txtForm += "<input type='button' id='CA_SS_Tab_Button4' class='ButtonStyle1' onclick='SSS_JS_Fn_Show_FD_Tab(&quot;CA_SS_Tab4&quot;,this.id,false,3)' value='References' />";
						txtForm += "</div>";
						txtForm += "<div id='CA_SS_Tabs_Content' style='padding-top: 5px;'>";
							txtForm += "<table style='width: 450px; display: block; border: solid 1px #000;' id='CA_SS_Tab0' border'0' cellspacing='0' cellpadding='0'>";
								txtForm += "<tr>";
									txtForm += "<colgroup>";
										txtForm += "<col width='150px' />";
										txtForm += "<col width='150px' />";
										txtForm += "<col width='150px' />";
									txtForm += "</colgroup>";
									txtForm += "<td valign='top'>";
										txtForm += "<select id='listSkillSet' class='TextStyle' size='10' style='width: 150px; padding-left: 3px'>";
											txtForm += DDL_SkillSet;
										txtForm += "</select>";
									txtForm += "</td>";
									txtForm += "<td align='center' style='width: 150px'>";
											txtForm += "<input type='button' class='ButtonStyle' value='>>' onclick='add_remove(listSkillSet,listSkillSetKnown,listSkillSet)' /><br />";
											txtForm += "<input type='button' class='ButtonStyle' value='<<' onclick='add_remove(listSkillSetKnown,listSkillSet,listSkillSetKnown)' />";
									txtForm += "</td>";
									txtForm += "<td valign='top'>";
										txtForm += "<select id='listSkillSetKnown' style='width: 150px; padding-left: 3px' class='TextStyle' size='10'>";
										txtForm += "</select>";
									txtForm += "</td>";
								txtForm += "</tr>";
							txtForm += "</table>";
							
							txtForm += "<table style='width: 450px; display: none; border: solid 1px #000;' id='CA_SS_Tab1' border'0' cellspacing='0' cellpadding='0'>";
							txtForm += "<tr>";
									txtForm += "<colgroup>";
										txtForm += "<col width='150px' />";
										txtForm += "<col width='150px' />";
										txtForm += "<col width='150px' />";
									txtForm += "</colgroup>";
									txtForm += "<td valign='top'>";
										txtForm += "<select id='listOfficeTools' class='TextStyle' size='10' style='width: 150px; padding-left: 5px;'>";
											txtForm += "<option value='MS Word'>MS Word</option>";
											txtForm += "<option value='MS Excel'>MS Excel</option>";
											txtForm += "<option value='MS Powerpoint'>MS Powerpoint</option>";
											txtForm += "<option value='MS Access'>MS Access</option>";
											txtForm += "<option value='Corel Draw'>Corel Draw</option>";
											txtForm += "<option value='Flash MX'>Flash MX</option>";
											txtForm += "<option value='Photoshop'>Photoshop</option>";
											txtForm += "<option value='3d Max'>3d Max</option>";
											txtForm += "<option value='Open Office'>Open Office</option>";
										txtForm += "</select>";
									txtForm += "</td>";
									txtForm += "<td align='center' style='width: 150px;'>";
											txtForm += "<input type='button' class='ButtonStyle' value='>>' onclick='add_remove(listOfficeTools,listOfficeToolsKnown,listOfficeTools)' /><br />";
											txtForm += "<input type='button' class='ButtonStyle' value='<<' onclick='add_remove(listOfficeToolsKnown,listOfficeTools,listOfficeToolsKnown)' />";
									txtForm += "</td>";
									txtForm += "<td valign='top'>";
										txtForm += "<select id='listOfficeToolsKnown' class='TextStyle' size='10' style='width: 150px; padding-left: 5px;'>";
										txtForm += "</select>";
									txtForm += "</td>";
								txtForm += "</tr>";
							txtForm += "</table>";
							
							txtForm += "<table id='CA_SS_Tab2' style='display: none; width: 450px; border: solid 1px #000;' border'0' cellspacing='0' cellpadding='0'>";
								txtForm += "<tr>";
									txtForm += "<td>";
										txtForm += "<div id='CA_WE_Tabs'>";
											txtForm += "<input type='button' id='CA_WE_Tab_Button0' class='ButtonStyle1' onclick='SSS_JS_Fn_Show_FD_Tab(&quot;CA_WE_Tab0&quot;,this.id,false,4)' value='Experience1' />";
											txtForm += "<input class='ButtonStyle' type='button' value='+' onclick='SSS_JS_Fn_Add_WE_Relation()' />";
											txtForm += "<input id='Bt_CA_WE_Remove_Relation' style='visibility: hidden;'  type='button' class='ButtonStyle' value='-' onclick='SSS_JS_Fn_Remove_WE_Relation()'  />";
											txtForm += "</div>";
										txtForm += "<div id='CA_WE_Tabs_Content'>";
										txtForm += "</div>";
									txtForm += "</td>";
								txtForm += "</tr>";
							txtForm += "</table>";
							
							txtForm += "<table id='CA_SS_Tab3' style='display: none; border: solid 1px #000;' border'0' cellspacing='5' cellpadding='0'>";
								txtForm += "<tr>";
									txtForm += "<td>";
										txtForm += "<table class='TextStyle' border='0' cellspacing='5' cellpadding='0'>";
										txtForm += "<tr>";
											txtForm += "<th>&nbsp;</th>";
											txtForm += "<th>(Mention Additional Qualifications, Achievements, Hobbies, Co-curricular activities and other details if any) </th>";
										txtForm += "</tr>";
										for(i=1; i<7; i++){
											if(i>1){
												var DisabledStyle = 'disabled';
												var DisabledClass = 'DisabledStyle';
												var CheckedState='';
											}else{
												var DisabledStyle = '';
												var DisabledClass = 'TextBoxStyle';
												var CheckedState = 'checked';
											}
										txtForm += "<tr>";
											txtForm += "<td><input type='checkbox' "+CheckedState+" id='CA_SS_CheckObj"+i+"' onclick='SSS_JS_Fn_Enable(this,&quot;CA_SS_Other_Details"+i+"&quot;,&quot;&quot;)' /></td>";
											txtForm += "<td><input class="+DisabledClass+" id='CA_SS_Other_Details"+i+"' type='textbox' "+DisabledStyle+" size='70' /></td>";
										txtForm += "</tr>";
										}
										txtForm += "</table>";
									txtForm += "</td>";
								txtForm += "</tr>";
							txtForm += "</table>";
							
							txtForm += "<table id='CA_SS_Tab4' style='display: none; width: 450px; border: solid 1px #000;' border'0' cellspacing='0' cellpadding='0'>";
								txtForm += "<tr>";
									txtForm += "<td>";
										txtForm += "<table  class='TextStyle' border='0' cellspacing='5' cellpadding='0'>";
											txtForm += "<colgroup>";
												txtForm += "<col width='10%' />";
												txtForm += "<col width='40%' />";
												txtForm += "<col width='50%' />";
											txtForm += "</colgroup>";
											txtForm += "<tr>";
												txtForm += "<th>&nbsp;</th>";
												txtForm += "<th>Name of the Person</th>";
												txtForm += "<th>Details</th>";
											txtForm += "</tr>";
											for(i=1; i<3; i++){
												if(i>1){
													var DisabledStyle = 'disabled';
													var DisabledClass = 'DisabledStyle';
													var CheckedState='';
												}else{
													var DisabledStyle = '';
													var DisabledClass = 'TextBoxStyle';
													var CheckedState = 'checked';
												}
												txtForm += "<tr>";
													txtForm += "<td valign='top'><input type='checkbox' "+CheckedState+" id='CA_Reference_CheckObj"+i+"' onclick='SSS_JS_Fn_Enable(this,&quot;CA_SS_Reference_Name"+i+"&quot;,&quot;CA_SS_Reference_Details"+i+"&quot;)' /></td>";
													txtForm += "<td valign='top'><input class="+DisabledClass+" type='text' id='CA_SS_Reference_Name"+i+"' size='20' "+DisabledStyle+" /></td>";
													txtForm += "<td><textarea class="+DisabledClass+" cols='30' rows='3' id='CA_SS_Reference_Details"+i+"' "+DisabledStyle+"></textarea></td>";
												txtForm += "</tr>";
											}
										txtForm += "</table>";
									txtForm += "</td>";
								txtForm += "</tr>";
							txtForm += "</table>";
						txtForm += "</div>";
					txtForm += "</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td>Plan for Next Five Years:<span style='color: red;'>*</span></td>";
					txtForm += "<td><textarea name='CA_ShortTermPlan' id='CA_ShortTermPlan' class='TextAreaStyle' cols='40' rows='3' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;'></textarea></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td valign='top'>Resume Attachment:</td>";
					txtForm += "<td>";
						txtForm += "<input class='TextBoxStyle' type='file' name='Careers_ResumeUpload' onchange='SSS_Fn_Upload(&quot;Iframe_Resume_Upload&quot;,&quot;Form_Careers&quot;,&quot;"+UploadPageRequest+"?reqUp=res&quot;)' onfocus='this.className=&quot;TextBoxFocusStyle&quot;' onblur='this.className=&quot;TextBoxStyle&quot;' /><br />";
						txtForm += "<iframe name='Iframe_Resume_Upload' id='Iframe_Resume_Upload'  allowtransparency='true' frameborder='0' scrolling='no' style='width: 200px; height: 50px; display: none; overflow: hidden;' src='inc/uploading.php'></iframe>";
					txtForm += "</td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td id='ErrorMsg' colspan='2'></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td align='right'><input class='ButtonStyle' type='submit' value='Save' onclick='return SSS_Fn_Validate_Careers_Form()' /></td>";
					txtForm += "<td><input class='ButtonStyle' type='reset' value='Reset' /></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td colspan='2' id='SSS_Careers_Ack'></td>";
				txtForm += "</tr>";
				
				txtForm += "<tr>";
					txtForm += "<td></td>";
					txtForm += "<td></td>";
				txtForm += "</tr>";
			txtForm += "</table>";
			txtForm += "</form>";
			return txtForm;
		}

/*Function for Loading Caste List */
		function SSS_Fn_Load_Caste(){
			var Arr_Caste=['BC','OBC','MBC','FC','SC','ST'];
			var Str = "<select name='CA_Caste' id='CA_Caste' class='TextStyle'><option>-</option>";
			for(var i=0; i<Arr_Caste.length; i++){
				Str += "<option value="+Arr_Caste[i]+">"+ Arr_Caste[i] +"</option>";
			}	
			Str += "</select>";
			return Str;
		}
		
/* Function for Validating Passport and permanent address */
		function SSS_Fn_Show_Field(val,DivID,Flag){
			Flag==1 ?  CA_Permanent_Address_Flag = true : CA_Permanent_Address_Flag = false;
			Flag==1 ? document.getElementById("CA_H_PAddr").value="true" : document.getElementById("CA_H_PAddr").value="false";
			val=='1' ? document.getElementById(DivID).style.display="block" : document.getElementById(DivID).style.display="none";
		}
		
/* Function for loading Religion list */
		function SSS_Fn_Load_Religion(){
			var Arr_Religion = ['Buddhist','Christian','Hindu','Jain','Muslim','Parsi','Sikh','Others'];
			var Str = "<select name='CA_Religion' id='CA_Religion' class='TextStyle'><option>-</option>";
				for(i=0; i<Arr_Religion.length; i++){
					Str += "<option value="+Arr_Religion[i]+">";
						Str += Arr_Religion[i];
					Str += "</option>";
				}
			Str += "</select>";
			return Str;
		}
		
/* Function for loading year,month,date */
		function SSS_Fn_Load_Calender(){
			var Str="<table border='0' cellspacing='0' cellpadding='0'><tr><td><select name='CA_DOB_Date' id='CA_DOB_Date' class='TextStyle'><option>-</option>";
			for(dd in Arr_Date){
				Str += "<option value="+Arr_Date[dd]+">";
			 		Str += Arr_Date[dd];
				Str += "</option>";
			}	
				Str+="</select></td><td><select name='CA_DOB_Month' id='CA_DOB_Month' class='TextStyle'><option>-</option>";
			for(mm in Arr_Month){
				Str += "<option value="+Arr_Month[mm]+">";
					Str += Arr_Month[mm];
				Str += "</option>";
			}
				Str += "</select></td><td><select name='CA_DOB_Year' id='CA_DOB_Year' class='TextStyle'><option>-</option>";

			for(yy in Arr_Year){
				Str += "<option value="+Arr_Year[yy]+">";
					Str += Arr_Year[yy];
				Str += "</option>";
			}
				Str += "</select></td></tr></table>";
			return Str;
		}
	
	
//function for	getting field values
	function SSS_Fn_Get_Field_Value(FieldObj,TypeCheck)
	{
		if(TypeCheck == 4){
			var DDLObj = document.getElementById(FieldObj);
			var FieldValue = "";
			for(i=0; i<DDLObj.length; i++){
				FieldValue += DDLObj[i].value + ",";
			}
			return FieldValue;
			return false;
		}
		if(TypeCheck == 3){
			var RadioObj = document.getElementsByName(FieldObj);
			
			for(i=0; i<RadioObj.length; i++){
				
				if(RadioObj[i].checked == true){
					var FieldValue = RadioObj[i].value;
				}
			}			
			return FieldValue;
			return false;
		}
			
		var FieldValue = document.getElementById(FieldObj).value;
		return FieldValue;
	}	
//function for hiding the update container in news
	function SSS_JS_Fn_Hide_Update_News()
	{
		document.getElementById("News_Id").value="";
		document.getElementById("News_Entered_By").value="";
		document.getElementById("News_Description").value="";
		document.getElementById("Update_News_Container").style.display="none";
		document.getElementById("Add_New_News").style.display="block";
	}
