

			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 == '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 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 validate_email(semail)
			    {
			        // validate email address...
			        var svalmsg;
			        svalmsg = '';
			        if (semail != '')
			            {
                            emailCheck(semail);			            
			            }
			        else
			            {alert('Your email address is required.');}

			    }
			// -->
			

function swap_panel(elemid){
document.getElementById('contactpanel').innerHTML=document.getElementById(elemid).innerHTML;
}
