﻿<?xml version="1.0" encoding="UTF-8"?>

<Module>
  
<ModulePrefs title="The List Pump" 
directory_title="The List Pump" 
category="funandgames" 
description="the List Pump manages your ToDo List and helps you complete your tasks by giving them visual weight; either by pumping them up or deflating them." 
author="Brandon Flowers" 
author_email="brandonflowers@gmail.com" 
title_url="http://www.headwindslab.net/" 
screenshot="http://www.headwinds.net/lab/trainer/todo/listPump.png"
thumbnail="http://www.headwinds.net/lab/trainer/todo/listPumpThumb.png"
author_link="http://www.headwindslab.net" 
author_photo="http://www.headwinds.net/lab/scientists/brandon.jpg" 
author_location="Toronto, Ontario">
	
	<Require feature="flash"/>
</ModulePrefs>	




<UserPref name="myListListName" display_name="Name" default_value="Link List" datatype="string"/> 
<UserPref name="backgroundImage" display_name="Background Image (jpg)" default_value="http://" datatype="string"/> 

 <UserPref name="backgroundColor" display_name="Background Color" default_value="FFFFFF" datatype="enum">
  <EnumValue value="666666" display_value="Gray"/> 
  <EnumValue value="333333" display_value="Dark Gray"/> 
  <EnumValue value="000000" display_value="Black"/> 
  <EnumValue value="0E30B7" display_value="Blue"/> 
  <EnumValue value="33CC33" display_value="Green"/> 
  <EnumValue value="FEB859" display_value="Orange"/> 
  <EnumValue value="F45540" display_value="Red"/> 
  <EnumValue value="FFFFFF" display_value="White"/> 
  <EnumValue value="FFE114" display_value="Yellow"/> 
  <EnumValue value="userColor1" display_value="Custom Color 1"/> 
  <EnumValue value="userColor2" display_value="Custom Color 2"/> 
  <EnumValue value="userColor3" display_value="Custom Color 3"/> 
  <EnumValue value="userColor4" display_value="Custom Color 4"/> 
  </UserPref>


<Content type="html">
 <![CDATA[ 
	 
<param name="AllowScriptAccess" value="always">	 
<script type="text/javascript">

_IG_RegisterOnloadHandler(init__MODULE_ID__); 

function init__MODULE_ID__(){
    var prefs = new _IG_Prefs(__MODULE_ID__);
    
    var movie = "http://www.headwinds.net/lab/trainer/todo/ToDo.swf";
    
    var bgcolor = "33CC33";
    var flashContent = _gel("flashContent");
    var flashVars = "";

    var backgroundColor = prefs.getString("backgroundColor");
    var size = prefs.getString("size");
    var backgroundImage = prefs.getString("backgroundImage");
    
    if(size != null){
        flashVars = "up_size=" + size + "&";
    }

    
    if(backgroundImage != null){
        flashVars += "up_backgroundImage=" + backgroundImage + "&";
    }

    if(backgroundColor != null){
        backgroundColor = checkCustomColor__MODULE_ID__(backgroundColor);
        flashVars += "up_backgroundColor=" + backgroundColor + "&"; 
        bgcolor = backgroundColor;
    }
    	
	
    if(prefs.getBool("originalLook") == true){
        flashVars += "up_original=true&";
    }
    
    //need to resize here for Google Desktop
    flashContent.style.height = document.body.clientHeight +"px";
    
    flashContent.innerHTML = '<object type="application/x-shockwave-flash" data="'+ movie +'" style="width:100%;height:100%;" id="linklist">'+
                            '<param name="movie" value="'+ movie +'"/>'+
                            '<param name="wmode" value="opaque"/>'+
                            '<param name="quality" value="high" />'+
                            '<param name="bgcolor" value="#'+ bgcolor +'" />'+
                            '<param name="FlashVars" value="'+ flashVars +'"/>'+
                            'You must first install the <a href="http://www.adobe.com/products/flashplayer/" target="_blank">free flash player plugin</a> in order to view this content.'+
                            '</object>';
    
    //need to resize here for Firefox 1.0
    flashContent.style.height = document.body.clientHeight +"px";
                            
}

// adds two numbers, and sends the result back to ActionScript
function addNumbers(num1, num2)
{
	return (num1 + num2);
}

var jsReady = true;

 function isReady() {
	 return jsReady;
 }

 function thisMovie(movieName) {
	 if (navigator.appName.indexOf("Microsoft") != -1) {
		 return window[movieName];
	 } else {
		 return document[movieName];
	 }
 }
 
 function sendToActionScript(value) {
	 thisMovie("linklist").sendToActionScript(value);
 }
 
 function sendToJavaScript(value) {
	 document.forms["form1"].output.value += "ActionScript says: " + value + "\n";
 }



window.onresize = function(){
    _gel("flashContent").style.height=document.body.clientHeight+"px";
}


function checkCustomColor__MODULE_ID__(color){
        var prefs = new _IG_Prefs(__MODULE_ID__);
        if(color.substring(0,4)=="user")
            return prefs.getString(color);
        else
            return color;
}

</script>

<div id="flashContent" style="height:auto;"/>


  ]]> 
  
</Content>

</Module>