// Sets cookie values. Expiration date is optional// childWindow4GU = null repWin = null; //sets the cookie value of both cookies in any page /*function setCookies(cookie1, cookie2){ if(cookie1 != null && cookie1 != "") { setCookie(cookie1, getCookie(cookie1)); } if(cookie2 != null && cookie2 != "") { setCookie(cookie2, getCookie(cookie2)); } } */ //sets the cookie value function setCookie(name,value){ value++; cookiestring=name+"="+escape(value)+";"; document.cookie=cookiestring; } //fetches the value of cookie function getCookie(cookiename) { //alert(document.cookie); var cookiestring=""+document.cookie; var index1=cookiestring.indexOf(cookiename); if (index1==-1 || cookiename=="") return ""; var index2=cookiestring.indexOf(';',index1); if (index2==-1) index2=cookiestring.length; return unescape(cookiestring.substring(index1+cookiename.length+1,index2)); } function numCheck(param, strFieldName) { if(isNaN(param.value)==true) { alert(strFieldName + " accepts only numeric characters !!!"); param.select(); param.focus(); return false; } else return true; } function alphanumCheck(param, strFieldName) { var n=param.value; var ln=n.length; var i=0; for(i=0;i='a' && c<='z') || (isNaN(c)==false) ||(c>='A' && c<='Z')) continue; else { alert(strFieldName + " accepts only alphanumeric characters"); param.select(); param.focus(); return false; } } return true; } function alphaCheck(param, strFieldName) { var n=param.value; var ln=n.length; var i=0; for(i=0;i='a' && c<='z')||(c>='A' && c<='Z')) continue; else { alert(strFieldName + " accepts only alphabetic characters"); param.select(); param.focus(); return false; } } return true; } function trim(param){ //SRP - Sep282004 - ECSN_DEFECT_528 - commented the following line //len=param.length; //alert("inside trim"); //remove leading spaces while(param.charAt(0)==' '){ //SRP - Sep282004 - ECSN_DEFECT_528 - included the following line len=param.length; if(param.length !=1) { //SRP - Sep282004 - ECSN_DEFECT_528 - commented the following line //param=param.substring(1,len-1); //SRP - Sep282004 - ECSN_DEFECT_528 - included the following line param=param.substring(1,len); } else if(param.length ==1) { param = ""; return(param); } } len2=param.length-1; //remove all ending spaces while(param.charAt(len2)==' '){ param=param.substring(0,len2); len2=param.length-1; } return(param); } function checkBlank(param, strFieldName) { //alert("inside checkblank"); if(trim(param.value)=="") { alert(strFieldName+" can not be empty"); param.value=""; param.focus(); return false; } } function popUp(filename){ YP = window.open(filename,"popUp","width=750,height=600,toolbar=yes,status=yes,resizable=yes,scrollbars=yes,location=yes,menubar=yes,titlebar=yes"); } function popUpFA(filename){ YP = window.open(filename,'serviceview','width=700,height=600,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes,left=0,top=0,screenX=0,screenY=0'); //newWindow.focus(); } //SRP - 10/05/2004 - ECSNUsabilityChanges Item41 function popUpERR(filename){ YP = window.open(filename,'serviceview','width=700,height=300,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes,screenX=0,screenY=0'); //newWindow.focus(); } function popUpVasReports(filename) { YP = window.open(filename, 'winName', ''); } function openLink(mylink, windowname) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; //SRP - 10/05/2004 - ECSNUsabilityChanges Item40 //window.open(href, windowname, 'menubar,width=600,height=600,scrollbars=yes'); window.open(href, windowname, 'menubar,width=600,height=600,resizable=yes,scrollbars=yes'); return false; } function setCookieValue(name,value){ cookiestring=name+"="+escape(value)+";"; document.cookie=cookiestring; } //fetches the value of cookie function getCookieValue(cookiename) { var cookiestring=""+document.cookie; var index1=cookiestring.indexOf(cookiename); if (index1==-1 || cookiename=="") return ""; var index2=cookiestring.indexOf(';',index1); if (index2==-1) index2=cookiestring.length; return unescape(cookiestring.substring(index1+cookiename.length+1,index2)); } function changeTab(formToBeSubmitted, nextTab) { if(formToBeSubmitted.indexOf("ContactInformationHandler") != -1) { //alert('in contact'); if(parent.Content.validateContactFields()) { document.contact.linkNumber.value = nextTab; document.contact.target="_top" document.contact.action = "/controller/ContactInformationHandler.GetTempContactEvent.ecsn" document.contact.submit(); } else return; } else if(formToBeSubmitted.indexOf("CalenderInformationHandler") != -1) { if(parent.Content.validateFields()) { document.calendar.linkNumber.value = nextTab; document.calendar.target="_top" document.calendar.action = "/controller/CalenderInformationHandler.GetTempCalendarEvent.ecsn" document.calendar.submit(); } else return; } else if(formToBeSubmitted.indexOf("ArrivalAlertHandler") != -1) { //alert('in ..arrival alert'); if(true) { document.arrivalListForm.linkNumber.value = nextTab; document.arrivalListForm.target="_top" document.arrivalListForm.action = "/controller/ArrivalAlertHandler.getTempArrivalAlertEvent.ecsn" document.arrivalListForm.submit(); } else return; } else if(formToBeSubmitted.indexOf("FAPolicyHandler") != -1) { if(parent.Content.doValidation(parent.Content.document.faPolicyForm)) { document.faPolicyForm.linkNumber.value = nextTab; document.faPolicyForm.faPage.value = "true" document.faPolicyForm.target="_top" document.faPolicyForm.action = "/controller/FAPolicyHandler.getTempFaPolicyEvent.ecsn" document.faPolicyForm.submit(); } else return; } else if(formToBeSubmitted.indexOf("saveRecords") != -1) { document.tpContactForm.linkNumber.value = nextTab; document.tpContactForm.target="_top" document.tpContactForm.action = "\ECSNTPContact?param=getNext&record=1" document.tpContactForm.submit(); } else if(formToBeSubmitted.indexOf("AlertEnablementHandler") != -1) { document.disablement.linkNumber.value = nextTab; document.disablement.target="_top" document.disablement.action = "/controller/AlertEnablementHandler.GetTempEnablementEvent.ecsn" document.disablement.submit(); } } function goForFirstTime(toBeFetchedLink, nextTab) { if(toBeFetchedLink.indexOf("ContactInformationHandler") != -1) { document.contact.linkNumber.value = nextTab; document.contact.target="_top" document.contact.action = toBeFetchedLink document.contact.submit(); } else if(toBeFetchedLink.indexOf("CalenderInformationHandler") != -1) { document.calendar.linkNumber.value = nextTab; document.calendar.target="_top" document.calendar.action = toBeFetchedLink document.calendar.submit(); } else if(toBeFetchedLink.indexOf("AlertEnablementHandler") != -1) { document.arrivalAlert.linkNumber.value = nextTab; document.arrivalAlert.target="_top" document.arrivalAlert.action = toBeFetchedLink document.arrivalAlert.submit(); } else if(toBeFetchedLink.indexOf("FAPolicyHandler") != -1) { document.faPolicyForm.linkNumber.value = nextTab; document.faPolicyForm.target="_top" document.faPolicyForm.action = toBeFetchedLink document.faPolicyForm.submit(); } else if(toBeFetchedLink.indexOf("saveRecords") != -1) { document.tpContactForm.linkNumber.value = nextTab; document.tpContactForm.target="_top" document.tpContactForm.action = toBeFetchedLink document.tpContactForm.submit(); } else if(toBeFetchedLink.indexOf("AlertEnablementHandler") != -1) { document.disablement.linkNumber.value = nextTab; document.disablement.target="_top" document.disablement.action = toBeFetchedLink document.disablement.submit(); } } //-->