var savePagePrefix = 'ctl00_PHCenter_';var GlobReqId="";function showSuccess(Msg)
{if($get("td_MsgDisplay"))
$get("td_MsgDisplay").innerHTML = Msg;try{parent.parent.autoFitContentIframe();}catch(Error)
{}      
}
function showError(Msg)
{if($get("td_MsgDisplay"))
$get("td_MsgDisplay").innerHTML = Msg;try{parent.parent.autoFitContentIframe();}catch(Error)
{}
}
function showInfo(Msg)
{if($get("td_MsgDisplay"))
$get("td_MsgDisplay").innerHTML = Msg;try{parent.parent.autoFitContentIframe();}catch(Error)
{}       
}
function showAltInfo(Msg)
{if($get("td_MsgDisplay"))
$get("td_MsgDisplay").innerHTML = Msg;try{parent.parent.autoFitContentIframe();}catch(Error)
{}
}
function hideAltInfo()
{try{if($get("td_MsgDisplay"))
$get("td_MsgDisplay").innerHTML = "&nbsp;";parent.parent.autoFitContentIframe();}catch(Error)
{}
}
function JobView(reqJobId,role,jobfairId,JobFeedURL)
{if(trim(JobFeedURL) != "" && JobFeedURL != null && JobFeedURL != '0')
{var width = window.screen.availWidth;var height = window.screen.availHeight;var win = window.open(JobFeedURL,"_blank","width=" + width + ",height=" + height + ",left=0,top=0,status=no,toolbar=no,addressbar=no,scrollbars=yes,menubar=no,location=no,resizable=yes");if(win==null)
{displayStaticMessage('Please disable popup blocker',false);}
else
{}
}
else
{var jodfid = 0;if(jobfairId != null)
{if(jobfairId == undefined)
{}
else
{jodfid = jobfairId;}
}
GridConfiguartion.SetLink(
"jobCodeId=" + String(reqJobId) + "&JobFairId=" + jodfid,
function(result)
{if(parent.document.getElementById("MicroFrame")!=null)
{if(parent.document.getElementById("MicroFrame")!=null)
{parent.parent.OpenMDIWindow("Job Details: " + role,"winJob" + String(reqJobId),"../JobSeekers/JobViewDetails.aspx?" + result,'50','150','800','550');}
else
{parent.parent.OpenMDIWindow("Job Details: " + role,"winJob" + String(reqJobId),"JobSeekers/JobViewDetails.aspx?" + result,'50','150','800','550');}
}
else if(parent)
{try{if(parent.window.location.href.indexOf("Dashboard.aspx")>0)
parent.OpenMDIWindow("Job Details: " + role,"winJob" + String(reqJobId),"JobSeekers/JobViewDetails.aspx?" + result,'50','150','800','550');else
parent.OpenMDIWindow("Job Details: " + role,"winJob" + String(reqJobId),"JobSeekers/JobViewDetails.aspx?" + result,'50','150','800','550');}
catch(Error)
{parent.parent.OpenMDIWindow("Job Details: " + role,"winJob" + String(reqJobId),"../JobSeekers/JobViewDetails.aspx?" + result,'50','150','800','550');}
} 
else
OpenMDIWindow("Job Details: " + role,"winJob" + String(reqJobId),"../JobSeekers/JobViewDetails.aspx?" + result,'50','150','800','550');});}         
}
function showNewFolderPopup(e)
{if(document.getElementById('_IsPlacementOfficer_')!=null)
{if(document.getElementById('_IsPlacementOfficer_').innerHTML == 'true')
{if(location != "")
document.location   =   "../login.htm" + location.search;else
document.location   =   "../login.htm" + parent.window.document.location.search;return;}
}
showNewPopUpInfo('',false);var y_cord = findPosYForMDPopUp(e);var modalPopupBehavior = $find('NewFldModalPopupBehavior');try{modalPopupBehavior.set_Y(y_cord);}
catch(err)
{}
modalPopupBehavior.show();}
function CreateNewFld()
{hideAllMsgDivs();var newFolderName = document.getElementById('NewFolderName').value;if(document.getElementById('_IsPlacementOfficer_')!=null)
{if(document.getElementById('_IsPlacementOfficer_').innerHTML == 'true')
{if(location != "")
document.location   =   "../login.htm" + location.search;else
document.location   =   "../login.htm" + parent.window.document.location.search;return;}
}
if(newFolderName.length == 0 || trim(newFolderName) == '')
{showNewPopUpInfo("Enter Folder Name.",true);return false;}
else if(newFolderName.length>12)
{showNewPopUpInfo("Folder Name Should Be Less Than Or Equal to 12 Characters.",true);newFolderName.value ="";return false;}
else
{JobsServices.JobSeekerApplyJobs.CreateFolder(newFolderName,onsuccess_NF,onFailed_NF);return false;}
}
function onsuccess_NF(response)
{var NewFolderName = document.getElementById('NewFolderName').value;if(parseInt(response) != -1)
{Cancle_NF();if($get(savePagePrefix + 'SaveToFolderDDL') != null)
{var savefolder = document.createElement("OPTION");savefolder.text = NewFolderName;savefolder.value = response;$get(savePagePrefix + 'SaveToFolderDDL').options.add(savefolder);var controlName = 'SaveToFolderDDL';}
if($get(savePagePrefix + 'folderDropDown') != null)
{var folders = document.createElement("OPTION");folders.text = NewFolderName;folders.value = response;$get(savePagePrefix + 'folderDropDown').options.add(folders);var controlName = 'folderDropDown';}
if($get(savePagePrefix + 'ChangefolderDropDown') != null)
{var Changefolder = document.createElement("OPTION");Changefolder.text = NewFolderName;Changefolder.value = response;$get(savePagePrefix + 'ChangefolderDropDown').options.add(Changefolder);var controlName = 'ChangefolderDropDown';}
showSuccess("Folder '" + NewFolderName + "' Created Successfully.");return false;}
else
{showNewPopUpInfo("Folder '" + NewFolderName + "' already exists.",true);return false;}
$get('NewFolderName').value = '';Cancle_NF();}
function onFailed_NF()
{$get('NewFolderName').value = '';showError("Error! While Creating Folder.");Cancle_NF();}
function Cancle_NF()
{var modalPopupBehavior = $find('NewFldModalPopupBehavior');modalPopupBehavior.hide();showNewPopUpInfo('',false);}
function LTrim( value ) {var re = /\s*((\S+\s*)*)/;return value.replace(re, "$1");}
function RTrim( value ) {var re = /((\s*\S+)*)\s*/;return value.replace(re, "$1");}
function trim( value ) {return LTrim(RTrim(value));}
function showApplyPopUpInfo(Msg,prefix,bool)
{hideAltInfo();var applyPopUp = document.getElementById(prefix + 'ddlActiveResumes');var ApplyPopUpDivs = document.getElementById('ApplyPopUpDiv');var copyPopUpDivs = document.getElementById('CopyPopUpDiv');var changePopUpDivs = document.getElementById('ChangePopUpDiv');HidePopUps('Apply');if(bool == true)
{ApplyPopUpDivs.style.display = 'block';applyPopUp.focus();}
else
{ApplyPopUpDivs.style.display = 'none';var profileId = document.getElementById(prefix + 'defaultProfileId').value;if(profileId > 0)
applyPopUp.value = profileId;else
applyPopUp.value = -1;}
if(copyPopUpDivs != null)    
copyPopUpDivs.style.display = 'none';else
changePopUpDivs.style.display = 'none';ApplyPopUpDivs.innerHTML = Msg;}
function showCopyPopUpInfo(Msg,prefix,bool)
{hideAltInfo();var copyPopUp = $get(prefix + 'SaveToFolderDDL');var ApplyPopUpDivs = document.getElementById('ApplyPopUpDiv');var copyPopUpDivs = document.getElementById('CopyPopUpDiv');HidePopUps('Save');if(bool == true)
{copyPopUpDivs.style.display = 'block';try{copyPopUp.focus();txt_createFolder.focus();}
catch(Error){}
}
else
{copyPopUpDivs.style.display = 'none';copyPopUp.value = -1;}
copyPopUpDivs.innerHTML = Msg;}
function showNewPopUpInfo(Msg,bool)
{hideAltInfo();var newFolder = $get('NewFolderName');var newPopUpDivs = document.getElementById('NewPopUpDiv');HidePopUps('NewFolder');if(bool == true)
{newPopUpDivs.style.display = 'block';newFolder.focus();}
else
{newPopUpDivs.style.display = 'none';newFolder.value = '';}
newPopUpDivs.innerHTML = Msg;}
function showChangePopUpDiv(Msg,prefix,bool)
{hideAltInfo();var changeDDL = $get(prefix + 'ChangefolderDropDown');HidePopUps('Save Search');var changePopUpDivs = document.getElementById('ChangePopUpDiv');if(bool == true)
{changePopUpDivs.style.display = 'block';changeDDL.focus();}
else
{changePopUpDivs.style.display = 'none';}
changePopUpDivs.innerHTML = Msg;}
function showSearchPopUpDiv(Msg,bool)
{hideAltInfo();var searchTextBox = $get('nametxtBx');var descTextBox = $get('desctxtBx');var searchPopUpDivs = document.getElementById('SearchPopUpDiv');if(bool == true)
{searchPopUpDivs.style.display = 'block';searchTextBox.focus();}
else
{searchPopUpDivs.style.display = 'none';searchTextBox.focus();searchTextBox.value = '';descTextBox.value = '';}
searchPopUpDivs.innerHTML = Msg;}
function showSaveFeedSearch(Msg,bool)
{hideAltInfo();var searchTextBox = $get('txtfeedname');var descTextBox = $get('txtfeeddesc');var feedPopUpDivs = document.getElementById('FeedPopUpDiv');if(bool == true)
{feedPopUpDivs.style.display = 'block';searchTextBox.focus();}
else
{feedPopUpDivs.style.display = 'none';searchTextBox.focus();searchTextBox.value = '';descTextBox.value = '';}
feedPopUpDivs.innerHTML = Msg;}
function HidePopUps(popUpName)
{hideAltInfo();if(popUpName == 'Apply')
{var modalPopupBehavior = $find('saveJobPopupBehavior');if(modalPopupBehavior != null)
modalPopupBehavior.hide();var NewmodalPopupBehavior = $find('NewFldModalPopupBehavior');if(NewmodalPopupBehavior != null)
NewmodalPopupBehavior.hide();var SaveSearchModalPopupBehavior = $find('SavedSearchPopupBehavior');if(SaveSearchModalPopupBehavior != null)
SaveSearchModalPopupBehavior.hide();}
if(popUpName == 'Save')
{var ApplymodalPopupBehavior = $find('ApplyJobPopUpPopupBehavior');if(ApplymodalPopupBehavior != null)
ApplymodalPopupBehavior.hide();var NewmodalPopupBehavior = $find('NewFldModalPopupBehavior');if(NewmodalPopupBehavior != null)
NewmodalPopupBehavior.hide();var SaveSearchModalPopupBehavior = $find('SavedSearchPopupBehavior');if(SaveSearchModalPopupBehavior != null)
SaveSearchModalPopupBehavior.hide();}
if(popUpName == 'NewFolder')
{var modalPopupBehavior = $find('saveJobPopupBehavior');if(modalPopupBehavior != null)
modalPopupBehavior.hide();var ApplymodalPopupBehavior = $find('ApplyJobPopUpPopupBehavior');if(ApplymodalPopupBehavior != null)
ApplymodalPopupBehavior.hide();var SaveSearchModalPopupBehavior = $find('SavedSearchPopupBehavior');if(SaveSearchModalPopupBehavior != null)
SaveSearchModalPopupBehavior.hide();}
if(popUpName == 'Save Search')
{var modalPopupBehavior = $find('saveJobPopupBehavior');if(modalPopupBehavior != null)
modalPopupBehavior.hide();var ApplymodalPopupBehavior = $find('ApplyJobPopUpPopupBehavior');if(ApplymodalPopupBehavior != null)
ApplymodalPopupBehavior.hide();var NewmodalPopupBehavior = $find('NewFldModalPopupBehavior');if(NewmodalPopupBehavior != null)
NewmodalPopupBehavior.hide();}
}
function sortSelect(Prefix,controlName) 
{var selectToSort = null;if(Prefix != '')
selectToSort = document.getElementById(Prefix + controlName);else
selectToSort = document.getElementById(controlName);var myOptions = [];for (var loop=0;loop<selectToSort.options.length;loop++) 
{myOptions[loop] = {optText:selectToSort.options[loop].text, optValue:selectToSort.options[loop].value };}
myOptions.sort(sortFuncAsc);selectToSort.options.length = 0;for (var loop=0;loop<myOptions.length;loop++) 
{var optObj = document.createElement('option');optObj.text = myOptions[loop].optText;optObj.value = myOptions[loop].optValue;selectToSort.options.add(optObj);}
}
function sortFuncAsc(record1, record2) 
{var value1 = record1.optText.toLowerCase();var value2 = record2.optText.toLowerCase();if (value1 > value2) return(1);if (value1 < value2) return(-1);return(0);}
function sortFuncDesc(record1, record2)
{var value1 = record1.optText.toLowerCase();var value2 = record2.optText.toLowerCase();if (value1 > value2) return(-1);if (value1 < value2) return(1);return(0);}
function hideAllMsgDivs()
{if($get("td_MsgDisplay"))
$get("td_MsgDisplay").innerHTML = "&nbsp;";}
function JobSourceTag(jobSource)
{var jobSourceTag = "";if(parseInt(jobSource,10) == 0)
{jobSourceTag = "<img src='/cssserver20091030/images/ic_jobafair.gif' style='cursor:none' title='' border='0' alt='JobSource' />";}
else if(parseInt(jobSource,10) == 1)
{jobSourceTag = "<img src='/cssserver20091030/images/ic_noukri.gif' style='cursor:none' title='' border='0' alt='JobSource' />";}
else
{jobSourceTag = "<img src='/cssserver20091030/images/ic_indeed.gif' style='cursor:none' title='' border='0' alt='JobSource' />";}
return jobSourceTag;}
function PrepareExperienceTag(jobSource,minExp,maxExp)
{var exp = "";if(parseInt(jobSource,10) != 2)
{exp = "<span class='exp'>(" + minExp + " - " + maxExp +" yrs)</span>&nbsp;&nbsp;&nbsp;&nbsp;";}
return exp;}
function PrepareRecruitmentType(recruitmentType)
{var recruitmentTypeTag = "";if(recruitmentType)
{recruitmentTypeTag = '<img title="Online Recruitment" src="/cssserver20091030/images/onlineinterview.gif" style="cursor: pointer"/>';}
return recruitmentTypeTag;}
function PrepareOrgAncTag(OrgId,IsOrgSiteExists,OrgName)
{var OrganizationName = "";try{if(IsOrgSiteExists)
OrganizationName = '<a href= "javascript:ShowOrganizationJobs(' + OrgId + ')" class ="orgname">' + OrgName + '</a>';else
OrganizationName = OrgName ;}
catch(Error)
{}
return OrganizationName;}
function PrepareSaveAncTag(RequsitionId,IsSaved)
{var SaveAnchoreTag = "";try{if(IsSaved == "0")
SaveAnchoreTag = '<a class="actionlink_small" id="ancSave_' + RequsitionId +'" onclick = "showSaveJobPopUp(this,' + RequsitionId + ')">'
+ '<img title="Save Job" id="imgSave_' + RequsitionId +'" src="/cssserver20091030/images/ic_save.gif"' 
+ 'style="cursor: pointer"/>save</a>';else
SaveAnchoreTag = '<a class="actionlink_small1" id="ancSaved_' + RequsitionId +'">'
+ '<img title="' + IsSaved + '" src="/cssserver20091030/images/ic_saved.gif" style="cursor: pointer"/>saved</a>';}
catch(Error)
{}
return SaveAnchoreTag;}
function PrepareApplyAncTag(RequsitionId,jobFairId,isPreScreeReq,IsApplied,isSingleApply,organizaionId,JobFeedURL,recruitmentType,position,OnlineRecTime)
{var ApplyAnchoreTag = "";if(isPreScreeReq == 'False')
{isPreScreeReq = false;}
else if(isPreScreeReq == 'True')
{isPreScreeReq = true;}
if(isSingleApply == "1" || isSingleApply == "true")
{try{if(IsApplied == "0")
ApplyAnchoreTag = '<a class="actionlink_small" id="ancApply_' + RequsitionId +'"onclick = "showJobFairApplyPopup(this,'+ RequsitionId + ',' + jobFairId + ',' + isPreScreeReq + ','+ organizaionId +',\'' + JobFeedURL + '\',' + recruitmentType + ',\'' + position + '\',' + OnlineRecTime + ')">'
+ '<img title="Apply Job" id="imgApply_' + RequsitionId +'" src="/cssserver20091030/images/ic_apply.gif"  style="cursor: pointer"/>'
+ 'apply</a>';else
ApplyAnchoreTag = '<a class="actionlink_small1" id="anc_' + RequsitionId +'">'
+ '<img title="' + IsApplied + '" src="/cssserver20091030/images/ic_applied.gif"  style="cursor: pointer" />applied</a>';}
catch(Error)
{}
}
else
{try{if(IsApplied == "0")
ApplyAnchoreTag = '<a class="actionlink_small" id="ancApply_' + RequsitionId +'"onclick = "showApplyPopup(this,'+ RequsitionId + ',' + jobFairId + ',' + isPreScreeReq + ',\'' + JobFeedURL + '\',' + recruitmentType + ',\'' + position + '\','+ OnlineRecTime + ')">'
+ '<img title="Apply Job" id="imgApply_' + RequsitionId +'" src="/cssserver20091030/images/ic_apply.gif"  style="cursor: pointer"/>'
+ 'apply</a>';else
ApplyAnchoreTag = '<a class="actionlink_small1" id="anc_' + RequsitionId +'">'
+ '<img title="' + IsApplied + '" src="/cssserver20091030/images/ic_applied.gif"  style="cursor: pointer" />applied</a>';}
catch(Error)
{}
}
return ApplyAnchoreTag;}
function PrepareChangeFolderAncTag(RequsitionId)
{var ChangeFolderTag = "";try{ChangeFolderTag =   '<a title="Change Folder" class="actionlink_small" id="ancChFolder_' + RequsitionId +'" onclick = "ChangeFolder(this,' + RequsitionId + ')">'
+ '<img id="imgChFolder_' + RequsitionId +'" title = "Change Folder"  src="/cssserver20091030/images/ic_changefolder.gif" style="cursor: pointer"/>change folder</a>';}
catch(Error)
{}
return ChangeFolderTag;}
function PrepareDeleteAncTag(RequsitionId)
{var DeleteFolderTag = "";try{DeleteFolderTag = '<a title="Delete Job" class="actionlink_small" id="ancDelFolder_' + RequsitionId +'" onclick = "DeleteJob(' + RequsitionId + ')">'
+ '<img id="imgDelFolder_' + RequsitionId +'" title = "Delete Job" src="/cssserver20091030/images/ic_delete.gif" style="cursor: pointer"/>delete<a>';}
catch(Error)
{}
return DeleteFolderTag;}
function PrepareStickyAncTag(RequisitionId,ObjectTypeId,IsStickyExists)
{var StickyImgTag = "";try{if(IsStickyExists == 0)
{StickyImgTag = '<a title="Stickies" class="actionlink_small" id="ancSticky_" onclick = "ShowStickyOptions(' + RequisitionId + ',' + ObjectTypeId + ',this,0)">'
+'<img title="Stickies" src="/cssserver20091030/images/ic_sticky.gif" style="cursor: pointer"/>sticky</a>';}
else
if(IsStickyExists == 1)
{StickyImgTag = '<a title="Stickies" class="actionlink_small" id="ancSticky_" onclick = "ShowStickyOptions(' + RequisitionId + ',' + ObjectTypeId + ',this,0)">'
+'<img title="Stickies" src="/cssserver20091030/images/ic_stickyAlready.gif" style="cursor: pointer"/>sticky</a>';}
}
catch(Error)
{}
return StickyImgTag;}
function findPosYForMDPopUp(obj) 
{var curtop = 0;if (obj.offsetParent) 
{while (obj.offsetParent) 
{curtop += obj.offsetTop;obj = obj.offsetParent;}
}
else if (obj.y)
curtop += obj.y;return curtop;}
function DisplayClassPopUp(e,ReqId)
{GlobReqId=ReqId;var length = getRequistionJobDetails();if(length == 0)
{displayStaticMessage('Select a Job',false);}
else
{hideAltInfo();if(document.getElementById(userTypeprefix + "hdnUserType") != null)
{if(document.getElementById(userTypeprefix + "hdnUserType").value != 'PlacementOfficer' && document.getElementById(userTypeprefix + "hdnUserType").value != 'jobSeeker')
{if(String(document.location).indexOf("JobTrendAnalysis.aspx") > 0)
{document.location   =   "login.htm?ReturnUrl=" + location.pathname.replace("/NexGen/","") + location.search;return;}
}
}
if(parent.parent.document.getElementById("MicroParentFrame")!= null) 
{if(parent.parent.document.getElementById("MicroParentFrame").contentWindow.document.getElementById("MicroFrame")!= null)
{parent.parent.OpenMDIWindow("Refer Job(s)","winJob_ReferToJob","../JobSeekers/ReferJobsToFriend.aspx",'10','50','940','600');} 
}
else if(parent.parent.document.getElementById("MicroFrame") != null)
{parent.parent.OpenMDIWindow("Refer Job(s)","winJob_ReferToJob","../JobSeekers/ReferJobsToFriend.aspx",'10','50','940','600');}
else
{parent.OpenMDIWindow("Refer Job(s)","winJob_ReferToJob","JobSeekers/ReferJobsToFriend.aspx",'10','50','940','600');}  
}
}
function getRequistionJobDetails()
{var documentObj = parent.document;var jobsGridObj;var GReqId;if(parent.parent.document.getElementById("MicroParentFrame")!= null) 
{if(parent.parent.document.getElementById("MicroParentFrame").contentWindow.document.getElementById("MicroFrame")!= null)
{jobsGridObj = parent.parent.document.getElementById("MicroParentFrame").contentWindow.document.getElementById("MicroFrame").contentWindow.jobsGrid;GReqId= parent.parent.document.getElementById("MicroParentFrame").contentWindow.document.getElementById("MicroFrame").contentWindow.GlobReqId;}
else   
{jobsGridObj = parent.parent.document.getElementById("MicroParentFrame").contentWindow.jobsGrid;GReqId= parent.parent.document.getElementById("MicroParentFrame").contentWindow.GlobReqId;}
}
else if(documentObj.getElementById("parentFrame")!= null) 
{jobsGridObj = documentObj.getElementById("parentFrame").contentWindow.jobsGrid;GReqId=documentObj.getElementById("parentFrame").contentWindow.GlobReqId;}
else if(parent.jobsGrid != null) 
{jobsGridObj = parent.jobsGrid;GReqId=parent.GlobReqId;}   
else if(parent.parent.document.getElementById("MicroFrame") != null) 
{jobsGridObj = parent.parent.document.getElementById("MicroFrame").contentWindow.jobsGrid;GReqId= parent.parent.document.getElementById("MicroFrame").contentWindow.GlobReqId;}
if(GReqId==-1)
{var _checkedRowIds = jobsGridObj.grid.getCheckedRows(0).split(",");var thisId = 0;var count = jobsGridObj.grid.getCheckedRows(0).length;if(count == 0)
return count;else
{ReferToFriendsInfo = new Array();var jobsGridXMLObj = jobsGridObj.xmlResponseObj;if(jobsGridXMLObj != null)
{var requistionsJobIdsArr = jobsGridXMLObj.getElementsByTagName("RequisitionJobId");var requistionArrLength = requistionsJobIdsArr.length;if(requistionArrLength > 0)
{for(cnt = 0;cnt<_checkedRowIds.length;cnt++)
{thisId = _checkedRowIds[cnt];ReferToFriendsInfo[cnt] = new NexGen.Model.Jobseeker.ReferToFriendsInfo();var cutRequisJobId = jobsGridObj.grid.cells(thisId,1).getValue();for(var i=requistionArrLength-1;i>=0;i--)
{if(requistionsJobIdsArr[i].firstChild.nodeValue == cutRequisJobId)
{if(jobsGridXMLObj.getElementsByTagName("Position")[i].firstChild != null)
ReferToFriendsInfo[cnt].Position            = jobsGridXMLObj.getElementsByTagName("Position")[i].firstChild.nodeValue;if(jobsGridXMLObj.getElementsByTagName("OrganizationName")[i].firstChild != null)
ReferToFriendsInfo[cnt].OrganizationName    = jobsGridXMLObj.getElementsByTagName("OrganizationName")[i].firstChild.nodeValue;if(jobsGridXMLObj.getElementsByTagName("Location")[i].firstChild != null)
ReferToFriendsInfo[cnt].Location            = jobsGridXMLObj.getElementsByTagName("Location")[i].firstChild.nodeValue;if(jobsGridXMLObj.getElementsByTagName("MinExp")[i].firstChild != null)
ReferToFriendsInfo[cnt].MinExp              = jobsGridXMLObj.getElementsByTagName("MinExp")[i].firstChild.nodeValue;if(jobsGridXMLObj.getElementsByTagName("MaxExp")[i].firstChild != null)
ReferToFriendsInfo[cnt].MaxExp              = jobsGridXMLObj.getElementsByTagName("MaxExp")[i].firstChild.nodeValue;if(requistionsJobIdsArr[i].firstChild != null)
ReferToFriendsInfo[cnt].RequisitionJobIds   = requistionsJobIdsArr[i].firstChild.nodeValue;if(jobsGridXMLObj.getElementsByTagName("JobDescription")[i].firstChild != null)
{var jobDescription = jobsGridXMLObj.getElementsByTagName("JobDescription")[i].firstChild.nodeValue;if(jobDescription.length > 100)
jobDescription = jobDescription.substring(0,100) + '...';ReferToFriendsInfo[cnt].JobDescription      = jobDescription
}
}
}
}
}
}
return cnt;}
}
else
{ReferToFriendsInfo = new Array();var jobsGridXMLObj = jobsGridObj.xmlResponseObj;if(jobsGridXMLObj != null)
{var requistionsJobIdsArr = jobsGridXMLObj.getElementsByTagName("RequisitionJobId");var requistionArrLength = requistionsJobIdsArr.length;if(requistionArrLength > 0)
{ReferToFriendsInfo[0] = new NexGen.Model.Jobseeker.ReferToFriendsInfo();for(var i=requistionArrLength-1;i>=0;i--)
{if(requistionsJobIdsArr[i].firstChild.nodeValue == GReqId)
{if(jobsGridXMLObj.getElementsByTagName("Position")[i].firstChild != null)
ReferToFriendsInfo[0].Position            = jobsGridXMLObj.getElementsByTagName("Position")[i].firstChild.nodeValue;if(jobsGridXMLObj.getElementsByTagName("OrganizationName")[i].firstChild != null)
ReferToFriendsInfo[0].OrganizationName    = jobsGridXMLObj.getElementsByTagName("OrganizationName")[i].firstChild.nodeValue;if(jobsGridXMLObj.getElementsByTagName("Location")[i].firstChild != null)
ReferToFriendsInfo[0].Location            = jobsGridXMLObj.getElementsByTagName("Location")[i].firstChild.nodeValue;if(jobsGridXMLObj.getElementsByTagName("MinExp")[i].firstChild != null)
ReferToFriendsInfo[0].MinExp              = jobsGridXMLObj.getElementsByTagName("MinExp")[i].firstChild.nodeValue;if(jobsGridXMLObj.getElementsByTagName("MaxExp")[i].firstChild != null)
ReferToFriendsInfo[0].MaxExp              = jobsGridXMLObj.getElementsByTagName("MaxExp")[i].firstChild.nodeValue;if(requistionsJobIdsArr[i].firstChild != null)
ReferToFriendsInfo[0].RequisitionJobIds   = requistionsJobIdsArr[i].firstChild.nodeValue;if(jobsGridXMLObj.getElementsByTagName("JobDescription")[i].firstChild != null)
{var jobDescription = jobsGridXMLObj.getElementsByTagName("JobDescription")[i].firstChild.nodeValue;if(jobDescription.length > 100)
jobDescription = jobDescription.substring(0,100) + '...';ReferToFriendsInfo[0].JobDescription      = jobDescription
}
}
}
}
}
return 1;}
}
function ChkForEmailIcon()
{}
function PrepareRecommandJob(OrgId,Orgname)
{var RecImgTag = "";try
{RecImgTag = '<a class="actionlink_small"  href="javascript:void(0)" onclick = "ShowRecommandjob('+OrgId+',\'' + Orgname + '\');">'
+'<img title = "Friends at company" src="/cssserver20091030/images/ic_recommand.gif" style="cursor: pointer;border:0"/>'
+'Friends at company</a>';}
catch(Error)
{}
return RecImgTag;}
function PrepareReferaFriendTag(ReqJobId)
{var ReferAfriend = "";try
{ReferAfriend = '<a class="actionlink_small"  href="javascript:void(0)" onclick = "DisplayClassPopUp(this,'+ReqJobId+');">'
+'<img title = "Refer a friend" src="/cssserver20091030/images/ic_referjob.gif" style="cursor: pointer;border:0"/>'
+'Refer a friend</a>';}
catch(Error)
{}
return ReferAfriend;}
function LTrim( value ) {var re = /\s*((\S+\s*)*)/;return value.replace(re, "$1");}
function RTrim( value ) {var re = /((\s*\S+)*)\s*/;return value.replace(re, "$1");}
function trim( value ) {return LTrim(RTrim(value));}



