var newWindow;function makeNewWindow(url,height,width){var left=parseInt((screen.availWidth/2)-(width/2));var top=parseInt((screen.availHeight/2)-(height/2));var windowFeatures="width="+width+",height="+height+",resizable=yes,scrollbars=yes,status,left="+left+",top="+top+",screenX="+left+",screenY="+top;if(!newWindow||newWindow.closed){newWindow=open(url,"subwind",windowFeatures);}else{newWindow.focus();if(newWindow.confirm('Click OK to close this window without saving and replace it with the new list.  \nClick cancel to leave this window open.')){newWindow.location=url}else{newWindow.focus();}}}function isBadEmail(email){var result=false;var sEmail=email;sEmail=sEmail.toLowerCase();var iAt=sEmail.indexOf("@");var iPeriod=sEmail.indexOf(".");var iLen=sEmail.length-1;var iAtPeriod=sEmail.substring(iAt,iAt+2);if((iAt<1)||(iAt==iLen)||(iPeriod==iLen)||(sEmail.indexOf(" ")>0)||(sEmail.indexOf(",")>0)||(sEmail.indexOf(";")>0)){result=true}if(sEmail.lastIndexOf("@")!=iAt){result=true}if((sEmail.indexOf(".com")<5)&&(sEmail.indexOf(".org")<5)&&(sEmail.indexOf(".gov")<5)&&(sEmail.indexOf(".net")<5)&&(sEmail.indexOf(".mil")<5)&&(sEmail.indexOf(".edu")<5)&&(sEmail.indexOf(".us")<5)&&(sEmail.indexOf(".ca")<5)&&(sEmail.indexOf(".tv")<5)){result=true}if(iAtPeriod=="@."){result=true}return result}function changeIFRAMEsize(iframeID,behaviorID,ifrWidth,ifrHeight){var myIFRAME=parent.document.getElementById(iframeID);myIFRAME.style.height=ifrHeight;myIFRAME.style.width=ifrWidth;parent.$find(behaviorID).hide();parent.$find(behaviorID).show(true);}function changeIFRAMESource(sURL,iframeID,behaviorID,ifrWidth,ifrHeight){var ifraHost=parent.document.getElementById(iframeID);ifraHost.src=sURL;ifraHost.style.height=ifrHeight;ifraHost.style.width=ifrWidth;parent.$find(behaviorID).hide();parent.$find(behaviorID).show(true);}function replaceAll(str,from,to){var idx=str.indexOf(from);while(idx>-1){str=str.replace(from,to);idx=str.indexOf(from);}return str}function getIFrameID(){if(parent.document.getElementsByTagName('iframe')[0].id=='')return'ifraHost';else return parent.document.getElementsByTagName('iframe')[0].id}function getMPEBehaviorID(){var div=parent.document.getElementsByTagName('div');var bvMPE="";for(var i=0;i<div.length;i++){if(div[i].className=="modalBackground"){bvMPE=div[i].id;bvMPE=bvMPE.replace("_backgroundElement","");break}}return bvMPE}function changeIFRAMEsize2(ifrWidth,ifrHeight){var iframeID=getIFrameID();var behaviorID=getMPEBehaviorID();var ifrResize=parent.document.getElementById(iframeID);ifrResize.style.height=ifrHeight;ifrResize.style.width=ifrWidth;parent.$find(behaviorID).hide();parent.$find(behaviorID).show(true);}function handleQuickRegisterEnter(btnButton,e){var charCode;if(e&&e.which){charCode=e.which}else if(window.event){e=window.event;charCode=e.keyCode}if(charCode==13){var myBtn=document.getElementById(btnButton);if(browser.indexOf("Firefox")!=-1||browser.indexOf("Safari")!=-1){event.preventDefault();event.stopPropagation();myBtn.click(event);}else{event.returnValue=false;myBtn.click();}}}function handleQuickRegisterEnter2(btnButton,event){if(event.keyCode==13){var btnButton=document.getElementById(btnButton);if(browser.indexOf("Firefox")!=-1||browser.indexOf("Safari")!=-1){event.preventDefault();event.stopPropagation();btnButton.click(event);}else{event.returnValue=false;btnButton.click();}}}function autoTab(element,nextElement){if(element.value.length==element.maxLength&&(nextElement!=null&&nextElement.value.length!=nextElement.maxLength)){document.getElementById(nextElement.id).focus();}}function ToggleLtBoxButton(FT4URL,imgBtnID,imgFile){var imgBtn=document.getElementById(imgBtnID);imgBtn.src=FT4URL+"Images/"+imgFile}function closeIFRAMELtBox(){var iframeID=getIFrameID();var ifraHost=parent.document.getElementById(iframeID);ifraHost.src="";ifraHost.style.height="0px";ifraHost.style.width="0px";var behaviorID=getMPEBehaviorID();parent.$find(behaviorID).hide();}function closeIFRAMELtBoxTY(){var iframeID=getIFrameID();var ifraHost=parent.document.getElementById(iframeID);ifraHost.src="";ifraHost.style.height="0px";ifraHost.style.width="0px";var hidPDSSCancel=parent.document.getElementById("hidPDSSCancel");if(hidPDSSCancel!=null){hidPDSSCancel.value="Y"}var behaviorID=getMPEBehaviorID();parent.$find(behaviorID).hide();parent.document.getElementById("btnDummyCancel").click();}
