

			var iconPlus = true;
			var lastexpandedDivID;
			var lastexpandedImgID;
			
            function preload_images() {minusicon = new Image();
                                         minusicon.src = "images/minus.gif";
                                        }
           // -->

			function expand_collapse(cid) {
						document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none";
						lastexpandedDivID = cid;
						}
			// -->  
			function switch_plusminus(cid)
					{
					if (iconPlus == true)
						{
						document.getElementById(cid).src="images/minus.gif";
						document.getElementById(cid).alt="close service list";
						iconPlus = false;
						lastexpandedImgID = cid;
						}
					else
						{
						document.getElementById(cid).src="images/plus.gif";	
						document.getElementById(cid).alt="expand service list";
						iconPlus = true;
						}																		
					}						
			// --> 

			function collapse_lastexpanded(cid)
					{
					if ((iconPlus == false) && (lastexpandedDivID !== cid))
						{ 
						document.getElementById(lastexpandedDivID).style.display="none";						
						document.getElementById(lastexpandedImgID).src="images/plus.gif";
						iconPlus = true;
						}
					}
			// -->
			function hideshow_element(cid, smode)
					{
						document.getElementById(cid).style.display = smode;
					}			
			// -->	
 
			function setfocus(cid)
                                        {
                                        if (cid == 'd')
                                            {document.getElementById('a_closedef').focus();}
                                        else if (cid == 'w')
                                           {document.getElementById('tbWord').focus();
                                           }
                                        else if (cid == 'n')
                                           {document.getElementById('tbName').focus();}
                                        else if (cid=='o')
                                            {document.getElementById('tbOrgName').focus();  }
                                        else if (cid == 'z')
                                           {document.getElementById('tbZIPCode').focus();}                                           
                                        }
                                        			
			// --> 
			function move_on(arg1, arg2, arg3)
			    {
			        var scid = document.getElementById(arg1).value;
			        var inum = Number(arg2);
			        if (scid.length == inum)
			            {
			                document.getElementById(arg3).focus();
			            }
			    }
			 // -->

			// -->
	        function clearfield(cid)
                    {
                    if ((cid == 'c') && (document.getElementById('ddCityList').selectedIndex > -1))
                       {document.getElementById('ddCityList').selectedIndex = -1;}
                    else if (cid == 'z')
                       {document.getElementById('tbZIPCode').value = "";}
                    else if (cid != 'c')
                        {document.getElementById(cid).value = "";}
                    }
           // -->
           
             function show_button(cid1, cid2)
                {
                    var sel_indx;
                    sel_indx = document.getElementById(cid1).selectedIndex;
                    if (sel_indx == 0) 
                        {hideshow_element(cid2, 'none');} 
                    else
                        {
                          document.getElementById(cid2).title = 'search for providers offering services in ' + document.getElementById(cid1)[document.getElementById(cid1).selectedIndex].innerHTML;
                          hideshow_element(cid2, 'inline');
                        }
                }  
                 
             function show_FullList()
                {
                    document.getElementById('tbWordCB').value = "";
                    hideshow_element('keyword_servicesearch', 'inline');
                    hideshow_element('keyword_nomatch', 'none');
                    hideshow_element('fulllist_button', 'none');
                    hideshow_element('keyword_Search', 'none');
                    hideshow_element('svsearch_results', 'none');
                    hideshow_element('svsearch_fulllist', 'block');
                }
                
           function setletterhref(sltr)
                {
                    document.getElementById('a.' + sltr).href="javascript:DoCallback_ShowFull('" + sltr + "');";
                }                 
            
            // function for keyword search postback from Keyword.aspx    
            function show_KWSearchResults()
            {
                hideshow_element('fulllist_button', 'none');
                hideshow_element('keyword_servicesearch', 'inline');
                hideshow_element('keyword_Search', 'none');
            }
           // -->
           
            function subcat_click(catid)
                {
                    var idcat = 't' + catid;
                    collapse_lastexpanded(idcat);
                    expand_collapse(idcat);
                    idcat = 'icon' + catid;
                    switch_plusminus(idcat);
                } 
                                         
            function printsection(cid, stitle)
                {
                    var html = '<HTML>\n<HEAD>\n';
                    var headTags = document.getElementsByTagName("head");                    
                    
                    html += '<TITLE>' + stitle + '</TI' + 'TLE>\n';
                    
                    //set stylesheet file...
                    if (cid=='detail_panel')
                       { html += '<link href="styles/pr' + 'int_popup.css" rel="stylesheet" type="text/cs' + 's" />'; }
                    else
                       { html += '<link href="styles/pr' + 'int_slider.css" rel="stylesheet" type="text/cs' + 's" />'; }                     
                    
                    html += '\n</HE' + 'AD>\n<BODY>\n';
                    
                    var printElem = document.getElementById(cid);
                    if (printElem != null) {html += printElem.innerHTML;} else return;
                    
                    html += '\n</BO' + 'DY>\n</HT' + 'ML>';
                    
                    var printWIN = window.open("","printsection");
                    printWIN.document.open();
                    printWIN.document.write(html);
                    printWIN.document.close();
                    printWIN.print();                    
                }


// -->
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}   
