
var objToUpdate;var rating;var xmlHttp;var thisResourceID;function createXMLHttpRequestObject()
{try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject("Microsoft.XMLHttp");}
catch(e){}}
if(!xmlHttp)
alert("Error creating the XMLHttpRequest object.");else
return xmlHttp;}
function rateResource(resourceType,thisObj,thisRating,resourceID)
{objToUpdate=thisObj;rating=thisRating;thisResourceID=resourceID;var url="/includes/ajax/RateResource.asp?ResourceType="+resourceType+"&Rating="+rating+"&ResourceID="+resourceID;try{xmlHttp=createXMLHttpRequestObject();xmlHttp.onreadystatechange=callback;var browser=navigator.appName
var b_version=navigator.appVersion
var version=parseFloat(b_version)
if(b_version.indexOf("Safari")>0){xmlHttp.open("get",url,false);}
else{xmlHttp.open("get",url,true);}
xmlHttp.send(null);}catch(e){}}
function callback(){if(xmlHttp.readyState==4){if(xmlHttp.status==200){adjustRatingStars();}}}
function adjustRatingStars()
{var obj=document.getElementById(objToUpdate);switch(rating)
{case.5:obj.className="rating halfstar";obj.style.backgroundPosition="0px -272px";break;case 1:obj.className="rating onestar";obj.style.backgroundPosition="0px -96px";break;case 1.5:obj.className="rating onehalfstar";obj.style.backgroundPosition="0px -288px";break;case 2:obj.className="rating twostar";obj.style.backgroundPosition="0px -112px";break;case 2.5:obj.className="rating twohalfstar";obj.style.backgroundPosition="0px -304px";break;case 3:obj.className="rating threestar";obj.style.backgroundPosition="0px -128px";break;case 3.5:obj.className="rating threehalfstar";obj.style.backgroundPosition="0px -320px";break;case 4:obj.className="rating fourstar";obj.style.backgroundPosition="0px -144px";break;case 4.5:obj.className="rating fourhalfstar";obj.style.backgroundPosition="0px -336px";break;case 5:obj.className="rating fivestar";obj.style.backgroundPosition="0px -160px";break;default:alert("in default");obj.className="rating nostar";obj.style.backgroundPosition="0px 0px";}
if(document.getElementById('ratedtext_'+thisResourceID)!=null)
{document.getElementById('ratedtext_'+thisResourceID).innerHTML="(Thanks for rating!)"}
if(document.getElementById('ratedtext2_'+thisResourceID)!=null)
{document.getElementById('ratedtext2_'+thisResourceID).innerHTML="(Thanks for rating!)"}}
function updateCommentPreview(o){var preview=document.getElementById("commentpreview");if(preview!=null){preview.innerHTML=o.value;}}
function toggleMenuSection(s,force){var section=document.getElementById(s);var button=document.getElementById(s+'_button');if(section!=null){if(section.style.display=="none"||force==1){section.style.display="block";if(button!=null){button.src='/images/seccol_arrow_con_d.gif';}}else{section.style.display="none";if(button!=null){button.src='/images/seccol_arrow_con_r.gif';}}}}
function submitMainForm(v){var mainform=document.getElementById("mainform");if(mainform!=null){if(v!=null){var action=mainform.action;if(action!=null){action.value=v;}}
mainform.submit();return(false);}}
function confirmChoice(question,href){if(confirm(question)){document.location=href}}
function show2(id,layout){var e=document.getElementById(id);if(e!=null){if(layout==null){e.style.display="block";}else{e.style.display=layout;}}}
function hide(id){var e=document.getElementById(id);if(e!=null){e.style.display="none";}}
function bodyLoaded(){}
function ValidateNumeric(FormName,FieldName,FieldValue){len=FieldValue.length;nums="0123456789";for(i=0;i<len;i++){if(nums.indexOf(FieldValue.charAt(i))<0){alert('Please enter only numbers!');document[FormName][FieldName].focus();document[FormName][FieldName].select();return false;}}
return true;}
function ShowOverlay(){var scrollTop1=document.documentElement.scrollTop;var scrollTop2=document.body.scrollTop;var useScrollTop=scrollTop1;if(scrollTop2>scrollTop1)
{useScrollTop=scrollTop2;}
document.getElementById("Overlay").style.top=useScrollTop+"px";document.getElementById("Overlay").style.display="";if(screen.height>769){document.getElementById("OverlayInside").style.top=(useScrollTop+120)+"px";}else{document.getElementById("OverlayInside").style.top=(useScrollTop)+"px";}
document.getElementById("OverlayInside").style.display="";window.onscroll=closeOverlay;document.body.onscroll=closeOverlay;}
function SuggestKeyword(ResourceTypeID,ResourceID,Title,Topic){document.getElementById("OverlayIFrame").src="/Overlays/KeywordSuggestion.asp?ResourceID="+ResourceID+"&ResourceTypeID="+ResourceTypeID
document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="540px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",400);}
function ShareWithFriend(ResourceID,ResourceTypeID){document.getElementById("OverlayIFrame").src="/Overlays/ShareWithFriend.asp?ResourceID="+ResourceID+"&ResourceTypeID="+ResourceTypeID;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="540px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",400);}
function AddResourceToCalendar(Item_ID,Type_ID){document.getElementById("OverlayIFrame").src="/Overlays/AddToCalendar.asp?Item_ID="+Item_ID+"&Type_ID="+Type_ID;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="540px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",400);}
function AddResourceToFavorites(Item_ID,Type_ID){document.getElementById("OverlayIFrame").src="/Overlays/AddToFavorites.asp?Item_ID="+Item_ID+"&Type_ID="+Type_ID;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="540px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",400);}
function EmailSearch(SearchURL){document.getElementById("OverlayIFrame").src="/Overlays/EmailSearch.asp?SearchURL="+SearchURL;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="540px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",400);}
function NewsletterSignup(LYRIS_Email,MoreInfo){document.getElementById("OverlayIFrame").src="/Overlays/NewsletterSignup.asp?MoreInfo="+MoreInfo+"&LYRIS_Email="+LYRIS_Email;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="540px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",400);}
function MarketingOverlay_Favorites(){document.getElementById("OverlayIFrame").src="/Overlays/MarketingOverlay_Favorites.asp";document.getElementById("OverlayIFrame").style.width="620px";document.getElementById("OverlayIFrame").style.height="470px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-120px";}
window.setTimeout("ShowOverlay()",300);}
function MarketingOverlay_FullPageSermon(){document.getElementById("OverlayIFrame").src="/Overlays/MarketingOverlay_FullPageSermon.asp";document.getElementById("OverlayIFrame").style.width="620px";document.getElementById("OverlayIFrame").style.height="470px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-120px";}
window.setTimeout("ShowOverlay()",300);}
function MarketingOverlay_MyCalendar(){document.getElementById("OverlayIFrame").src="/Overlays/MarketingOverlay_MyCalendar.asp";document.getElementById("OverlayIFrame").style.width="620px";document.getElementById("OverlayIFrame").style.height="470px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-120px";}
window.setTimeout("ShowOverlay()",300);}
function MarketingOverlay_Illustrations(){document.getElementById("OverlayIFrame").src="/Overlays/MarketingOverlay_Illustrations.asp";document.getElementById("OverlayIFrame").style.width="620px";document.getElementById("OverlayIFrame").style.height="490px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-120px";}
window.setTimeout("ShowOverlay()",300);}
function MarketingOverlay_PowerPoints(){document.getElementById("OverlayIFrame").src="/Overlays/MarketingOverlay_PowerPoints.asp";document.getElementById("OverlayIFrame").style.width="620px";document.getElementById("OverlayIFrame").style.height="470px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-120px";}
window.setTimeout("ShowOverlay()",300);}
function DownloadVideoOfTheWeek(){document.getElementById("OverlayIFrame").src="/Overlays/DownloadVideoOfTheWeek.asp";document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="215px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",300);}
function PreviewVideoFromFeed(VideoFeedProductGroup_ID){document.getElementById("OverlayIFrame").src="/Overlays/PreviewVideoFromFeed.asp?VideoFeedProductGroup_ID="+VideoFeedProductGroup_ID;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="490px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",300);}
function PreviewVideoFromFeed_Test(VideoPreviewURL){document.getElementById("OverlayIFrame").src="/Overlays/PreviewVideoFromFeed_Test.asp?VideoPreviewURL="+VideoPreviewURL;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="388px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",300);}
function ReportProblemWithVideoFeed(VideoFeedProductGroup_ID){document.getElementById("OverlayIFrame").src="/Overlays/ReportProblemWithVideoFeed.asp?VideoFeedProductGroup_ID="+VideoFeedProductGroup_ID;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="460px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",300);}
function ReportComment(Comment_ID){document.getElementById("OverlayIFrame").src="/Overlays/ReportComment.asp?Comment_ID="+Comment_ID;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="460px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",300);}
function ReportAbuse(Contributor_ID){document.getElementById("OverlayIFrame").src="/Overlays/ReportAbuse.asp?Contributor_ID="+Contributor_ID;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="460px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",300);}
function ProvideSiteFeedback(){document.getElementById("OverlayIFrame").src="/Overlays/ProvideSiteFeedback.asp"
document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="460px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",300);}
function LoginOverlay(){document.getElementById("OverlayIFrame").src="/Overlays/Login.asp"
document.getElementById("OverlayIFrame").style.width="610px";document.getElementById("OverlayIFrame").style.height="405px";document.getElementById("OverlayInside").style.left="-100px";window.setTimeout("ShowOverlay()",300);}
function LoginOverlayWithReturnUrl(returnurl){document.getElementById("OverlayIFrame").src="/Overlays/Login.asp?ReturnUrl="+returnurl;document.getElementById("OverlayIFrame").style.width="610px";document.getElementById("OverlayIFrame").style.height="405px";document.getElementById("OverlayInside").style.left="-100px";window.setTimeout("ShowOverlay()",300);}
function CreateBasicOverlay(email,CreateContributor){document.getElementById("OverlayIFrame").src="/Overlays/createbasic.asp?email="+email+"&CreateContributor="+CreateContributor;document.getElementById("OverlayIFrame").style.width="600px";document.getElementById("OverlayIFrame").style.height="405px";document.getElementById("OverlayInside").style.left="-100px";window.setTimeout("ShowOverlay()",300);}
function LogoutOverlay(){document.getElementById("OverlayIFrame").src="/Overlays/Logout.asp"
document.getElementById("OverlayIFrame").style.width="480px";document.getElementById("OverlayIFrame").style.height="405px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",300);}
function LinkToThis(VideoFeedProductGroup_ID){document.getElementById("OverlayIFrame").src="/Overlays/LinkToThis.asp?VideoFeedProductGroup_ID="+VideoFeedProductGroup_ID;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="460px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",300);}
function LinkToThisPowerPoint(PowerPoint_ID){document.getElementById("OverlayIFrame").src="/Overlays/LinkToThis.asp?PowerPoint_ID="+PowerPoint_ID;document.getElementById("OverlayIFrame").style.width="464px";document.getElementById("OverlayIFrame").style.height="460px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-45px";}
window.setTimeout("ShowOverlay()",300);}
function PowerPointPreview(root,image1,image2,image3,PowerPointID){var url="/Overlays/PreviewPowerpoint.asp?root="+root+"&image1="+image1+"&image2="+image2+"&image3="+image3+"&PowerPointID="+PowerPointID;document.getElementById("OverlayIFrame").src=url;document.getElementById("OverlayIFrame").style.width="512px";document.getElementById("OverlayIFrame").style.height="430px";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-70px";}
window.setTimeout("ShowOverlay()",400);}
function SuggestScripture(url){document.getElementById("OverlayIFrame").src=url;document.getElementById("OverlayIFrame").style.width="650px";document.getElementById("OverlayIFrame").style.height="500px";document.getElementById("OverlayInside").style.overflow="auto";if(navigator.appVersion.indexOf("MSIE 6.")<0){document.getElementById("OverlayInside").style.left="-150px";}
window.setTimeout("ShowOverlay()",400);}
function closeOverlay(){document.getElementById("OverlayIFrame").src="";document.getElementById("Overlay").style.display="none";document.getElementById("OverlayInside").style.display="none";document.getElementById("OverlayIFrame").style.height="240px";document.getElementById("OverlayIFrame").style.width="400px";window.onscroll=null;document.body.onscroll=null;}
function toggleVideoFeedScriptureSuggestions(id)
{if(document.getElementById("divScripture"+id).style.display=='none')
{document.getElementById("divScripture"+id).style.display='';document.getElementById("a"+id).style.display='none';}
else
{document.getElementById("divScripture"+id).style.display='none';document.getElementById("a"+id).style.display='';}}
function toggleKeywordSuggestions(id)
{if(document.getElementById("div"+id).style.display=='none')
{document.getElementById("div"+id).style.display='';document.getElementById("a"+id).style.display='none';}
else
{document.getElementById("div"+id).style.display='none';document.getElementById("a"+id).style.display='';}}
function toggleDescription(id)
{if(document.getElementById("DescDiv"+id).style.display=='none')
{document.getElementById("DescDiv"+id).style.display='';document.getElementById("DescA"+id).style.display='none';}
else
{document.getElementById("DescDiv"+id).style.display='none';document.getElementById("DescA"+id).style.display='';}}
function ShowAltTextOnRating(obj,altText)
{document.getElementById(obj).innerHTML="("+altText+")"}
var timeout;function ScrollContributors(direction){var obj=document.getElementById('FeaturedContributors');var currentOffset=obj.style.marginLeft;currentOffset=parseInt(currentOffset.replace("px",""));var newOffset;var offsetIncrement=parseInt(500);if(direction=='right')
{if(currentOffset>=-1475)
{newOffset=eval(currentOffset+-(offsetIncrement));obj.style.marginLeft=newOffset+"px";}
else
{newOffset=0;obj.style.marginLeft=newOffset+"px";}}
else
{if(currentOffset<0)
{newOffset=eval(currentOffset+offsetIncrement);obj.style.marginLeft=newOffset+"px";}
else
{newOffset=-1500;obj.style.marginLeft=newOffset+"px";}}
clearTimeout(timeout);}
function toggleMoreResources()
{if(document.getElementById('MoreResourcesMenu').style.display=="")
{document.getElementById('MoreResourcesMenu').style.display="none";}
else
{document.getElementById('MoreResourcesMenu').style.display="";}}
function ChangeMenuSearch(resourcetype)
{UpdateMenuSearchLinks(resourcetype,false);}
function ChangeMenuSearchAndSubmit(resourcetype)
{UpdateMenuSearchLinks(resourcetype,true);}
function showProgressBar()
{document.getElementById("loading").style.display="block";setTimeout('document.getElementById("LoadingImage").src = "/images/40/loading2.gif"',100);}
function UpdateMenuSearchLinks(resourcetype,submitform)
{if(resourcetype=="sermons")
{UnBoldAllROSSearch();document.getElementById('frmRunOfSiteSearch').action="/Sermons/SearchResults.asp";document.getElementById('ROS_SearchSermons').className="SearchBar_Cateogry bold";document.getElementById('ROSSS').style.color="#000";var Element=document.getElementById("ProSearchesBlock");if(Element!=null){document.getElementById('ProSearchesBlock').style.display="block";document.getElementById('ProSearchesText').style.display="block";}
var AdvancedSearchLink=document.getElementById("AdvancedSearchLink");if(AdvancedSearchLink!=null){AdvancedSearchLink.href="/Sermons/SearchResults.asp?AdvancedSearch=1";}}
if(resourcetype=="illustrations")
{UnBoldAllROSSearch();document.getElementById('frmRunOfSiteSearch').action="/Illustrations/SearchResults.asp";document.getElementById('ROS_SearchIllustrations').className="SearchBar_Cateogry bold";document.getElementById('ROSSI').style.color="#000";var AdvancedSearchLink=document.getElementById("AdvancedSearchLink");if(AdvancedSearchLink!=null){AdvancedSearchLink.href="/Illustrations/SearchResults.asp?AdvancedSearch=1";}
var TopicsRow=document.getElementById("DateRow");if(TopicsRow!=null){TopicsRow.style.display="none";}}
if(resourcetype=="videos")
{UnBoldAllROSSearch();document.getElementById('frmRunOfSiteSearch').action="/Videos/SearchResults.asp";document.getElementById('ROS_SearchVideos').className="SearchBar_Cateogry bold";document.getElementById('ROSSV').style.color="#000";var AdvancedSearchLink=document.getElementById("AdvancedSearchLink");if(AdvancedSearchLink!=null){AdvancedSearchLink.href="/Videos/SearchResults.asp?AdvancedSearch=1";}
var TopicsRow=document.getElementById("TopicsRow");if(TopicsRow!=null){TopicsRow.style.display="none";}
var Element=document.getElementById("VideoProvidersBlock");if(Element!=null){document.getElementById('VideoProvidersBlock').style.display="block";}}
if(resourcetype=="powerpoints")
{UnBoldAllROSSearch();document.getElementById('frmRunOfSiteSearch').action="/PowerPoints/SearchResults.asp";document.getElementById('ROS_SearchPowerPoints').className="SearchBar_Cateogry bold";document.getElementById('ROSSPP').style.color="#000";var AdvancedSearchLink=document.getElementById("AdvancedSearchLink");if(AdvancedSearchLink!=null){AdvancedSearchLink.href="/PowerPoints/SearchResults.asp?AdvancedSearch=1";}}
if(resourcetype=="scripture")
{UnBoldAllROSSearch();document.getElementById('frmRunOfSiteSearch').action="/bible.asp";document.getElementById('ROS_SearchScripture').className="SearchBar_Cateogry bold";document.getElementById('ROSSSC').style.color="#000";var AdvancedSearchLink=document.getElementById("AdvancedSearchLink");if(AdvancedSearchLink!=null){AdvancedSearchLink.href="/bible.asp";}
var AdvancedScritureOptions=document.getElementById("AdvancedScritureOptions");if(AdvancedScritureOptions!=null){AdvancedScritureOptions.style.display="block";}}
if(submitform==true)
{if(document.getElementById("SearchBar").value!="")
{var TopicList=document.getElementById('TopicID');if(TopicList!=null)
{TopicList.value="0";}
var ScriptureList=document.getElementById('ScriptureBookA');if(ScriptureList!=null)
{ScriptureList.value="0";}
document.getElementById("loading").style.display="block";document.frmRunOfSiteSearch.submit();setTimeout('document.getElementById("LoadingImage").src = "/images/40/loading2.gif"',100);}}}
function UnBoldAllROSSearch()
{document.getElementById('ROS_SearchSermons').className="SearchBar_Cateogry";document.getElementById('ROS_SearchIllustrations').className="SearchBar_Cateogry";document.getElementById('ROS_SearchVideos').className="SearchBar_Cateogry";document.getElementById('ROS_SearchPowerPoints').className="SearchBar_Cateogry";document.getElementById('ROS_SearchScripture').className="SearchBar_Cateogry";document.getElementById('ROSSS').style.color="#4595d8";document.getElementById('ROSSI').style.color="#4595d8";document.getElementById('ROSSV').style.color="#4595d8";document.getElementById('ROSSPP').style.color="#4595d8";document.getElementById('ROSSSC').style.color="#4595d8";document.getElementById('MoreResourcesMenu').style.display="none";var Element=document.getElementById("ProSearchesBlock");if(Element!=null)
{document.getElementById('ProSearchesBlock').style.display="none";document.getElementById('ProSearchesText').style.display="none";}
var Element=document.getElementById("VideoProvidersBlock");if(Element!=null)
{document.getElementById('VideoProvidersBlock').style.display="none";}
var TopicsRow=document.getElementById("TopicsRow");if(TopicsRow!=null){TopicsRow.style.display="block";}
var TopicsRow=document.getElementById("DateRow");if(TopicsRow!=null){TopicsRow.style.display="block";}
var AdvancedScritureOptions=document.getElementById("AdvancedScritureOptions");if(AdvancedScritureOptions!=null){AdvancedScritureOptions.style.display="none";}}
function showSPM(section)
{UnSelectAllSPM();if(section=='scripture')
{document.getElementById('SPMNav1').style.backgroundImage='url(/images/40/btn_spm_selected.jpg)';document.getElementById('SPMNav1').style.backgroundPosition='right';document.getElementById('SPMNav1').style.backgroundRepeat='no-repeat';document.getElementById('SPM_Scripture').style.display='block';document.getElementById('SPM_A1').style.fontWeight='bold';}
if(section=='sermons')
{document.getElementById('SPMNav2').style.backgroundImage='url(/images/40/btn_spm_selected.jpg)';document.getElementById('SPMNav2').style.backgroundPosition='right';document.getElementById('SPMNav2').style.backgroundRepeat='no-repeat';document.getElementById('SPM_Sermons').style.display='block';document.getElementById('SPM_A2').style.fontWeight='bold';}
if(section=='illustrations')
{document.getElementById('SPMNav3').style.backgroundImage='url(/images/40/btn_spm_selected.jpg)';document.getElementById('SPMNav3').style.backgroundPosition='right';document.getElementById('SPMNav3').style.backgroundRepeat='no-repeat';document.getElementById('SPM_Illustrations').style.display='block';document.getElementById('SPM_A3').style.fontWeight='bold';}
if(section=='videos')
{document.getElementById('SPMNav4').style.backgroundImage='url(/images/40/btn_spm_selected.jpg)';document.getElementById('SPMNav4').style.backgroundPosition='right';document.getElementById('SPMNav4').style.backgroundRepeat='no-repeat';document.getElementById('SPM_Videos').style.display='block';document.getElementById('SPM_A4').style.fontWeight='bold';}
if(section=='powerpoints')
{document.getElementById('SPMNav5').style.backgroundImage='url(/images/40/btn_spm_selected.jpg)';document.getElementById('SPMNav5').style.backgroundPosition='right';document.getElementById('SPMNav5').style.backgroundRepeat='no-repeat';document.getElementById('SPM_PowerPoints').style.display='block';document.getElementById('SPM_A5').style.fontWeight='bold';}
if(section=='more')
{document.getElementById('SPMNav6').style.backgroundImage='url(/images/40/btn_spm_selected.jpg)';document.getElementById('SPMNav6').style.backgroundPosition='right';document.getElementById('SPMNav6').style.backgroundRepeat='no-repeat';document.getElementById('SPM_More').style.display='block';document.getElementById('SPM_A6').style.fontWeight='bold';}}
function UnSelectAllSPM()
{document.getElementById('SPMNav1').style.backgroundImage='url(/images/40/btn_spm_not_selected.jpg)';document.getElementById('SPMNav2').style.backgroundImage='url(/images/40/btn_spm_not_selected.jpg)';document.getElementById('SPMNav3').style.backgroundImage='url(/images/40/btn_spm_not_selected.jpg)';document.getElementById('SPMNav4').style.backgroundImage='url(/images/40/btn_spm_not_selected.jpg)';document.getElementById('SPMNav5').style.backgroundImage='url(/images/40/btn_spm_not_selected.jpg)';document.getElementById('SPMNav6').style.backgroundImage='url(/images/40/btn_spm_not_selected.jpg)';document.getElementById('SPM_Scripture').style.display='none';document.getElementById('SPM_Sermons').style.display='none';document.getElementById('SPM_Illustrations').style.display='none';document.getElementById('SPM_Videos').style.display='none';document.getElementById('SPM_PowerPoints').style.display='none';document.getElementById('SPM_More').style.display='none';document.getElementById('SPM_A1').style.textDecoration='none';document.getElementById('SPM_A2').style.textDecoration='none';document.getElementById('SPM_A3').style.textDecoration='none';document.getElementById('SPM_A4').style.textDecoration='none';document.getElementById('SPM_A5').style.textDecoration='none';document.getElementById('SPM_A6').style.textDecoration='none';document.getElementById('SPM_A1').style.fontWeight='normal';document.getElementById('SPM_A2').style.fontWeight='normal';document.getElementById('SPM_A3').style.fontWeight='normal';document.getElementById('SPM_A4').style.fontWeight='normal';document.getElementById('SPM_A5').style.fontWeight='normal';document.getElementById('SPM_A6').style.fontWeight='normal';}
function toggleSermonPageRateThis()
{if(document.getElementById('SermonPageRateThis').style.display=="none")
{document.getElementById('SermonPageRateThis').style.display="block";}
else
{document.getElementById('SermonPageRateThis').style.display="none";}}
function togglePowerPointPageRateThis()
{if(document.getElementById('PowerPointPageRateThis').style.display=="none")
{document.getElementById('PowerPointPageRateThis').style.display="block";}
else
{document.getElementById('PowerPointPageRateThis').style.display="none";}}
function toggleContributorMenu()
{document.getElementById('ProMenu').style.display="none";if(document.getElementById('ContributorMenu').style.display=="none")
{document.getElementById('ContributorMenu').style.display="block";}
else
{document.getElementById('ContributorMenu').style.display="none";}}
function toggleProMenu()
{document.getElementById('ContributorMenu').style.display="none";if(document.getElementById('ProMenu').style.display=="none")
{document.getElementById('ProMenu').style.display="block";}
else
{document.getElementById('ProMenu').style.display="none";}}
function isMouseLeaveOrEnter(e,handler)
{if(e.type!='mouseout'&&e.type!='mouseover')return false;var reltg=e.relatedTarget?e.relatedTarget:e.type=='mouseout'?e.toElement:e.fromElement;while(reltg&&reltg!=handler)reltg=reltg.parentNode;return(reltg!=handler);}
function toggleScripturePageResources(id)
{if(document.getElementById(id).style.display=="none")
{document.getElementById(id).style.display="block";document.getElementById('scripturemoreresources').src="/images/40/uparrow.gif";}
else
{document.getElementById(id).style.display="none";document.getElementById('scripturemoreresources').src="/images/40/downarrow.gif";}}
function toggleBibleChapterList(id)
{if(document.getElementById(id).style.display=="none")
{document.getElementById(id).style.display="block";}
else
{ document.getElementById(id).style.display = "none"; } 
}
function BringBack() {//bring the menu back...make the div large.
document.getElementById('ExpansionAdDiv').style.overflow = "visible";document.getElementById("navigation").style.zIndex = 1;document.getElementById("sclogobeta").style.zIndex = 2;document.getElementById("livechat").style.zIndex = 2;}
function BringForward(){document.getElementById('ExpansionAdDiv').style.overflow = "hidden";document.getElementById("navigation").style.zIndex = 1000000;document.getElementById("sclogobeta").style.zIndex = 1000001;document.getElementById("livechat").style.zIndex = 1000001;}
function redirectMobile(ReturnUrl){window.location = "/overlays/login.asp?ReturnUrl=" + ReturnUrl;}
