<!DOCTYPE html> <html lang="en-US"> <head> <title>Welcome to the Nelson Center SD web site!</title> <link rel="shortcut icon" href="ICO/favicon.ico"> <meta charset="utf-16" /> <meta name="google-site-verification" content="BAIyutlXcJk3i_zyPZIgFtut1maEBaVG9-xsW-GlH4I" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> </head> <script> var ua = navigator.userAgent.toLowerCase(); var isMobile = ua.indexOf("mobile"); var elementsheight; var orientation; if( $( window ).height() > $( window ).width()){ orientation = 0; }else{ orientation = 90; } if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && isMobile > -1 ) { $('head').append('<link rel="apple-touch-icon" sizes="57x57" href="ICO/apple-touch-icon-57x57.png">'); $('head').append('<link rel="apple-touch-icon" sizes="60x60" href="ICO/apple-touch-icon-60x60.png">'); $('head').append('<link rel="apple-touch-icon" sizes="72x72" href="ICO/apple-touch-icon-72x72.png">'); $('head').append('<link rel="apple-touch-icon" sizes="76x76" href="ICO/apple-touch-icon-76x76.png">'); $('head').append('<link rel="apple-touch-icon" sizes="114x114" href="ICO/apple-touch-icon-114x114.png">'); $('head').append('<link rel="apple-touch-icon" sizes="120x120" href="ICO/apple-touch-icon-120x120.png">'); $('head').append('<link rel="apple-touch-icon" sizes="144x144" href="ICO/apple-touch-icon-144x144.png">'); $('head').append('<link rel="apple-touch-icon" sizes="152x152" href="ICO/apple-touch-icon-152x152.png">'); $('head').append('<link rel="apple-touch-icon" sizes="180x180" href="ICO/apple-touch-icon-180x180.png">'); $('head').append('<link rel="stylesheet" href="CSS/Mobile.css" type="text/css" />'); }else{ //alert("Adding CSS"); $('head').append('<link rel="stylesheet" href="CSS/Main.css" type="text/css" />'); $('head').append('<link rel="icon" href="favicon.ico" type="image/x-icon" />'); //alert("Post CSS"); } function SetupScript(orien){ var Home = "Home"; var Contact = "Contact"; var ua = navigator.userAgent.toLowerCase(); var isMobile = ua.indexOf("mobile"); if(isMobile > 0){ if(orien == 90){ $('#Content_Container').height("418px"); var position = $('#Content_Container').position(); var submaintop = $('#Content_Container').height() + position.top - 30; $( "#SubMain_Bar" ).css({ top: submaintop+"px" }); $("#Container").css({overflow: "scroll"}); }else{ $('#Content_Container').height( elementsheight ); $( "#SubMain_Bar" ).css({ top: "" }); $( "#SubMain_Bar" ).css({ bottom: "0px" }); $("#Container").css({overflow: "hidden"}); } }else{ $('#Content_Container').height(elementsheight - 115); $( "#SubMain_Bar" ).css({ top: "" }); $( "#SubMain_Bar" ).css({ bottom: "0px" }); $("#Container").css({overflow: "hidden", position: "fixed"}); } // } function ChangePage(Page){ SetupScript(orientation); Page = Page.toString(); var newPage = Page.split("("); var newPage1 = newPage[1].split(")"); Page = newPage1[0]; ResetButtons(); $("#"+Page).attr("class", "MainNav_Button_Selected"); if(Page.toString() == 'Locatio'){ $("#Content").html("<iframe src='https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d2866.309556975038!2d-103.2493961!3d44.076964!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x877d434ca0e24183%3A0x9f7944373d3be466!2s1818+W+Fulton+St+%23102%2C+Rapid+City%2C+SD+57702!5e0!3m2!1sen!2sus!4v1426380213881' width='100%' height='100%' frameborder='0' style='border:0'></iframe>"); $("#Content").attr("class", "MapContent"); }else{ if(Page.toString() == "About"){ $("#Content").attr("class", "AboutContent"); if(isMobile != -1){ Page = "About_Mobile"; } }else{ $("#Content").attr("class", "MainContent"); } var pageRequest = false //variable to hold ajax object /*@cc_on @if (@_jscript_version >= 5) try { pageRequest = new ActiveXObject("Msxml2.XMLHTTP") } catch (e){ try { pageRequest = new ActiveXObject("Microsoft.XMLHTTP") } catch (e2){ pageRequest = false } } @end @*/ if (!pageRequest && typeof XMLHttpRequest != 'undefined'){ pageRequest = new XMLHttpRequest() } if (pageRequest){ //if pageRequest is not false //alert("pageRequest success."); pageRequest.open('GET', Page+".txt", false) //get page synchronously pageRequest.send(null) embedpage(pageRequest) }else{ $("#Content").html("pageRequest failed."); } if(Page.toString() == "Schedule"){ $("#Content").attr("class", "MapContent"); } } } function ResetButtons(){ $("#Home").attr("class" , "MainNav_Button_Rest"); $("#Contact").attr("class" , "MainNav_Button_Rest"); $("#About").attr("class" , "MainNav_Button_Rest"); $("#Locatio").attr("class" , "MainNav_Button_Rest"); $("#Forms").attr("class" , "MainNav_Button_Rest"); $("#Schedule").attr("class" , "MainNav_Button_Rest"); } function embedpage(request){ //alert("embedpaging page: "+request); //if viewing page offline or the document was successfully retrieved online (status code=2000) if (window.location.href.indexOf("http")==-1 || request.status==200){ //document.write(request.responseText) //alert("embedpage success: "+request.responseText); $("#Content").html(""); $("#Content").attr("class", "MainContent"); $("#Content").html(request.responseText); }else{ $("#Content").html("embedpage failed. "+request.statusrequest.responseText); } } $( window ).on( "orientationchange", function( event ) { SetupScript(orientation); }); function SetupHeight() { //alert($( window ).height()+" : "+$("#MainTitle_Bar").height() +" : "+ $("#MainNav_Bar").height() +" : "+ $("#SubMain_Bar").height()); elementsheight = $( window ).height() - ( $("#MainTitle_Bar").height() ); }; function AddSocialIcon(){ var div if(isMobile != -1){ div = document.getElementById('MainTitle_Bar'); }else{ div = document.getElementById('MainNav_Table'); } div.innerHTML = div.innerHTML + "<a href='https://www.facebook.com/TheNelsonCenterSD' id='FaceBook_LNK'></a>" } </script> <body onload="SetupHeight();SetupScript(orientation);ChangePage('(Home)');AddSocialIcon()"> <DIV id="Container"> <DIV id="MainTitle_Bar"></DIV> <DIV id="MainNav_Bar"> <DIV id="MainNav_Background"></Div> <!-- <table id="MainNav_Table"> <tr> <td><a href='javascript:ChangePage(Contact)' class='MainNav_Button_Rest' id='Contact'>Contact</a></td> <td><a href='javascript:ChangePage(About)' class='MainNav_Button_Rest' id='About'>About</a></td> <td><a href='javascript:ChangePage(Locatio)' class='MainNav_Button_Rest' id='Locatio'>Location</a></td> <td><a href='javascript:ChangePage(Forms)' class='MainNav_Button_Rest' id='Forms'>Forms</a></td> </tr> </table> --> </DIV> <DIV id="Content_Container"> <DIV id="Content" class="MainContent"> Content will go here </DIV> </DIV> <DIV id="SubMain_Bar"></DIV> </DIV> </body> </html>