<?xml version="1.0" encoding="UTF-8"?>
<Module>
  <ModulePrefs
     title="Any Page"
     title_url="http://www.zoqui.com/google-gadgets"
     author="Marco Aurelio Zoqui"
     author_email="marco@zoqui.com"
     height="600"
     width="350"
     description="Display any URL in your iGoogle Page!!Do you think it is difficult to have your jscript based page running in your google site? Now you can embedded any URL in your iGoogle page."
     scaling="false"
     thumbnail="http://lh6.ggpht.com/_yHJZ4Txl7xs/SujaQC2lujI/AAAAAAAAAf0/BbovudKes6E/s144/gadget_anypage.png"
           screenshot="http://lh6.ggpht.com/_yHJZ4Txl7xs/SujaQC2lujI/AAAAAAAAAf0/BbovudKes6E/s800/gadget_anypage.png" >
          <Require feature="views"/>
          <Require feature="dynamic-height"/>
          <Require feature="settitle"/>  
        </ModulePrefs>
  <UserPref 
           name="baseurl" 
           display_name="Base URL" 
           required="true" 
           default_value="http://www.google.com"
           />
  
        <Content type="html" view="home">
  <![CDATA[
          <!-- div style="background: transparent url(http://img0.gmodules.com/ig/images/v2/ico_sprite_classic.gif) -142px 0 no-repeat;height:13px;width:12px;float:right;" onclick="goToView('canvas');"/-->
          <div id="content_div" style="font-size:12pt; padding:2px; text-align:center;">
        <iframe id="txtcontent" src="" title="" width="100%" height="100%" scrolling="no" frameborder="0" align="left">
      </iframe>
    </div>
  <script type="text/javascript">
    // Get userprefs
         function getGadgetURL(){
           var url = (window.document.location.search ? window.document.location.search : '');
           if (url.length>0){
              url = url.replace(/\?url\=/ig,'');
              var asArray= url.split('xml');
              if (asArray.length>0)
                 url = asArray[0]+'.xml';
              };
              return url;
          };
          var prefs = new gadgets.Prefs();
          var baseurl = prefs.getString("baseurl");
          var src=baseurl;
          var iframe = document.getElementById("txtcontent");
          iframe.src = src;
          gadgets.window.setTitle("Anypage - Home view" );
          gadgets.window.adjustHeight();
          function goToView(dest) {
             var supported_views = gadgets.views.getSupportedViews();
             gadgets.views.requestNavigateTo(supported_views[dest]);
          };
    </script>
  ]]>
        </Content>
  
        <Content type="html" view="canvas">
  <![CDATA[
          <!-- div style="background: transparent url(http://img0.gmodules.com/ig/images/v2/ico_sprite_classic.gif) -130px 0 no-repeat;height:13px;width:12px;float:right;" onclick="goToView('home');"-->
    <div id="content_div" style="font-size:12pt; padding:2px; text-align:center;">
        <iframe id="txtcontent" src="" title="" width="100%" height="100%" scrolling="no" frameborder="0" align="left">
      </iframe>
    </div>
  <script type="text/javascript">
    // Get userprefs
          var prefs = new gadgets.Prefs();
      var baseurl = prefs.getString("baseurl");
    var src=baseurl;
          var iframe = document.getElementById("txtcontent");
          iframe.src = src;
          gadgets.window.setTitle("Anypage - Canvas View" );
          gadgets.window.adjustHeight();
          function goToView(dest) {
             var supported_views = gadgets.views.getSupportedViews();
             gadgets.views.requestNavigateTo(supported_views[dest]);
          };
    </script>
  ]]>
        </Content>  
</Module>
