<?xml version="1.0" encoding="UTF-8" ?> 
<Module>
<ModulePrefs 
     title="uieme!" 
     height="211"
     description="UIEMe is a free service delivering your own personal broadcast to multiple devices including mobile phones, televisions, computers, portable gaming devices, ipods, etc."
     author="UIEvolution"
     author_location="Bellevue, WA"
     screenshot="http://www.uievolution.com/images/logo.gif"
     author_link="http://www.uieme.com"
>
 <Require feature="dynamic-height" />
 <Require feature="flash" />
 <Require feature="setprefs"/>
  <Require feature="minimessage"/>
</ModulePrefs>

<!-- store the program to display -->
<UserPref name="bid" default_value="1" datatype="string"/>
<UserPref name="large" default_value="false" datatype="bool"/>

<Content type="html"><![CDATA[
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="UIEMe, uievolution, uiengine, uie player, uie server, uie sdk, uienable, uiempower, uienterprise, interactive content, mobile solutions, broadband solutions" />

<meta name="Copyright" content="Copyright (C) 2000-2007 UIEvolution. All Rights Reserved." />

<link rel="shortcut icon" href="http://www.uievolution.com/images/favicon.ico" type="image/ico" />

<link rel="stylesheet" href="../assets/css/global.css" type="text/css" media="screen" />
<script type="text/JavaScript" src="../assets/js/global.js"></script>

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">_uacct = "UA-678782-3"; urchinTracker(); </script>




<style>
  * { padding: 0; margin: 0; }
  html { padding: 0; margin: 0; }
  body { background: #fff; padding: 0; margin: 0; }
  a:link, a:visited {
  	text-decoration: none;
	color: #0667A5
  }
  a:hover {
  	color: #064973;
	text-decoration: underline;
  }
  #invalid {
  	padding: 10px 0 10px 10px;
  	display: none;
  }
  #valid {
  	display: block;
	background: #eee;
	width: 176px;
	padding: 4px;
	border: 1px solid #ccc;
  }
  #flash {
  	display:none;
  }
  #bottom {
  	border-top: 1px solid #ccc;
	background: #ddd;
	padding: 2px 4px 2px 4px;
	margin: 0 -4px -4px -4px;
  }
#help {
	float: right;
}
</style>



<script type="text/javascript">
  var flashDetails="uieplayer.swf";
  var bid= "1";
  var contentUrl = "http://www.uieme.com/content/";
  var assetUrl = "http://www.uieme.com/assets/";
  var debug = true;
  var isLarge = false;

  // Load flash using google APIS
  function loadFlash() {
    try {  
       var flashUrl = contentUrl + flashDetails;

       var flashVariables ="homeUrl=../compile/content/ujml_main.jsp?bid="+ bid + "&displayFLabels=true";

       var widthPref = (isLarge) ?  "265" : "166";
       var heightPref = (isLarge) ? "460" : "211";

       var successLoad = _IG_EmbedFlash(flashUrl, "flashcontainer", {
         swf_version: 9,
         id: "flashid",
         height: heightPref,
         wmode : "transparent",
         flashvars: flashVariables
         });
     
       if (debug && !successLoad) alert("successLoad was " + successLoad + "\r\n" + flashUrl);
       return successLoad;

     } 
     catch (e) {
        return false;
     }
  }

  // fetch stored preferences using Google APIS
  function loadPreferences() {
     try {

         // use google APIs to fetch preferences
         var prefs = new _IG_Prefs(__MODULE_ID__);
 
         var bidPref = null;
         var isLargePref = false;
         if (prefs != null) {
             // get the last known program id
             bidPref = prefs.getString("bid");
             isLargePref = prefs.getBool("large");
         } 


         // if we've got one try the new program out.
         if (bidPref != null) {
             bid = bidPref;
         }
         
         isLarge = isLargePref;




     }
     catch (e) {
         bid = "1";
         isLarge = false;
         if (debug) alert("prefences not loaded\r\n" + e);
     }
  }

  // set the visibility of a div tag
  function setVisible(tagname, visible) {
     var element = document.getElementById(tagname);
     if (element != null) {        
       element.style.display = (visible) ?  "block" : "none";
     }
     else {
       if (debug) alert("could not find " + tagname);
     }
  }
	


  // Page load handler.
  function onPageLoad() {
    try {
        loadPreferences();


         var flashLoadSuccess = loadFlash();

        setVisible("splashgif", false);
        if (flashLoadSuccess) {
           setVisible("flashcontainer", true);

           // In the constructor, state that messages should be be displayed

           // in the messageBox <div> rather than at the top of the gadget.
           var msg = new _IG_MiniMessage(__MODULE_ID__, _gel("messageBox"));
           var settingsMsg = msg.createStaticMessage("To change 'meCast!' choose 'Edit settings' from the dropdown.");
           var uieMeMsg = msg.createStaticMessage("<a href='http://www.uieme.com/'>Visit uieme!</a>");
           settingsMsg.style.backgroundColor = "white";
           uieMeMsg.style.backgroundColor = "white";
      
        }
        else {
           setVisible("invalid", true);
        }


        // resize to fit contents
        _IG_AdjustIFrameHeight();
     }
     catch (e) {  
        if (debug) alert("an error occurred" + e.toString());
     }
  }


  // Register the onload handler
  _IG_RegisterOnloadHandler(onPageLoad);


</script>


<div id="flashcontainer" style="text-align: center;">
</div> 
<div id="splashgif" style="text-align: center;"><img src="http://www.uieme.com/assets/img/flash_splash.gif" alt="Loading meCast"/></div>

<!---  Only visible if flash player is invalid -->

<div id="invalid" style="display: none">
<p><b style="font-size: 12px;">Flash Version 9 is required</b><br />
</p> 
<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" 
   target="_blank">Click here</a> to update your flash version, then restart your browser.
</div>

<br/>
<div id="messageBox"></div>
]]></Content>
</Module>
