var startRow=0,includeCell=0,urlCell=1,titleCell=2,lastModCell=3,changeCell=4,priorityCell=5,descCell=6,rangeCell=7,noDescription=0,mapRows=null;
function window_onload(){if(document.getElementById("txtCount").value>0)document.getElementById("tblMapButtons").style.display="block";if(document.getElementById("txtRemoveUrls").value.length>0||document.getElementById("txtRemoveParams").value.length>0){settingsVisible=true;document.getElementById("divSettings").style.display="block";document.getElementById("hlSettings").innerHTML=" &nbsp;Hide Filters &<br />Settings"}if(document.getElementById("tblMap")!=null){mapRows=document.getElementById("tblMap").getElementsByTagName("tr");
for(var a=mapRows.length,b=startRow;b<a;b++){mapRows[b].cells[lastModCell].childNodes[0].onkeypress=document.all?Check_IE:Check_NS;if(mapRows[b].cells[descCell].childNodes[0].innerHTML.length==0&&mapRows[b].cells[includeCell].firstChild.checked){mapRows[b].cells[titleCell].innerHTML+=' <span class="MapErrors2">No Description</span>';noDescription++}}b=new Date;document.getElementById("ddLastModYear").selectedIndex=b.getFullYear()-2009;document.getElementById("ddLastModMonth").selectedIndex=b.getMonth();
document.getElementById("ddLastModDay").selectedIndex=b.getDate()-1;if(document.getElementById("cbHTMLMap").checked){document.getElementById("txtRSSTitle").value=mapRows[0].cells[titleCell].innerHTML;document.getElementById("txtRSSLink").value=mapRows[0].cells[urlCell].innerHTML;document.getElementById("txtRSSDescription").value=mapRows[0].cells[descCell].firstChild.innerHTML;document.getElementById("ddRSSYear").selectedIndex=b.getFullYear()-2005;document.getElementById("ddRSSMonth").selectedIndex=
b.getMonth();document.getElementById("ddRSSDay").selectedIndex=b.getDate()-1;UpdateRSSDate()}var c=document.getElementById("ddFilterChange").options;a=document.getElementsByName("ddCh");for(var d=0;d<a.length;d++){for(b=0;b<c.length;b++)a[d].options[b]=new Option(c[b].text,c[b].value);a[d].selectedIndex=4}c=document.getElementById("ddFilterPriority").options;a=document.getElementsByName("ddPr");for(d=0;d<a.length;d++){for(b=0;b<c.length;b++)a[d].options[b]=new Option(c[b].text,c[b].value);a[d].selectedIndex=
5}}}function GetCurrentDate(){var a=new Date,b=a.getMonth()+1;if(b<10)b="0"+b;var c=a.getDate();if(c<10)c="0"+c;return a.getFullYear()+"-"+b+"-"+c}var processing=false;
function Form_onsubmit(){var a=document.getElementById("txtUrl").value;if(a.substr(a.length-4)==".txt"||a.substr(a.length-4)==".xml"){alert(a+"\n\ris an xml or text file\n\rTo load and edit existing sitemaps\n\rclick 'Edit Existing Map'");return false}if(a.indexOf("www.")==-1)if(!confirm(a+"\n\rdoes not contain www.\n\r\n\rContinue"))return false;if(a.indexOf("dnn")>-1||a.indexOf("dotnetnuke")>-1)if(!confirm("If this is a DotNetNuke site, you may\n\rwant to filter out links to\n\rRegister and Login pages\n\rTo exclude these pages, click cancel\n\rthen click 'Show Filters and Settings'\n\rand add login,register to the filter list\n\r\n\rContinue"))return false;
a.substr(a.length-1)=="/"&&a.substr(0,a.length-1);document.getElementById("spnWait").style.display="block";setTimeout("DisableButton()",1E3);setTimeout("StartPolling()",8E3);return processing=true}function StartPolling(){GetProgress();setInterval("GetProgress()",1E4)}function DisableButton(){document.getElementById("btnCreateMap").style.display="none"}function HideRSSDialog(){document.getElementById("tblRSS").style.left="-10000px"}
function GoRSSMapDialog(){document.getElementById("tblRSS").style.left="130px"}function GoRSSMap(){HideRSSDialog();document.getElementById("btnGoMap").disabled=true;document.getElementById("btnGoMap").value="Calculating";document.body.style.cursor="progress";setTimeout("BuildRSSMap()",10)}
function BuildRSSMap(){var a="",b=document.getElementById("cbPubDateItems").checked,c=0,d='<?xml version="1.0" ?>\n<rss version="2.0">',e=XmlEncode(document.getElementById("txtRSSTitle").value);document.getElementById("txtRSSTitle").value=e;var f=XmlEncode(document.getElementById("txtRSSLink").value);a=XmlEncode(document.getElementById("txtRSSDescription").value);document.getElementById("txtRSSDescription").value=a;d+="\n\t<channel>\n\t\t<title>"+e+"</title>\n\t\t<link>"+f+"</link>";d+="\n\t\t<description>"+
a+"</description>";if(document.getElementById("txtRSSCopyright").value.length>0)d+="\n\t\t<copyright>Copyright &#xA9; "+XmlEncode(document.getElementById("txtRSSCopyright").value)+"</copyright>";if(document.getElementById("cbPubDateChannel").checked){a=document.getElementById("ddRSSYear").value+"-"+document.getElementById("ddRSSMonth").value+"-"+document.getElementById("ddRSSDay").value;d+="\n\t\t<pubDate>"+FormatDateString(a)+"</pubDate>"}d+="\n\t\t<generator>Sitemapdoc.com XML Sitemap Generator</generator>";
e=/^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))$/;f=document.getElementById("ddMaxRSSItems").value;if(f==0)f=mapRows.length;else if(f>mapRows.length)f=mapRows.length;for(var g=startRow;g<f;g++)if(mapRows[g].cells[includeCell].firstChild.checked){c++;var i="\n\t\t<item>\n\t\t\t<title><![CDATA["+mapRows[g].cells[titleCell].innerHTML+"]]\></title>";i+="\n\t\t\t<link>"+mapRows[g].cells[urlCell].innerHTML+"</link>";if(b){a=mapRows[g].cells[lastModCell].childNodes[0].value;
if(!a.match(e)){document.getElementById("btnGoMap").disabled=false;document.body.style.cursor="default";mapRows[g].cells[lastModCell].childNodes[0].select();mapRows[g].cells[lastModCell].childNodes[0].focus();alert("pubDate must be format yyyy-mm-dd");return}i+="\n\t\t\t<pubDate>"+FormatDateString(a)+"</pubDate>"}a=mapRows[g].cells[descCell].firstChild.innerHTML;if(a.length>1)i+="\n\t\t\t<description><![CDATA["+a+"]]\></description>";i+="\n\t\t</item>";d+=i}d+="\n\t</channel>\n</rss>";document.getElementById("gMap").value=
d;document.getElementById("gMap").style.height=c*80+22+"px";document.getElementById("spnMap").style.display="block";document.getElementById("spnEdit").style.display="none";document.getElementById("spnMapButton").style.display="block";document.getElementById("spnMapName").innerHTML="myRSSFeed.xml";document.getElementById("tblMapButtons").style.display="none";document.getElementById("btnGoMap").disabled=false;document.body.style.cursor="default";document.getElementById("spnInMap").innerHTML=c}
function GoMap(){document.getElementById("btnGoMap").disabled=true;document.getElementById("btnGoMap").value="Calculating";document.body.style.cursor="progress";document.getElementById("btnGoMap").disabled=true;document.getElementById("btnGoMap").value="Calculating";document.body.style.cursor="progress";setTimeout("BuildMap()",10)}
function BuildMap(){var a="",b=document.getElementById("cbIncludeLastMod").checked,c=document.getElementById("cbIncludeChanged").checked,d=document.getElementById("cbIncludePriority").checked,e=0,f='<?xml version="1.0" encoding="UTF-8" ?>';f+='\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"';f+='\nxsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">';for(var g=/^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))$/,
i=mapRows.length,h=0;h<i;h++)if(mapRows[h].cells[includeCell].firstChild.checked){e++;var j="\n\t<url>\n\t\t<loc>"+mapRows[h].cells[urlCell].innerHTML+"</loc>";if(b){a=mapRows[h].cells[lastModCell].childNodes[0].value;if(!a.match(g)){document.getElementById("btnGoMap").disabled=false;document.body.style.cursor="default";mapRows[h].cells[lastModCell].childNodes[0].select();mapRows[h].cells[lastModCell].childNodes[0].focus();alert("Date must be format yyyy-mm-dd");return}j+="\n\t\t<lastmod>"+a+"</lastmod>"}if(c)j+=
"\n\t\t<changefreq>"+mapRows[h].cells[changeCell].childNodes[0].value+"</changefreq>";if(d)j+="\n\t\t<priority>"+mapRows[h].cells[priorityCell].childNodes[0].value+"</priority>";j+="\n\t</url>";f+=j}f+="\n</urlset>";document.getElementById("gMap").value=f;document.getElementById("gMap").style.height=e*80+22+"px";document.getElementById("spnMap").style.display="block";document.getElementById("spnEdit").style.display="none";document.getElementById("spnMapButton").style.display="block";document.getElementById("spnMapName").innerHTML=
"sitemap.xml";document.getElementById("tblMapButtons").style.display="none";document.getElementById("btnGoMap").disabled=false;document.body.style.cursor="default";document.getElementById("spnInMap").innerHTML=e}
function GoHtmlMap(){for(var a='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml">\n<head>\n<title>Sitemap</title>\n</head>\n<body>\n',b,c,d,e=0,f=mapRows.length,g=0;g<f;g++)if(mapRows[g].cells[includeCell].firstChild.checked){e++;b=mapRows[g].cells[urlCell].innerHTML;c=mapRows[g].cells[titleCell].innerHTML;if(c.indexOf("<")>-1)c=c.substring(0,c.indexOf("<")-1);d=mapRows[g].cells[descCell].firstChild.innerHTML;
a+='<a href="'+b+'">';a+=c.length>0&&c.indexOf("No Title")==-1?c:b;a+="</a>";if(d.length>1&&d.indexOf("No Desc")==-1)a+="\n<br />"+d;a+="\n<br /><br />"}a+="</body>\n</html>";document.getElementById("gMap").value=a;document.getElementById("gMap").style.height=e*80+22+"px";document.getElementById("spnMap").style.display="block";document.getElementById("spnEdit").style.display="none";document.getElementById("spnMapButton").style.display="block";document.getElementById("spnMapName").innerHTML="sitemap.htm";
document.getElementById("tblMapButtons").style.display="none";document.getElementById("btnGoMap").disabled=false;document.body.style.cursor="default";document.getElementById("spnInMap").innerHTML=e}function GoTxtMap(){document.getElementById("btnGoMap").disabled=true;document.getElementById("btnGoMap").value="Calculating";document.body.style.cursor="progress";setTimeout("BuildTxtMap()",10)}
function BuildTxtMap(){for(var a=0,b="",c=mapRows.length,d=startRow;d<c;d++)if(mapRows[d].cells[includeCell].firstChild.checked){a++;b+=mapRows[d].cells[urlCell].innerHTML+"\n"}document.getElementById("gMap").value=b;document.getElementById("gMap").style.height=a*14+"px";document.getElementById("spnMap").style.display="block";document.getElementById("spnEdit").style.display="none";document.getElementById("spnMapButton").style.display="block";document.getElementById("spnMapName").innerHTML="sitemap.txt";
document.getElementById("tblMapButtons").style.display="none";document.getElementById("btnGoMap").disabled=false;document.body.style.cursor="default";document.getElementById("spnInMap").innerHTML=a}
function ShowEdit(){document.getElementById("spnMap").style.display="none";document.getElementById("spnEdit").style.display="block";document.getElementById("spnMapButton").style.display="none";document.getElementById("tblMapButtons").style.display="block";document.getElementById("btnGoMap").value="XML SiteMap"}
function DefaultChange(a){var b=mapRows.length;if(a=="up")for(a=startRow;a<b;a++)mapRows[a].cells[changeCell].firstChild.selectedIndex>0&&mapRows[a].cells[changeCell].firstChild.selectedIndex--;else for(a=startRow;a<b;a++)mapRows[a].cells[changeCell].firstChild.selectedIndex<6&&mapRows[a].cells[changeCell].firstChild.selectedIndex++}
function DefaultPriority(a){var b=mapRows.length;if(a=="up")for(a=startRow;a<b;a++)mapRows[a].cells[priorityCell].firstChild.selectedIndex>0&&mapRows[a].cells[priorityCell].firstChild.selectedIndex--;else for(a=startRow;a<b;a++)mapRows[a].cells[priorityCell].firstChild.selectedIndex<10&&mapRows[a].cells[priorityCell].firstChild.selectedIndex++}
function DefaultLastMod(a,b){var c,d,e=mapRows.length;if(a=="up")for(var f=startRow;f<e;f++){d=mapRows[f].cells[lastModCell].firstChild;c=d.value.split("-");switch(b){case "year":d.value=GetPart(c[0],1)+"-"+c[1]+"-"+c[2];break;case "month":if(parseInt(c[1])<12)d.value=c[0]+"-"+GetPart(c[1],1)+"-"+c[2];break;case "day":if(parseInt(c[2])<31)d.value=c[0]+"-"+c[1]+"-"+GetPart(c[2],1);break}}else for(f=startRow;f<e;f++){d=mapRows[f].cells[lastModCell].firstChild;c=d.value.split("-");switch(b){case "year":d.value=
GetPart(c[0],0)+"-"+c[1]+"-"+c[2];break;case "month":if(c[1]>1)d.value=c[0]+"-"+GetPart(c[1],-1)+"-"+c[2];break;case "day":if(c[2]>1)d.value=c[0]+"-"+c[1]+"-"+GetPart(c[2],0);break}}}function GetPart(a,b){if(a.substr(0,1)=="0")a=a.substr(1,1);var c=b==1?parseInt(a)+1:parseInt(a)-1;return c<10?"0"+c.toString():c.toString()}function GoLink(a){document.getElementById("rbGoUrl").checked?window.open(a.innerHTML):window.open("http://validator.w3.org/check?uri="+a.innerHTML)}
function ResetPriorities(){if(confirm("Reset all Priorities to 0.5"))for(var a=mapRows.length,b=startRow;b<a;b++)mapRows[b].cells[priorityCell].firstChild.selectedIndex=5}function CascadeHelp(){alert("Set all priorities from the first setting down\n\rwith equal increments\n\rFirst setting must be above 0.5\n\rHighest + lowest priority will be = 1.0\n\reg: if first = 0.8 last will = 0.2\n\r\n\rSet first priority and click Casc")}var settingsVisible=false;
function Settings(){if(!processing)if(settingsVisible&&(document.getElementById("txtRemoveUrls").value.length>0||document.getElementById("txtRemoveParams").value.length>0))alert("Cannot hide settings with text enterred\n\r\n\rClear textbox to hide settings");else{settingsVisible=!settingsVisible;document.getElementById("divSettings").style.display=settingsVisible?"block":"none";document.getElementById("hlSettings").innerHTML=settingsVisible?" &nbsp;Hide Filters &<br />Settings":"Show Filters &<br /> Settings"}}
function Check_IE(){if(event.srcElement.value.length>10)return false;var a=event.keyCode;if(a>45&&a<58||a==45)return true;return false}function Check_NS(a){var b=a.which;if(b>45&&b<58||b==0||b==8||b==45)return true;a.preventDefault()}var hiding=false;
function ToggleUnchecked(a){for(var b=0,c=mapRows.length,d=startRow;d<c;d++)if(!mapRows[d].cells[includeCell].firstChild.checked){mapRows[d].style.display=a;b++}if(a=="block"){document.getElementById("hlShowUnchecked").innerHTML="";hiding=false}else{document.getElementById("hlShowUnchecked").innerHTML="Show "+b+" Unchecked";hiding=true}}
function SetLowerCase(){if(confirm("Set all entries to lower case\n\r\n\rContinue?")){document.body.style.cursor="progress";for(var a=0,b=mapRows.length,c=startRow;c<b;c++)if(mapRows[c].cells[urlCell].innerHTML!=mapRows[c].cells[urlCell].innerHTML.toLowerCase()){mapRows[c].cells[urlCell].innerHTML=mapRows[c].cells[urlCell].innerHTML.toLowerCase();a++}document.body.style.cursor="default";a>0?alert(a+" entries set to Lower Case"):alert("All entries are Lower Case")}}
function ClearFind(){for(var a=mapRows.length,b=startRow;b<a;b++){mapRows[b].cells[urlCell].style.backgroundColor="";mapRows[b].cells[lastModCell].childNodes[0].style.backgroundColor="";mapRows[b].cells[changeCell].childNodes[0].style.backgroundColor="";mapRows[b].cells[priorityCell].childNodes[0].style.backgroundColor=""}ClearRange()}
function FilterFind(){var a=document.getElementById("txtFilter").value.toLowerCase();if(a.length==0)FilterHelp();else{document.body.style.cursor="progress";for(var b=0,c=mapRows.length,d=startRow;d<c;d++)if(mapRows[d].cells[urlCell].innerHTML.toLowerCase().indexOf(a)>-1){mapRows[d].cells[urlCell].style.backgroundColor="yellow";if(hiding)mapRows[d].style.display="block";b++}else mapRows[d].cells[urlCell].style.backgroundColor="";document.body.style.cursor="default";alert(b+" entries containing "+a+
" found")}}var filterring=false;
function FilterOut(a){if(!filterring){var b=0;if(document.getElementById("cbEditRange").checked){document.body.style.cursor="progress";filterring=true;d=mapRows.length;for(e=startRow;e<d;e++)if(mapRows[e].cells[priorityCell].style.backgroundColor=="yellow"){if(mapRows[e].cells[includeCell].firstChild.checked=a){mapRows[e].cells[includeCell].style.backgroundColor="";if(hiding)mapRows[e].style.display="block"}else mapRows[e].cells[includeCell].style.backgroundColor="orange";b++}a?alert(b+" selected entries are CHECKED"):
alert(b+" selected entries are UNCHECKED")}else{var c=document.getElementById("txtFilter").value.toLowerCase();if(c.length==0){FilterHelp();return}document.body.style.cursor="progress";filterring=true;for(var d=mapRows.length,e=startRow;e<d;e++)if(mapRows[e].cells[urlCell].innerHTML.toLowerCase().indexOf(c)>-1){if(mapRows[e].cells[includeCell].firstChild.checked=a){mapRows[e].cells[includeCell].style.backgroundColor="";if(hiding)mapRows[e].style.display="block"}else mapRows[e].cells[includeCell].style.backgroundColor=
"orange";b++}a?alert(b+" entries containing "+c+" are CHECKED"):alert(b+" entries containing "+c+" are UNCHECKED")}document.body.style.cursor="default";filterring=false}}
function FilterHelp(){document.getElementById("txtFilter").style.backgroundColor="red";alert("Enter search terms in the Find textbox and click Find to highlight all Urls containing these terms\n\rClick Check or UnCheck to include or exclude all page URLs containing these terms\n\rClick Clear to clear highlights\n\r\n\rSet LastMod, ChangeFrequency and Priority settings in the same way\n\r\n\rTo filter on keywords in initial search\n\rclick 'Show Filters and Settings'\n\rand add comma separated list of filter terms");document.getElementById("txtFilter").style.backgroundColor=
""}
function FilterLastMod(){if(!filterring){filterring=true;var a=0,b=document.getElementById("ddLastModYear").value+"-"+document.getElementById("ddLastModMonth").value+"-"+document.getElementById("ddLastModDay").value;if(document.getElementById("cbEditRange").checked){document.body.style.cursor="progress";d=mapRows.length;for(e=startRow;e<d;e++)if(mapRows[e].cells[lastModCell].style.backgroundColor=="yellow"){mapRows[e].cells[lastModCell].firstChild.value=b;mapRows[e].cells[lastModCell].firstChild.style.backgroundColor="Chartreuse";
a++}else mapRows[e].cells[lastModCell].firstChild.style.backgroundColor="";alert(a+" selected entries set to LastMod "+b)}else{var c=document.getElementById("txtFilter").value.toLowerCase();if(c.length==0){FilterLastModHelp();filterring=false;return}document.body.style.cursor="progress";for(var d=mapRows.length,e=startRow;e<d;e++)if(mapRows[e].cells[urlCell].innerHTML.toLowerCase().indexOf(c)>-1){mapRows[e].cells[lastModCell].firstChild.value=b;mapRows[e].cells[lastModCell].firstChild.style.backgroundColor=
"Chartreuse";a++}else mapRows[e].cells[lastModCell].firstChild.style.backgroundColor="";alert(a+" entries containing "+c+" set to LastMod "+b)}document.body.style.cursor="default";filterring=false}}
function FilterLastModHelp(){document.getElementById("txtFilter").style.backgroundColor="red";alert("Enter search terms in the Find textbox\n\rSelect Year, Month and Date\n\rfrom dropdowns and click Go\n\r\n\rAll URL entries containing these terms will be\nset to selected LastMod date");document.getElementById("txtFilter").style.backgroundColor=""}
function FilterChange(){if(!filterring){filterring=true;var a=0,b=document.getElementById("ddFilterChange").selectedIndex;if(document.getElementById("cbEditRange").checked){document.body.style.cursor="progress";d=mapRows.length;for(e=startRow;e<d;e++)if(mapRows[e].cells[lastModCell].style.backgroundColor=="yellow"){mapRows[e].cells[changeCell].firstChild.selectedIndex=b;mapRows[e].cells[changeCell].firstChild.style.backgroundColor="Dodgerblue";a++}else mapRows[e].cells[changeCell].firstChild.style.backgroundColor=
"";alert(a+" selected entries set to Change Frequency "+document.getElementById("ddFilterChange").value)}else{var c=document.getElementById("txtFilter").value.toLowerCase();if(c.length==0){FilterChangeHelp();filterring=false;return}document.body.style.cursor="progress";for(var d=mapRows.length,e=startRow;e<d;e++)if(mapRows[e].cells[urlCell].innerHTML.toLowerCase().indexOf(c)>-1){mapRows[e].cells[changeCell].firstChild.selectedIndex=b;mapRows[e].cells[changeCell].firstChild.style.backgroundColor="Dodgerblue";
a++}else mapRows[e].cells[changeCell].firstChild.style.backgroundColor="";alert(a+" entries containing "+c+" set to Change Frequency "+document.getElementById("ddFilterChange").value)}document.body.style.cursor="default";filterring=false}}
function FilterChangeHelp(){document.getElementById("txtFilter").style.backgroundColor="red";alert("Enter search terms in the Find textbox and click Go\n\r\n\rAll URL entries containing these terms will be\nset to selected Change Frequency");document.getElementById("txtFilter").style.backgroundColor=""}
function FilterPriority(){if(!filterring){filterring=true;var a=0,b=document.getElementById("ddFilterPriority").selectedIndex;if(document.getElementById("cbEditRange").checked){document.body.style.cursor="progress";d=mapRows.length;for(e=startRow;e<d;e++)if(mapRows[e].cells[lastModCell].style.backgroundColor=="yellow"){mapRows[e].cells[priorityCell].firstChild.selectedIndex=b;mapRows[e].cells[priorityCell].firstChild.style.backgroundColor="Orange";a++}else mapRows[e].cells[priorityCell].firstChild.style.backgroundColor=
"";alert(a+" selected entries set to Priority "+document.getElementById("ddFilterPriority").value)}else{var c=document.getElementById("txtFilter").value.toLowerCase();if(c.length==0){FilterPriorityHelp();filterring=false;return}document.body.style.cursor="progress";for(var d=mapRows.length,e=startRow;e<d;e++)if(mapRows[e].cells[urlCell].innerHTML.toLowerCase().indexOf(c)>-1){mapRows[e].cells[priorityCell].firstChild.selectedIndex=b;mapRows[e].cells[priorityCell].firstChild.style.backgroundColor="Orange";
a++}else mapRows[e].cells[priorityCell].firstChild.style.backgroundColor="";alert(a+" entries containing "+c+" set to Priority "+document.getElementById("ddFilterPriority").value)}document.body.style.cursor="default";filterring=false}}
function FilterPriorityHelp(){document.getElementById("txtFilter").style.backgroundColor="red";alert("Enter search terms in the Link Filter textbox and click Go\n\r\n\rAll URL entries containing these terms will be\nset to selected Priority");document.getElementById("txtFilter").style.backgroundColor=""}var lastModVisible=true;
function ToggleLastMod(){var a=lastModVisible?"none":"block";document.body.style.cursor="progress";for(var b=mapRows.length,c=startRow;c<b;c++)mapRows[c].cells[lastModCell].firstChild.style.display=a;lastModVisible=!lastModVisible;document.body.style.cursor="default"}var changeVisible=true;
function ToggleChange(){document.body.style.cursor="progress";for(var a=changeVisible?"none":"block",b=mapRows.length,c=startRow;c<b;c++)mapRows[c].cells[changeCell].firstChild.style.display=a;changeVisible=!changeVisible;document.body.style.cursor="default"}var priorityVisible=true;
function TogglePriority(){document.body.style.cursor="progress";for(var a=priorityVisible?"none":"block",b=mapRows.length,c=startRow;c<b;c++)mapRows[c].cells[priorityCell].firstChild.style.display=a;priorityVisible=!priorityVisible;document.body.style.cursor="default"}function ClearNew(a){mapRows[a].cells[urlCell].style.backgroundColor=""}var reg1=/&/g,reg2=/</g,reg3=/>/g,reg4=/'/g,reg5=/"/g,reg6=/\\u00a9/g;
function XmlEncode(a){a=a.replace(reg1,"+");a=a.replace(reg2,"");a=a.replace(reg3,"");a=a.replace(reg4,"");a=a.replace(reg5,"");return a=a.replace(reg6,"&#xA9;")}var aDat,dt;function FormatDateString(a){aDat=a.split("-");aDat[1]=aDat[1].substr(0,1)+parseInt(aDat[1].substr(1,1))-1;return(new Date(aDat[0],aDat[1],aDat[2])).toGMTString()}
function UpdateRSSDate(){document.getElementById("spnRSSDate").innerHTML=FormatDateString(document.getElementById("ddRSSYear").value+"-"+document.getElementById("ddRSSMonth").value+"-"+document.getElementById("ddRSSDay").value)}
function RangeEditHelp(){document.getElementById("cbEditRange").style.backgroundColor="red";document.getElementById("cbEditRange").checked=true;CbEditRange_onclick(document.getElementById("cbEditRange"));alert("Check the box to enable editing selections\n\r\n\rIn yellow line below, click start and end of selections to edit\nSet desired LastMod, Change or Priority dropdowns and click Go");document.getElementById("cbEditRange").style.backgroundColor=""}var startMark=-1,endMark=-1;
function Mark(a){if(document.getElementById("cbEditRange").checked){a--;if(startMark==-1){startMark=a;mapRows[a].cells[rangeCell].style.backgroundColor="lawngreen"}else{endMark=a+1;for(a=startMark;a<endMark;a++){mapRows[a].cells[rangeCell].style.backgroundColor="yellow";mapRows[a].cells[priorityCell].style.backgroundColor="yellow";mapRows[a].cells[changeCell].style.backgroundColor="yellow";mapRows[a].cells[lastModCell].style.backgroundColor="yellow";mapRows[a].cells[titleCell].style.backgroundColor=
"yellow";mapRows[a].cells[urlCell].style.backgroundColor="yellow";mapRows[a].cells[rangeCell].innerHTML="*"}startMark=-1}}}function ClearRange(){for(var a=mapRows.length,b=0;b<a;b++){mapRows[b].cells[priorityCell].style.backgroundColor="";mapRows[b].cells[changeCell].style.backgroundColor="";mapRows[b].cells[lastModCell].style.backgroundColor="";mapRows[b].cells[titleCell].style.backgroundColor="";mapRows[b].cells[urlCell].style.backgroundColor="";mapRows[b].cells[rangeCell].innerHTML=""}}
function CbEditRange_onclick(a){for(var b=a.checked?"yellow":"",c=mapRows.length,d=0;d<c;d++)mapRows[d].cells[rangeCell].style.backgroundColor=b;a.checked||ClearRange()}var showSearch=false;
function ShowSearch(a){if(showSearch){document.getElementById("ifrmSearch").style.display="none";document.getElementById("btnSearch").value="Search";document.getElementById("btnSearch").style.backgroundColor=""}else{var b=a.clientX+document.body.scrollLeft;a=a.clientY+document.body.scrollTop;document.getElementById("ifrmSearch").style.top=a+16+"px";document.getElementById("ifrmSearch").style.left=b-400+"px";document.getElementById("ifrmSearch").style.display="block";document.getElementById("btnSearch").value=
"Hide";document.getElementById("btnSearch").style.backgroundColor="red"}showSearch=!showSearch}var progressError=false;function GetProgress(){var a=document.getElementById("txtMapId").value;try{Progress.GetProgress(a,OnRequestComplete)}catch(b){progressError||(progressError=true)}}function OnRequestComplete(a){document.getElementById("spnProgress").innerHTML=a};