//auto-suggest.js starts here
var SearchBoxId='googlesearchboxid';var SuggestionBoxId='AutoSuggestionBoxId';var HighLightedClass='current';var SuggestionTableId='AutoSuggestionTableId';var isTextBoxFocused=false;var SearchFormId='search_form_id';var SearchButtonId='search_button_id';if(typeof $=='function'){$(document).ready(function(){if(!window.location.hash){document.getElementById(SearchBoxId).focus();}});}
function getFocus(){isTextBoxFocused=true;}
function lostFocus(){isTextBoxFocused=false;}
function CreateDropDownMenu(oEvent){var val=$('#'+SearchBoxId).val();var iKeyCode=oEvent.keyCode;if(iKeyCode==8||iKeyCode==46){getSuggestion(val);}else if(iKeyCode<32||(iKeyCode>=33&&iKeyCode<46)||(iKeyCode>=112&&iKeyCode<=123)){}else{getSuggestion(val);}}
function getSuggestion(str){var p=/^\s*$/;if(!p.test(str)){var prefix,url;prefix="/include/ajax/";url="auto-suggestion-ajax.php";$.post(prefix+url,{SearchFor:str,MaxLength:35,TableId:SuggestionTableId},function(data){var p=/^\s*$/;var val=$('#'+SearchBoxId).val();if(isTextBoxFocused&&!p.test(val)){$('#'+SuggestionBoxId).html(data).css('visibility','visible');$('#'+SuggestionBoxId+' td:not(.SuggestionType)').click(function(){selectOption(this);$('#'+SearchButtonId).click();});$('#'+SuggestionBoxId+' td').mouseover(function(){$('#'+SuggestionBoxId+' td').removeClass(HighLightedClass)
$(this).addClass(HighLightedClass);});}});}else{$('#'+SuggestionBoxId).css('visibility','hidden');}}
function selectOption(cell){$('#'+SearchBoxId).val(cleanHtmlTag(cell.innerHTML)).focus();$('#'+SuggestionBoxId).css('visibility','hidden');}
function HighLightSuggestion(oEvent){var iKeyCode=oEvent.keyCode;var Visibility=$('#'+SuggestionBoxId).css('visibility');if(Visibility!='hidden'){switch(iKeyCode){case 38:previousSuggestion();break;case 40:nextSuggestion();break;case 27:hideSuggestions();break;case 13:selectCurrentSuggestion();hideSuggestions();break;}}
return true;}
function previousSuggestion(){var Table=document.getElementById(SuggestionTableId);var Length=Table.childNodes[0].rows.length;var Rows=Table.childNodes[0].rows;if(getSelectedIndex()==-1){Rows[Length-1].cells[0].className+=HighLightedClass;selectCurrentSuggestion();return true;}
for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(HighLightedClass)!=-1){if(i!=0){Rows[i].cells[0].className='';Rows[i-1].cells[0].className+=HighLightedClass;break;}}}
selectCurrentSuggestion();return true;}
function nextSuggestion(){var Table=document.getElementById(SuggestionTableId);var Length=Table.childNodes[0].rows.length;var Rows=Table.childNodes[0].rows;if(getSelectedIndex()==-1){Rows[0].cells[0].className+=HighLightedClass;selectCurrentSuggestion();return true;}
for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(HighLightedClass)!=-1){if(i!=Length-1){Rows[i].cells[0].className='';Rows[i+1].cells[0].className+=HighLightedClass;break;}}}
selectCurrentSuggestion();return true;}
function hideSuggestions(){$('#'+SuggestionBoxId).css('visibility','hidden');}
function hideSuggestionsAfter(timeout){setTimeout('document.getElementById("'+SuggestionBoxId+'").style.visibility="hidden"',timeout);}
function getSelectedIndex(){var Table=document.getElementById(SuggestionTableId);var Length=Table.childNodes[0].rows.length;var Rows=Table.childNodes[0].rows;var i;for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(HighLightedClass)!=-1){return i;}}
return-1;}
function selectCurrentSuggestion(){var Table=document.getElementById(SuggestionTableId);var Length=Table.childNodes[0].rows.length;var Rows=Table.childNodes[0].rows;var i;for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(HighLightedClass)!=-1){$('#'+SearchBoxId).val(cleanHtmlTag(Rows[i].cells[0].innerHTML));break;}}}
function getTop(oNode){var iTop=0;while(oNode.tagName!="BODY"&&oNode.tagName!="HTML"){iTop+=oNode.offsetTop;oNode=oNode.offsetParent;}
return iTop;}
function getLeft(oNode){var iLeft=0;while(oNode.tagName!="BODY"&&oNode.tagName!="HTML"){iLeft+=oNode.offsetLeft;oNode=oNode.offsetParent;}
return iLeft;}
function showXY(oNode){alert("offsetTop="+getTop(oNode)+"\noffsetLeft="+getLeft(oNode)+"");}
function cleanHtmlTag(str){str=str.replace(/<span[^>]*>/ig,'').replace(/<\/span>/ig,'');return str;}
function showAskQuestionPopup(){alert('122');$('#AskCommunitySideBar').click();}
//auto-suggest.js ends here
/* -- topmenu.js Start Here-- */ 
function clearsearchbox(){document.getElementById("googlesearchboxid").style.backgroundImage=""}
function restoresearchbox(){if(document.getElementById("googlesearchboxid").value=="")document.getElementById("googlesearchboxid").style.backgroundImage="url(http://1static.debtconsolidationcare.com/img/comtopside_sprite.png)"}
function clearsearchboxinsitenotfound(){document.getElementById("googlesearchboxinsitenotfoundid").style.backgroundImage=""}
function restoresearchboxinsitenotfound(){if(document.getElementById("googlesearchboxinsitenotfoundid").value=="")document.getElementById("googlesearchboxinsitenotfoundid").style.backgroundImage="url(http://www.debtconsolidationcare.com/styles/dtcc/img/google_custom_search_watermark.png)"};function showAskQuestionPopup(){jQuery('#AskCommunitySideBar').click();}
function configuration(SearchBoxId,SuggestionBoxId,SearchButtonId){this.SearchBoxId=SearchBoxId;this.SuggestionBoxId=SuggestionBoxId;this.HighLightedClass='current';this.SuggestionTableId='Table_'+SuggestionBoxId;this.isTextBoxFocused=false;this.SearchButtonId=SearchButtonId;this.hideSuggestionsAfter=function(timeout){if(document.getElementById(this.SuggestionBoxId)){setTimeout('document.getElementById("'+this.SuggestionBoxId+'").style.visibility="hidden"',timeout);}}
this.hideSuggestions=function(){$('#'+this.SuggestionBoxId).css('visibility','hidden').css('display','none');}
this.CreateDropDownMenu=function(oEvent){var val=$('#'+this.SearchBoxId).val();var iKeyCode=oEvent.keyCode;if(iKeyCode==8||iKeyCode==46){this.getSuggestion(val,this);}else if(iKeyCode<32||(iKeyCode>=33&&iKeyCode<46)||(iKeyCode>=112&&iKeyCode<=123)){}else{this.getSuggestion(val,this);}}
this.getTop=function(oNode){var iTop=0;while(oNode.tagName!="BODY"&&oNode.tagName!="HTML"){iTop+=oNode.offsetTop;oNode=oNode.offsetParent;}
return iTop;}
this.getLeft=function(oNode){var iLeft=0;while(oNode.tagName!="BODY"&&oNode.tagName!="HTML"){iLeft+=oNode.offsetLeft;oNode=oNode.offsetParent;}
return iLeft;}
this.getSuggestion=function(str,Conf){var p=/^\s*$/;var THIS=this;if(!p.test(str)){var prefix,url;prefix="/include/ajax/";url="auto-suggestion-ajax.php";$.post(prefix+url,{SearchFor:str,MaxLength:35,TableId:this.SuggestionTableId},function(data,textStatus){var p=/^\s*$/;var val=$('#'+THIS.SearchBoxId).val();if(THIS.isTextBoxFocused&&!p.test(val)){if(typeof(data.suggestion)=='object'&&data.suggestion.length>0){var suggest='',tbl='';tbl+='<table width="100%" class="auto_suggest" id="'+THIS.SuggestionTableId+'" >';for(var i=0;i<data.suggestion.length;i++){var suggest=data.suggestion[i].suggestion;var text=suggest;var re=new RegExp(data.search,"g");text=text.replace(re,'<b>'+data.search+'</b>');tbl+='<tr><td>'+text+'<input type="hidden" value="'+suggest+'" ></td></tr>';}
tbl+='</table>';var height=$('#'+THIS.SearchBoxId).css('height');height=height.match(/\d+/);var offset=$('#'+THIS.SearchBoxId).offset();var left=offset.left;var top=parseInt(height)+parseInt(offset.top);$('#'+THIS.SuggestionBoxId).html(tbl).css('display','block').css('visibility','visible');$('#'+THIS.SuggestionBoxId+' td:not(.SuggestionType)').mouseover(function(){$('#'+THIS.SuggestionBoxId+' td:not(.SuggestionType)').removeClass(THIS.HighLightedClass);$(this).addClass(THIS.HighLightedClass);});$('#'+THIS.SuggestionBoxId+' td:not(.SuggestionType)').click(function(){var current_suggestion=$(this).children('input').val();$('#'+THIS.SearchBoxId).val(current_suggestion);$('#'+THIS.SearchButtonId).click();});}
else{$('#'+THIS.SuggestionBoxId).css('visibility','hidden').css('display','none');}}},"json");}else{$('#'+this.SuggestionBoxId).css('visibility','hidden').css('display','none');}}
this.HighLightSuggestion=function(oEvent){var iKeyCode=oEvent.keyCode;var Visibility=$('#'+this.SuggestionBoxId).css('visibility');if(Visibility!='hidden'){switch(iKeyCode){case 38:this.previousSuggestion();break;case 40:this.nextSuggestion();break;case 27:this.hideSuggestions();break;case 13:return true;break;}}
else{if(iKeyCode==13){return false;}}
return true;}
this.previousSuggestion=function(){var Table=document.getElementById(this.SuggestionTableId);var Rows=Table.childNodes[0].rows;var Length=Table.childNodes[0].rows.length;if(Length>0){if(this.getSelectedIndex()==-1){$(Rows[Length-1].cells[0]).addClass(this.HighLightedClass);this.selectCurrentSuggestion();return true;}
for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(this.HighLightedClass)!=-1){if(i>0){$(Rows[i].cells[0]).removeClass(this.HighLightedClass);if(Rows[i-1].cells[0].className.indexOf(this.SuggestionType)==-1){$(Rows[i-1].cells[0]).addClass(this.HighLightedClass);}
else{$(Rows[i-2].cells[0]).addClass(this.HighLightedClass);}
break;}}}
this.selectCurrentSuggestion();}
return true;}
this.nextSuggestion=function(){var Table=document.getElementById(this.SuggestionTableId);var Rows=Table.childNodes[0].rows;if(!Rows){return true;}
var Length=Table.childNodes[0].rows.length;if(Length>0){if(this.getSelectedIndex()==-1){$(Rows[0].cells[0]).addClass(this.HighLightedClass);this.selectCurrentSuggestion();return true;}
for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(this.HighLightedClass)!=-1){if(i!=Length-1){$(Rows[i].cells[0]).removeClass(this.HighLightedClass);if(Rows[i+1].cells[0].className.indexOf(this.SuggestionType)==-1){$(Rows[i+1].cells[0]).addClass(this.HighLightedClass);}
else{$(Rows[i+2].cells[0]).addClass(this.HighLightedClass);}
break;}}}
this.selectCurrentSuggestion();}
return true;}
this.getSelectedIndex=function(){var Table=document.getElementById(this.SuggestionTableId);var Length=Table.childNodes[0].rows.length;var Rows=Table.childNodes[0].rows;var i;for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(this.HighLightedClass)!=-1){return i;}}
return-1;}
this.selectCurrentSuggestion=function(){var Table=document.getElementById(this.SuggestionTableId);var Length=Table.childNodes[0].rows.length;var Rows=Table.childNodes[0].rows;var i,cell=null;for(i=0;i<Length;i++){var Class=Rows[i].cells[0].className;if(Class.indexOf(this.HighLightedClass)!=-1){cell=Rows[i].cells[0];$('#'+this.SearchBoxId).val($(cell).children('input').val());break;}}
return cell;}}
function ClickHandler(Conf){}
function KeyUpHandler(Conf,e){Conf.CreateDropDownMenu(e);}
function KeyDownHandler(Conf,e){return Conf.HighLightSuggestion(e);}
function BlurHandler(Conf){Conf.hideSuggestionsAfter(250);Conf.isTextBoxFocused=false;}
function FocusHandler(Conf){Conf.isTextBoxFocused=true;}
function configureAutoSuggest(Conf){if(jQuery('#'+Conf.SearchBoxId)){jQuery('#'+Conf.SearchBoxId).click(function(e){ClickHandler(Conf,e)});jQuery('#'+Conf.SearchBoxId).keyup(function(e){KeyUpHandler(Conf,e)});jQuery('#'+Conf.SearchBoxId).keydown(function(e){return KeyDownHandler(Conf,e)});jQuery('#'+Conf.SearchBoxId).blur(function(e){BlurHandler(Conf,e)});jQuery('#'+Conf.SearchBoxId).focus(function(e){FocusHandler(Conf,e)});}}
var timeout=500,closetimer=0,ddmenuitem=0;function mopen(a){mcancelclosetime();if(ddmenuitem)ddmenuitem.style.visibility="hidden";ddmenuitem=document.getElementById(a);ddmenuitem.style.visibility="visible"}
function mclose(){if(ddmenuitem)ddmenuitem.style.visibility="hidden"}
function mclosetime(){closetimer=window.setTimeout(mclose,timeout)}
function mcancelclosetime(){if(closetimer){window.clearTimeout(closetimer);closetimer=null}};
/* -- topmenu.js End Here-- */  
var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-401109-1'],['_setDomainName', 'www.debtconsolidationcare.com'],['_setSiteSpeedSampleRate', 5],['_trackPageview']); (function(){var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();
/* -- html_footer.js Start Here-- */
function f()
{QueryString=window.location.search.substring(1);if(QueryString!='')
{QueryString="?"+QueryString;}
document.write("<script type='text/javascript' src='/affiliate/admin/ga-affiliates.php"+QueryString+"'></scr"+"ipt>");}
f();
/* -- html_footer.js End Here-- */

/* -- facebox.js.js Starts Here-- */
/* -- jquery_002.js Starts Here-- */
/* -- common utility js Starts Here-- */
