var _UserRegMode;var fileName;var alertsInfo = null;function checkForQuickSignUp()
{if(document.referrer.indexOf("QuickSignup") > -1)
{document.getElementById("recJoinEmp").style.display = "none";}
}
function ValidateMobileNumberRegn()
{var y = document.getElementById(CtrlPrefix + 'txtMobileNumber').value;if(isNaN(y)||y.indexOf(" ")!=-1)
{document.getElementById(CtrlPrefix + 'txtMobileNumber').value="";return false;}
if (y.length>10)
{document.getElementById(CtrlPrefix + 'txtMobileNumber').value="";return false;}
if (y.length<10)
{document.getElementById(CtrlPrefix + 'txtMobileNumber').value="";return false;}
if (y.charAt(0)!="9")
{document.getElementById(CtrlPrefix + 'txtMobileNumber').value="";return false;}     
}
function CheckEmailRegn()
{var _email=$get(CtrlPrefix +'txtEmailAddress').value;if(_email!="")
{PageMethods.CheckEmailAvailability(_email, OnSuccessCheckmail, OnFailedCheckEmail);}
else
{return false;}
}
function OnSuccessCheckmail(response)
{var _email=$get(CtrlPrefix +'txtEmailAddress').value
if(response == 0)
{displayError(document.getElementById(CtrlPrefix + 'txtEmailAddress'),PrepareMsg(MsgArray["ChkEmail"],_email));document.getElementById(CtrlPrefix + 'txtEmailAddress').value="";parent.autofitIframeSignUp(0);return false;}
else
{return true;}    
}
function OnFailedCheckEmail(error)
{alert(error.get_message());HideProgress("btnRegistration");}
function ValidateCollegeName()
{if ($get(CtrlPrefix + "RadioButtonList1_0").checked == true)
{if($get(CtrlPrefix + 'txtcollegename').value =="")
{return false;}
else
{return true;}
}
else if($get(CtrlPrefix + "RadioButtonList1_1").checked == true)
{if($get(CtrlPrefix + 'txtcollegename').value =="")
{return false;}
else
{return true;}
}  
else
{return true;}  
}
function ValidateOtherUniversities()
{var _Othersuniv=parseInt($get(CtrlPrefix + 'ddlUniversity').value,10);var _Othersaffilated=parseInt($get(CtrlPrefix + 'ddlaffiliatedinst').value,10);if(_Othersuniv == 26)
{if($get(CtrlPrefix + 'txtotheruniv').value.replace(/\s+/,"") =="")
{return false;}
else
{return true;}
}    
else if(_Othersaffilated == 90000371)
{if($get(CtrlPrefix + 'txtotheruniv').value.replace(/\s+/,"") =="")
{return false;}
else
{return true;}
}
else
{return true;}
}
function ImageVerify(UserRegMode)
{PrepareNotificationAlerts();_UserRegMode = UserRegMode;if($get(CtrlPrefix + 'txtGUID').value =="")
{$get('errorDiv').style.display="block";displayError($get(CtrlPrefix + 'txtGUID'),"Please enter image text");parent.autofitIframeSignUp(0);HideProgress("btnRegistration");}
else
{$get('errorDiv').style.display="none";var _imagevalue=$get(CtrlPrefix + 'txtGUID').value;var originalText=$get(CtrlPrefix + 'hdnImage').value;if(UserRegMode==20)
PageMethods.VerifyImage(_imagevalue,DoJobSeekerRegistration,OnFailed);else if(UserRegMode==47)
PageMethods.VerifyImage(_imagevalue,DoCollegeRegistration,OnFailed);else if(UserRegMode==67)
PageMethods.VerifyImage(_imagevalue,DoAdvertiserRegistration,OnFailed);else if(UserRegMode==45)
PageMethods.VerifyImage(_imagevalue,DoRecruiterRegistration,OnFailed);else if(UserRegMode ==88390)
PageMethods.VerifyImage(_imagevalue,DoOrganizerRegistration,OnFailed);else if(UserRegMode ==88412)
PageMethods.VerifyImage(_imagevalue,DoEventPublisherRegistration,OnFailed);else if(UserRegMode == 90000016)
PageMethods.VerifyImage(_imagevalue,DoPartnerRegistration,OnFailed);}
}
function HideErrorDiv()
{$get('errorDiv').style.display="none";}
function DoJobSeekerRegistration(response)
{ShowProgress("btnRegistration");$get(CtrlPrefix + 'hdnImage').value = response;if($get(CtrlPrefix + 'hdnImage').value == $get(CtrlPrefix + 'txtGUID').value)
{var objUsersInfo    =   new NexGen.Model.Common.UsersInfo();var _genderCount=2;for(rowCount=0;rowCount<_genderCount;rowCount++)
{if($get(CtrlPrefix +'rdBtnGender_'+rowCount).checked)
{objUsersInfo.Gender=$get(CtrlPrefix +'rdBtnGender_'+rowCount).value;}
}
$get('errorDiv').style.display="none";objUsersInfo.UserName =$get(CtrlPrefix + 'txtUserName').value;objUsersInfo.Pwd =$get(CtrlPrefix + 'txtPassword').value;objUsersInfo.FirstName =$get(CtrlPrefix + 'txtFirstName').value;objUsersInfo.MiddleName =$get(CtrlPrefix + 'txtMiddleName').value;objUsersInfo.LastName =$get(CtrlPrefix + 'txtLastName').value;objUsersInfo.Email =$get(CtrlPrefix + 'txtEmailAddress').value;objUsersInfo.MobileNo =$get(CtrlPrefix + 'txtMobileNumber').value;objUsersInfo.RoleId = 20;objUsersInfo.Status = 7;objUsersInfo.ChatTheme = 50;objUsersInfo.StatusId = 77;PageMethods.JobseekerRegistration(objUsersInfo,alertsInfo,RegisterpwdOnSuccess ,OnFailed);}
else
{displayError($get(CtrlPrefix + 'txtGUID'),MsgArray["ChkImgTxt"]);parent.autofitIframeSignUp(0);$get(CtrlPrefix + 'txtGUID').focus();var rndNum = Math.random();$get('regImg').src="Admin/GenerateRandomImage.ashx?guidId="+rndNum;HideProgress("btnRegistration");return false;}
} 
function checkUserName(stringValue)
{filter =/^[A-Za-z]$/;filter2 =/^[A-Za-z0-9_]+$/;var firstChar = stringValue.value.charAt(0);if(!filter.test(firstChar))
{return false;}
else if(!filter2.test(stringValue.value))
{return false;}
else
{return true;}
}
var xmlObj;function LoadXML()
{var xmlDoc
if (window.ActiveXObject)
{xmlDoc = new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.load("Js/PasswordStrength.xml");}
else if(document.implementation && document.implementation.createDocument)
{xmlDoc = document.implementation.createDocument("","",null);xmlDoc.async = false;xmlDoc.load("Js/PasswordStrength.xml");}
xmlObj = xmlDoc.documentElement;}
function LoadXMLAds()
{var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.load("../Js/PasswordStrength.xml");if(xmlDoc.parseError<0)
xmlDoc.load("../Js/PasswordStrength.xml");xmlObj = xmlDoc.documentElement;}
function isValidPwdAds(value)
{LoadXMLAds();var length;if(xmlObj.childNodes[1].nodeName == 'MinLength')
{length= xmlObj.childNodes[1].childNodes[0].text ? xmlObj.childNodes[1].childNodes[0].text : xmlObj.childNodes[1].childNodes[0].textContent;}
var regularExpression;regularExpression = new RegExp("^.{"+String(length)+",}$");if(regularExpression.test(value))
{var filter = /[0-9]{1,}/;if(filter.test(value))
{var filter = /[^a-zA-Z0-9]{1,}/;if(filter.test(value))
{return true;}
}
}
return false;}
function isValidPwd(value)
{LoadXML();var length;if(xmlObj.childNodes[1].nodeName == 'MinLength')
{length= xmlObj.childNodes[1].childNodes[0].text ? xmlObj.childNodes[1].childNodes[0].text : xmlObj.childNodes[1].childNodes[0].textContent;}
var regularExpression;regularExpression = new RegExp("^.{"+String(length)+",}$");if(regularExpression.test(value))
{var filter = /[0-9]{1,}/;if(filter.test(value))
{var filter = /[^a-zA-Z0-9]{1,}/;if(filter.test(value))
{return true;}
}
}
return false;}
function ProcessPassword()
{$get("HelpLabelSpace").style.display="none";var _passwd=$get(CtrlPrefix + 'txtPassword').value;var _password=trim(_passwd);$get(CtrlPrefix + 'txtPassword').value=_password;var _cnfPwdObj = $get(CtrlPrefix + 'txtConfirmPassword');var _confirmpasswd=_cnfPwdObj.value;var _confirmpassword=trim(_confirmpasswd);$get(CtrlPrefix + 'txtConfirmPassword').value=_confirmpassword;if(_password!="")
{if(_password.length < 8)
{return false;}
else
{$get('HelpLabel').style.display="none";if(_confirmpassword != "")
{if(ProcessCofirmPassword())
{hideVFError(_cnfPwdObj);}
else
{displayError(_cnfPwdObj,MsgArray["ShouldMatch"]);}
}
return true;}
}
}
function ProcessCofirmPassword()
{$get("HelpLabelSpace").style.display="none";var _passwd=$get(CtrlPrefix + 'txtPassword').value;var _password=trim(_passwd);$get(CtrlPrefix + 'txtPassword').value=_password;var _confirmpasswd=$get(CtrlPrefix + 'txtConfirmPassword').value;var _confirmpassword=trim(_confirmpasswd);$get(CtrlPrefix + 'txtConfirmPassword').value=_confirmpassword;if(_confirmpassword=="")
{return false;}
else if(_confirmpassword!="")
{if(_password !="" && _confirmpassword !="")
{if(_password != _confirmpassword)
{return false;}
else
{return true;}
}
}
}
function trim(str) 
{var mystr = str.split(" ");var CorrectStr="";for(var cnt = 0;cnt<mystr .length;cnt++)
{if(mystr[cnt]!="")
CorrectStr +=mystr[cnt]  
}
return CorrectStr;}
function JobSeekerRegistration()
{var _passwd=$get(CtrlPrefix + 'txtPassword').value;var _password=trim(_passwd);$get(CtrlPrefix + 'txtPassword').value=_password;var _confirmpasswd=$get(CtrlPrefix + 'txtConfirmPassword').value;var _confirmpassword=trim(_confirmpasswd);$get(CtrlPrefix + 'txtConfirmPassword').value=_confirmpassword;if(_password.length < 8)
{$get(CtrlPrefix + 'txtPassword').focus();parent.autofitIframeSignUp(0);return false;}
else if(_password==_confirmpassword)
{var cont=FileControl(CtrlPrefix + "fileUpload");if(cont.value!="")
{$get('ErrDivForUpload').style.display="none";if(ValidateFileUploader(CtrlPrefix + "fileUpload",$get(CtrlPrefix + "htxtExtension").value,false))
{ImageVerify(20);return true;}
else
{$get('ErrDivForUpload').style.display="block";parent.autofitIframeSignUp(0);return false;}
}
else
{ImageVerify(20);return true;}
}
else
{displayError($get(CtrlPrefix + 'txtConfirmPassword'),MsgArray["ShouldMatch"]);$get(CtrlPrefix + 'txtConfirmPassword').focus();parent.autofitIframeSignUp(0);return false;} 
}
var UserId;function RegisterpwdOnSuccess(response)
{var reDirectPageUrl="";reDirectPageUrl ="JobseekerRegConfirmMsg.aspx?mode=j";var fileIndex;try
{UserId=response;if(response > 0)
{var date = new Date();var dateTimeString = date.getDate() + date.getMonth() + date.getFullYear()+date.getHours()+date.getMinutes()+date.getMilliseconds();if(ValidateFileUploader(CtrlPrefix + "fileUpload",$get(CtrlPrefix + "htxtExtension").value,true))
{var uploadPopUpBehaviour=$find('BehaviourUploadMessage');uploadPopUpBehaviour.show();var cont=FileControl(CtrlPrefix + "fileUpload");if(cont.value!="")
{fileName=GetFileName(CtrlPrefix + "fileUpload");fileIndex=fileName.lastIndexOf('.');fileName=fileName.substr(0,fileIndex);UploadFile(CtrlPrefix + "fileUpload","~/App_Data/Resumes/" +dateTimeString+fileName,"ResumeUploadSuccess",$get(CtrlPrefix + "htxtFileSize").value,$get(CtrlPrefix + "htxtExtension").value);}
}
else
{var returnUrl=$get(CtrlPrefix + 'returnUrlValue').value;PageMethods.InsertReturnUrl(returnUrl,UserId);var invitationId=$get(CtrlPrefix + 'invitationId').value;var roleId=$get(CtrlPrefix + 'roleId').value;if(invitationId!="")
{PageMethods.GetUserIdAndMessage(invitationId,UserId,roleId,function(result)
{parent.window.location.href="JobseekerRegConfirmMsg.aspx?mode=j";},function(result)
{parent.window.location.href="JobseekerRegConfirmMsg.aspx?mode=j";});}
else
{parent.window.location.href="JobseekerRegConfirmMsg.aspx?mode=j";}
}
}
else
{$get('errorDiv').style.display="block";$get('errorDiv').innerHTML="Unable to Register"
parent.autofitIframeSignUp(0);}
}
catch(e)
{alert(e);}
}
function ResumeUploadSuccess(FileLoc)
{if(parent.document.location.href.toLowerCase().indexOf("/signup.aspx") > -1)
{PageMethods.GrabResumeDetails(UserId, $get(CtrlPrefix + 'txtUserName').value, FileLoc,fileName,$get(CtrlPrefix + 'txtFirstName').value,$get(CtrlPrefix + 'txtMiddleName').value,$get(CtrlPrefix + 'txtLastName').value,ResumeGrabSuccess,OnFailed);}
else
{var querystring = parent.document.location.search;var reqId = '';if(querystring != null)
{if(querystring.toLowerCase().indexOf("jobseekers/jobviewdetails") > -1 || querystring.toLowerCase().indexOf("common/anonymoussearchresult") > -1 || querystring.toLowerCase().indexOf("jobseekers/careerjobs") > -1 || querystring.toLowerCase().indexOf("recruiter/microsite") > -1 || querystring.toLowerCase().indexOf("jobseekers/featuredjobs") > -1 )
reqId = querystring.substring(querystring.indexOf("sk=") + 3,querystring.length);}
PageMethods.GrabResumeDetails(UserId, $get(CtrlPrefix + 'txtUserName').value, FileLoc,fileName,$get(CtrlPrefix + 'txtFirstName').value,$get(CtrlPrefix + 'txtMiddleName').value,$get(CtrlPrefix + 'txtLastName').value,reqId,ResumeGrabSuccess,OnFailed);}
}
function ResumeGrabSuccess(response)
{var returnUrl=$get(CtrlPrefix + 'returnUrlValue').value;PageMethods.InsertReturnUrl(returnUrl,UserId);var invitationId=$get(CtrlPrefix + 'invitationId').value;var roleId=$get(CtrlPrefix + 'roleId').value;if(invitationId!="")
{PageMethods.GetUserIdAndMessage(invitationId,UserId,roleId,function(result)
{parent.window.location.href="JobseekerRegConfirmMsg.aspx?mode=j";},function(result)
{parent.window.location.href="JobseekerRegConfirmMsg.aspx?mode=j";});}
else
{parent.window.location.href="JobseekerRegConfirmMsg.aspx?mode=j";}
}
var mode="direct";;function CheckUserAvailability()
{var username=document.getElementById(CtrlPrefix + 'txtUserName').value;if(username != "")
{if( checkUserName($get(CtrlPrefix + 'txtUserName')))
{PageMethods.CheckUserAvailability(username,OnSuccessJBUsername,OnFailed);}
}
}
function OnSuccessJBUsername(response)
{var username =document.getElementById(CtrlPrefix + 'txtUserName').value;if(response > 0)
{displayError(document.getElementById(CtrlPrefix + 'txtUserName'),PrepareMsg(MsgArray["ChkUser"],"<b>"+username+"</b>"));document.getElementById(CtrlPrefix + 'txtUserName').value="";document.getElementById(CtrlPrefix + 'txtUserName').title ="User name "+username+" is not available.kindly choose another"
parent.autofitIframeSignUp(0);return false;}
else
{return true;}
}
function OnFailed(error)
{alert(error.get_message());var uploadPopUpBehaviour=$find('BehaviourUploadMessage');uploadPopUpBehaviour.hide();HideProgress("btnRegistration");}
var isValidPassword =true;function CheckPWDSpaces(e)
{if(e.keyCode == 32)
{e.keyCode = 0;}
}
function ProcessChangepassword()
{ShowProgress("btnSumitpw");var _oldPassword=document.getElementById(CtrlPrefixpwd + 'txtOldPassword').value;var _confirmPassword=document.getElementById(CtrlPrefixpwd + 'txtRetypePassword').value;var _passwd=$get(CtrlPrefixpwd + 'txtNewPassword').value;var _newPassword=trim(_passwd);if( _oldPassword != "" &&  _oldPassword != null)
{if(_newPassword.length < 8)
{HideProgress("btnSumitpw","DisplaySaveMsgPW", MsgArray["minPwdLen"],"Info");}
else if(_newPassword ==_confirmPassword)
{PageMethods.ProcessChangePwd(_newPassword,_oldPassword,changepwdOnSuccess,OnFailed);}
else
{HideProgress("btnSumitpw","DisplaySaveMsgPW", MsgArray["ShouldMatch"],"Info")
}
}
else
{$get('pwderror').style.display="block";$get('pwderror').innerHTML="Please enter password"
}    
}
function changepwdOnSuccess(response)
{if(parseInt(response) ==0)
{$get('pwderror').className ='information';$get('pwderror').style.display="block";$get('pwderror').innerHTML="Enter your old password correctly"
HideProgress("btnSumitpw");ClearChangePasswordControls();}
else if(parseInt(response) >0)
{$get('pwderror').style.display="none";$get('pwderror').className ='success';$get('showChagePwdDiv').style.display="block";HideProgress("btnSumitpw","DisplaySaveMsgPW", MsgArray["PwdSuc"]);ClearChangePasswordControls(1);}
}
function ClearChangePasswordControls(val)
{if(val!=1)
$get("DisplaySaveMsgPW").innerHTML="";document.getElementById(CtrlPrefixpwd + 'txtOldPassword').value = "";document.getElementById(CtrlPrefixpwd + 'txtRetypePassword').value = "";document.getElementById(CtrlPrefixpwd + 'txtNewPassword').value = "";}
function CollegeRegistration()
{$get('divaffiliatedinsterror').style.display ='none';$get('divUniversityError').style.display ='none';if ($get(CtrlPrefix + "RadioButtonList1_0").checked == true)
{if($get(CtrlPrefix + 'ddlUniversity').value == "0" || $get(CtrlPrefix + 'ddlUniversity').value == "<Select>")
{$get(CtrlPrefix + 'ddlUniversity').className ='form_input_error';$get('divUniversityError').style.display="block";$get('divUniversityError').innerHTML ="Please select the university"
parent.autofitIframeSignUp(0);return false;}
else
{$get(CtrlPrefix + 'ddlUniversity').className ='form_input_normal';}
}
if($get(CtrlPrefix + 'chkByPhone').checked ||$get(CtrlPrefix + 'chkInPerson').checked)
{if(validateContactTime())
{$get('ctntctTimErrDiv').style.display="none";parent.autofitIframeSignUp(0);}
else
{$get('ctntctTimErrDiv').style.display="block";$get('ctntctTimErrDiv').innerHTML ="Please select the time to contact";parent.autofitIframeSignUp(0);return false;}
}
ShowProgress("btnRegistration");ImageVerify(47);}
function validateContent(CntrlName,extensionName)
{var cont=FileControl(CtrlPrefixPhotoUpload + CntrlName);if(cont.value == "")
{return true;}
else if(cont.value!="")
{if(ValidateFileUploader(CtrlPrefix + CntrlName,$get(CtrlPrefix + extensionName).value,false))
{return true;}
else
{return false;}
}
}
function OnChangeUniversity()
{var _insType;var _Others=parseInt($get(CtrlPrefix + 'ddlUniversity').value,10);$get('divUniversityError').style.display ='none';$get(CtrlPrefix + 'ddlUniversity').className="form_input_normal";if(_Others == 26)
{$get('trothers').style.display=navigator.appName.indexOf("Microsoft")!= -1?"block":"table-row";$get(CtrlPrefix+"txtotheruniv").setAttribute("valGrp","Set1Val");}
else
{$get('trothers').style.display='none';$get(CtrlPrefix+"txtotheruniv").removeAttribute("valGrp");}
parent.autofitIframeSignUp(0);}
function OnChangeAffInst()
{var _Others=parseInt($get(CtrlPrefix + 'ddlaffiliatedinst').value,10);$get('divaffiliatedinsterror').style.display ='none';$get(CtrlPrefix + 'ddlaffiliatedinst').className="form_input_normal";if(_Others == 90000371)
{$get('trothers').style.display= navigator.appName.indexOf("Microsoft")!= -1?"block":"table-row";$get(CtrlPrefix+"txtotheruniv").setAttribute("valGrp","Set1Val");}
else
{$get('trothers').style.display='none';$get(CtrlPrefix+"txtotheruniv").removeAttribute("valGrp")
}
parent.autofitIframeSignUp(0);}
function DoCollegeRegistration(response)
{var UserMode ="";$get(CtrlPrefix + 'hdnImage').value = response;if($get(CtrlPrefix + 'hdnImage').value == $get(CtrlPrefix + 'txtGUID').value)
{var objPlacementOfficersInfo =new NexGen.Model.QA.PlacementOfficersInfo();if ($get(CtrlPrefix + "RadioButtonList1_0").checked == true)
{objPlacementOfficersInfo.InstitutionType = "College";objPlacementOfficersInfo.UniversityType = true;objPlacementOfficersInfo.CollegeName=$get(CtrlPrefix + 'txtcollegename').value;if($get(CtrlPrefix + 'ddlUniversity').value != "0")
{objPlacementOfficersInfo.UniversityId =parseInt($get(CtrlPrefix + 'ddlUniversity').value,10);objPlacementOfficersInfo.UniversityName =$get(CtrlPrefix + 'ddlUniversity').options[$get(CtrlPrefix + 'ddlUniversity').selectedIndex].text;if($get(CtrlPrefix + 'ddlUniversity').text == 'others')
objPlacementOfficersInfo.OthersInstituteName = $get(CtrlPrefix + 'txtOthersCollegeName').value;else
objPlacementOfficersInfo.OthersInstituteName = "";}
}
else if($get(CtrlPrefix + "RadioButtonList1_1").checked == true)
{objPlacementOfficersInfo.InstitutionType = "Training Institute";objPlacementOfficersInfo.UniversityType = false;objPlacementOfficersInfo.CollegeName=$get(CtrlPrefix + 'txtcollegename').value;if($get(CtrlPrefix + 'ddlaffiliatedinst').value != "0")
objPlacementOfficersInfo.UniversityId  = $get(CtrlPrefix + 'ddlaffiliatedinst').value;} 
objPlacementOfficersInfo.ReturnUrl = "PaymentGateWay/SelectedProductForm.aspx";objPlacementOfficersInfo.Others=$get(CtrlPrefix + 'txtotheruniv').value;objPlacementOfficersInfo.RegisteredOfficeAddress=$get(CtrlPrefix + 'txtAddress').value;objPlacementOfficersInfo.CountryId =parseInt($get(CtrlPrefix + 'ddlCountry').value,10);objPlacementOfficersInfo.StateId =parseInt($get(CtrlPrefix + 'ddlState').value,10);objPlacementOfficersInfo.CityId =parseInt($get(CtrlPrefix + 'ddlCity').value,10);objPlacementOfficersInfo.Pincode =$get(CtrlPrefix + 'txtZip').value;objPlacementOfficersInfo.CollageFax =$get(CtrlPrefix + 'txtFax').value;objPlacementOfficersInfo.CollegePhone =$get(CtrlPrefix + 'txtCollegephone').value;objPlacementOfficersInfo.CollegeCategory =$get(CtrlPrefix + 'ddlCollCategory').value;objPlacementOfficersInfo.EmailId1 = $get(CtrlPrefix + 'txtSecEmailId1').value;objPlacementOfficersInfo.EmailId2 = $get(CtrlPrefix + 'txtSecEmailId2').value;if($get(CtrlPrefix + 'txtStudents').value!="")
{objPlacementOfficersInfo.NoOfStudents =parseInt($get(CtrlPrefix + 'txtStudents').value,10);}
if($get(CtrlPrefix + 'rbtlColltype_0').checked)
{objPlacementOfficersInfo.CollegeTypeName = "Private";objPlacementOfficersInfo.CollegeType = parseInt($get(CtrlPrefix + 'rbtlColltype_0').value,10);}                
else
{objPlacementOfficersInfo.CollegeTypeName = "Government";objPlacementOfficersInfo.CollegeType = parseInt($get(CtrlPrefix + 'rbtlColltype_1').value,10);}
objPlacementOfficersInfo.CollegeURL =$get(CtrlPrefix + 'txtCollageurl').value;objPlacementOfficersInfo.YearofEstablish =$get(CtrlPrefix + 'txtYearEstablish').value;objPlacementOfficersInfo.AboutYourCollege =GetIframeData('RTECoverLetterDiv');;objPlacementOfficersInfo.ContactPersonName = $get(CtrlPrefix + 'txtcontactperson').value;$get(CtrlPrefix + 'hdnContactName').value   =   $get(CtrlPrefix + 'txtcontactperson').value;objPlacementOfficersInfo.ContactPersonMailId =$get(CtrlPrefix + 'txtEmailAddress').value;$get(CtrlPrefix + 'hdnContactMailId').value = $get(CtrlPrefix + 'txtEmailAddress').value;objPlacementOfficersInfo.ContactPersonNumber =$get(CtrlPrefix + 'txtContperphone').value;objPlacementOfficersInfo.StatusId =77;objPlacementOfficersInfo.CollegeLogo="";objPlacementOfficersInfo.StatusId = 29;$get(CtrlPrefix + 'ddlSrartTime').value != "<Select>" ?(objPlacementOfficersInfo.ContactFromTime = $get(CtrlPrefix + 'ddlSrartTime').value):objPlacementOfficersInfo.ContactFromTime = null;$get(CtrlPrefix + 'ddlEndTime').value != "<Select>" ?(objPlacementOfficersInfo.ContactToTime = $get(CtrlPrefix + 'ddlEndTime').value):objPlacementOfficersInfo.ContactToTime = null;var ByPhone = $get(CtrlPrefix + 'chkByPhone');if(ByPhone.checked == true)
objPlacementOfficersInfo.IsByPhone=true;else
objPlacementOfficersInfo.IsByPhone=false;var InPerson = $get(CtrlPrefix + 'chkInPerson');if(InPerson.checked == true)
objPlacementOfficersInfo.IsByPerson=true;else
objPlacementOfficersInfo.IsByPerson=false;var ByMail = $get(CtrlPrefix + 'chkBymail');if(ByMail.checked == true)      
objPlacementOfficersInfo.IsByMail=true;else
objPlacementOfficersInfo.IsByMail=false;UserMode = $get(CtrlPrefix+"hdnMode").value;objPlacementOfficersInfo.UserName = $get(CtrlPrefix +'txtUserName').value;objPlacementOfficersInfo.Password = $get(CtrlPrefix +'txtPassword').value;var TechToDisplay =  $get(CtrlPrefix +'ddlTechnology');var TechIds = "";for(var cnt = 0;cnt <TechToDisplay.length;cnt++)
{if(TechToDisplay[cnt].selected == true)
{TechIds +=  TechToDisplay[cnt].value+",";}
}
if(TechIds.lastIndexOf(',')== (TechIds.length-1))
{TechIds = TechIds.substring(0,TechIds.lastIndexOf(","));}
objPlacementOfficersInfo.ReferenceTypeID = $get(CtrlPrefix + 'ddlRefType').value;objPlacementOfficersInfo.BusinessExecId = $get(CtrlPrefix + 'txtExecutiveCode').value;PageMethods.CollegeRegistration(objPlacementOfficersInfo,UserMode, TechIds, alertsInfo, RegisterCollegeOnSuccess,OnFailed,objPlacementOfficersInfo);}
else
{displayError($get(CtrlPrefix + 'txtGUID'),MsgArray["ChkImgTxt"]);$get(CtrlPrefix + 'txtGUID').focus();parent.autofitIframeSignUp(0);var rndNum=Math.random();$get('regImg').src="Admin/GenerateRandomImage.ashx?guidId="+rndNum;HideProgress("btnRegistration");return false;}  
}
function InsertTech()
{var TechToDisplay =  $get(CtrlPrefix +'ddlTechnology');var TechIds = "";for(var cnt = 0;cnt <TechToDisplay.length;cnt++)
{if(TechToDisplay[cnt].selected == true)
{TechIds +=  TechToDisplay[cnt].value+",";}
}
if(TechIds.lastIndexOf(',')== (TechIds.length-1))
{TechIds = TechIds.substring(0,TechIds.lastIndexOf(","));}
PageMethods.InsertTech(TechIds,collegeId,TechOnSuccess,OnFailed);}
function TechOnSuccess(result)
{if(result > 0)
fileLogoUpload(Response);else
{$get('errorDiv').style.display="block";$get('errorDiv').innerHTML="Unable to register";parent.autofitIframeSignUp(0);} 
}
var collegeId;var Response;function RegisterCollegeOnSuccess(response,objPlacementOfficersInfo)
{if(response >0)
{try {GridConfiguartion.SetLink(
"Username=" + objPlacementOfficersInfo.ContactPersonName + "&Email=" + objPlacementOfficersInfo.ContactPersonMailId + "&mode=p",
function(result)
{parent.window.location.href = "JobseekerRegConfirmMsg.aspx?" + result;});}
catch(error) {} 
}
HideProgress("btnRegistration");}
function EnableTermsCond()
{var termsandCond = document.getElementById("ChkTermsCond");if(termsandCond.checked == true)
{return true;}
else
return false;}
function FillStates()
{var _countryid=$get(CtrlPrefix + 'ddlCountry').value;if(_countryid!="0")
NexGenRegistration.RegistrationService.GetStates(_countryid,OnSuccessStatesFill,OnFailed);else
{var _drpstate = $get(CtrlPrefix + 'ddlState');_drpstate.length=0;var _drpDistrict = $get(CtrlPrefix + 'ddlCity');_drpDistrict.length=0;_drpDistrict.options[0] = new Option("<Select>","0");_drpstate.options[0] = new Option("<Select>","0");} 
}
function OnSuccessStatesFill(response)
{var stateDrpDn = $get(CtrlPrefix + 'ddlState');if(response!=null)
{if (window.ActiveXObject)
{if(response != null)
{xmlResDoc=new ActiveXObject("Microsoft.XMLDOM");xmlResDoc.async=false;xmlResDoc.loadXML(response);stateDrpDn.options[0] = new Option("<Select>","0");} 
}
else if (document.implementation && document.implementation.createDocument)
{if(response != null)
{var parser=new DOMParser();xmlResDoc=parser.parseFromString(response,"text/xml");}
}
for(var i=0;i<xmlResDoc.getElementsByTagName("Name").length;i++)
{var text = xmlResDoc.getElementsByTagName("Name")[i].text ?xmlResDoc.getElementsByTagName("Name")[i].text : xmlResDoc.getElementsByTagName("Name")[i].textContent;var value = xmlResDoc.getElementsByTagName("Id")[i].text ? xmlResDoc.getElementsByTagName("Id")[i].text : xmlResDoc.getElementsByTagName("Id")[i].textContent;stateDrpDn.options[i+1] = new Option(text,value);}       
}
}
function FillDistricts()
{var stateId=$get(CtrlPrefix + 'ddlState').value;if(stateId!="0")
NexGenRegistration.RegistrationService.GetCities(stateId,OnSuccessCitiesFill,OnFailed);else
{var _drpDistrict = $get(CtrlPrefix + 'ddlCity');_drpDistrict.length=0;_drpDistrict.options[0] = new Option("<Select>","0");}
}
function OnSuccessCitiesFill(response)
{var districtDrpDn =$get(CtrlPrefix + 'ddlCity');if(response!=null)
{if (window.ActiveXObject)
{if(response != null)
{xmlResDoc=new ActiveXObject("Microsoft.XMLDOM");xmlResDoc.async=false;xmlResDoc.loadXML(response);districtDrpDn.options[0] = new Option("<Select>","0");} 
}
else if (document.implementation && document.implementation.createDocument)
{if(response != null)
{var parser=new DOMParser();xmlResDoc=parser.parseFromString(response,"text/xml");}
}
for(var i=0;i<xmlResDoc.getElementsByTagName("Name").length;i++)
{var text = xmlResDoc.getElementsByTagName("Name")[i].text ? xmlResDoc.getElementsByTagName("Name")[i].text : xmlResDoc.getElementsByTagName("Name")[i].textContent;var value = xmlResDoc.getElementsByTagName("Id")[i].text ? xmlResDoc.getElementsByTagName("Id")[i].text : xmlResDoc.getElementsByTagName("Id")[i].textContent;districtDrpDn.options[i+1] = new Option(text,value);}        
}
}
function SaveOrganizationsDetails()
{ShowProgress("btnRegistration");if($get(CtrlPrefix + 'chkByPhone').checked ||$get(CtrlPrefix + 'chkInPerson').checked)
{if(validateContactTime())
{$get('ctntctTimErrDiv').style.display="none";ImageVerify(45);parent.autofitIframeSignUp(0);}
else
{$get('ctntctTimErrDiv').style.display="block";$get('ctntctTimErrDiv').innerHTML ="Please select the time to contact"
parent.autofitIframeSignUp(0);HideProgress("btnRegistration");}
}
else
{ImageVerify(45);}
}
function DoRecruiterRegistration(response)
{$get(CtrlPrefix + 'hdnImage').value = response;if($get(CtrlPrefix + 'hdnImage').value == $get(CtrlPrefix + 'txtGUID').value)
{if(document.getElementById("updLogo").checked)
{var cont=FileControl(CtrlPrefix + "fileUpload");if(cont.value =="")
{alert("Please specify organization logo.If you want to upload later select NO IMAGE option.");document.getElementById("updNoImage").focus();HideProgress("btnRegistration");return false;}
if(!ValidateFileUploader(CtrlPrefix + "fileUpload",$get(CtrlPrefix + "htxtExtension").value,true))
{HideProgress("btnRegistration","Note: Only png,jpg,gif extension files are allowed.");return false;}
}
var OrgUrl = $get(CtrlPrefix + 'txtOrgUrl').value;if(OrgUrl!="")
{if(OrgUrl.startsWith("http://"))
OrgUrl = OrgUrl;else
OrgUrl = "http://" + OrgUrl;PageMethods.ValOrgWebsiteUrl(OrgUrl, OnValidWebSiteUrl, OnFailedResponse);}
else
{OnValidWebSiteUrl(1);}
}
else
{displayError($get(CtrlPrefix + 'txtGUID'),MsgArray["ChkImgTxt"]);$get(CtrlPrefix + 'txtGUID').focus();parent.autofitIframeSignUp(0);var rndNum=Math.random();$get('regImg').src="Admin/GenerateRandomImage.ashx?guidId="+rndNum;HideProgress("btnRegistration");return false;}  
}
function OnValidWebSiteUrl(response)
{var mode = "";if(response == 1)
{var objOrganizationsInfo =new NexGen.Model.Recruiter.OrganizationsInfo();objOrganizationsInfo.OrganizationName= $get(CtrlPrefix + 'txtOrgName').value;objOrganizationsInfo.OrgAddress = $get(CtrlPrefix + 'txtorgaddress').value;objOrganizationsInfo.ContactPersonName = $get(CtrlPrefix + 'txtcontpername').value;objOrganizationsInfo.OrganizationType = $get(CtrlPrefix + 'ddlorganizationtype').value;objOrganizationsInfo.OrganizationUrl = $get(CtrlPrefix + 'txtOrgUrl').value;objOrganizationsInfo.OrganizationPhoneNo= $get(CtrlPrefix + 'txtOrgPhone').value;objOrganizationsInfo.AboutOrganization= $get(CtrlPrefix + 'txtAbtOrg').value;objOrganizationsInfo.CountryId= $get(CtrlPrefix + 'ddlCountry').value;objOrganizationsInfo.StateId = $get(CtrlPrefix + 'ddlState').value;objOrganizationsInfo.CityId = $get(CtrlPrefix + 'ddlCity').value;objOrganizationsInfo.ContactPersonPhone = $get(CtrlPrefix + 'txtcontperphone').value;objOrganizationsInfo.Designation = $get(CtrlPrefix + 'txtdesignation').value;objOrganizationsInfo.ConatctPersonMailId= $get(CtrlPrefix + 'txtemail').value;$get(CtrlPrefix + 'ddlSrartTime').value != "<Select>" ?(objOrganizationsInfo.ContactFromTime = $get(CtrlPrefix + 'ddlSrartTime').value):objOrganizationsInfo.ContactFromTime = null;$get(CtrlPrefix + 'ddlEndTime').value != "<Select>" ?(objOrganizationsInfo.ContactToTime = $get(CtrlPrefix + 'ddlEndTime').value):objOrganizationsInfo.ContactToTime = null;objOrganizationsInfo.StatusId = '8';objOrganizationsInfo.ReturnUrl = "PaymentGateWay/SelectedProductForm.aspx";var ByPhone = $get(CtrlPrefix + 'chkByPhone');if(ByPhone.checked == true)
objOrganizationsInfo.IsByPhone=true;else
objOrganizationsInfo.IsByPhone=false;var InPerson = $get(CtrlPrefix + 'chkInPerson');if(InPerson.checked == true)
objOrganizationsInfo.IsInPerson=true;else
objOrganizationsInfo.IsInPerson=false;var ByMail = $get(CtrlPrefix + 'chkBymail');if(ByMail.checked == true)      
objOrganizationsInfo.IsByMail=true;else
objOrganizationsInfo.IsByMail=false;mode = $get(CtrlPrefix+"hdnMode").value;objOrganizationsInfo.EnquiryDate = '';objOrganizationsInfo.IndustryId = $get(CtrlPrefix + 'ddlIndustry').value;objOrganizationsInfo.CompanySize = $get(CtrlPrefix +'drpdnCompanySize').value;objOrganizationsInfo.CompanySalesRevenue = $get(CtrlPrefix +'drpdnCompanyRevenue').value;objOrganizationsInfo.Size = $get(CtrlPrefix + 'drpdnCompanySize').value;objOrganizationsInfo.CompanySizeText = $get(CtrlPrefix + 'drpdnCompanySize').options[$get(CtrlPrefix + 'drpdnCompanySize').selectedIndex].text;objOrganizationsInfo.OrgType = $get(CtrlPrefix + 'ddlorganizationtype').options[$get(CtrlPrefix + 'ddlorganizationtype').selectedIndex].text;var _organizationId=document.getElementById(CtrlPrefix +"hdnOrgId");var  _userName = document.getElementById(CtrlPrefix +"hdnUserName").value;if(_organizationId.value > 0)
{objOrganizationsInfo.OrganizationId = _organizationId.value;PageMethods.UpdateOrganizationDetails(_userName,objOrganizationsInfo,alertsInfo, UpdateOrgDetailsOnSuccess,OnFailed);}
else   
{objOrganizationsInfo.UserName = $get(CtrlPrefix +'txtUserName').value;objOrganizationsInfo.Password = $get(CtrlPrefix +'txtPassword').value;PageMethods.SaveOrganizationDetails(objOrganizationsInfo,mode,alertsInfo,InsertOrgDetailsOnSuccess,OnFailed,objOrganizationsInfo);}
}
else
if(response == -1)
{displayError($get(CtrlPrefix + 'txtOrgUrl'),"Please enter valid website url");$get(CtrlPrefix + 'txtOrgUrl').focus();parent.autofitIframeSignUp(0);HideProgress("btnRegistration");}       
}
var org_Id ;function InsertOrgDetailsOnSuccess(response,objOrganizationsInfo)
{var _OrganizationId=response;org_Id=_OrganizationId;UploadLogo(org_Id);var count=document.getElementsByName('OrgDomains').length;if(response > 0)
{var xmlDomain = "<Root>";for(loopindex=1;loopindex<count+1;loopindex++)
{var id = 'chk'+loopindex;if (document.getElementById(id).checked == true)
{xmlDomain = xmlDomain + "<Domain DomainId=\"" + document.getElementById(id).value + "\" />";}
}
xmlDomain = xmlDomain + "</Root>";PageMethods.InsertDomains(_OrganizationId,xmlDomain,InsertDomainsOfOrganisationOnSucess,OnFailed,objOrganizationsInfo);}
}
function UpdateOrgDetailsOnSuccess(response)
{var _OrganizationId=response;if(response > 0)
{GridConfiguartion.SetLink(
"UserName="+response,
function(result)
{parent.window.location = "Dashboard.aspx?";});}
}
function InsertDomainsOfOrganisationOnSucess(response,objOrganizationsInfo)
{if(response > 0)
{var returnURL ="";if($get("hdnCid").value !="0")
{var classifiedId = $get("hdnCid").value;PageMethods.UpdateClassifieds(classifiedId,org_Id, onsuccssUpdate, OnFailed);}   
else
{try {GridConfiguartion.SetLink(
"Username=" + objOrganizationsInfo.ContactPersonName + "&Email=" + objOrganizationsInfo.ConatctPersonMailId + "&mode=r",
function(result)
{parent.window.location.href = "JobseekerRegConfirmMsg.aspx?" + result;});}
catch(error) {}  
}
}
}
function onsuccssUpdate(response)
{parent.window.location.href = "RecruiterRegConfirmMsg.aspx";}
function SaveOrganizerDetails()
{ShowProgress("btnRegistration");if($get(CtrlPrefix + 'chkByPhone').checked ||$get(CtrlPrefix + 'chkInPerson').checked)
{if(validateContactTime())
{$get('ctntctTimErrDiv').style.display="none";ImageVerify(88390);parent.autofitIframeSignUp(0);}
else
{$get('ctntctTimErrDiv').style.display="block";$get('ctntctTimErrDiv').innerHTML ="Please select the time to contact"
parent.autofitIframeSignUp(0);HideProgress("btnRegistration");}
}
else
{ImageVerify(88390);}
}
function DoOrganizerRegistration(response)
{$get(CtrlPrefix + 'hdnImage').value = response;if($get(CtrlPrefix + 'hdnImage').value == $get(CtrlPrefix + 'txtGUID').value)
{var OrgUrl = $get(CtrlPrefix + 'txtOrgUrl').value;if(OrgUrl!= "")
{if(OrgUrl.startsWith("http://"))
OrgUrl = OrgUrl;else
OrgUrl = "http://" + OrgUrl;PageMethods.ValOrgWebsiteUrl(OrgUrl, OnValidOrganizerWebSiteUrl, OnFailedResponse);}
else
{OnValidOrganizerWebSiteUrl(1);}
}
else
{displayError($get(CtrlPrefix + 'txtGUID'),MsgArray["ChkImgTxt"]);$get(CtrlPrefix + 'txtGUID').focus();parent.autofitIframeSignUp(0);var rndNum=Math.random();$get('regImg').src="Admin/GenerateRandomImage.ashx?guidId="+rndNum;HideProgress("btnRegistration");return false;}
}
function OnValidOrganizerWebSiteUrl(response)
{if(response == 1)
{$get('errorDiv').style.display="none";var objOrganizationsInfo  = new NexGen.Model.VirtualSeminar.VS_OrganizerInfo();objOrganizationsInfo.ReturnUrl = "PaymentGateWay/SelectedProductForm.aspx";objOrganizationsInfo.OrganizationName= $get(CtrlPrefix + 'txtOrgName').value;objOrganizationsInfo.OrgAddress = $get(CtrlPrefix + 'txtorgaddress').value;objOrganizationsInfo.ContactPersonName = $get(CtrlPrefix + 'txtcontpername').value;objOrganizationsInfo.OrganizationUrl = $get(CtrlPrefix + 'txtOrgUrl').value;objOrganizationsInfo.OrganizationPhoneNo= $get(CtrlPrefix + 'txtOrgPhone').value;objOrganizationsInfo.Designation= $get(CtrlPrefix + 'txtAbtOrg').value;objOrganizationsInfo.CountryId= $get(CtrlPrefix + 'ddlCountry').value;objOrganizationsInfo.StateId = $get(CtrlPrefix + 'ddlState').value;objOrganizationsInfo.CityId = $get(CtrlPrefix + 'ddlCity').value;objOrganizationsInfo.ContactPersonPhone = $get(CtrlPrefix + 'txtcontperphone').value;objOrganizationsInfo.Designation = $get(CtrlPrefix + 'txtdesignation').value;objOrganizationsInfo.ConatctPersonMailId= $get(CtrlPrefix + 'txtemail').value;$get(CtrlPrefix + 'ddlSrartTime').value != "<Select>" ?(objOrganizationsInfo.ContactFromTime = $get(CtrlPrefix + 'ddlSrartTime').value):objOrganizationsInfo.ContactFromTime = null;$get(CtrlPrefix + 'ddlEndTime').value != "<Select>" ?(objOrganizationsInfo.ContactToTime = $get(CtrlPrefix + 'ddlEndTime').value):objOrganizationsInfo.ContactToTime = null;objOrganizationsInfo.StatusId='8';objOrganizationsInfo.ReturnUrl = "PaymentGateWay/SelectedProductForm.aspx";var ByPhone = $get(CtrlPrefix + 'chkByPhone');if(ByPhone.checked == true)
objOrganizationsInfo.IsByPhone=true;else
objOrganizationsInfo.IsByPhone=false;var InPerson = $get(CtrlPrefix + 'chkInPerson');if(InPerson.checked == true)
objOrganizationsInfo.IsInPerson=true;else
objOrganizationsInfo.IsInPerson=false;var ByMail = $get(CtrlPrefix + 'chkBymail');if(ByMail.checked == true)      
objOrganizationsInfo.IsByMail=true;else
objOrganizationsInfo.IsByMail=false;mode = $get(CtrlPrefix+"hdnMode").value;objOrganizationsInfo.EnquiryDate ='';objOrganizationsInfo.IndustryId= $get(CtrlPrefix + 'ddlIndustry').value;objOrganizationsInfo.CompanySize=$get(CtrlPrefix +'drpdnCompanySize').value;objOrganizationsInfo.CompanySalesRevenue=$get(CtrlPrefix +'drpdnCompanyRevenue').value;objOrganizationsInfo.UserName = $get(CtrlPrefix +'txtUserName').value;objOrganizationsInfo.Password = $get(CtrlPrefix +'txtPassword').value;objOrganizationsInfo.AccountName = $get(CtrlPrefix +'txtAccount').value;PageMethods.organizerRegistration(objOrganizationsInfo,alertsInfo,OrganizerRegOnSuccess,OnFailed,objOrganizationsInfo);}
else if(response == -1)
{displayError($get(CtrlPrefix + 'txtOrgUrl'),"Please enter valid website url");$get(CtrlPrefix + 'txtOrgUrl').focus();parent.autofitIframeSignUp(0);HideProgress("btnRegistration");}
}
function OrganizerRegOnSuccess(response,objOrganizationsInfo)
{if(response >0)
{var returnURL ="";if(document.getElementById(CtrlPrefix+"hdnMode").value !="")
{try {GridConfiguartion.SetLink(
"Username=" + objOrganizationsInfo.ContactPersonName + "&Email=" + objOrganizationsInfo.ConatctPersonMailId + "&mode=o",
function(result)
{parent.window.location.href = "JobseekerRegConfirmMsg.aspx?" + result;});}
catch(error) {}
}
else{try {GridConfiguartion.SetLink(
"Username=" + objOrganizationsInfo.ContactPersonName + "&Email=" + objOrganizationsInfo.ConatctPersonMailId + "&mode=o",
function(result)
{parent.window.location.href = "JobseekerRegConfirmMsg.aspx?" + result;});}
catch(error) {}
}
}
}
function SavePartnerDetails()
{ShowProgress("btnRegistration");if($get(CtrlPrefix + 'chkByPhone').checked ||$get(CtrlPrefix + 'chkInPerson').checked)
{if(validateContactTime())
{$get('ctntctTimErrDiv').style.display="none";ImageVerify(90000016);parent.autofitIframeSignUp(0);}
else
{$get('ctntctTimErrDiv').style.display="block";$get('ctntctTimErrDiv').innerHTML ="Please select the time to contact"
parent.autofitIframeSignUp(0);HideProgress("btnRegistration");}
}
else
{ImageVerify(90000016);}
}
function DoPartnerRegistration(response)
{$get(CtrlPrefix + 'hdnImage').value = response;if($get(CtrlPrefix + 'hdnImage').value == $get(CtrlPrefix + 'txtGUID').value)
{var OrgUrl = $get(CtrlPrefix + 'txtOrgUrl').value;if(OrgUrl!="")
{if(OrgUrl.startsWith("http://"))
OrgUrl = OrgUrl;else
OrgUrl = "http://" + OrgUrl;PageMethods.ValOrgWebsiteUrl(OrgUrl, OnValidPartnerWebSiteUrl, OnFailedResponse);}
else
{OnValidPartnerWebSiteUrl(1);}
}
else
{displayError($get(CtrlPrefix + 'txtGUID'),MsgArray["ChkImgTxt"]);$get(CtrlPrefix + 'txtGUID').focus();parent.autofitIframeSignUp(0);var rndNum=Math.random();$get('regImg').src="Admin/GenerateRandomImage.ashx?guidId="+rndNum;HideProgress("btnRegistration");return false;}
}
function OnValidPartnerWebSiteUrl(response)
{if(response == 1)
{$get('errorDiv').style.display="none";var objOrganizationsInfo =new NexGen.Model.Partner.PartnerInfo();objOrganizationsInfo.PartnerName = $get(CtrlPrefix + 'txtOrgName').value;objOrganizationsInfo.PartnerAddress = $get(CtrlPrefix + 'txtorgaddress').value;objOrganizationsInfo.ContactPersonName = $get(CtrlPrefix + 'txtcontpername').value;objOrganizationsInfo.PartnerUrl = $get(CtrlPrefix + 'txtOrgUrl').value;objOrganizationsInfo.PartnerPhone = $get(CtrlPrefix + 'txtOrgPhone').value;objOrganizationsInfo.CountryId= $get(CtrlPrefix + 'ddlCountry').value;objOrganizationsInfo.StateId = $get(CtrlPrefix + 'ddlState').value;objOrganizationsInfo.CityId = $get(CtrlPrefix + 'ddlCity').value;objOrganizationsInfo.ContactPersonPhone = $get(CtrlPrefix + 'txtcontperphone').value;objOrganizationsInfo.ConatctPersonMailId = $get(CtrlPrefix + 'txtemail').value;$get(CtrlPrefix + 'ddlSrartTime').value != "<Select>" ?(objOrganizationsInfo.ContactFromTime = $get(CtrlPrefix + 'ddlSrartTime').value):objOrganizationsInfo.ContactFromTime = null;$get(CtrlPrefix + 'ddlEndTime').value != "<Select>" ?(objOrganizationsInfo.ContactToTime = $get(CtrlPrefix + 'ddlEndTime').value):objOrganizationsInfo.ContactToTime = null;var ByPhone = $get(CtrlPrefix + 'chkByPhone');if(ByPhone.checked == true)
objOrganizationsInfo.IsByPhone=true;else
objOrganizationsInfo.IsByPhone=false;var InPerson = $get(CtrlPrefix + 'chkInPerson');if(InPerson.checked == true)
objOrganizationsInfo.IsInPerson=true;else
objOrganizationsInfo.IsInPerson=false;var ByMail = $get(CtrlPrefix + 'chkBymail');if(ByMail.checked == true)      
objOrganizationsInfo.IsByMail=true;else
objOrganizationsInfo.IsByMail=false;mode = $get(CtrlPrefix+"hdnMode").value;objOrganizationsInfo.StatusId = '30';objOrganizationsInfo.AboutPartner = $get(CtrlPrefix + 'txtAbtOrg').value;objOrganizationsInfo.EnquiryDate ='';objOrganizationsInfo.LOGO ='';objOrganizationsInfo.UserName = $get(CtrlPrefix +'txtUserName').value;objOrganizationsInfo.Password = $get(CtrlPrefix +'txtPassword').value;PageMethods.partnerRegistration(objOrganizationsInfo,alertsInfo,PartnerRegOnSuccess,OnFailed,objOrganizationsInfo);}
else if(response == -1)
{displayError($get(CtrlPrefix + 'txtOrgUrl'),"Please enter valid website url");$get(CtrlPrefix + 'txtOrgUrl').focus();parent.autofitIframeSignUp(0);HideProgress("btnRegistration");}
}
function PartnerRegOnSuccess(response,objOrganizationsInfo)
{if(response >0)
{try {GridConfiguartion.SetLink(
"Username=" + objOrganizationsInfo.ContactPersonName + "&Email=" + objOrganizationsInfo.ConatctPersonMailId + "&mode=pat",
function(result)
{parent.window.location.href = "JobseekerRegConfirmMsg.aspx?" + result;});}
catch(error) {}
}
}
function ShowType()
{var Univertbl= $get(CtrlPrefix + 'tbluniv');var Insttbl = $get(CtrlPrefix + 'tblinst');if ($get(CtrlPrefix + "RadioButtonList1_0").checked == true)
{$get('tdNameCollTrng').innerHTML = "College name";$get(CtrlPrefix+'tdNameCollTrng').innerHTML = "College name";navigator.appName.indexOf("Microsoft") != -1 ? Univertbl.style.display="block":Univertbl.style.display="table";Insttbl.style.display="none";$get("tdColInsPhone").innerHTML ="College phone number";$get("tdColInsCategory").innerHTML ="College category";$get("tdColInsType").innerHTML ="College type";$get("tdColInsURL").innerHTML ="College URL";$get("tdColInsAbt").innerHTML ="About your college";$get("divCollInsInfo").innerHTML = "College Information";$get(CtrlPrefix+'txtcollegename').removeAttribute('errMsg');$get(CtrlPrefix+'txtcollegename').setAttribute('errMsg',"Please enter college name");$get(CtrlPrefix+'ddlCollCategory').removeAttribute('errMsg');$get(CtrlPrefix+'ddlCollCategory').setAttribute('errMsg',"Please select college category");}
else
{$get(CtrlPrefix+'tdNameCollTrng').innerHTML = "Training institute name";navigator.appName.indexOf("Microsoft") != -1 ? Insttbl.style.display="block":Insttbl.style.display="table";Univertbl.style.display="none";$get("tdColInsPhone").innerHTML ="Institute phone number";$get("tdColInsCategory").innerHTML ="Institute category";$get("tdColInsType").innerHTML ="Institute type";$get("tdColInsURL").innerHTML ="Institute URL";$get("tdColInsAbt").innerHTML ="About your institute";$get("divCollInsInfo").innerHTML = "Training Institute Information";$get(CtrlPrefix+'txtcollegename').removeAttribute('errMsg');$get(CtrlPrefix+'txtcollegename').setAttribute('errMsg',"Please enter training institute name");$get(CtrlPrefix+'ddlCollCategory').removeAttribute('errMsg');$get(CtrlPrefix+'ddlCollCategory').setAttribute('errMsg',"Please select training institute category");}
}
function ShowContactTime(pageType)
{var ByPhone = $get(CtrlPrefix + 'chkByPhone');var InPerson = $get(CtrlPrefix + 'chkInPerson');var conttime= $get(CtrlPrefix + 'contimerow');var conttimelbl= $get(CtrlPrefix + 'contimerowLbl');if(ByPhone.checked == true || InPerson.checked == true)
{conttime.style.display="";conttimelbl.style.display="";}
else
{conttime.style.display="none";conttimelbl.style.display="none";}
$get('ctntctTimErrDiv').style.display="none";}
function AdvertiserRegistration()
{ShowProgress("btnRegistration");var _passwd=$get(CtrlPrefix + 'txtPassword').value;var _password=trim(_passwd);$get(CtrlPrefix + 'txtPassword').value=_password;var _confirmpasswd=$get(CtrlPrefix + 'txtConfirmPassword').value;var _confirmpassword=trim(_confirmpasswd);$get(CtrlPrefix + 'txtConfirmPassword').value=_confirmpassword;if($get(CtrlPrefix + 'chkByPhone').checked ||$get(CtrlPrefix + 'chkInPerson').checked)
{if(validateContactTime())
{$get('ctntctTimErrDiv').style.display="none";ImageVerify(67);parent.autofitIframeSignUp(0);}
else
{$get('ctntctTimErrDiv').style.display="block";$get('ctntctTimErrDiv').innerHTML ="Please select the time to contact"
parent.autofitIframeSignUp(0);HideProgress("btnRegistration");}
}
else
{ImageVerify(67);}
}
function DoAdvertiserRegistration(response)
{$get(CtrlPrefix + 'hdnImage').value = response;if($get(CtrlPrefix + 'hdnImage').value == $get(CtrlPrefix + 'txtGUID').value)
{var objUsersInfo = new NexGen.Model.Common.UsersInfo();var _passwd = $get(CtrlPrefix + 'txtPassword').value;var _password=trim(_passwd);objUsersInfo.UserName = $get(CtrlPrefix + 'txtUserName').value;objUsersInfo.Pwd = $get(CtrlPrefix + 'txtPassword').value;objUsersInfo.FirstName = $get(CtrlPrefix + 'txtFirstname').value;objUsersInfo.MiddleName = $get(CtrlPrefix + 'txtMiddlename').value;objUsersInfo.LastName = $get(CtrlPrefix + 'txtLastname').value;objUsersInfo.Email = $get(CtrlPrefix + 'txtEmail').value;objUsersInfo.MobileNo = $get(CtrlPrefix + 'txtContperphone').value;objUsersInfo.Active =false;objUsersInfo.RoleId = '67';objUsersInfo.StatusId = '77';objUsersInfo.Status =7;var objAdvertiserInfo = new NexGen.Model.Ads.Ad_AdvertisersInfo();objAdvertiserInfo.ContactFirstName = $get(CtrlPrefix + 'txtFirstname').value;objAdvertiserInfo.ContactMiddleName = $get(CtrlPrefix + 'txtMiddlename').value;objAdvertiserInfo.ContactLastName = $get(CtrlPrefix + 'txtLastname').value;objAdvertiserInfo.CompanyName = $get(CtrlPrefix + 'txtCompanyname').value;objAdvertiserInfo.EmailAddress = $get(CtrlPrefix + 'txtEmail').value;objAdvertiserInfo.Address = $get(CtrlPrefix + 'txtAddress').value;objAdvertiserInfo.Country = $get(CtrlPrefix + 'ddlCountry').value;objAdvertiserInfo.State = $get(CtrlPrefix + 'ddlState').value;objAdvertiserInfo.City = $get(CtrlPrefix + 'ddlCity').value;objAdvertiserInfo.Zip = $get(CtrlPrefix + 'txtZip').value;objAdvertiserInfo.Fax = $get(CtrlPrefix + 'txtFax').value;objAdvertiserInfo.ContactNo = $get(CtrlPrefix + 'txtCompanyphone').value;objAdvertiserInfo.Companysize = $get(CtrlPrefix + 'txtCompanySize').value;objAdvertiserInfo.CompanyURL = $get(CtrlPrefix + 'txtCompanyurl').value;objAdvertiserInfo.AboutCompany = $get(CtrlPrefix + 'txtAboutcompany').value;objAdvertiserInfo.IndustryId = $get(CtrlPrefix + 'ddlIndustry').value;objAdvertiserInfo.ClosedBy = '';var ByPhone = $get(CtrlPrefix + 'chkByPhone');if(ByPhone.checked == true)
objAdvertiserInfo.IsByPhone=true;else
objAdvertiserInfo.IsByPhone=false;var InPerson = $get(CtrlPrefix + 'chkInPerson');if(InPerson.checked == true)
objAdvertiserInfo.IsInPerson=true;else
objAdvertiserInfo.IsInPerson=false;var ByMail = $get(CtrlPrefix + 'chkBymail');if(ByMail.checked == true)  
{objAdvertiserInfo.IsByMail=true;objAdvertiserInfo.ContactFromTime = 'Not Required';objAdvertiserInfo.ContactToTime = 'Not Required';}
else
{objAdvertiserInfo.IsByMail=false;objAdvertiserInfo.ContactFromTime = $get(CtrlPrefix + 'ddlSrartTime').value;objAdvertiserInfo.ContactToTime = $get(CtrlPrefix + 'ddlEndTime').value;}
PageMethods.RegistrationAdvertiser(objUsersInfo,objAdvertiserInfo,alertsInfo,RegisterAdvertiserOnSuccess,OnFailed);}
else
{parent.autofitIframeSignUp();displayError($get(CtrlPrefix + 'txtGUID'),MsgArray["ChkImgTxt"]);$get(CtrlPrefix + 'txtGUID').focus();var rndNum=Math.random();$get('regImg').src="Admin/GenerateRandomImage.ashx?guidId="+rndNum;HideProgress("btnRegistration");return false;}
}
function RegisterAdvertiserOnSuccess(response)
{if(response > 0)
{parent.window.location.href="AdvertiserConfirmMessage.aspx?mode=adv";}
else
{$get('errorDiv').style.display="block";$get('errorDiv').innerHTML="Error :  During  registration process"
parent.autofitIframeSignUp(0);}
}
function AdvertiserRegistrationByAdmin()
{var _passwd=$get(CtrlPrefix + 'txtPassword').value;var _password=trim(_passwd);$get(CtrlPrefix + 'txtPassword').value=_password;var _confirmpasswd=$get(CtrlPrefix + 'txtConfirmPassword').value;var _confirmpassword=trim(_confirmpasswd);$get(CtrlPrefix + 'txtConfirmPassword').value=_confirmpassword;if(_password.length < 8)
{$get('errorDiv').style.display ="block";$get('errorDiv').className ='error';$get('errorDiv').innerHTML ="Password should contains minimum 8 characters";parent.autofitIframeSignUp(0);}
else if(_password == _confirmpassword)
{var objUsersInfo = new NexGen.Model.Common.UsersInfo();objUsersInfo.UserName = $get(CtrlPrefix + 'txtUserName').value;objUsersInfo.Pwd = $get(CtrlPrefix + 'txtPassword').value;objUsersInfo.FirstName = $get(CtrlPrefix + 'txtFirstname').value;objUsersInfo.MiddleName = $get(CtrlPrefix + 'txtMiddlename').value;objUsersInfo.LastName = $get(CtrlPrefix + 'txtLastname').value;objUsersInfo.Email = $get(CtrlPrefix + 'txtEmail').value;objUsersInfo.MobileNo = $get(CtrlPrefix + 'txtContperphone').value;objUsersInfo.RoleId = '67';objUsersInfo.StatusId = '77';objUsersInfo.Status =7;var objAdvertiserInfo = new NexGen.Model.Ads.Ad_AdvertisersInfo();objAdvertiserInfo.CompanyName = $get(CtrlPrefix + 'txtCompanyname').value;objAdvertiserInfo.Address = $get(CtrlPrefix + 'txtAddress').value;objAdvertiserInfo.Country = $get(CtrlPrefix + 'ddlCountry').value;objAdvertiserInfo.State = $get(CtrlPrefix + 'ddlState').value;objAdvertiserInfo.City = $get(CtrlPrefix + 'ddlCity').value;objAdvertiserInfo.Zip = $get(CtrlPrefix + 'txtZip').value;objAdvertiserInfo.Fax = $get(CtrlPrefix + 'txtFax').value;objAdvertiserInfo.ContactNo = $get(CtrlPrefix + 'txtCompanyphone').value;var ByPhone = $get(CtrlPrefix + 'chkByPhone');if(ByPhone.checked == true)
{objAdvertiserInfo.IsByPhone=true;}
else
objAdvertiserInfo.IsByPhone=false;var InPerson = $get(CtrlPrefix + 'chkInPerson');if(InPerson.checked == true)
objAdvertiserInfo.IsInPerson=true;else
objAdvertiserInfo.IsInPerson=false;var ByMail = $get(CtrlPrefix + 'chkBymail');if(ByMail.checked == true)  
{objAdvertiserInfo.IsByMail=true;objAdvertiserInfo.ContactFromTime = 'Not Required';objAdvertiserInfo.ContactToTime = 'Not Required';}
else
{objAdvertiserInfo.IsByMail=false;objAdvertiserInfo.ContactFromTime = $get(CtrlPrefix + 'ddlSrartTime').value;objAdvertiserInfo.ContactToTime = $get(CtrlPrefix + 'ddlEndTime').value;}
objAdvertiserInfo.IndustryId = $get(CtrlPrefix + 'ddlIndustry').value;objAdvertiserInfo.Companysize = $get(CtrlPrefix + 'txtCompanySize').value;objAdvertiserInfo.CompanyURL = $get(CtrlPrefix + 'txtCompanyurl').value;objAdvertiserInfo.AboutCompany = $get(CtrlPrefix + 'txtAboutcompany').value;objAdvertiserInfo.ContactFirstName = $get(CtrlPrefix + 'txtFirstname').value;objAdvertiserInfo.ContactMiddleName = $get(CtrlPrefix + 'txtMiddlename').value;objAdvertiserInfo.ContactLastName = $get(CtrlPrefix + 'txtLastname').value;objAdvertiserInfo.EmailAddress = $get(CtrlPrefix + 'txtEmail').value;objAdvertiserInfo.ClosedBy = 'Admin';objAdvertiserInfo.StatusId = $get(CtrlPrefix + 'ddlStatus').value;PageMethods.RegistrationAdvertiser(objUsersInfo,objAdvertiserInfo,OnSuccessRegisterAdvertiserByAdmin,OnFailedAdvReg);}
else
{$get('errorDiv').style.display ="block";$get('errorDiv').className ='error';$get('errorDiv').innerHTML ="Password and confirm password should be same";parent.autofitIframeSignUp(0);}
}
function ClearMessages()
{e1("errorDiv").style.display="none";e1("divAdvRegSuccess").style.display="none";}      
function OnSuccessRegisterAdvertiserByAdmin(response)
{if(response > 0)
{$get("divAdvRegSuccess").innerHTML = "Registration successfully completed";$get("divAdvRegSuccess").style.display = "block";ClearAllControls();parent.autofitIframeSignUp(0);}
}
function OnFailedAdvReg()
{HideProgress("btnRegistration");e1("errorDiv").innerHTML="Registration process failed";e1("errorDiv").style.display="block";parent.autofitIframeSignUp(0);}
function e1(Id)
{return document.getElementById(Id)
}
function CancelRegistration()
{window.location.href="index.aspx";}
function isValidDesignation(stringValue)
{removeMultipleWhiteSpaces(stringValue);var filter =/^([a-zA-Z])([a-zA-Z0-9_\-\s.])+([a-zA-Z0-9])+$/;if(!filter.test(stringValue.value))
{return false;}
else
{return true;}
}
function ClearAllControls()
{$get(CtrlPrefix + 'txtPassword').value=""
$get(CtrlPrefix + 'txtConfirmPassword').value="";$get(CtrlPrefix + 'txtUserName').value="";$get(CtrlPrefix + 'txtFirstname').value="";$get(CtrlPrefix + 'txtMiddlename').value="";$get(CtrlPrefix + 'txtLastname').value="";$get(CtrlPrefix + 'txtEmail').value="";$get(CtrlPrefix + 'txtContperphone').value="";$get(CtrlPrefix + 'txtCompanyname').value=""
$get(CtrlPrefix + 'txtAddress').value="";$get(CtrlPrefix + 'ddlCountry').value="0";$get(CtrlPrefix + 'ddlState').value="0";$get(CtrlPrefix + 'ddlCity').value="0";$get(CtrlPrefix + 'txtZip').value="";$get(CtrlPrefix + 'txtFax').value = "";$get(CtrlPrefix + 'txtCompanyphone').value="";$get(CtrlPrefix + 'txtCompanyname').value="";$get(CtrlPrefix + 'chkByPhone').checked=false;$get(CtrlPrefix + 'chkInPerson').checked=false;$get(CtrlPrefix + 'chkBymail').checked=true;$get(CtrlPrefix + 'ddlSrartTime').value="0";$get(CtrlPrefix + 'ddlEndTime').value = "0";$get(CtrlPrefix + 'ddlIndustry').value="0";$get(CtrlPrefix + 'txtCompanySize').value="";$get(CtrlPrefix + 'txtCompanyurl').value="";$get(CtrlPrefix + 'txtAboutcompany').value="";$get(CtrlPrefix + 'ddlStatus').value="0";parent.autofitIframeSignUp(0);}
function CancelRegistration()
{parent.location = "index.aspx";}
function ClearChangePwdCntrls()
{$get('pwderror').style.display ="none";document.getElementById(CtrlPrefixpwd + 'txtOldPassword').value='';document.getElementById(CtrlPrefixpwd + 'txtRetypePassword').value='';document.getElementById(CtrlPrefixpwd + 'txtNewPassword').value='';document.getElementById(CtrlPrefixpwd + 'TextBox2_HelpLabel').innerHTML='';}
function Enableregbtn(Id)
{if($get(Id).checked)
{$get("btnRegistration").disabled=false;}
else
$get("btnRegistration").disabled=true;}
function OnFailedResponse()
{$get('errorDiv').style.display="block";$get('errorDiv').innerHTML="Error while validating url."
parent.autofitIframeSignUp(0);HideProgress("btnRegistration");}
function validateContactTime()
{if($get(CtrlPrefix + 'ddlSrartTime').value =="<Select>" || $get(CtrlPrefix + 'ddlEndTime').value =="<Select>")
{$get(CtrlPrefix + 'ddlSrartTime').className ="form_input_error";$get(CtrlPrefix + 'ddlEndTime').className = "form_input_error";return false;}
else
{$get(CtrlPrefix + 'ddlSrartTime').className ="form_input_normal";$get(CtrlPrefix + 'ddlEndTime').className = "form_input_normal";return true;}
}
function fromToTimeValidation()
{if(validateContactTime())
{$get('ctntctTimErrDiv').style.display="none";parent.autofitIframeSignUp(0);}
else
{$get('ctntctTimErrDiv').style.display = "block";$get('ctntctTimErrDiv').innerHTML = "Please select the time to contact";parent.autofitIframeSignUp(0);}
}    
function setToNull()
{var y = document.getElementById(CtrlPrefix + 'ddlEndTime');y.options[0].selected = true;}
function SetEndTime(fromId)
{var x = document.getElementById(CtrlPrefix + 'ddlSrartTime');var y = document.getElementById(CtrlPrefix + 'ddlEndTime');var xValue = x.options[x.selectedIndex].value;var yValue = y.options[y.selectedIndex].value;var xdata = xValue.split(':');var ydata = yValue.split(':');if(parseInt(ydata[0]) < parseInt(xdata[0]))
{if( xdata[1].substring(xdata[1].length-2,xdata[1].length) == ydata[1].substring(ydata[1].length-2,ydata[1].length))
{alert('To Time should greater than From time');y.options[0].selected = true;}
else if((xdata[1].substring(xdata[1].length-2,xdata[1].length) == "PM") && (ydata[1].substring(ydata[1].length-2,ydata[1].length) =="AM"))
{alert('To Time should greater than From time');y.options[0].selected = true;}
}
else
{if((xdata[1].substring(xdata[1].length-2,xdata[1].length) == "PM") && (ydata[1].substring(ydata[1].length-2,ydata[1].length) =="AM"))
{alert('To Time should greater than From time');y.options[0].selected = true;}
}
}
function GetJobSeekerEmployeresDetaails()
{GetRecentlyJoinedJobSeekers();GetRecentlyJoinedEmployers();}
function GetRecentlyJoinedJobSeekers()
{PageMethods.GetRecentlyJoinedMembers(OnsuccessJobseekerList,OnFailedJobSeekerList);}
function OnsuccessJobseekerList(result)
{var NoOfJobSeekers = 0;if(result!=null)
{var xmlDoc;if (window.ActiveXObject)
{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.loadXML(result);}
else if (document.implementation && document.implementation.createDocument)
{var parser=new DOMParser();xmlDoc=document.implementation.createDocument("","",null);result = result.replace(/\B\s\B/g,"");xmlDoc=parser.parseFromString(result,"text/xml");}
if(xmlDoc != null)
{NoOfJobSeekers=xmlDoc.getElementsByTagName("UserName").length;var JobseekersTbl =$get("tblJobSeekers");var divJobseekersDetails=$get("RecentlyJoinedJobseekers");var JobseekersTbl = document.createElement("table");JobseekersTbl.style.width='100%';if(NoOfJobSeekers>0)
{for(var records=0;records<NoOfJobSeekers;records++)
{newRow = document.createElement("tr");newCell = document.createElement("td");newCell.style.width='100%';try
{var JobSeekerDetails ="<div class='txt_sec_r'>";JobSeekerDetails += "<div><a href='javascript:void(0)' style='cursor:pointer'>";JobSeekerDetails += "<strong>" + xmlDoc.getElementsByTagName("UserName")[records].firstChild.nodeValue + "</strong></a></div>";JobSeekerDetails += "<div style=margin-left:10px>";JobSeekerDetails += xmlDoc.getElementsByTagName("Location")[records].firstChild.nodeValue + "</div>";JobSeekerDetails += "<div class='line'></div></div>";newCell.innerHTML = JobSeekerDetails;} catch(e){}
newRow.appendChild(newCell);JobseekersTbl.appendChild(newRow);}   
divJobseekersDetails.appendChild(JobseekersTbl);$get("JobSeekers").innerHTML=divJobseekersDetails.innerHTML;}                    
}
}                               
}        
function OnFailedJobSeekerList(error)
{alert(error);}
function GetRecentlyJoinedEmployers()
{PageMethods.GetRecentlyEmployers(OnsuccessGetEmployers,OnFailedJobSeekerList);}
function OnsuccessGetEmployers(result)
{var NoofRecruiter = 0;if(result!=null)
{var xmlDoc;if (window.ActiveXObject)
{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.loadXML(result);}
else if (document.implementation && document.implementation.createDocument)
{var parser=new DOMParser();xmlDoc=document.implementation.createDocument("","",null);result = result.replace(/\B\s\B/g,"");xmlDoc=parser.parseFromString(result,"text/xml");}
if(xmlDoc != null)
{NoofRecruiter=xmlDoc.getElementsByTagName("IndustryName").length;var divEmployersDetails=$get("RecentlyJoinedEmployers");var EmployersTbl = document.createElement("table");EmployersTbl.style.width='100%';if(NoofRecruiter > 0)
{for(var records=0;records<5;records++)
{newRow = document.createElement("tr");newCell = document.createElement("td");newCell.style.width='100%';try
{var orgId = xmlDoc.getElementsByTagName("OrganizationId")[records].firstChild.nodeValue;var   EmployersDetails ="<div class='txt_sec_r'>";EmployersDetails +="<div>";EmployersDetails +='<a href="javascript:void(0)" onclick="GetEmployerDetailsMicrosite(\''+ orgId + '\')" ><strong>';EmployersDetails +=  xmlDoc.getElementsByTagName("OrganizationName")[records].firstChild.nodeValue + "</strong></a></div>";EmployersDetails +="<div style=margin-left:10px>";EmployersDetails += xmlDoc.getElementsByTagName("IndustryName")[records].firstChild.nodeValue + "</div>";EmployersDetails += "<div class='line'></div></div>";newCell.innerHTML =EmployersDetails;} catch(e){}
newRow.appendChild(newCell);EmployersTbl.appendChild(newRow);}   
var FooterCell= document.createElement("td");var FooterRow =document.createElement("tr");var M ="More";FooterCell.innerHTML ="<div align='right'><a class='more' style='cursor:hand' onclick='GetMoreEmployerColleges(2)'>" + M+ "&raquo;</a>&nbsp;&nbsp;</div>" ;FooterRow.appendChild(FooterCell);EmployersTbl.appendChild(FooterRow);divEmployersDetails.appendChild(EmployersTbl);$get("Employers").innerHTML= divEmployersDetails.innerHTML;}                    
}
}                               
}
function GetRecentlyJoinedColleges()
{PageMethods.GetRecentlyJoinedColleges(OnsuccessJoinedColleges,OnFailedJobSeekerList);}
function OnsuccessJoinedColleges(result)
{var NoofColleges = 0;if(result!=null)
{var xmlDoc;if (window.ActiveXObject)
{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.loadXML(result);}
else if (document.implementation && document.implementation.createDocument)
{var parser=new DOMParser();xmlDoc=document.implementation.createDocument("","",null);result = result.replace(/\B\s\B/g,"");xmlDoc=parser.parseFromString(result,"text/xml");}
if(xmlDoc != null)
{NoofColleges=xmlDoc.getElementsByTagName("CollegeName").length;var divCollegeDetails=$get("RecentlyJoinedColleges");var CollegesTbl = document.createElement("table");CollegesTbl.style.width='100%';if(NoofColleges > 0)
{for(var records=0;records<5;records++)
{newRow = document.createElement("tr");newCell = document.createElement("td");newCell.style.width='100%';try
{var   CollegesDetails ="<div class='txt_sec_r'>";CollegesDetails +="<div>";CollegesDetails +="<a  class='link_blue' href='javascript:void(0)' onclick='GetCollegesMicrositeFromHomePage(" + xmlDoc.getElementsByTagName("PlacementOfficerId")[records].firstChild.nodeValue +")'><strong>";CollegesDetails +=xmlDoc.getElementsByTagName("CollegeName")[records].firstChild.nodeValue + "</strong></a></div>";CollegesDetails +="<div style=margin-left:10px>";CollegesDetails += xmlDoc.getElementsByTagName("CategoryName")[records].firstChild.nodeValue + "</div>";CollegesDetails += "<div class='line'></div></div>";newCell.innerHTML =CollegesDetails;} catch(e){}
newRow.appendChild(newCell);CollegesTbl.appendChild(newRow);}  
var FooterCell= document.createElement("td");var FooterRow =document.createElement("tr");var M ="More";FooterCell.innerHTML ="<div align='right'><a class='more' style='cursor:hand'  onclick='GetMoreEmployerColleges(1)'>" + M+ "&raquo;</a>&nbsp;&nbsp;</div>" ;FooterRow.appendChild(FooterCell);CollegesTbl.appendChild(FooterRow);divCollegeDetails.appendChild(CollegesTbl);$get("Colleges").innerHTML=divCollegeDetails.innerHTML;}                    
}
}                               
}
function GetEmployersColleges()
{GetRecentlyJoinedJobSeekers();GetRecentlyJoinedEmployers();GetRecentlyJoinedColleges();}
function GetEmployerDetailsMicrosite(orgId)
{var width = window.screen.availWidth;var height = window.screen.availHeight;try{GridConfiguartion.SetLink(
"orgid="+ orgId,
function(result)
{var win = window.open("Recruiter/MicroSite.aspx?" + result,"_blank",
"width=" + width + ",height=" + height + "left=0,top=0,status=no,scrollbars=yes,toolbar=no,addressbar=yes,menubar=no,location=no,resizable=yes");win.moveTo(0,0);});}
catch(error) {}
}
function GetCollegesMicrositeFromHomePage(_collegeId)
{var width = window.screen.availWidth;var height = window.screen.availHeight;var UserId=-1;try {GridConfiguartion.SetLink(
"Collegeid="+_collegeId+"&Userid="+UserId+"&Flag=po",
function(result)
{var  win = window.open("Recruiter/MicroSiteForCollege.aspx?" + result,"_blank",
"width=" + width + ",height=" + height + "left=0,top=0,status=no,toolbar=yes,scrollbars=yes,addressbar=yes,menubar=yes,location=yes,resizable=yes");win.moveTo(0,0);});}
catch(error) {}     
}
function GetMoreEmployerColleges(mode)
{try {GridConfiguartion.SetLink(
"Mode="+mode,
function(result)
{parent.window.location.href="CollegesAndCompanybyCategory.aspx?" + result;});}
catch(error) {}     
}
function updateTextCount(wordCnt,obj,txtCnt)
{var length = obj.value.length;if(length>wordCnt)
{obj.value = obj.value.substring(0,wordCnt)
$get(txtCnt).value =  0;alert("Maximum no. of allowed characters are exceeded");return false;}
else
$get(txtCnt).value =  wordCnt - length;}
function DoTrainingInstitueRegistrations()
{var objPlacementOfficersInfo =new NexGen.Model.QA.PlacementOfficersInfo();if ($get(CtrlPrefix + "rdCollege").checked == true)
{objPlacementOfficersInfo.UniversityType = true;objPlacementOfficersInfo.CollegeName=$get(CtrlPrefix + 'txtcollegename').value;if($get(CtrlPrefix + 'ddlUniversity').value != "0")
{objPlacementOfficersInfo.UniversityId =parseInt($get(CtrlPrefix + 'ddlUniversity').value,10);if($get(CtrlPrefix + 'ddlUniversity').text == 'others')
objPlacementOfficersInfo.OthersInstituteName = $get(CtrlPrefix + 'txtOthersCollegeName').value;else
objPlacementOfficersInfo.OthersInstituteName = "";}
else {return false;}
}
else 
{objPlacementOfficersInfo.UniversityType = false;objPlacementOfficersInfo.CollegeName=$get(CtrlPrefix + 'txtcollegename').value;if($get(CtrlPrefix + 'ddlaffiliatedinst').value != "0")
{objPlacementOfficersInfo.UniversityId=parseInt($get(CtrlPrefix + 'ddlaffiliatedinst').value,10);if($get(CtrlPrefix + 'ddlaffiliatedinst').text == 'others')
objPlacementOfficersInfo.OthersInstituteName = $get(CtrlPrefix + 'txtOthersInstituteName').value;else
objPlacementOfficersInfo.OthersInstituteName = "";}    
else {return false;}            
}           
objPlacementOfficersInfo.Others=$get(CtrlPrefix + 'txtotheruniv').value;objPlacementOfficersInfo.RegisteredOfficeAddress=$get(CtrlPrefix + 'txtAddress').value;objPlacementOfficersInfo.CountryId =parseInt($get(CtrlPrefix + 'ddlCountry').value,10);objPlacementOfficersInfo.StateId =parseInt($get(CtrlPrefix + 'ddlState').value,10);objPlacementOfficersInfo.CityId =parseInt($get(CtrlPrefix + 'ddlCity').value,10);objPlacementOfficersInfo.Pincode =$get(CtrlPrefix + 'txtZip').value;objPlacementOfficersInfo.CollageFax =$get(CtrlPrefix + 'txtFax').value;objPlacementOfficersInfo.CollegePhone =$get(CtrlPrefix + 'txtCollegephone').value;objPlacementOfficersInfo.EmailId1 = $get(CtrlPrefix + 'txtSecEmailId1').value;objPlacementOfficersInfo.EmailId2 = $get(CtrlPrefix + 'txtSecEmailId2').value;objPlacementOfficersInfo.CollegeCategory =$get(CtrlPrefix + 'ddlCollCategory').value;if($get(CtrlPrefix + 'txtStudents').value!="")
{objPlacementOfficersInfo.NoOfStudents =parseInt($get(CtrlPrefix + 'txtStudents').value,10);}
var colegeType = $get(CtrlPrefix + 'rbtlColltype');if(colegeType.cells[0].childNodes[0].checked)
objPlacementOfficersInfo.CollegeType = 0;else
objPlacementOfficersInfo.CollegeType = 1;objPlacementOfficersInfo.CollegeURL =$get(CtrlPrefix + 'txtCollageurl').value;objPlacementOfficersInfo.YearofEstablish =$get(CtrlPrefix + 'txtYearEstablish').value;objPlacementOfficersInfo.AboutYourCollege =$get(CtrlPrefix + 'txtAboutcollege').value;objPlacementOfficersInfo.ContactPersonName = $get(CtrlPrefix + 'txtcontactperson').value;$get(CtrlPrefix + 'hdnContactName').value   =   $get(CtrlPrefix + 'txtcontactperson').value;objPlacementOfficersInfo.ContactPersonMailId =$get(CtrlPrefix + 'txtEmailAddress').value;$get(CtrlPrefix + 'hdnContactMailId').value = $get(CtrlPrefix + 'txtEmailAddress').value;objPlacementOfficersInfo.ContactPersonNumber =$get(CtrlPrefix + 'txtContperphone').value;objPlacementOfficersInfo.StatusId =77;objPlacementOfficersInfo.CollegeLogo="";objPlacementOfficersInfo.StatusId = 29;$get(CtrlPrefix + 'ddlSrartTime').value != "<Select>" ?(objPlacementOfficersInfo.ContactFromTime = $get(CtrlPrefix + 'ddlSrartTime').value):objPlacementOfficersInfo.ContactFromTime = null;$get(CtrlPrefix + 'ddlEndTime').value != "<Select>" ?(objPlacementOfficersInfo.ContactToTime = $get(CtrlPrefix + 'ddlEndTime').value):objPlacementOfficersInfo.ContactToTime = null;var ByPhone = $get(CtrlPrefix + 'chkByPhone');if(ByPhone.checked == true)
objPlacementOfficersInfo.IsByPhone=true;else
objPlacementOfficersInfo.IsByPhone=false;var InPerson = $get(CtrlPrefix + 'chkInPerson');if(InPerson.checked == true)
objPlacementOfficersInfo.IsByPerson=true;else
objPlacementOfficersInfo.IsByPerson=false;var ByMail = $get(CtrlPrefix + 'chkBymail');if(ByMail.checked == true)      
objPlacementOfficersInfo.IsByMail=true;else
objPlacementOfficersInfo.IsByMail=false;PageMethods.TrainingRegistration(objPlacementOfficersInfo,OnTrainingRegistrationSucess,OnFailed);}
function OnTrainingRegistrationSucess(response)
{if(response > 0)
{$get('errorDiv').style.display="block";$get('errorDiv').style.innerHTML ='Updated Succesfully';parent.parent.autoFitContentIframe();}
else
{$get('errorDiv').style.display="block";$get('errorDiv').innerHTML="Unable to register"
parent.parent.autoFitContentIframe();}
}
function HideUniversityOrInstitute(type)
{if(type=='University')
{$get(CtrlPrefix+'tbluniv').style.display = 'none';$get(CtrlPrefix+'tblinst').style.display = 'block';}
else
{$get(CtrlPrefix+'tbluniv').style.display = 'block';$get(CtrlPrefix+'tblinst').style.display = 'none';}
}
function IsOtherUniv(isTrue,data)
{if(isTrue)
{$get('trothers').style.display='block';$get(CtrlPrefix +'txtotheruniv').value =data;}
else
{$get('trothers').style.display='none';$get(CtrlPrefix +'txtotheruniv').value ='';}
}
function NavigatetoClassifieds()
{var path=$get(CtrlPrefix+'apppath').value;parent.window.location=path+"/Classifieds/ClassifedsHome.aspx";}
var resbackup;var POId;var FilePath;var ImagefileLoc= [];function fileLogoUpload(response)
{if (parseInt(response[0],10)>0) 
{resbackup=response;FilePath='';POId = parseInt(resbackup[0],10);FilePath=resbackup[1];var cont=FileControl(CtrlPrefixPhotoUpload + "logoUpload_0");if(ValidateFileUploader(CtrlPrefix + "logoUpload_0",$get(CtrlPrefix + "htxtExtension0").value,true))
{if(cont.value!="")
{UploadFile(CtrlPrefixPhotoUpload + "logoUpload_0",resbackup[1]+ GetFileName(CtrlPrefixPhotoUpload + "logoUpload_0"),"LogoUploadSuccess","",$get(CtrlPrefix + "htxtExtension0").value);}
}
else
{LogoUploadSuccess('');}
}
else
{LogoUploadSuccess('');}
}
function LogoUploadSuccess(filePath)
{POId = parseInt(resbackup[0],10);FilePath=resbackup[1];ImagefileLoc[0]=filePath;var cont=FileControl(CtrlPrefixPhotoUpload + "logoUpload_1");if(ValidateFileUploader(CtrlPrefix + "logoUpload_1",$get(CtrlPrefix + "htxtExtension1").value,true))
{if(cont.value!="")
{UploadFile(CtrlPrefixPhotoUpload + "logoUpload_1",resbackup[1]+ GetFileName(CtrlPrefixPhotoUpload + "logoUpload_1"),"PicUploadSuccess1",$get(CtrlPrefix + "htxtFileSize1").value,$get(CtrlPrefix + "htxtExtension1").value);}
}
else
{PicUploadSuccess1('');}
}
function PicUploadSuccess1(filePath)
{POId = parseInt(resbackup[0],10);FilePath=resbackup[1];ImagefileLoc[1]=filePath;var cont=FileControl(CtrlPrefixPhotoUpload + "logoUpload_2");if(ValidateFileUploader(CtrlPrefix + "logoUpload_2",$get(CtrlPrefix + "htxtExtension2").value,true))
{if(cont.value!="")
{UploadFile(CtrlPrefixPhotoUpload + "logoUpload_2",resbackup[1]+ GetFileName(CtrlPrefixPhotoUpload + "logoUpload_2"),"PicUploadSuccess2",$get(CtrlPrefix + "htxtFileSize2").value,$get(CtrlPrefix + "htxtExtension2").value);}
}
else
{PicUploadSuccess2('');}
}
function PicUploadSuccess2(filePath)
{POId = parseInt(resbackup[0],10);FilePath=resbackup[1];ImagefileLoc[2]=filePath;var cont=FileControl(CtrlPrefixPhotoUpload + "logoUpload_3");if(ValidateFileUploader(CtrlPrefix + "logoUpload_3",$get(CtrlPrefix + "htxtExtension3").value,true))
{if(cont.value!="")
{UploadFile(CtrlPrefixPhotoUpload + "logoUpload_3",resbackup[1]+ GetFileName(CtrlPrefixPhotoUpload + "logoUpload_3"),"PicUploadSuccess3",$get(CtrlPrefix + "htxtFileSize3").value,$get(CtrlPrefix + "htxtExtension3").value);}
}
else
{PicUploadSuccess3('');}
}
function getNavigateURL()
{if(document.getElementById(CtrlPrefix+"hdnMode").value !="")
nvurl ="PaymentGateway/SelectedProductForm.aspx";else 
nvurl ="dashboard.aspx";return nvurl;}
function PicUploadSuccess3(filePath)
{FilePath=resbackup[1];ImagefileLoc[3]=filePath;var returnURL =getNavigateURL();if((ImagefileLoc[0]!= '')||(ImagefileLoc[1]!= '')||(ImagefileLoc[2]!= '') ||(ImagefileLoc[3]!= ''))
PicturesUploadSuccess(ImagefileLoc);else
parent.window.location.href=returnURL;}
function PicturesUploadSuccess(FileLocs)
{if(FileLocs != null)
{var objPlacementOfficersInfo =new NexGen.Model.QA.PlacementOfficersInfo();objPlacementOfficersInfo.PlacementOfficerId = POId;objPlacementOfficersInfo.CollegeLogo = FileLocs[0];objPlacementOfficersInfo.Picture1=FileLocs[1];objPlacementOfficersInfo.Picture2=FileLocs[2];objPlacementOfficersInfo.Picture3=FileLocs[3];objPlacementOfficersInfo.ContactPersonName =$get(CtrlPrefix + 'hdnContactName').value;objPlacementOfficersInfo.ContactPersonMailId =$get(CtrlPrefix + 'hdnContactMailId').value;PageMethods.UploadPhoto(objPlacementOfficersInfo,OnPicturesUploadSuccess,OnFailed);}
}
function OnPicturesUploadSuccess(response)
{var returnURL =getNavigateURL();HideProgress("upload");if(response > 0)
{parent.window.location.href=returnURL;}
else
{$get('errorDiv').style.display="block";$get('errorDiv').innerHTML="Unable to register";parent.autofitIframeSignUp(0);}
}
function ItemsSelected(obj)
{$get("items").innerHTML = "";var location="";for(var cnt = 0;cnt <obj.length;cnt++)
{if(obj[cnt].selected ==true)
{location += obj[cnt].text +", ";}
}
location = location.substring(0,location.length-2);$get("items").innerHTML = location;}
function validateTech(obj)
{var moduleCount = 0;var objTechnologiesInfo    =   new NexGen.Model.TrainingInstitute.TechnologiesInfo();objTechnologiesInfo.TechnologyId  = "";for(var cnt = 0;cnt <obj.length;cnt++)
{if(obj[cnt].selected ==true)
{moduleCount += 1;}
}
if(moduleCount<1)
{return false;}
else
{return true;}
}
function HideValidationErrorMessage()
{hideVFError(FileControl(CtrlPrefix + "logoUpload_0"));hideVFError(FileControl(CtrlPrefix + "logoUpload_1"));hideVFError(FileControl(CtrlPrefix + "logoUpload_2"));hideVFError(FileControl(CtrlPrefix + "logoUpload_3"));}
function CheckIsUserAvailable()
{var username=document.getElementById(CtrlPrefix + 'txtUserName').value;if(username != "")
{if( checkUserName($get(CtrlPrefix + 'txtUserName')))
{PageMethods.CheckUserAvailability(username,OnSuccessUsername,OnFailUserName);}
}
}
function OnSuccessUsername(response)
{var username =document.getElementById(CtrlPrefix + 'txtUserName').value;if(response > 0)
{displayError(document.getElementById(CtrlPrefix + 'txtUserName'),PrepareMsg(MsgArray["ChkUser"],"<b>"+username+"</b>"));document.getElementById(CtrlPrefix + 'txtUserName').value="";document.getElementById(CtrlPrefix + 'txtUserName').title ="User name "+username+" is not available.kindly choose another"
parent.autofitIframeSignUp(0);return false;}
else
return true;}
function OnFailUserName(error)
{var x = error;}
function CheckAccountAvailabilityblur()
{var Orgaccount=$get(CtrlPrefix + "txtAccount").value;if(Orgaccount != "")
{PageMethods.CheckOrgAccount(Orgaccount,OnSuccessOrgAccount,OnFailed);}
}
function OnSuccessOrgAccount(response)
{var spanstrength= document.getElementById('errorMsg');if(response > 0)
{spanstrength.innerHTML = "URL Identity already exists";spanstrength.style.display='';$get(CtrlPrefix + "txtAccount").focus();$get(CtrlPrefix + "txtAccount").value="";}
else
{spanstrength.innerHTML='';}
}
function EventPublisherRegistration()
{ShowProgress("btnRegistration");var _passwd=$get(CtrlPrefix + 'txtPassword').value;var _password=trim(_passwd);$get(CtrlPrefix + 'txtPassword').value=_password;var _confirmpasswd=$get(CtrlPrefix + 'txtConfirmPassword').value;var _confirmpassword=trim(_confirmpasswd);$get(CtrlPrefix + 'txtConfirmPassword').value=_confirmpassword;if($get(CtrlPrefix + 'chkByPhone').checked ||$get(CtrlPrefix + 'chkInPerson').checked)
{if(validateContactTime())
{$get('ctntctTimErrDiv').style.display="none";ImageVerify(88412);parent.autofitIframeSignUp(0);}
else
{$get('ctntctTimErrDiv').style.display="block";$get('ctntctTimErrDiv').innerHTML ="Please select the time to contact"
parent.autofitIframeSignUp(0);HideProgress("btnRegistration");}
}
else
{ImageVerify(88412);}
}
function DoEventPublisherRegistration(response)
{$get(CtrlPrefix + 'hdnImage').value = response;if($get(CtrlPrefix + 'hdnImage').value == $get(CtrlPrefix + 'txtGUID').value)
{var objUsersInfo = new NexGen.Model.Common.UsersInfo();var _passwd = $get(CtrlPrefix + 'txtPassword').value;var _password=trim(_passwd);objUsersInfo.UserName = $get(CtrlPrefix + 'txtUserName').value;objUsersInfo.Pwd = $get(CtrlPrefix + 'txtPassword').value;objUsersInfo.FirstName = $get(CtrlPrefix + 'txtFirstname').value;objUsersInfo.MiddleName = $get(CtrlPrefix + 'txtMiddlename').value;objUsersInfo.LastName = $get(CtrlPrefix + 'txtLastname').value;objUsersInfo.Email = $get(CtrlPrefix + 'txtEmail').value;objUsersInfo.MobileNo = $get(CtrlPrefix + 'txtContperphone').value;objUsersInfo.Active =false;objUsersInfo.RoleId = '88412';objUsersInfo.StatusId = '77';objUsersInfo.Status =7;var objEvt_Publishers = new NexGen.Model.EventMgmt.Evt_PublishersInfo();objEvt_Publishers.PublisherId = -1;objEvt_Publishers.ContactPersonName = $get(CtrlPrefix + 'txtFirstname').value+' '+$get(CtrlPrefix + 'txtMiddlename').value+' '+$get(CtrlPrefix + 'txtLastname').value;objEvt_Publishers.PublisherName = $get(CtrlPrefix + 'txtCompanyname').value;objEvt_Publishers.ContactPersonMailId = $get(CtrlPrefix + 'txtEmail').value;objEvt_Publishers.RegdAddress = $get(CtrlPrefix + 'txtAddress').value;objEvt_Publishers.Countryid = $get(CtrlPrefix + 'ddlCountry').value;objEvt_Publishers.Stateid = $get(CtrlPrefix + 'ddlState').value;objEvt_Publishers.CityId = $get(CtrlPrefix + 'ddlCity').value;objEvt_Publishers.PinCode = $get(CtrlPrefix + 'txtZip').value;objEvt_Publishers.Fax = $get(CtrlPrefix + 'txtFax').value;objEvt_Publishers.Phone = $get(CtrlPrefix + 'txtCompanyphone').value;var ByPhone = $get(CtrlPrefix + 'chkByPhone');if(ByPhone.checked == true)
objEvt_Publishers.IsByPhone=true;else
objEvt_Publishers.IsByPhone=false;var InPerson = $get(CtrlPrefix + 'chkInPerson');if(InPerson.checked == true)
objEvt_Publishers.IsInPerson=true;else
objEvt_Publishers.IsInPerson=false;var ByMail = $get(CtrlPrefix + 'chkBymail');if(ByMail.checked  == true)
objEvt_Publishers.IsByMail=true;else
objEvt_Publishers.IsByMail=false;if((ByPhone.checked == true) || (InPerson.checked == true) )
{objEvt_Publishers.ContactFromtime = $get(CtrlPrefix + 'ddlSrartTime').value;objEvt_Publishers.ContactTotime = $get(CtrlPrefix + 'ddlEndTime').value;}
else
{objEvt_Publishers.ContactFromtime = 'Not Required';objEvt_Publishers.ContactTotime = 'Not Required';}
PageMethods.RegistrationEventPublisher(objUsersInfo,objEvt_Publishers,alertsInfo,RegisterEventPublisherOnSuccess,OnFailed);}
else
{parent.autofitIframeSignUp();displayError($get(CtrlPrefix + 'txtGUID'),MsgArray["ChkImgTxt"]);$get(CtrlPrefix + 'txtGUID').focus();var rndNum=Math.random();$get('regImg').src="Admin/GenerateRandomImage.ashx?guidId="+rndNum;HideProgress("btnRegistration");return false;}
}
function RegisterEventPublisherOnSuccess(response)
{if(response > 0)
{parent.window.location.href = "EventPublisherConfirmMessage.aspx";}
else
{$get('errorDiv').style.display="block";$get('errorDiv').innerHTML="Error :  During  registration process"
HideProgress("btnRegistration");parent.autofitIframeSignUp(0);}
}
function ShowExecutive()
{if($get(CtrlPrefix + 'ddlRefType').value=="1")
{$get("divExecutive").style.display = "";$get("divExecutivetxt").style.display = "";}
else
{$get("divExecutive").style.display = "none";$get("divExecutivetxt").style.display = "none";}
parent.autofitIframeSignUp(0);}
function ValidateExecutive()
{if($get(CtrlPrefix + 'ddlRefType').value=="1" && $get(CtrlPrefix + 'txtExecutiveCode').value=="")
{return false;}
else
{return true;}
}
function checkLogoType()
{if(document.getElementById("updLogo").checked)
{document.getElementById("trUpdLogo").style.display = "";document.getElementById("trLogoNote").style.display = "";document.getElementById("trUpdNoImage").style.display = "none";}
else
{document.getElementById("trUpdLogo").style.display = "none";document.getElementById("trLogoNote").style.display = "none";document.getElementById("trUpdNoImage").style.display = "";}
}
function UploadLogo(Orgid)
{if(document.getElementById("updLogo").checked)
{if(ValidateFileUploader(CtrlPrefix + "fileUpload",$get(CtrlPrefix + "htxtExtension").value,true))
{var cont=FileControl(CtrlPrefix + "fileUpload");if(cont.value!="")
{UploadFile(CtrlPrefix + "fileUpload","PhotoImages/OrganizationLogos/" + GetFileName(CtrlPrefix + "fileUpload"),"LogoUploadSuccess",$get(CtrlPrefix + "htxtFileSize").value,$get(CtrlPrefix + "htxtExtension").value);}
else
{HideProgress("btnRegistration","Upload success");}
}
else
{HideProgress("btnUpdate","Note: Only png,jpg,gif extension files are allowed.");}
}
else
{LogoUploadSuccess("PhotoImages/OrganizationLogos/samplelogo.jpg");}
}
function LogoUploadSuccess(FileLoc)
{PageMethods.UploadOrgLogo(FileLoc,OnuploadsuccessLogo,OnFaileduploadLogo)
}
function OnuploadsuccessLogo(url)
{if(url != "")
{HideProgress("btnRegistration","Upload success");}
}
function OnFaileduploadLogo()
{}
function ShowAlertToolTip(event,value)
{var text = "";switch(parseInt(value,10))
{case 0:
text = "Site updates like new features in jobafair etc.";break;case 1:
text = "When jobafair user create a new unite groupand sends a request to you.";break;case 2:
text = "When your colleague from previous (or) current organization sends a invitation to you.";break;case 3:
text = "When your classmate from previous (or) current organization sends a invitation to you.";break;case 4:
text = "When any of you friend refer a job of jobafair";break;case 5:
text = "When jobafair user post a new blog and sends a request to you.";break;case 6:
text = "When jobafair user create a new poll and sends a request to you.";break;case 7:
text = "When jobafair user create new event and sends a request to you";break;case 8:
text = "When jobafair user create seminar and sends a invitation to you";break;}
showTooltip(event,text);}
function PrepareNotificationAlerts()
{alertsInfo  =   new NexGen.Model.Common.NotificationAlertsInfo();var siteUpd = false;var uniteGrp = false;var colleague = false;var classmate = false;var referFriend = false;var blogs = false;var polls = false;var newEvent = false;var seminar = false;if($get("chk_siteUpdates").checked)
siteUpd = true;if($get("chk_uniteGrp").checked)
uniteGrp = true;if($get("chk_colleague").checked)
colleague = true;if($get("chk_classmate").checked)
classmate = true;if($get("chk_referJobFriend").checked)
referFriend = true;if($get("chk_blogs").checked)
blogs = true;if($get("chk_polls").checked)
polls = true;if($get("chk_newEvent").checked)
newEvent = true;if($get("chk_seminar").checked)
seminar = true;alertsInfo.IsSiteUpdates = siteUpd;alertsInfo.IsUniteGroup = uniteGrp;alertsInfo.IsColleagueInvite = colleague;alertsInfo.IsClassmateInvite = classmate;alertsInfo.IsReferJobByFriend = referFriend;alertsInfo.IsBlogs = blogs;alertsInfo.IsPolls = polls;alertsInfo.IsNewEvent = newEvent;alertsInfo.IsSeminar = seminar;}



