var outstanding_ajax_calls=0;var function_waiting_for_ajax=null;var refreshList=new Array();function addRefreshElement(item){refreshList[refreshList.length]=item;} function refreshElements(){for(var i=0;i';} function fillName(fl_name,file_name_field){var pos=0;var name=fl_name;pos=fl_name.lastIndexOf('/');if(pos==-1){pos=fl_name.lastIndexOf('\\');} if(pos==-1){pos=fl_name.lastIndexOf(':');} if((pos!=-1)){name=fl_name.substring(pos+1,fl_name.length);} file_name_field.value=name;file_name_field.value=file_name_field.value.replace(/[^a-zA-Z0-9_\.]/g,"_");} function auto_fill(file_name_field,file_field){if(file_name_field.value.length>3)fillName(file_name_field.value,file_name_field);else fillName(file_field.value,file_name_field);} function ExpandNC(ID){hide(ID+"_show");show(ID+"_hide");hide(ID+"_instr");show(ID);} function Expand(ID){hide(ID+"_show");show(ID+"_hide");hide(ID+"_instr");show(ID);SetCookie(ID,'on');} function ContractNC(ID){hide(ID+"_hide");show(ID+"_show");hide(ID);show(ID+"_instr");} function Contract(ID){hide(ID+"_hide");show(ID+"_show");hide(ID);show(ID+"_instr");SetCookie(ID,'off');} function CheckMenu(ID){if(GetCookie(ID)=='on')Expand(ID);else SetCookie(ID,'off');} function hide(ID1){obj1=document.getElementById(ID1);if(obj1!=null){obj1.style.display='none';}} function show(ID1){obj2=document.getElementById(ID1);if(obj2!=null){obj2.style.visibility='';obj2.style.position='';obj2.style.display='';}} var TabObjects=new Array();function TabObject(group,name){this.group=group;this.name=name;return this;} function TabCreate(group,name){var found=0;for(var i=0;i=0){alert(required_fields[first_field].alert_message);if(required_fields[first_field].isRadioButton){if(required_fields[first_field].field[0])required_fields[first_field].field[0].focus();else required_fields[first_field].field.focus();}else{required_fields[first_field].field.focus();} return false;}else return true;} function check_file_upload_fields(group){var upload=false;for(var i=0;i3)upload=true;}} return upload;} function clear_field_group(group){for(var i=required_fields.length-1;i>=0;i--){if(required_fields[i].group==group)required_fields.splice(i,1);} for(var i=file_upload_fields.length-1;i>=0;i--){if(file_upload_fields[i].group==group)file_upload_fields.splice(i,1);}} function is_numeric(character){var digits="0123456789";if(digits.indexOf(character)!=-1)return true;else return false;} function is_alpha(character){var chars="abcdefghijklmnopqrstuvwxyz";if(chars.indexOf(character.toLowerCase())!=-1)return true;else return false;} function strip_letters(mixed_text){var char_only="";for(var i=0;i=0){extension=strip_letters(phone_text.substr(ext_pos+1,phone_text.length));phone_text=phone_text.substr(0,ext_pos);} phone_text=strip_letters(phone_text);if(phone_text.length==x2+x3||phone_text.length>=x1+x2+x3){input_box.value="";last_four=phone_text.substr(phone_text.length-x3,x3);first_three=phone_text.substr(phone_text.length-x3-x2,x2);if(phone_text.length>=x1+x2+x3){area_code=phone_text.substr(phone_text.length-(x1+x2+x3),x1);input_box.value+=first+area_code+second;} input_box.value+=first_three+third+last_four;if(extension!="")input_box.value+=ext_char+extension;}else{alert("Please enter a "+(x2+x3)+" or "+(x1+x2+x3)+" digit phone number.");focus_and_select(input_box);}} function phoneInt_filter(input_box,first,second,third,fourth,ext_char,x1,x2,x3,x4,strict){if(!x1)x1=2;if(!x2)x2=2;if(!x3)x3=4;if(!x4)x4=4;var prefix="";var nat_code="";var area_code="";var first_three="";var last_four="";var extension="";var phone_text=input_box.value.toLowerCase();var ext_pos=phone_text.indexOf("x");if(phone_text=="")return;if(ext_pos>=0){extension=strip_letters(phone_text.substr(ext_pos+1,phone_text.length));phone_text=phone_text.substr(0,ext_pos);} phone_text=strip_letters(phone_text);var phone_length=x1+x2+x3+x4;if(phone_text.length>=phone_length){if(strict)phone_text=phone_text.substr(0,phone_length);input_box.value="";last_four=phone_text.substr(phone_text.length-x4,x4);first_three=phone_text.substr(phone_text.length-x4-x3,x3);area_code=phone_text.substr(phone_text.length-(x2+x3+x4),x2);nat_code=phone_text.substr(phone_text.length-(phone_length),x1);if(phone_text.length>phone_length){prefix=phone_text.substr(0,phone_text.length-phone_length);input_box.value+=prefix+" ";} input_box.value+=first+nat_code+second+area_code+third+first_three+fourth+last_four;if(extension!="")input_box.value+=ext_char+extension;}else{alert("Please enter a "+(phone_length)+" digit international phone number.");focus_and_select(input_box);}} function phoneInt_filter5(input_box,s1,s2,s3,s4,s5,ext_char,x1,x2,x3,x4,x5){if(!x1)x1=2;if(!x2)x2=2;if(!x3)x3=2;if(!x4)x4=2;if(!x5)x5=2;var prefix="";var p1="";var p2="";var p3="";var p4="";var p5="";var extension="";var phone_text=input_box.value.toLowerCase();var ext_pos=phone_text.indexOf("x");if(phone_text=="")return;if(ext_pos>=0){extension=strip_letters(phone_text.substr(ext_pos+1,phone_text.length));phone_text=phone_text.substr(0,ext_pos);} phone_text=strip_letters(phone_text);if(phone_text.length>=x1+x2+x3+x4+x5){input_box.value="";p5=phone_text.substr(phone_text.length-x5,x5);p4=phone_text.substr(phone_text.length-x4-x5,x4);p3=phone_text.substr(phone_text.length-x3-x4-x5,x3);p2=phone_text.substr(phone_text.length-x2-x3-x4-x5,x2);p1=phone_text.substr(phone_text.length-x1-x2-x3-x4-x5,x1);if(phone_text.length>x1+x2+x3+x4+x5){prefix=phone_text.substr(0,phone_text.length-(x1+x2+x3+x4+x5));if(s1.indexOf(prefix)<0)input_box.value+=prefix+" ";} input_box.value+=s1+p1+s2+p2+s3+p3+s4+p4+s5+p5;if(extension!="")input_box.value+=ext_char+extension;}else{alert("Please enter a "+(x1+x2+x3+x4+x5)+" digit international phone number.");focus_and_select(input_box);}} function phoneInt_filter6(input_box,s1,s2,s3,s4,s5,s6,ext_char,x1,x2,x3,x4,x5,x6){if(!x1)x1=2;if(!x2)x2=2;if(!x3)x3=2;if(!x4)x4=2;if(!x5)x5=2;if(!x6)x6=2;var prefix="";var p1="";var p2="";var p3="";var p4="";var p5="";var p6="";var extension="";var phone_text=input_box.value.toLowerCase();var ext_pos=phone_text.indexOf("x");if(phone_text=="")return;if(ext_pos>=0){extension=strip_letters(phone_text.substr(ext_pos+1,phone_text.length));phone_text=phone_text.substr(0,ext_pos);} phone_text=strip_letters(phone_text);if(phone_text.length>=x1+x2+x3+x4+x5+x6){input_box.value="";p6=phone_text.substr(phone_text.length-x6,x6);p5=phone_text.substr(phone_text.length-x5-x6,x5);p4=phone_text.substr(phone_text.length-x4-x5-x6,x4);p3=phone_text.substr(phone_text.length-x3-x4-x5-x6,x3);p2=phone_text.substr(phone_text.length-x2-x3-x4-x5-x6,x2);p1=phone_text.substr(phone_text.length-x1-x2-x3-x4-x5-x6,x1);if(phone_text.length>x1+x2+x3+x4+x5+x6){prefix=phone_text.substr(0,phone_text.length-(x1+x2+x3+x4+x5+x6));if(s1.indexOf(prefix)<0)input_box.value+=prefix+" ";} input_box.value+=s1+p1+s2+p2+s3+p3+s4+p4+s5+p5+s6+p6;if(extension!="")input_box.value+=ext_char+extension;}else{alert("Please enter a "+(x1+x2+x3+x4+x5+x6)+" digit international phone number.");focus_and_select(input_box);}} function regex_filter(input_box,type,format,MATCH_ALL,prefix){if(!format||typeof format!=="object")return;var letter="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split('');var phone_text=input_box.value;if(phone_text=="")return;format=format.toString();format=format.substr(1,format.length-2);var wild1="().!$^+?/";var wild2="-]}";var wild3="[{|";if(!MATCH_ALL){phone_text=phone_text.toUpperCase();format=format.replace(/a\-z/g,"A-Z");} var f_split=format.split('[');var text_length=0;for(i=0;i-1&&f_split[i].indexOf('}')>-1){var val=parseInt(f_split[i].split('{')[1].split('}')[0]);if(!isNaN(val))text_length+=val;}else if(f_split[i].indexOf(']')>-1&&(f_split[i].indexOf('\]')<0||f_split[i].split(']').length>1)){text_length++;}} if(MATCH_ALL){var fExp=new RegExp(format);var showAlert=!fExp.test(phone_text);if(showAlert&&prefix){var presplit=prefix.split('');var prefix2="";for(i=0;i-1)prefix2+="\\";prefix2+=""+presplit[i];} fExp=new RegExp(prefix2+format);showAlert=!fExp.test(phone_text);}}else{phone_text=phone_text.replace(/[\W_]+/g,"");var showAlert=false;if(phone_text.length>=text_length){var find="";var find_length=0;for(i=0;i-1&&(f_split[i].indexOf('\]')<0||f_split[i].split(']').length>1)){var find_string="([";var f_split2=f_split[i].split('|');for(j=0;j0)find_string+="|";find_string+=f_split2[j].split('}')[0].trim()+((f_split2[j].indexOf('}')>-1)?"}":"");} find_string+=")";find+=find_string.replace(/\)\)/g,")");find_length++;}} find=find.replace(/\\/g,'');find=new RegExp(find);var format_split=format.split('');var format_test="";for(i=0;i-1)&&i>0&&format_split[i-1]=="\\")){format_test+=format_split[i];} else if(wild2.indexOf(format_split[i])>-1&&(i==0||format_split[i-1]=="\\"||/[A-Z0-9]/.test(format_split[i-1])||(format_split[i]=="}"&&format_split[i-1]==","))){format_test+=format_split[i];} else if(format_split[i]=="["&&(i==0||format_split[i-1]=="\\"||(format_split[i+1]&&/[A-Z0-9]/.test(format_split[i+1])))){format_test+=format_split[i];} else if(format_split[i]=="{"&&(i==0||format_split[i-1]=="\\"||(format_split[i+1]&&(format_split[i-1]=="]"||format_split[i-1]==")")&&/[0-9]/.test(format_split[i+1])))){format_test+=format_split[i];} else if(format_split[i]=="|"&&(i==0||format_split[i-1]=="\\"||(format_split[i+1]&&(format_split[i-1]=="]"||format_split[i-1]==")"||/[0-9]/.test(format_split[i-1]))&&(format_split[i+1]=="["||format_split[i+1]=="("||/[0-9]/.test(format_split[i+1]))))){format_test+=format_split[i];}else{format_test=format_test;}} var rep=format_test.replace(/\[[(A|0)\-(Z|9)]{1,}\](\{[0-9]{1,}\})?/g,'$').split('$');var substitute="";if(phone_text.length>text_length){var pre=phone_text.substr(0,phone_text.length-(text_length));if(prefix){var prefixLength=prefix.replace(/[^a-zA-Z0-9]/g,'').length;if(prefixLength!==pre.length)showAlert=true;substitute=prefix;}else{if(rep[0].indexOf(pre)<0)substitute=substitute+""+pre+" ";} phone_text=phone_text.substr(pre.length,text_length);} if(find.test(phone_text)){var x=1;for(i=0;i-1&&(f_split[i].indexOf('\]')<0||f_split[i].split(']').length>1)){var ctr=1;if(f_split[i].indexOf(']{')>-1){ctr=parseInt(f_split[i].split(']{')[1].split('}')[0]);} if(!isNaN(ctr)){f_split[i]=f_split[i].replace(/\](\{[0-9]\,?\})?\|\[/,'');var p_text="";var p_array=f_split[i].replace(/[(A|0)\-(Z|9)]{1,}\]/g,'').replace(/\{[0-9]{1,}\}/g,'').split('');for(j=0;j-1){if(j>0&&p_array[j-1]=="\\"){p_text+=p_array[j];}}else{p_text+=p_array[j];}} var delimiter=f_split[i].split(']')[0];if(delimiter=='A-Z'||delimiter.indexOf('A-Z')>-1){var placeholder="";for(j=0;j-1){var placeholder="";for(j=0;j-1){if(j>0&&p_array[j-1]=="\\"){p_text+=p_array[j];}}else{p_text+=p_array[j];}} string_format+=p_text;string1+=p_text;string2+=p_text;}}else{var p_text="";var p_array=f_split[i].replace(/[(A|0)\-(Z|9)]{1,}\]/g,'').replace(/\{[0-9]{1,}\}/g,'').split('');for(j=0;j-1){if(j>0&&p_array[j-1]=="\\"){p_text+=p_array[j];}}else{p_text+=p_array[j];}} string_format+=p_text;string1+=p_text;string2+=p_text;}} if(string1!=string2){string_format=string1+" or "+string2;} string_format=string_format.replace(/\\/g,'');var alertText="Please enter a"+(("aeiou".indexOf(type.charAt(0))>-1)?"n ":" ")+type+" using the following format: \n\n"+string_format;if(prefix)alertText+=" or "+prefix+string_format;alert(alertText);focus_and_select(input_box);}} function zip_filter(input_box){var zip_text=strip_letters(input_box.value);if(!(zip_text.length==5||zip_text.length==9)&&zip_text.length>0){alert("Please enter a 5 or 9 digit zip code.");focus_and_select(input_box);}else{if(zip_text.length==9)input_box.value=zip_text.substr(0,5)+"-"+zip_text.substr(5,4) else input_box.value=zip_text}} function zip_canada_filter(input_box){ucase_filter(input_box);if(input_box.value.length==6){if(is_alpha(input_box.value.charAt(0))&&is_alpha(input_box.value.charAt(2))&&is_alpha(input_box.value.charAt(4))&&is_numeric(input_box.value.charAt(1))&&is_numeric(input_box.value.charAt(3))&&is_numeric(input_box.value.charAt(5)))return true;}else if(input_box.value.length==7){if(is_alpha(input_box.value.charAt(0))&&is_alpha(input_box.value.charAt(2))&&is_alpha(input_box.value.charAt(5))&&is_numeric(input_box.value.charAt(1))&&is_numeric(input_box.value.charAt(4))&&is_numeric(input_box.value.charAt(6))&&input_box.value.charAt(3)==' ')return true;} alert("Please enter a valid zip code.");focus_and_select(input_box);} function numeric_filter(input_box){input_box.value=strip_letters(input_box.value);} function numeric_filter_length(input_box,x1,x2,x3){if(!x1)x1=-1;if(!x2)x2=-1;if(!x3)x3=-1;var number=new String(parseInt(strip_letters(input_box.value)));if(number.length==x1||number.length==x2||number.length==x3)input_box.value=number;else{if(x1>0) if(x2>0) if(x3>0)alert("Please enter "+x1+", "+x2+", or "+x3+" digits.") else alert("Please enter "+x1+" or "+x2+" digits.") else alert("Please enter "+x1+" digits.")}} function ucase_filter(input_box){input_box.value=input_box.value.toUpperCase();} function lcase_filter(input_box){input_box.value=input_box.value.toLowerCase();} function capitalized_filter(input_box){var input_text="";var last_char_is_space=1;for(var i=0;i2){invalid=true;} if(day_st.length>2){invalid=true;} if(year_st.length>4){invalid=true;} if(year_st.length==2){if(year_st<50){year_st=year_st*1+2000;}else{year_st=year_st*1+1900;}} if((year_st>2200)||(year_st<1900)){invalid=true;} var month_st=date_array[0];if((month_st>12)||(month_st<1)){invalid=true;} var day_st=date_array[1];if((day_st>31)||(day_st<1)){invalid=true;} if(invalid){alert("Date must be in the form mm/dd/yyyy");return "";}else{year_st=month_st+"/"+day_st+"/"+year_st;return year_st;}} function setMouseOver(input,prefix){input.className=prefix+"-button";input.onmouseover=function(){this.className=prefix+'-button-alt';};input.onfocus=function(){this.className=prefix+'-button-alt';};input.onblur=function(){this.className=prefix+'-button';};input.onmouseout=function(){this.className=prefix+'-button';};} function createButton(input,prefix,sm,bgstyle){if($(input).hasClass('button'))return;var type="cartbutton" if(sm)type="cartbutton-small";if(bgstyle)type=type+"-"+bgstyle;var txt=input.innerHTML;input.innerHTML="";var div1=ce('div');div1.className="button-start";var div2=ce('div');div2.innerHTML=txt;if(navigator.userAgent.toLowerCase().indexOf("msie 6")>=0)div2.style["color"]="black";div1.appendChild(div2);input.appendChild(div1);div3=ce('div');div3.className="button-end";input.appendChild(div3);input.className=prefix+"-button "+type;input.onmouseover=function(){this.className=prefix+'-button-alt '+type;};input.onfocus=function(){this.className=prefix+'-button-alt '+type;};input.onblur=function(){this.className=prefix+'-button '+type;};input.onmouseout=function(){this.className=prefix+'-button '+type;};var width=parseInt(input.offsetWidth);if(width<=20)width=parseInt(input.style["width"]);if(width>20)div2.style["width"]=(width-20)+"px";} function createDialogButton(input,color){if($(input).hasClass('button'))return;var prefix="dialog-"+color;var txt=input.innerHTML;input.innerHTML="";var div1=ce('div');div1.className="button-start";var div2=ce('div');div2.innerHTML=txt;if(navigator.userAgent.toLowerCase().indexOf("msie 6")>=0)div2.style["color"]="black";div1.appendChild(div2);input.appendChild(div1);div3=ce('div');div3.className="button-end";input.appendChild(div3);input.className=prefix+"-button";input.onmouseover=function(){this.className=prefix+'-button-alt';};input.onfocus=function(){this.className=prefix+'-button-alt';};input.onblur=function(){this.className=prefix+'-button';};input.onmouseout=function(){this.className=prefix+'-button';};var width=parseInt(input.offsetWidth);if(width<=20)width=parseInt(input.style["width"]);if(width>20)div2.style["width"]=(width-20)+"px";} function getPictureFrame(div,img_dir){var table,tbody,tr,td;table=document.createElement('table');table.style["borderCollapse"]="collapse";table.style["padding"]="0px";table.style["margin"]="0px";tbody=document.createElement('tbody');tr=document.createElement('tr');td=document.createElement('td');td.style["fontSize"]="1px";td.style["lineHeight"]="0px";td.style["margin"]="0px";td.style["padding"]="0px";td.style["width"]="25px";td.style["height"]="25px";td.style["backgroundImage"]="url(images/frame_tl.png)";tr.appendChild(td);td=document.createElement('td');td.style["fontSize"]="1px";td.style["lineHeight"]="0px";td.style["margin"]="0px";td.style["padding"]="0px";td.style["height"]="25px";td.style["backgroundImage"]="url(images/frame_t.png)";tr.appendChild(td);td=document.createElement('td');td.style["fontSize"]="1px";td.style["lineHeight"]="0px";td.style["margin"]="0px";td.style["padding"]="0px";td.style["width"]="25px";td.style["height"]="25px";td.style["backgroundImage"]="url(images/frame_tr.png)";tr.appendChild(td);tbody.appendChild(tr);tr=document.createElement('tr');td=document.createElement('td');td.style["fontSize"]="1px";td.style["lineHeight"]="0px";td.style["margin"]="0px";td.style["padding"]="0px";td.style["width"]="25px";td.style["backgroundImage"]="url(images/frame_l.png)";tr.appendChild(td);td=document.createElement('td');td.style["backgroundColor"]="white";td.style["lineHeight"]="0px";td.style["margin"]="0px";td.appendChild(div);tr.appendChild(td);td=document.createElement('td');td.style["fontSize"]="1px";td.style["lineHeight"]="0px";td.style["margin"]="0px";td.style["padding"]="0px";td.style["width"]="25px";td.style["backgroundImage"]="url(images/frame_r.png)";tr.appendChild(td);tbody.appendChild(tr);tr=document.createElement('tr');td=document.createElement('td');td.style["fontSize"]="1px";td.style["lineHeight"]="0px";td.style["margin"]="0px";td.style["padding"]="0px";td.style["width"]="25px";td.style["height"]="25px";td.style["backgroundImage"]="url(images/frame_bl.png)";tr.appendChild(td);td=document.createElement('td');td.style["fontSize"]="1px";td.style["lineHeight"]="0px";td.style["margin"]="0px";td.style["padding"]="0px";td.style["height"]="25px";td.style["backgroundImage"]="url(images/frame_b.png)";tr.appendChild(td);td=document.createElement('td');td.style["fontSize"]="1px";td.style["lineHeight"]="0px";td.style["margin"]="0px";td.style["padding"]="0px";td.style["width"]="25px";td.style["height"]="25px";td.style["backgroundImage"]="url(images/frame_br.png)";tr.appendChild(td);tbody.appendChild(tr);table.appendChild(tbody);return table;} function createPanel(content,title,helpContext){var table,tbody,tr,td,input,div;table=ce('table');table.className="tan-header rounded-box";table.style["padding"]="0px";table.style["border"]="0px";table.style["borderCollapse"]="collapse";table.style["marginBottom"]="15px";tbody=ce('tbody');tr=ce('tr');tr.className="headerrow";td=ce('td');td.className="main";if(helpContext&&helpContext!=""){div=ce('div');div.style["cssFloat"]="right";div.style["styleFloat"]="right";input=ce('input');input.type="button";input.value="Help";input.style["fontSize"]="11px";setMouseOver(input,'black');input.onclick=function(){help_popup(helpContext);};div.appendChild(input);td.appendChild(div);} div=ce('div');div.style["fontWeight"]="bold";div.style["paddingTop"]="4px";div.innerHTML=title;td.appendChild(div);tr.appendChild(td);td=ce('td');td.className="end";td.innerHTML="";tr.appendChild(td);tbody.appendChild(tr);tr=ce('tr');tr.className="contentrow";td=ce('td');td.className="main";td.appendChild(content);tr.appendChild(td);td=ce('td');td.className="end";td.innerHTML="";tr.appendChild(td);tbody.appendChild(tr);tr=ce('tr');tr.className="footerrow";td=ce('td');td.className="main";td.innerHTML="";tr.appendChild(td);td=ce('td');td.className="end";td.innerHTML="";tr.appendChild(td);tbody.appendChild(tr);table.appendChild(tbody);return table;} function help_popup(context){url="popup.iml?mdl=knowledgebase/opc_help.mdl&show_instructions=1&Popup_Title=Online%20Help:%20"+escape(context)+"&CONTEXT="+escape(context);helpWindow=window.open(url,"Email","height=450,width=450,resizable=1,scrollbars=1,status=no,toolbar=no,location=no,menubar=no");helpWindow.focus();} Number.prototype.minPrecision=function(places){var x=new Number(this.toFixed(places));if(x.valueOf()==this.valueOf())return this.toFixed(places);else return this;} var DEFINED_MENU_JS=false;var jqueryProcessList=new Array();$(function(){if(!DEFINED_MENU_JS){$.fn.processContent=function(){for(var i=0;i0){window.setTimeout(function(){$('[hoverTarget][startOpen=1]').fadeIn()},1000);}});$('[clickNote]').live("click",function(){if($('[clickNoteTarget='+$(this).attr('clickNote')+']').show().length>0&&$(this).attr('toggle')==1)$(this).hide();return false;});});