USGS_OGC_Loaded=false;if(USGS_OGC_Loaded){mapTransparent=true;};Display_Only_OGC=false;var OGC_Low_Bandwidth=true;var Number_OGC_Layers=15;var CheckForExtentChange='';var Display_Layer_Classification=false;var Include_Bad_Scale=false;var Show_TOC_Title=true;var Panning_Moves_OGC_Background=true;var TOC_Hash='';var Update_Images='';var Working_Category=-1;var Category_Order=new Array();var Category_Layer_Order=new Array();var Category_Layer_Visibility=new Array();var Category_Expanded=new Array();var Downloading_Count=0;var Category_Expanded_Image='/Image_Library/category_expanded.gif';var Category_Collapsed_Image='/Image_Library/category_collapsed.gif';var SRC_Layer_URL=new Array();var SRC_Layer_Name=new Array();var SRC_Layer_Icon_URL=new Array();var SRC_Layer_Documentation_URL=new Array();var SRC_Layer_Metadata_URL=new Array();var SRC_Layer_Max_Scale=new Array();var SRC_Layer_Min_Scale=new Array();var SRC_Layer_Category=new Array();var SRC_Layer_IDLayers=new Array();var SRC_Layer_Description=new Array();var SRC_Layer_Extent_Left=new Array();var SRC_Layer_Extent_Right=new Array();var SRC_Layer_Extent_Bottom=new Array();var SRC_Layer_Extent_Top=new Array();var SRC_Layer_Download_URL=new Array();USGS_OGC_Disabled_Color='#CCCCCC';USGS_OGC_Text_Color='#000000';USGS_OGC_Legend_Background_Color='#FFFFFF';var OGC_Exceptions_String='application/vnd.ogc.se_blank';function AddUSGSOGCLayers(mWidth,mHeight,sWidth,sHeight){var n=navigator;var ua=' '+navigator.userAgent.toLowerCase();var is_ie=ua.indexOf('msie')>0;var is_opera=ua.indexOf('opera')>0;Number_OGC_Layers=SRC_Layer_URL.length;for(var i=0;i<Number_OGC_Layers;i++){if(is_ie||is_opera){var content='<img name="BackgroundMap'+i+'" id="BackgroundMap'+i+'" alt="Background Map '+i+'" onload="FinishedLoading();" src="images/pixel.gif" hspace="0" vspace="0" border="0" style="width:1px;height:1px;filter:alpha(opacity=100);">';}else{var content='<img name="BackgroundMap'+i+'" id="BackgroundMap'+i+'" alt="Background Map '+i+'" onload="FinishedLoading();" src="images/pixel.gif" hspace="0" vspace="0" border="0" style="-moz-opacity:1.0;">';}createLayer("theBackground"+i,0,0,sWidth,sHeight,false,content);}};function DrawOGCLayers(mWidth,mHeight,eLeft,eBottom,eRight,eTop){var n=navigator;var ua=' '+navigator.userAgent.toLowerCase();var is_ie=ua.indexOf('msie')>0;var is_opera=ua.indexOf('opera')>0;Downloading_Count=0;if(USGS_Group_Loaded){IVM_OGC_Update_Layer();};localCheck=false;if((CheckForExtentChange!='&WIDTH='+mWidth+'&HEIGHT='+mHeight+'&BBOX='+eLeft+','+eBottom+','+eRight+','+eTop)||OGC_Low_Bandwidth){CheckForExtentChange='&WIDTH='+mWidth+'&HEIGHT='+mHeight+'&BBOX='+eLeft+','+eBottom+','+eRight+','+eTop;localCheck=true;};var CenterAdjust=Math.abs(eRight-eLeft);var CurrentMapScale=HaversineScale((eLeft+CenterAdjust),eBottom,(eLeft+CenterAdjust),eTop,mHeight,ScaleToolDPI);Background_Image_Counter=0;for(var i=Category_Order.length-1;i>=0;i--){if(Category_Layer_Order[i].length>0){TempArray=Category_Layer_Order[i].split(',');TempArray2=Category_Layer_Visibility[i].split(',');for(var j=TempArray.length-1;j>=0;j--){if(Check_Layer_Extent_and_Scale(TempArray[j],eLeft,eBottom,eRight,eTop,CurrentMapScale)){if(localCheck){TempString=SRC_Layer_URL[TempArray[j]]+CheckForExtentChange+'&REQUEST=GetMap&EXCEPTIONS='+OGC_Exceptions_String;if((OGC_Low_Bandwidth&&TempArray2[j]=='true')||!OGC_Low_Bandwidth){Downloading_Count++;TempString2='document.BackgroundMap'+Background_Image_Counter+'.src = "'+TempString+'"';eval(TempString2);TempString2='document.BackgroundMap'+Background_Image_Counter+'.alt = "'+SRC_Layer_Name[TempArray[j]]+'"';eval(TempString2);}};if(TempArray2[j]=='true'){showLayer('theBackground'+Background_Image_Counter);if(is_ie||is_opera){var OGC_Image_Layer=getLayer('BackgroundMap'+Background_Image_Counter);OGC_Image_Layer.width=mWidth;OGC_Image_Layer.height=mHeight;}}else{hideLayer('theBackground'+Background_Image_Counter);if(is_ie||is_opera){var OGC_Image_Layer=getLayer('BackgroundMap'+Background_Image_Counter);OGC_Image_Layer.width=1;OGC_Image_Layer.height=1;}}}else{hideLayer('theBackground'+Background_Image_Counter);if(is_ie||is_opera){var OGC_Image_Layer=getLayer('BackgroundMap'+Background_Image_Counter);OGC_Image_Layer.width=1;OGC_Image_Layer.height=1;}};Background_Image_Counter++;}}};setTimeout('CheckDownloadStatus()',1000);};function getOGCTOC(page2Load){var LocalString='';if(Show_TOC_Title){LocalString+=('<div align="left" class="title_label">&nbsp;Layers</div>');};LocalString+='<form name="OGCLayerlist"><table border="0" cellpadding="0" cellspacing="0" summary="Categorized Layer list of OGC layers">';var CenterAdjust=Math.abs(eRight-eLeft);var CurrentMapScale=HaversineScale((eLeft+CenterAdjust),eBottom,(eLeft+CenterAdjust),eTop,mHeight,ScaleToolDPI);for(var i=0;i<Category_Order.length;i++){LocalString+=('<tr><td valign=top align=right><a name="C'+i+'"></a><a href="'+page2Load+'"');if(Category_Expanded[i]){LocalString+=(' onclick="parent.MapFrame.Category_Expanded['+i+']=false;parent.MapFrame.TOC_Hash=\'C' + i + '\';" title="Collapse Category (Hide Layer List for this category)">');LocalString+=('<img src="'+Category_Expanded_Image+'" alt="Collapse Category (Hide Layer List for this category)" border="0" height="18" width="18" valign="middle" />');}else{LocalString+=(' onclick="parent.MapFrame.Category_Expanded['+i+']=true;parent.MapFrame.TOC_Hash=\'C' + i + '\';" title="Expand Category (Show Layer List for this category)">');LocalString+=('<img src="'+Category_Collapsed_Image+'" alt="Expand Category (Show Layer List for this category)" border="0" height="18" width="18" valign="middle" />');};LocalString+=('</a></td>');LocalString+=('<td colspan="2" valign="top" align="left"><strong>'+Category_Order[i]+'</strong></td></tr>');if(Category_Expanded[i]){if(Category_Layer_Order[i].length>0){TempArray=Category_Layer_Order[i].split(',');TempArray2=Category_Layer_Visibility[i].split(',');CheckForBadScaleLayer='All Layers out of Scale';for(var j=0;j<TempArray.length;j++){if(Include_Bad_Scale){CheckForBadScaleLayer='Has Some in Scale';LocalString+=GetOGCTOC_Layer(j,i,TempArray[j],CurrentMapScale);}else{if(Check_Layer_Extent_and_Scale(TempArray[j],eLeft,eBottom,eRight,eTop,CurrentMapScale)){CheckForBadScaleLayer='Has Some in Scale';LocalString+=GetOGCTOC_Layer(j,i,TempArray[j],CurrentMapScale);}}};if(CheckForBadScaleLayer=='All Layers out of Scale'){LocalString+=('<tr><td>&nbsp;</td><td colspan="2" valign="top" align="left"><span style="color:'+USGS_OGC_Disabled_Color+'">No layers in the current scale</span></td></tr>');}}else{LocalString+=('<tr><td>&nbsp;</td><td colspan="2" valign="top" align="left"><span style="color:'+USGS_OGC_Disabled_Color+'">No Layers available in this category</span></td></tr>');}}};LocalString+=('</table></form>');return LocalString;};function GetOGCTOC_Layer(CategoryLayerID,CategoryID,LayerID,CurrentMapScale){if(parent.MapFrame.USGS_Group_Loaded){Temp_Group_Keyword_Index=parent.MapFrame.IVM_Keyword_check(SRC_Layer_Name[LayerID]);}else{Temp_Group_Keyword_Index=-1;};if(Temp_Group_Keyword_Index>-1){return parent.MapFrame.IVM_Display_Layer(Temp_Group_Keyword_Index,CategoryLayerID,CategoryID,LayerID,CurrentMapScale);}else{var LocalString=('<tr><td>&nbsp;</td><td valign="top" align="left">');LocalString+=('<input type="checkbox"');VisibleArray=Category_Layer_Visibility[CategoryID].split(',');if(VisibleArray[CategoryLayerID]=='true'){LocalString+=(' checked="checked"');};LocalString+=(' onclick="parent.MapFrame.change_Layer_Visibility('+CategoryID+','+CategoryLayerID+');"');if((SRC_Layer_Max_Scale[LayerID]!=0&&SRC_Layer_Max_Scale[LayerID]<CurrentMapScale)||((SRC_Layer_Min_Scale[LayerID]!=0&&SRC_Layer_Min_Scale[LayerID]>CurrentMapScale))){LocalString+=(' disabled="disabled"');DisableColor=USGS_OGC_Disabled_Color;}else{LocalString+=(' readonly="readonly"');DisableColor=USGS_OGC_Text_Color;};LocalString+=(' />');if(SRC_Layer_Documentation_URL[LayerID].length>0){LocalString+=('</td><td valign="top" align="left"><a href="'+SRC_Layer_Documentation_URL[LayerID]+'" target="_blank" title="View Documentation about this layer."><span style="color: '+DisableColor+';">'+SRC_Layer_Name[LayerID]+'</span></a></td></tr>');}else{if(SRC_Layer_Metadata_URL[LayerID].length>0){LocalString+=('</td><td valign="top" align="left"><a href="'+SRC_Layer_Metadata_URL[LayerID]+'" target="_blank" title="View Documentation about this layer."><span style="color: '+DisableColor+';">'+SRC_Layer_Name[LayerID]+'</span></a></td></tr>');}else{LocalString+=('</td><td valign="top" align="left"><span style="color: '+DisableColor+';">'+SRC_Layer_Name[LayerID]+'</span></td></tr>');}};if(Display_Layer_Classification&&SRC_Layer_Icon_URL[LayerID].length>0){LocalString+=('<tr><td>&nbsp;</td><td>&nbsp;</td><td valign="top" align="left">');LocalString+=('<img src="'+SRC_Layer_Icon_URL[LayerID]+'" style="background-color: '+USGS_OGC_Legend_Background_Color+';" alt="Classification for '+SRC_Layer_Name[LayerID]+'" /></td></tr>');};return LocalString;}};function simpleOGCTOC(){var LocalString='';if(Show_TOC_Title){LocalString+=('<div align="left" class="title_label">&nbsp;Layers</div>');};LocalString+='<form name="SimpleOGClist"><table border="0" cellpadding="0" cellspacing="0" summary="Categorized Layer list of OGC layers">';var CenterAdjust=Math.abs(eRight-eLeft);var CurrentMapScale=HaversineScale((eLeft+CenterAdjust),eBottom,(eLeft+CenterAdjust),eTop,mHeight,ScaleToolDPI);CheckForBadScaleLayer='All Layers out of Scale';for(var i=0;i<Category_Order.length;i++){if(Category_Layer_Order[i].length>0){TempArray=Category_Layer_Order[i].split(',');TempArray2=Category_Layer_Visibility[i].split(',');for(var j=0;j<TempArray.length;j++){if(Include_Bad_Scale){CheckForBadScaleLayer='Has Some in Scale';LocalString+=GetOGCTOC_Layer(j,i,TempArray[j],CurrentMapScale);}else{if(Check_Layer_Extent_and_Scale(TempArray[j],eLeft,eBottom,eRight,eTop,CurrentMapScale)){CheckForBadScaleLayer='Has Some in Scale';LocalString+=GetOGCTOC_Layer(j,i,TempArray[j],CurrentMapScale);}}}}};if(CheckForBadScaleLayer=='All Layers out of Scale'){LocalString+=('<tr><td>&nbsp;</td><td colspan="2" valign="top" align="left"><span style="color:'+USGS_OGC_Disabled_Color+'">No layers in the current scale</span></td></tr>');};LocalString+=('</table></form>');return LocalString;};function pan_Move_Images(xMove,yMove){if(Panning_Moves_OGC_Background){Number_OGC_Layers=SRC_Layer_URL.length;for(var i=0;i<Number_OGC_Layers;i++){if(isVisible("theBackground"+i)){moveLayer("theBackground"+i,xMove+hspc,yMove+vspc);}}}};function pan_Finished_Moving(){if(Panning_Moves_OGC_Background){Number_OGC_Layers=SRC_Layer_URL.length;for(var i=0;i<Number_OGC_Layers;i++){moveLayer("theBackground"+i,hspc,vspc);}}};function toggleLegend(){Display_Layer_Classification=!Display_Layer_Classification;parent.TOCFrame.document.location=appDir+"toc.htm";};function Check_Layer_Extent_and_Scale(LayerID,MapLeft,MapBottom,MapRight,MapTop,MapScale){var tempCheck=true;if(SRC_Layer_Min_Scale[LayerID]!=0||SRC_Layer_Max_Scale[LayerID]!=0){if(SRC_Layer_Min_Scale[LayerID]!=0&&SRC_Layer_Min_Scale[LayerID]>MapScale){tempCheck=false;}else if(SRC_Layer_Max_Scale[LayerID]!=0&&SRC_Layer_Max_Scale[LayerID]<MapScale){tempCheck=false;}};if(tempCheck){if(SRC_Layer_Extent_Right[LayerID]<=MapLeft){tempCheck=false;}else if(SRC_Layer_Extent_Left[LayerID]>=MapRight){tempCheck=false;}else if(SRC_Layer_Extent_Bottom[LayerID]>=MapTop){tempCheck=false;}else if(SRC_Layer_Extent_Top[LayerID]<=MapBottom){tempCheck=false;}};return tempCheck;};function change_Layer_Visibility(CategoryID,CategoryLayerID){VisibilityString='';VisibleArray=Category_Layer_Visibility[CategoryID].split(',');for(var k=0;k<VisibleArray.length;k++){if(k==CategoryLayerID&&VisibleArray[k].toLowerCase()=='true'){VisibilityString+=('false');}else if(k==CategoryLayerID&&VisibleArray[k].toLowerCase()=='false'){VisibilityString+=('true');}else{VisibilityString+=(VisibleArray[k]);};if(k<VisibleArray.length-1){VisibilityString+=(',');}};Category_Layer_Visibility[CategoryID]=VisibilityString;afterMapRefresh();};function VisibleLayerInfo(ShowCategories,RepeatHeadings){if(!Boolean(ShowCategories)){ShowCategories=true;};if(!Boolean(RepeatHeadings)){RepeatHeadings=true;};var TempArray;var TempArray2;var TempString;var Local_useExternalWindow=useExternalWindow;useExternalWindow=true;var WindowContent='';WindowContent+=('<fieldset><legend><b>Currently Visible Layers</b></legend>');for(var i=0;i<Category_Order.length;i++){if(Category_Layer_Order[i].length>0){TempArray=Category_Layer_Order[i].split(',');TempArray2=Category_Layer_Visibility[i].split(',');if(Category_Layer_Visibility[i].indexOf("true")>=0){if(ShowCategories){WindowContent+=('<br /><br /><fieldset><legend><b>'+Category_Order[i]+'</b></legend>');};WindowContent+=('<table summary="Visible Layers Table" border="1" cellspacing="2" cellpadding="2">');for(var j=0;j<TempArray.length;j++){if(TempArray2[j]=="true"){WindowContent+=('<tr>');if(SRC_Layer_Documentation_URL[TempArray[j]].length>0){if(SRC_Layer_Description[TempArray[j]].length>0){WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="'+SRC_Layer_Documentation_URL[TempArray[j]]+'" title="'+SRC_Layer_Description[TempArray[j]]+'" target="_blank">'+SRC_Layer_Name[TempArray[j]]+'</a></td>');}else{WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="'+SRC_Layer_Documentation_URL[TempArray[j]]+'" title="'+SRC_Layer_Name[TempArray[j]]+'" target="_blank">'+SRC_Layer_Name[TempArray[j]]+'</a></td>');}}else{if(SRC_Layer_Description[TempArray[j]].length>0){WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="javascript: void(0);" title="'+SRC_Layer_Description[TempArray[j]]+'" target="_blank">'+SRC_Layer_Name[TempArray[j]]+'</a></td>');}else{WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="javascript: void(0);" title="'+SRC_Layer_Name[TempArray[j]]+'" target="_blank">'+SRC_Layer_Name[TempArray[j]]+'</a></td>');}};if(SRC_Layer_Icon_URL[TempArray[j]].length>0){WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="'+SRC_Layer_Icon_URL[TempArray[j]]+'" title="Open Layer Classification in a new window" target="_blank"><img src="'+SRC_Layer_Icon_URL[TempArray[j]]+'" alt="Open Layer Classification for '+SRC_Layer_Name[TempArray[j]]+' in a new window" /></a></td>');}else{WindowContent+=('<td nowrap="nowrap" align="CENTER">N/A</td>');};WindowContent+=('</tr>');}};WindowContent+=('</table>');if(ShowCategories){WindowContent+=('</fieldset>');}}}};WindowContent+=('</fieldset>');Create_Pop_Up_Window('Currently Visible Layers','',WindowContent,'VisibleLayersWindow','scrollbars=yes,resizable=yes');useExternalWindow=Local_useExternalWindow;};function OGCLayerMetadata(ShowCategories,RepeatHeadings){if(!Boolean(ShowCategories)){ShowCategories=true;};if(!Boolean(RepeatHeadings)){RepeatHeadings=true;};var TempArray;var TempArray2;var TempString;var Local_useExternalWindow=useExternalWindow;useExternalWindow=true;var WindowContent='';WindowContent+=('<fieldset><legend><b>Map Information</b></legend>');WindowContent+=('Current Extent = '+eLeft+', '+eBottom+', '+eRight+', '+eTop+'<br />');WindowContent+=('Map Image Size = '+iWidth+', '+iHeight+'<br />');var CenterAdjust=Math.abs(eRight-eLeft);var ApproxScale=HaversineScale((eLeft+CenterAdjust),eBottom,(eLeft+CenterAdjust),eTop,iHeight,ScaleToolDPI);WindowContent+=('The current Vertical Map Scale (at center) is 1 inch = '+ApproxScale+' ');if(MapUnits.toUpperCase()=="CENTIMETERS"){WindowContent+=('Centimeters');}else if(MapUnits.toUpperCase()=="FEET"){WindowContent+=('Feet');}else if(MapUnits.toUpperCase()=="KILOMETERS"){WindowContent+=('Kilometers');}else if(MapUnits.toUpperCase()=="METERS"){WindowContent+=('Meters');}else if(MapUnits.toUpperCase()=="MILES"){WindowContent+=('Miles');}else{WindowContent+=('Inches');};WindowContent+=('</fieldset>');WindowContent+=('<fieldset><legend><b>OGC Layer Metadata</b></legend>');for(var i=0;i<Category_Order.length;i++){if(Category_Layer_Order[i].length>0){TempArray=Category_Layer_Order[i].split(',');TempArray2=Category_Layer_Visibility[i].split(',');if(ShowCategories){WindowContent+=('<br /><br /><fieldset><legend><b>'+Category_Order[i]+'</b></legend>');};WindowContent+=('<table summary="OGC Layer Metadata Table" border="1" cellspacing="2" cellpadding="2">');if(RepeatHeadings){WindowContent+=OGCLayer_Metadata_Header();};for(var j=0;j<TempArray.length;j++){WindowContent+=('<tr>');if(SRC_Layer_Documentation_URL[TempArray[j]].length>0){if(SRC_Layer_Description[TempArray[j]].length>0){WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="'+SRC_Layer_Documentation_URL[TempArray[j]]+'" title="'+SRC_Layer_Description[TempArray[j]]+'" target="_blank">'+SRC_Layer_Name[TempArray[j]]+'</a></td>');}else{WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="'+SRC_Layer_Documentation_URL[TempArray[j]]+'" title="'+SRC_Layer_Name[TempArray[j]]+'" target="_blank">'+SRC_Layer_Name[TempArray[j]]+'</a></td>');}}else{if(SRC_Layer_Description[TempArray[j]].length>0){WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="javascript: void(0);" title="'+SRC_Layer_Description[TempArray[j]]+'" target="_blank">'+SRC_Layer_Name[TempArray[j]]+'</a></td>');}else{WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="javascript: void(0);" title="'+SRC_Layer_Name[TempArray[j]]+'" target="_blank">'+SRC_Layer_Name[TempArray[j]]+'</a></td>');}};WindowContent+=('<td  nowrap="nowrap">');WindowContent+=('Scale: '+FormatNumber(SRC_Layer_Min_Scale[TempArray[j]],0)+' - '+FormatNumber(SRC_Layer_Max_Scale[TempArray[j]],0));WindowContent+=(' / Extent: '+FormatNumber(SRC_Layer_Extent_Left[TempArray[j]],2)+', '+FormatNumber(SRC_Layer_Extent_Bottom[TempArray[j]],2)+' - '+FormatNumber(SRC_Layer_Extent_Right[TempArray[j]],2)+', '+FormatNumber(SRC_Layer_Extent_Top[TempArray[j]],2));WindowContent+=('</td>');if(SRC_Layer_Icon_URL[TempArray[j]].length>0){WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="'+SRC_Layer_Icon_URL[TempArray[j]]+'" title="Open Layer Classification in a new window" target="_blank"><img src="/Image_Library/document.gif" alt="Open Layer Classification in a new window" width="16" height="16" border="0" /></a></td>');}else{WindowContent+=('<td nowrap="nowrap" align="CENTER">N/A</td>');};if(SRC_Layer_Metadata_URL[TempArray[j]].length>0){WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="'+SRC_Layer_Metadata_URL[TempArray[j]]+'" title="Open Layer Metadata in a new window" target="_blank"><img src="/Image_Library/document.gif" alt="Open Layer Metadata in a new window" width="16" height="16" border="0" /></a></td>');}else{WindowContent+=('<td nowrap="nowrap" align="CENTER">N/A</td>');};if(SRC_Layer_Documentation_URL[TempArray[j]].length>0){WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="'+SRC_Layer_Documentation_URL[TempArray[j]]+'" title="Open Layer Documentation in a new window" target="_blank"><img src="/Image_Library/document.gif" alt="Open Layer Documentation in a new window" width="16" height="16" border="0" /></a></td>');}else{WindowContent+=('<td nowrap="nowrap" align="CENTER">N/A</td>');};if(SRC_Layer_URL[TempArray[j]].length>0){WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="'+SRC_Layer_URL[TempArray[j]]+'&REQUEST=capabilities'+CheckForExtentChange+'" title="Open WMS Capabilities in a new window" target="_blank"><img src="/Image_Library/document.gif" alt="Open WMS Capabilities in a new window" width="16" height="16" border="0" /></a></td>');}else{WindowContent+=('<td nowrap="nowrap" align="CENTER">N/A</td>');};if(TempArray2[j]=='true'){TempString=SRC_Layer_URL[TempArray[j]]+CheckForExtentChange+'&REQUEST=GetMap&EXCEPTIONS='+OGC_Exceptions_String;WindowContent+=('<td nowrap="nowrap" align="CENTER"><a href="'+TempString+'" target="_blank" title="Open Current Layer image in new window"><img src="/Image_Library/document.gif" alt="Open Current Layer image in new window" width="16" height="16" border="0" /></a></td>');}else{WindowContent+=('<td nowrap="nowrap" align="CENTER">N/A</td>');};WindowContent+=('</tr>');};WindowContent+=('</table>');if(ShowCategories){WindowContent+=('</fieldset>');}}};WindowContent+=('</fieldset>');WindowContent+=('Alternate Content URL: <a href="'+parent.USGSalternative+'" target="_blank">'+parent.USGSalternative+'</a><br />');Create_Pop_Up_Window('OGC Map Information','',WindowContent,'OGCMetadataWindow','scrollbars=yes,resizable=yes');useExternalWindow=Local_useExternalWindow;};function FormatNumber(num,decimalNum,bolLeadingZero,bolParens,bolCommas){if(!Boolean(bolLeadingZero)){bolLeadingZero=true;};if(!Boolean(bolParens)){bolParens=false;};if(!Boolean(bolCommas)){bolCommas=true;};if(isNaN(parseInt(num)))return "NaN";var tmpNum=num;var iSign=num<0?-1:1;tmpNum*=Math.pow(10,decimalNum);tmpNum=Math.round(Math.abs(tmpNum));tmpNum/=Math.pow(10,decimalNum);tmpNum*=iSign;var tmpNumStr=new String(tmpNum);if(!bolLeadingZero&&num<1&&num>-1&&num!=0){if(num>0){tmpNumStr=tmpNumStr.substring(1,tmpNumStr.length);}else{tmpNumStr="-"+tmpNumStr.substring(2,tmpNumStr.length);}}if(bolCommas&&(num>=1000||num<=-1000)){var iStart=tmpNumStr.indexOf(".");if(iStart<0){iStart=tmpNumStr.length;}iStart-=3;while(iStart>=1){tmpNumStr=tmpNumStr.substring(0,iStart)+","+tmpNumStr.substring(iStart,tmpNumStr.length);iStart-=3;}}if(bolParens&&num<0){tmpNumStr="("+tmpNumStr.substring(1,tmpNumStr.length)+")";}return tmpNumStr;}function OGCLayer_Metadata_Header(){var HeaderContent='';HeaderContent+=('<thead><th><a href="javascript:void(0);" onclick="alert(\'This is the category and layer name that is displayed in the layer list.\');">Layer</a></th>');HeaderContent+=('<th nowrap><a href="javascript:void(0);" onclick="alert(\'A short description of what the data portrays,including links to documentation,and information that describes at what scales this data will appear,and what geographic extent this data has coverage for.\');">Description, Scale, and Extent</a></th>');HeaderContent+=('<th><a href="javascript:void(0);" onclick="alert(\'A link to a static image showing the layer classification(Color Key).\');">Leg</a></th>');HeaderContent+=('<th><a href="javascript:void(0);" onclick="alert(\'A link to FGDC or OGC style metadata that describes this data in much more detail,including information on obtaining the data.\');">Met</a></th>');HeaderContent+=('<th><a href="javascript:void(0);" onclick="alert(\'A link to the home page for the project or data set description.\');">Doc</a></th>');HeaderContent+=('<th><a href="javascript:void(0);" onclick="alert(\'A link to the OpenGIS Consortium capabilities file describing the WMS request that this layer can handle,allowing GIS data experts to use the WMS services directly within their own applications.\');">Cap</a></th>');HeaderContent+=('<th><a href="javascript:void(0);" onclick="alert(\'A link that will display the current WMS request for just this layer in a new window. GIS data experts could save this image,create a world file,and use this image locally.\');">Img</a></th></thead>');return HeaderContent;}function IdentifyAllWindow(e){var theX=mouseX;var theY=mouseY;var TempArray;var TempArray2;var TempString;var Local_useExternalWindow=useExternalWindow;useExternalWindow=true;var WindowContent='';var CenterAdjust=Math.abs(eRight-eLeft);var CurrentMapScale=HaversineScale((eLeft+CenterAdjust),eBottom,(eLeft+CenterAdjust),eTop,mHeight,ScaleToolDPI);for(var i=Category_Order.length-1;i>=0;i--){if(Category_Layer_Order[i].length>0){TempArray=Category_Layer_Order[i].split(',');TempArray2=Category_Layer_Visibility[i].split(',');for(var j=TempArray.length-1;j>=0;j--){if(Check_Layer_Extent_and_Scale(TempArray[j],eLeft,eBottom,eRight,eTop,CurrentMapScale)){if(TempArray2[j]=='true'&&SRC_Layer_IDLayers[TempArray[j]].length>0){TempString=SRC_Layer_URL[TempArray[j]]+'&WIDTH='+mWidth+'&HEIGHT='+mHeight+'&BBOX='+eLeft+','+eBottom+','+eRight+','+eTop;TempString+='&REQUEST=feature_info&EXCEPTIONS=application/vnd.ogc.se_inimage&INFO_FORMAT=MIME&X='+theX+'&Y='+theY+'&QUERY_LAYERS='+SRC_Layer_IDLayers[TempArray[j]];WindowContent+=('<strong>'+SRC_Layer_Name[TempArray[j]]+'</strong> (<a href="'+TempString+'" title="Open '+SRC_Layer_Name[TempArray[j]]+' identify results in a new window" target="_blank"><img src="/Image_Library/document.gif" alt="Open '+SRC_Layer_Name[TempArray[j]]+' identify results in a new window" width="16" height="16" border="0" /></a>)');WindowContent+=('<blockquote><iframe width="100%" src="'+TempString+'">[Unable to display inline frames. Visit <A href="'+TempString+'">the layer Identify Results for this layer.</A>]</iframe></blockquote>');}}}}}Create_Pop_Up_Window('OGC Identify Features','',WindowContent,'OGCInfo','scrollbars=yes,resizable=yes');useExternalWindow=Local_useExternalWindow;}function CheckDownloadStatus(){if(Downloading_Count>0){parent.TopFrame.Set_OGC_Busy("ON");setTimeout('CheckDownloadStatus()',3000);}else{parent.TopFrame.Set_OGC_Busy("OFF");}};function FinishedLoading(){Downloading_Count--;}


