
$(document).ready(function()
{$('#reloadCaptcha').css("display","inline");$('#reloadCaptcha').click(reloadCaptchaImage);if($.cookie('-help-query')&&$('#search').size()>0)
{if($('#search').val().length==0)
{$('#search').val($.cookie('-help-query'));}}
$('#subCategoryId,#mainCategoryId').change(function()
{var sURL="?mainCategoryId="+$('#mainCategoryId').val();sURL+='&subCategoryId='+$('#subCategoryId').val();sURL+='&subject='+escape($('#subject').val());sURL+='&question='+escape($('#question').val());sURL+='&email='+escape($('#email').val());location.href=sURL;});$('#categoryNavigation').bind('change',function()
{if(this.selectedIndex!=0)
{location.href=location.href.replace(/(\/help\/faq).*/,'$1/viewMainCategory/'+this.options[this.selectedIndex].value);}});$('#subCategoryNavigation').bind('change',function()
{if($(this).val()!=0&&$('#categoryNavigation').val()!=0)
{location.href=location.href.replace(/(\/help\/faq).*/,'$1/viewSubCategory/'+$(this).val()+'/'+$('#categoryNavigation').val());}});$("#PRSearchMenu a,#SearchAlt a").click(function()
{if($('#search').size()>0)
{$.cookie('-help-query','',{expires:-1});$.cookie('-help-query',$("#search").val());}});});function reloadCaptchaImage()
{$.post('/api/',{'function':'getcaptcha'},function(sResponse)
{$('#captchaImage').html(sResponse);});return false;}
