function SaveContacts()
{document.getElementById('contactListMode').value='updateList';return true;}
function masterCheck(tt,selectall,none,status)
{if(status)
document.getElementById('moveToField').innerHTML='<a href="javascript:moveToMyContactAJAX()" style="text-decoration:none">&nbsp;&nbsp;'+"<img src='"+HOST_ROOT_PATH_VAR+"images/DefaultImage/move.gif' border='0' />"+'</a>';else
document.getElementById('moveToField').innerHTML='&nbsp;&nbsp;'+"<img src='"+HOST_ROOT_PATH_VAR+"images/DefaultImage/moveDisable.gif' border='0' />";var elems=document.contactUserListForm.elements;for(var i=0,len=elems.length;i<len;i++)
if(elems[i].type&&elems[i].type=='checkbox')
elems[i].checked=status;}
function countAllChkBox()
{var count=0;var elems=document.contactUserListForm.elements;for(var i=0,len=elems.length;i<len;i++)
if(elems[i].type&&elems[i].type=='checkbox')
{count++;}
return count;}
function countCheckedChkBox()
{var count=0;var elems=document.contactUserListForm.elements;for(var i=0,len=elems.length;i<len;i++)
if(elems[i].type&&elems[i].type=='checkbox'&&elems[i].checked)
{count++;}
return count;}
function moveToMyContactAJAX()
{len=countAllChkBox();document.getElementById('contactListMode').value='updateMyContactListList';document.contactUserListForm.submit();}
function contactAJAX(contactMode)
{$.post(HOST_ROOT_PATH_VAR+'code/AddContacts/AddContactAJAX.php',{'contactMode':contactMode,'mode':'userList'},responcePost,"html");if(contactMode=='MyContacts')
document.getElementById('saveBtn').style.display='block';else
document.getElementById('saveBtn').style.display='none';}
function responcePost(d,s)
{document.getElementById('contactUserListDiv').innerHTML=d;}
function indexOfCheckedChk()
{len=countAllChkBox();for(var i=0;i<len;i++)
{if(document.getElementById('contactUserChk'+i).checked)
return i;}}
function checkInContactList()
{var countChecked=countCheckedChkBox();if(countChecked<=1)
{if(countChecked==1)
{var Index=indexOfCheckedChk();var UserId=document.getElementById('contactUserId_'+Index).value;$.post(HOST_ROOT_PATH_VAR+'code/AddContacts/AddContactAJAX.php',{'userId':UserId,'mode':'checkInMyContacts'},checkInContactListResponce,"html");}
else if(countChecked==0)
{document.getElementById('moveToField').innerHTML='&nbsp;&nbsp;'+"<img src='"+HOST_ROOT_PATH_VAR+"images/DefaultImage/moveDisable.gif' border='0' />";}}
else if(countChecked>1)
{document.getElementById('moveToField').innerHTML='<a href="javascript:moveToMyContactAJAX()" style="text-decoration:none">&nbsp;&nbsp;'+"<img src='"+HOST_ROOT_PATH_VAR+"images/DefaultImage/move.gif' border='0' />"+'</a>';}}
function checkInContactListResponce(d,s)
{document.getElementById('moveToField').innerHTML=d;}
function backPage()
{location.replace(HOST_ROOT_PATH_VAR+'CompanyProjectList/');}
function CompanyProjectListAction(actionMode,actionIdArray,updateColumnArray)
{var variable=actionIdArray.toString().split(",");if(actionMode=='V')
{document.getElementById('hiddenProjectId').value=variable[1];document.ProjectListForm.submit();}}
function FAQValidate()
{message=isBlank("selectFaqCategory",MSG_FAQ_CATEGORY_BLANK);if(message!="")
{displayMessage("FAQErrorLabel",message,0);return false;}
return true;}
function submitFaqForm()
{if(!FAQValidate())
{return false;}
var isValidForm=false;isValidForm=validateForm('FaqForm');if(isValidForm=='true')
{document.getElementById("faqMode").value="Insert";document.getElementById("faqAction").value="save";document.getElementById("FaqForm").action=HOST_ROOT_PATH_VAR+"FAQ/EditFaq/";document.FaqForm.submit();}
else
return false;}
function updateFaqForm()
{if(!FAQValidate())
{return false;}
var isValidForm=false;isValidForm=validateForm('FaqForm');if(isValidForm=='true')
{document.getElementById("faqMode").value="Insert";document.getElementById("faqAction").value="update";document.getElementById("FaqForm").action=HOST_ROOT_PATH_VAR+"FAQ/EditFaq/";document.FaqForm.submit();}
else
return false;}
function addFaqCategory(formName)
{var FaqCategoryValidateVar=validateForm(formName);if(FaqCategoryValidateVar==true)
{$("#FaqCategoryModeId").attr('value','save');$("#formFaqCategoryId").attr('action',HOST_ROOT_PATH_VAR+"FAQ/FaqCategoryCreate/");$("#formFaqCategory").submit();}
else
{return false;}}
function checkGridName(d,s)
{if(d["ans"]=="N")
{displayMessage("gridError","Grid Name Already in Exist.",2);return false;}
else
{document.gridMasterForm.submit();}}
function ValidGrid()
{var gridName=$("#gridTitle").attr("value");var gridMasterId=$("#gridMasterId").attr("value");if(gridName=='')
{displayMessage("gridError","Enter Grid Name.",2);return false;}
else
{var url=HOST_ROOT_PATH_VAR+"code/GridWizard/GridValidation.php";if(gridMasterId=='')
{$.post(url,{"gName":gridName},checkGridName,"json");}
else
{$('#insertType').attr('value','Edit');$.post(url,{"gName":gridName,"gridId":gridMasterId},checkGridName,"json");}}}
function gridManagerAction(gridAction,gridArray)
{if(gridAction=='E')
{$('#insertType').attr('value','fetchData');}
if(gridAction=='D')
{$('#insertType').attr('value','Delete');}
$('#listGridId').attr('value',gridArray[0][1]);document.gridMasterForm.submit();}
function AddSiteMap(formName)
{var isValidForm=false;isValidForm=validateForm(formName);if(isValidForm==true)
{document.getElementById('Mode').value='addSiteMapName';document.formManageSiteMap.submit();}
else
{return false;}}
function UpdateEditSiteMap(formName)
{var isValidForm=false;isValidForm=validateForm(formName);if(isValidForm==true)
{document.getElementById('Mode').value='updateEditSiteMap';document.formManageSiteMap.submit();}
else
{return false;}}
function SubmitProjectDomain(id)
{$('#prjoectDomainId').attr('value',id);$('#projectDomain').submit();}
function ProjectDetail(id)
{$('#prjoectDomainId').attr('value',id);$('#DisplayType').attr('value','ViewProjectGallery');document.projectDomain.action=HOST_ROOT_PATH_VAR+"ProjectGallery/ViewProject/";$('#projectDomain').submit();}
function projectDomainListAction(actionMode,actionIdArray)
{if(actionMode=='E')
{document.projectDomainList.projectId.value=actionIdArray[0][1];document.projectDomainList.action=HOST_ROOT_PATH_VAR+"ProjectList/";document.projectDomainList.submit();}
else if(actionMode=='D')
{var val=confirm("Are You Sure You Want To Delete This Project?");if(val==false)
{return false;}
else
{document.projectDomainList.projectId.value=actionIdArray[0][1];document.projectDomainList.mode.value='Delete';document.projectDomainList.action=HOST_ROOT_PATH_VAR+"ProjectList/List/";document.projectDomainList.submit();}}
else if(actionMode=='A')
{document.projectDomainList.projectId.value=actionIdArray[0][1];}}
function submitSearch()
{document.projectDomainList.submit();}
function nextEvent()
{var projIdChecked=$('input:radio:checked').attr('value');if(!projIdChecked)
{displayMessage("projectDisplayListError",'Please select the project',2);return false;}
else
{document.getElementById('projectId').value=projIdChecked;document.projectDomainList.mode.value='Next';document.projectDomainList.submit();}}
function submitform(user)
{var isValidForm=false;isValidForm=validateForm('projectListForm');if(isValidForm==true)
{if(user)
{document.projectListForm.modetxt.value='Edit';document.projectListForm.submit();}
else
{document.projectListForm.modetxt.value='Insert';document.projectListForm.submit();}}
else
return false;}
function nextContact()
{document.projectListForm.pagination.value="pagination";document.projectListForm.showDetail.value="showDetail";var value=document.getElementById('recordNumber').value;if(value<document.getElementById('projectCount').value){document.projectListForm.recordNumber.value=++value;}
document.projectListForm.submit();}
function previousContact()
{document.projectListForm.pagination.value="pagination";document.projectListForm.showDetail.value="showDetail";var value=document.getElementById('recordNumber').value;if(document.projectListForm.recordNumber.value>0){document.projectListForm.recordNumber.value=--value;}
document.projectListForm.submit();}
var p="";var f="";function submitEmailForm(page,formName,callFun)
{p=page;f=formName;var vale=checkCaptchaValidation();if(vale==true){var isValidForm=false;isValidForm=validateForm(formName);if(isValidForm==true)
{document.standardForm.action=HOST_ROOT_PATH_VAR+"StandardEmail/"+page+"/";document.standardForm.submit();}
else
return false;}else
return false;}
function checkCaptchaValidation()
{var codeValue=document.getElementById("businessCaptcha").value;if(codeValue=='')
{$('#catCode').show();document.getElementById("businessCaptcha").focus();return false;}
url=HOST_ROOT_PATH_VAR+'code/ajaxRegistrationCapcha.php?checkCaptch='+codeValue;$.post(url,{},captchaResponse,"json");}
function captchaResponse(d,s)
{if(d['success']==0)
{$('#businessCaptcha').attr('value','');$('#catCode').html('The Captcha code entered was not correct. Please try again');document.getElementById("businessCaptcha").focus();return false;}
else
{var isValidForm=false;isValidForm=validateForm(f);if(isValidForm==true)
{document.standardForm.action=HOST_ROOT_PATH_VAR+"StandardEmail/"+p+"/";document.standardForm.submit();}
else
return false;}}
function downLoadFile(fileName)
{document.getElementById('downloadFileName').value=fileName;document.contactMailDetails.submit();}
function backPage1()
{location.replace(HOST_ROOT_PATH_VAR+'StandardEmail/Details/');}
function saveUpdateStateManagement(mode)
{var validateMsg='';var validateMsg=validateStateManagement()
if(validateMsg!='')
{displayMessage("stateManagementMessage",validateMsg,0);return false;}
document.stateManagementEditForm.stateManagementMode.value=mode;document.stateManagementEditForm.submit();}
function validateStateManagement()
{var msg=''
if(document.stateManagementEditForm.stateNameTxt.value=='')
{msg="Please State Name";return msg;}
if(document.stateManagementEditForm.displayOrderTxt.value=='')
{msg="Please Enter Display Order";return msg;}
else if(isNaN(document.stateManagementEditForm.displayOrderTxt.value))
{msg="Please Enter Only Numeric Display Order";return msg;}
return msg;}
function StateListAction(actionMode,actionIdArray,updateColumnArray)
{var variable=actionIdArray.toString().split(",");if(actionMode=='D')
{answer=confirm("Are you sure you want to delete this record?");if(answer)
{document.stateManagementListForm.actionMode.value=actionMode;document.stateManagementListForm.actionId.value=variable[1];document.stateManagementListForm.submit();}}
if(actionMode=='E')
{document.stateManagementListForm.actionMode.value=actionMode;document.stateManagementListForm.actionId.value=variable[1];document.stateManagementListForm.submit();}}
function pageSearch()
{document.stateManagementListForm.stateManagementMode.value="Search";document.stateManagementListForm.submit();}
function istb()
{window.open("http://www.istqb.in/affiliates.php?page=11");}
function cdac()
{window.open("http://www.cdacnoida.in/MoU_WS/MMIS.html");}
function setTheamSesssion(dd)
{id=$(dd).attr('id');$('.noClass').removeClass('selectedTheam');$(dd).addClass('selectedTheam')
$.post('../code/Theams/Ajax/theamSession.php',{'theamId':id},responcePost1,"json");}
function responcePost1(d,s){}
function submitAdminComment()
{$('#displayId').show();cmt=$('#adminCommentBox').val();$.post('../code/AdminOrder/Ajax/theamSession.php',{'comment':cmt},responcePost,"json");}
function saveTheam()
{$('#theamMode').attr('value','save');$('#theamForm').submit();}
var emailwindow;function openpopup(funcName)
{emailwindow=dhtmlmodal.open('EmailBox','iframe','http://localhost/Auction/code/UserLogin/UserLogin.php?functionName='+funcName,'Login','width=500px,height=430px,center=1,resize=0,scrolling=1')}
function CallAlert()
{alert(location.href);}
function memberUserLogin()
{if(!loginValidate())
{return false;}
else
{document.getElementById("currentUrl").value=location.href;document.getElementById("loginMode").value='loginUserMain';}
return true;}
function loginValidate()
{message=isBlank("loginIdTxt","Please Enter Username & Password");if(message!="")
{displayMessage("userLoginErrorLabels",message,2);return false;}
message=isBlank("loginPasswordTxt","Please Enter Password");if(message!="")
{displayMessage("userLoginErrorLabels",message,2);return false;}
return true;}
function browseFaq(faqCatID,faqID,faqQue)
{var quearray=faqQue.split(" ");var newNam='';if(quearray.length>1)
{for(i=0;i<quearray.length;i++)
{if(i==0)
{newNam=quearray[i];}
else
{newNam=newNam+'-'+quearray[i];}}}
else
{newNam=faqQue;}
$("#faqCatID").attr('value',faqCatID);$("#faqID").attr('value',faqID);$("#globalForm").attr('action',HOST_ROOT_PATH_VAR+"FAQ/"+newNam+"/");$("#globalForm").submit();}
function submitQuickQuote()
{$('#quickError2').hide();$('#errorCode3').hide();$('#quickError2').html('Enter valid Email Id')
document.quickQuoteForm.txtEmail.style.border='1px solid #CCCCCC';document.quickQuoteForm.txtQuote.style.border='1px solid #CCCCCC';document.quickQuoteForm.txtName.style.border='1px solid #CCCCCC';document.quickQuoteForm.txtTelephone.style.border='1px solid #CCCCCC';document.quickQuoteForm.selType.style.border='1px solid #CCCCCC';var iValidMailId=isBlank('txtName',"no");if(iValidMailId=="no")
{document.quickQuoteForm.txtName.style.border='1px solid red';document.quickQuoteForm.txtName.focus();return;}
if(document.quickQuoteForm.txtName.value=="Name")
{$('#quickError2').show();$('#quickError2').html('Enter Name');$('.midWrap').height(255)
document.quickQuoteForm.txtName.style.border='1px solid red';document.quickQuoteForm.txtName.focus();return;}
iValidMailId=isEmail('txtEmail',"no");if(iValidMailId=="no")
{$('#quickError2').show();$('#quickError2').html('Enter Email Id');$('.midWrap').height(255)
document.quickQuoteForm.txtEmail.style.border='1px solid red';document.quickQuoteForm.txtEmail.focus();return;;}
iValidMailId=isBlank('txtTelephone',"no");if(iValidMailId=="no")
{document.quickQuoteForm.txtTelephone.style.border='1px solid red';document.quickQuoteForm.txtTelephone.focus();return;}
if(document.quickQuoteForm.txtTelephone.value=="Telephone")
{$('#quickError2').show();$('#quickError2').html('Enter Telephone');$('.midWrap').height(255)
document.quickQuoteForm.txtTelephone.style.border='1px solid red';document.quickQuoteForm.txtTelephone.focus();return;}
if(document.quickQuoteForm.selType.value=="")
{$('#quickError2').show();$('#quickError2').html('Select need');$('.midWrap').height(255)
document.quickQuoteForm.selType.style.border='1px solid red';document.quickQuoteForm.selType.focus();return;}
iValidMailId=isBlank('txtQuote',"no");if(iValidMailId=="no")
{document.quickQuoteForm.txtQuote.style.border='1px solid red';$('#quickError2').show();$('#quickError2').html('Enter Quotation');$('.midWrap').height(255)
document.quickQuoteForm.txtQuote.focus();return;}
else
document.quickQuoteForm.submit();}
function submitQuickQuoteInner()
{var iValidMailId=isEmail('txtEmail',"no");if(iValidMailId=="no")
{document.quickQuoteInnerForm.txtEmail.focus();return false;}
else
document.quickQuoteForm.submit();}