var ACTIONS_PATH="/member/actions/";document.onfocus=function(){}
var ORIG_SCROLL_TOP=0;function showSPINNER(message){var m=document.getElementById('SPINNER_EXPLAIN_TEXT');clearTable(m);if(message){var txt=document.createTextNode(message);m.appendChild(txt);}
document.getElementById('WORKING_SPINNER').style.visibility="visible";}
function npi_check_digit(npi){if(npi.length != 10){ return 0;}var n = npi.substr(0,9);var cd = 1*npi.substr(9,1);var vls = new Array();var sum = 0;for(var i=0; i<n.length; i++){var tmp = 1*n[i]; var otmp = tmp;if(i%2 == 0){tmp = 2*tmp;if(tmp >= 10){var tt = ""+tmp; tmp = 1 + 1*tt[1];}}sum += tmp;}sum += 24; var cl = 10*Math.ceil(sum/10); var diff = cl - sum;if(diff == cd){return 1;}return 0;}
function hideSPINNER(){var m=document.getElementById('SPINNER_EXPLAIN_TEXT');clearTable(m);document.getElementById('WORKING_SPINNER').style.visibility="hidden";}
function SetScreenToTop(){ORIG_SCROLL_TOP=f_scrollTop();window.scrollTo(0,0);document.documentElement.style.overflow='hidden';document.body.scroll="no";}
function SetScreenScrollBack(){window.scrollTo(0,ORIG_SCROLL_TOP);document.documentElement.style.overflow='auto';document.body.scroll="yes";}
function f_scrollTop(){return f_filterResults(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0);}
function f_filterResults(n_win,n_docel,n_body){var n_result=n_win?n_win:0;if(n_docel&&(!n_result||(n_result>n_docel)))
n_result=n_docel;return n_body&&(!n_result||(n_result>n_body))?n_body:n_result;}
function cascadeAppend(elems){if(elems.length<2){return 0;}
for(var i=1;i<elems.length;i++){elems[i].appendChild(elems[i-1]);}}
function setStyles(obj,params){var P=params.split(",");for(var i=0;i<P.length;i++){var S=P[i].split('=');var st=obj.style[S[0]]=S[1];}}
function setAttributes(obj,params){var A=params.split(",");for(var i=0;i<A.length;i++){var S=A[i].split('=');obj.setAttribute(S[0],S[1]);}}
function newElement(ele,classname,properties){var P=properties.split(",");var plist="";if(properties!=""){for(var i=0;i<P.length;i++){var x=P[i].split("=");plist+=" "+x[0]+"='"+x[1]+"'";}}
try{var p=document.createElement("<"+ele+" class='"+classname+"' "+plist+" >");}
catch(e){var p=document.createElement(ele);if(properties!=""){for(var i=0;i<P.length;i++){var x=P[i].split("=");p.setAttribute(x[0],x[1]);}}}
if(classname!=""){setClass(p,classname);}
return p;}
function makeTable(width,height){var tbl=document.createElement("table");tbl.setAttribute('cellspacing','0');tbl.setAttribute('cellpadding','0');tbl.setAttribute('width',width+"px");if(height!=""){tbl.setAttribute('height',height+"px");}
return tbl;}
function setClass(obj,classname){obj.setAttribute("class",classname);obj.setAttribute("className",classname);}
function u_prep(str){var nstr=str.replace(/%/g,"%25");nstr=nstr.replace(/#/g,"%23");nstr=nstr.replace(/&/g,"%26");return nstr;}
function iconExplain(obj,message,param){hideIconExplain();var PRM=param.split(",");var color="#d8a675";var containerID=0;var offsetX=0;var offsetY=0;var displaySide="TOP";var color="#2c3b58";var zIndex="1000";for(var i=0;i<PRM.length;i++){var P=PRM[i].split(":");if(P[0]=="color"){color=P[1];}
if(P[0]=="containerID"){containerID=P[1];}
if(P[0]=="displaySide"){displaySide=P[1];}
if(P[0]=="offsetX"){offsetX=1*P[1];}
if(P[0]=="offsetY"){offsetY=1*P[1];}
if(P[0]=="zIndex"){zIndex=P[1];}}
var cont_offsetY=0;var cont_offsetX=0;if(containerID!=0){var container=document.getElementById(containerID);if(container){cont_offsetY=container.scrollTop;cont_offsetX=container.scrollLeft;}}
var div=document.createElement("div");div.style.background="white";div.style.border="3px solid "+color;div.style.padding="5px";div.style.zIndex=zIndex;div.setAttribute("id","ICONEXPLAINER");div.style.position="absolute";div.setAttribute("class","blackFontS");div.setAttribute("className","blackFontS");var txt=document.createTextNode(message);div.appendChild(txt);document.body.appendChild(div);var px=findPosX(obj);var py=findPosY(obj);if(displaySide=="RIGHT"){px=px+obj.offsetWidth;py=py-div.offsetHeight/2-obj.offsetHeight/2;}
if(displaySide=="TOP"){px=px-div.offsetWidth/2+obj.offsetWidth/2;py=py-obj.offsetHeight-div.offsetHeight;}
if(displaySide=="BOTTOM"){px=px-div.offsetWidth/2+obj.offsetWidth/2;}
if(displaySide=="LEFT"){px=px-div.offsetWidth;py=py-div.offsetHeight/2-obj.offsetHeight/2;}
px=px+offsetX-cont_offsetX;py=py+offsetY-cont_offsetY;div.style.left=px+"px";div.style.top=py+"px";}
function hideIconExplain(){if(document.getElementById("ICONEXPLAINER")){document.body.removeChild(document.getElementById("ICONEXPLAINER"));}}
function in_array(needle,haystack,argStrict){var key='',strict=!!argStrict;if(strict){for(key in haystack){if(haystack[key]===needle){return true;}}}else{for(key in haystack){if(haystack[key]==needle){return true;}}}
return false;}
function show_opaqBG(){var opbg=document.createElement("div");opbg.setAttribute("class","opaqBG");opbg.setAttribute("className","opaqBG");opbg.style.width="100%";opbg.style.height="100%";opbg.style.visibility="visible";opbg.style.position="absolute";opbg.style.left="0px";opbg.style.top="0px";opbg.style.backgroundColor="white";opbg.setAttribute("id","UVOPQBG");window.parent.document.body.appendChild(opbg);}
function hide_opaqBG(){var d=document.getElementById('UVOPQBG');if(d){document.body.removeChild(d);}}
function clearTable(obj){while(obj.childNodes.length>0){obj.removeChild(obj.firstChild);}}
function removeDisappearingMessage(){var div=document.getElementById('FADEOUTMESSAGE');document.body.removeChild(div);}
function disappearingMessage(message,height,width){if(document.getElementById('FADEOUTMESSAGE')){return 1;}
var div=document.createElement("div");div.setAttribute("id","FADEOUTMESSAGE");div.style.position="absolute";div.style.border="10px solid red";div.style.top="30%";div.style.left="50%";div.style.width=width+"px";div.style.height=height+"px";div.style.marginLeft=(-1*(width/2))+"px";div.style.marginTop=(-1*(height/2))+"px";div.style.backgroundColor="white";div.style.zIndex="60000";var tb=document.createElement("table");tb.setAttribute("width","100%");tb.setAttribute("height","100%");var tbod=document.createElement("tbody");var tr,td,txt,btn;tr=document.createElement("tr");td=document.createElement("td");td.setAttribute("width","100%");td.setAttribute("height","100%");td.setAttribute("align","center");td.setAttribute("valign","middle");var itb=document.createElement("table");var itbod=document.createElement("tbody");var itr,itd;itr=document.createElement("tr");itd=document.createElement("td");itd.setAttribute("class","blackFontM");itd.setAttribute("className","blackFontM");itd.setAttribute("align","center");txt=document.createTextNode(message);itd.appendChild(txt);itr.appendChild(itd);itbod.appendChild(itr);itb.appendChild(itbod);td.appendChild(itb);tr.appendChild(td);tbod.appendChild(tr);tb.appendChild(tbod);div.appendChild(tb);document.body.appendChild(div);var after=removeDisappearingMessage;fadeOutDiv(10,div,after);}
function myconfirm(func,obj,message,height,width,yesLabel,noLabel,no_func,no_func_parameter){if(!yesLabel){yesLabel="Yes";}
if(!noLabel){noLabel="No";}
if(height.length==0){height=300;}
else{height=1*height;}
if(width.length==0){width=300;}
else{width=1*width;}
var opbg=document.createElement("div");opbg.setAttribute("id","MYCONFIRM_OPBG");opbg.setAttribute("class","opaqBG");opbg.setAttribute("className","opaqBG");opbg.style.position="absolute";opbg.style.visibility="visible";opbg.style.left="0px";opbg.style.top="0px";opbg.style.width="100%";opbg.style.height="100%";opbg.style.zIndex="6000";document.body.appendChild(opbg);var div=document.createElement("div");div.setAttribute("id","MYCONFIRMDIV");div.style.position="absolute";div.style.border="10px solid red";div.style.top="30%";div.style.left="50%";div.style.width=width+"px";div.style.height=height+"px";div.style.marginLeft=(-1*(width/2))+"px";div.style.marginTop=(-1*(height/2))+"px";div.style.backgroundColor="white";div.style.zIndex="6001";var tb=document.createElement("table");tb.setAttribute("width","100%");tb.setAttribute("height","100%");var tbod=document.createElement("tbody");var tr,td,txt,btn;tr=document.createElement("tr");td=document.createElement("td");td.setAttribute("width","100%");td.setAttribute("height","100%");td.setAttribute("align","center");td.setAttribute("valign","middle");var itb=document.createElement("table");var itbod=document.createElement("tbody");var itr,itd;itr=document.createElement("tr");itd=document.createElement("td");itd.setAttribute("class","blackFontM");itd.setAttribute("className","blackFontM");itd.setAttribute("align","center");txt=document.createTextNode(message);itd.appendChild(txt);itr.appendChild(itd);itbod.appendChild(itr);itr=document.createElement("tr");itd=document.createElement("td");itd.setAttribute("align","center");try{btn=document.createElement("<input type='button' value='"+yesLabel+"'>");}
catch(e){btn=document.createElement("input");btn.setAttribute("type","button");btn.setAttribute("value",yesLabel);}
btn.onclick=function(){removeMyConfirm();func(obj);}
itd.appendChild(btn);var txt=document.createTextNode("\u00a0");itd.appendChild(txt);try{btn=document.createElement("<input type='button' value='"+noLabel+"'>");}
catch(e){btn=document.createElement("input");btn.setAttribute("type","button");btn.setAttribute("value",noLabel);}
btn.onclick=function(){removeMyConfirm();if(no_func){no_func(no_func_parameter);}}
itd.appendChild(btn);itr.appendChild(itd);itbod.appendChild(itr);itb.appendChild(itbod);td.appendChild(itb);tr.appendChild(td);tbod.appendChild(tr);tb.appendChild(tbod);div.appendChild(tb);document.body.appendChild(div);}
function removeMyConfirm(){var op=document.getElementById("MYCONFIRM_OPBG");document.body.removeChild(op);var my=document.getElementById("MYCONFIRMDIV");document.body.removeChild(my);}
function removeMyError(){var op=document.getElementById("MYERROR_OPBG");document.body.removeChild(op);var my=document.getElementById("MYERRORDIV");document.body.removeChild(my);}
function myError(message,seperator,title_sep){var height="300";var width="300";var opbg=document.createElement("div");opbg.setAttribute("id","MYERROR_OPBG");opbg.setAttribute("class","opaqBG");opbg.setAttribute("className","opaqBG");opbg.style.position="absolute";opbg.style.visibility="visible";opbg.style.left="0px";opbg.style.top="0px";opbg.style.width="100%";opbg.style.height="100%";opbg.style.zIndex="1200";document.body.appendChild(opbg);var div=document.createElement("div");div.setAttribute("id","MYERRORDIV");div.style.position="absolute";div.style.border="10px solid #2c3b58";div.style.top="30%";div.style.left="50%";div.style.width=width+"px";div.style.height=height+"px";div.style.marginLeft=(-1*(width/2))+"px";div.style.marginTop=(-1*(height/2))+"px";div.style.backgroundColor="white";div.style.zIndex="50000";var tb=document.createElement("table");tb.setAttribute("width","100%");tb.setAttribute("height","100%");var tbod=document.createElement("tbody");var tr,td,txt,btn;tr=document.createElement("tr");td=document.createElement("td");td.setAttribute("width","100%");td.setAttribute("height","100%");td.setAttribute("align","center");td.setAttribute("valign","top");var itb=document.createElement("table");var itbod=document.createElement("tbody");var itr,itd;itr=document.createElement("tr");itd=document.createElement("td");itd.setAttribute("class","blackFontHeader");itd.setAttribute("className","blackFontHeader");itd.setAttribute("align","center");txt=document.createTextNode("Error");itd.appendChild(txt);itr.appendChild(itd);itbod.appendChild(itr);itr=document.createElement("tr");itd=document.createElement("td");itd.setAttribute("class","blackFontM");itd.setAttribute("className","blackFontM");itd.setAttribute("align","center");var ediv=document.createElement("div");ediv.style.width="290px";ediv.style.height="240px";ediv.style.overflowX="hidden";ediv.style.overflowY="auto";var etbl=document.createElement("table");var etbod=document.createElement("tbody");var etr,etd,etxt;var ER=message.split(seperator);for(var i=0;i<ER.length;i++){var info=ER[i].split(title_sep);var idx=i+1;var title,descript;if(info.length==2){title=info[0];descript=info[1];}
else{title="Error #"+idx;descript=info[0];}
etr=document.createElement("tr");etd=document.createElement("td");etd.setAttribute("class","blackFontXS");etd.setAttribute("className","blackFontXS");etd.setAttribute("align","justify");try{var spn=document.createElement("<span>");}
catch(e){var spn=document.createElement("span");}
spn.style.fontWeigth="bold";spn.setAttribute("class","blackFontM");spn.setAttribute("className","blackFontM");etxt=document.createTextNode(title+": ");spn.appendChild(etxt);etd.appendChild(spn);etxt=document.createTextNode(descript);etd.appendChild(etxt);etr.appendChild(etd);etbod.appendChild(etr);}
etbl.appendChild(etbod);ediv.appendChild(etbl);itd.appendChild(ediv);itr.appendChild(itd);itbod.appendChild(itr);itr=document.createElement("tr");itd=document.createElement("td");itd.setAttribute("align","center");try{btn=document.createElement("<input type='button' value='Close'>");}
catch(e){btn=document.createElement("input");btn.setAttribute("type","button");btn.setAttribute("value","Close this alert");}
btn.onclick=function(){removeMyError();}
itd.appendChild(btn);itr.appendChild(itd);itbod.appendChild(itr);itb.appendChild(itbod);td.appendChild(itb);tr.appendChild(td);tbod.appendChild(tr);tb.appendChild(tbod);div.appendChild(tb);document.body.appendChild(div);}
function myAlert(message,height,width){if(height.length==0){height=300;}
else{height=1*height;}
if(width.length==0){width=300;}
else{width=1*width;}
var opbg=document.createElement("div");opbg.setAttribute("id","MYALERT_OPBG");opbg.setAttribute("class","opaqBG");opbg.setAttribute("className","opaqBG");opbg.style.position="absolute";opbg.style.visibility="visible";opbg.style.left="0px";opbg.style.top="0px";opbg.style.width="100%";opbg.style.height="100%";opbg.style.zIndex="1200";document.body.appendChild(opbg);var div=document.createElement("div");div.setAttribute("id","MYALERTDIV");div.style.position="absolute";div.style.border="10px solid red";div.style.top="30%";div.style.left="50%";div.style.width=width+"px";div.style.height=height+"px";div.style.marginLeft=(-1*(width/2))+"px";div.style.marginTop=(-1*(height/2))+"px";div.style.backgroundColor="white";div.style.zIndex="100000";var tb=document.createElement("table");tb.setAttribute("width","100%");tb.setAttribute("height","100%");var tbod=document.createElement("tbody");var tr,td,txt,btn;tr=document.createElement("tr");td=document.createElement("td");td.setAttribute("width","100%");td.setAttribute("height","100%");td.setAttribute("align","center");td.setAttribute("valign","middle");var itb=document.createElement("table");var itbod=document.createElement("tbody");var itr,itd;itr=document.createElement("tr");itd=document.createElement("td");itd.setAttribute("class","blackFontM");itd.setAttribute("className","blackFontM");itd.setAttribute("align","center");txt=document.createTextNode(message);itd.appendChild(txt);itr.appendChild(itd);itbod.appendChild(itr);itr=document.createElement("tr");itd=document.createElement("td");itd.setAttribute("align","center");try{btn=document.createElement("<input type='button' value='Close this alert'>");}
catch(e){btn=document.createElement("input");btn.setAttribute("type","button");btn.setAttribute("value","Close this alert");}
btn.onclick=function(){removeMyAlert();}
itd.appendChild(btn);itr.appendChild(itd);itbod.appendChild(itr);itb.appendChild(itbod);td.appendChild(itb);tr.appendChild(td);tbod.appendChild(tr);tb.appendChild(tbod);div.appendChild(tb);document.body.appendChild(div);}
function removeMyAlert(){var op=document.getElementById("MYALERT_OPBG");document.body.removeChild(op);var my=document.getElementById("MYALERTDIV");document.body.removeChild(my);}
function forceCloseCursorMessage(){}
function setCursorMessage(val){}
function showCursorMessage(){}
function disableEnterKey(e){var key;if(window.event){key=window.event.keyCode;}
else{key=e.which;}
if(key==13){return false;}
else{return true;}}
function validEmail(inputvalue){var pattern=/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;if(pattern.test(inputvalue)){return 1;}else{return 0;}}
function alphanumeric(alphane)
{var numaric=alphane;for(var j=0;j<numaric.length;j++)
{var alphaa=numaric.charAt(j);var hh=alphaa.charCodeAt(0);if((hh>47&&hh<58)||(hh>64&&hh<91)||(hh>96&&hh<123))
{}
else{return false;}}
return true;}
var FADEOUT_OBJ="";var DO_AFTER_FADEOUT="";var DO_AFTER_SET=0;function fadeOutDiv(currRF,obj,afterFunction){if(DO_AFTER_SET==0){DO_AFTER_FADEOUT=afterFunction;DO_AFTER_SET=1;}
if(FADEOUT_OBJ.length==0){FADEOUT_OBJ=obj;}
if(currRF>=0){FADEOUT_OBJ.style.visibility="visible";}
currRF-=.4;setOpacity(FADEOUT_OBJ,currRF);if(currRF<=0){FADEOUT_OBJ.style.visibility="hidden";if(DO_AFTER_FADEOUT.length!='null'){DO_AFTER_FADEOUT();}
FADEOUT_OBJ="";DO_AFTER_FADEOUT="";DO_AFTER_SET=0;return 1;}
var ts=setTimeout("fadeOutDiv("+currRF+")",50);}
function fadeInDiv(currRF){var divObj=document.getElementById(FADEINDIV);if(currRF==0){divObj.style.visibility="visible";}
var mkRF=currRF;setOpacity(divObj,mkRF);var rfEnd=10;var rfInc=.3;if(currRF>=rfEnd){return 1;}
else{currRF=currRF+rfInc;var t=setTimeout("fadeInDiv("+currRF+")",15);}}
function enableDocumentSelection(enable){if(enable){document.onselectstart=_original_onselectstart;}
else{_original_onselectstart=document.onselectstart;document.onselectstart=function(){return false;}}}
function setOpacity(obj,value){obj.style.opacity=value/10;obj.style.filter='alpha(opacity='+value*10+')';}
function findPosX(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}
else if(obj.x){curleft+=obj.x;}
return curleft;}
function findPosY(obj){var curtop=0;if(obj.offsetParent){curtop+=obj.offsetHeight;while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent;}}
else if(obj.y){curtop+=obj.y;curtop+=obj.height;}
return curtop;}
function trim(str,chars){return ltrim(rtrim(str,chars),chars);}
function ltrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("^["+chars+"]+","g"),"");}
function rtrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("["+chars+"]+$","g"),"");}

