<?xml version="1.0" encoding="UTF-8" ?> 
<Module>
  <ModulePrefs title="Aprenda Inglês: Rockle Lingomigo" 
             title_url="http://www.rockle.com/language/amigo"
             author="Vikram Govindan"
             author_email="vikram.govindan@gmail.com"
             author_affiliation="Rockle Technologies"
             author_location="St. Louis, MO"
             author_link="http://www.rockle.com"
             author_photo="http://hosting.gmodules.com/ig/gadgets/file/101976014698887854921/govindan.png"
             author_aboutme="Grad. student studying business (MBA) at Wash U. Love programming in particular and technology in general."
             screenshot="http://hosting.gmodules.com/ig/gadgets/file/101976014698887854921/ingles_portuguese.PNG"
             author_quote="The simple is the seal of the true, and beauty is the splendor of truth"
             thumbnail="http://hosting.gmodules.com/ig/gadgets/file/101976014698887854921/aprenda_p_ingles.PNG"
             description="Conheça pessoas que falam idiomas estrangeiros todos os dias! - que possam ensinar o idioma que você está tentando aprender...e você pode ensiná-los o idioma que sabe...no Rockle Lingomigo. Contate usuários através de um sistema de chat especialmente voltado para idiomas, email e fóruns de discussão."
             height="350" width="270" scrolling="true" > 
    <Require feature="tabs" /> 
  </ModulePrefs>
  <Content type="html">
  <![CDATA[ 

 <script type="text/javascript" src=http://hosting.gmodules.com/ig/gadgets/file/101976014698887854921/gadget.js>
</script>

<script type="text/javascript">
function display_results()
{
var language = document.buddy_search.language.value;
var snative= document.buddy_search.snative.value;
var spractice = document.buddy_search.spractice.value;
displayMenu(language,snative,spractice,'search_tab');
}
</script>

    <script type="text/javascript">

    // Initialize tabs, designate the tab named "Search" as
    // the tab selected by default.
    var tabs = new _IG_Tabs(__MODULE_ID__, "Pessoas que falam Inglês");
    function init() {

         tabs.addTab("Pessoas que falam Inglês", "content_div");

         tabs.addTab("Busca", "search_tab");

         displayMenu('English','English','Portuguese','content_div');


    }

    
    // Call init function to initialize and display tabs.
    _IG_RegisterOnloadHandler(init);
    </script>


<script type="text/javascript">      
  function displayMenu(language,native,practice,div_name) {	  	  
      // XML breakfast menu data
          var rand = Math.random();
	  var url = "http://www.rockle.com/yap/gadget?language="+language+"&snative="+native+"&spractice="+practice+"&rand="+rand;
    	     
var prefs = new _IG_Prefs(__MODULE_ID__);

      _IG_FetchXmlContent(url, function (response) {
         if (response == null || typeof(response) != "object" || response.firstChild == null) {
           _gel(div_name).innerHTML = "<a href=\"http://www.rockle.com/language/amigo\" target=\"_blank\"><img src=http://hosting.gmodules.com/ig/gadgets/file/101976014698887854921/lingomigo.gif alt=\"Rockle Lingomigo\" border=\"0\"></a><br><br><br><span style=\"font-family:arial;font-size:80%\">We may be experiencing difficulties. Please visit <a href=\"http://www.rockle.com/language/amigo\" target=\"_blank\">Rockle Lingomigo's homepage</a> or <a href=\"javascript:displayMenu('Portuguese','Portuguese','English','content_div');\">click here</a> to refresh this page</span>";
           return;
        }	

		// Start building HTML string that will be displayed in <div>.
        // Set the style for the <div>.
		var html = "<div style='font-family:Arial, Helvetica;" +
                   "text-align:left;font-size:75%'>";
html += "<a href=\"http://www.rockle.com/language/amigo\" target=\"_blank\"><img src=http://hosting.gmodules.com/ig/gadgets/file/101976014698887854921/lingomigo.gif alt=\"Rockle Lingomigo\" border=\"0\"></a><br>";

     
html += "<font color=\"#6f6f6f\">Posso ensinar Inglês...quero aprender Português</font>";

if (div_name=="content_div")
{
html += "<br><a href=\"javascript:displayMenu('English','English','Portuguese','content_div');\">Atualizar (10 usuários aleatórios que falam Inglês)</a><br>";
}

if (div_name=="search_tab")
{
html += "<br><br><a href=\"http://www.rockle.com/language/amigo\" target=\"_blank\">Tente outra busca</a><br>";
}
          
        // Get a list of the <user> element nodes in the file
        var itemList = response.getElementsByTagName("user");    
        var counter = 0;    
        // Loop through all <user> nodes
        for (var i = 0; i < itemList.length ; i++) { 
		   // For each <user> node, get child nodes.
		   var nodeList = itemList.item(i).childNodes;
		   // Loop through child nodes. Extract data from the text nodes that are
		   // the children of the associated username, age, gender, image and description element nodes.
           for (var j = 0; j < nodeList.length ; j++) {
             var node = nodeList.item(j);
                if (node.nodeName == "username") {
                     var username  = node.firstChild.nodeValue;
                     counter += 1;
				 }
if (node.nodeName == "image_link") 
{ 
var image_link = node.firstChild.nodeValue;
if (new String(image_link).indexOf("nil") != 1)
{
image_link = "<img src=\"http://www.rockle.com/yap/member_images/"+image_link+"\">";
}
else
{
image_link = "";
}
 } 
if (node.nodeName == "age") 
{ var age = node.firstChild.nodeValue;
 } 
if (new String(age).indexOf("nil") != -1)
{
age= "-";
}
if (node.nodeName == "country")
 { 
var country = node.firstChild.nodeValue;
 } 
if (new String(country).indexOf("nil") != -1)
{
country = "-";
}
if (node.nodeName == "city") 
{
 var city = node.firstChild.nodeValue;
 }
if (new String(city).indexOf("nil") != -1)
{
city = "-";
}
 if (node.nodeName == "gender")
 { 
var gender = node.firstChild.nodeValue;
 } 
if (new String(gender).indexOf("nil") != -1)
{
gender = "-";
}
if (node.nodeName == "native_language")
 { 
var native_language = node.firstChild.nodeValue;
 } 
if (node.nodeName == "practice_language")
 { 
var practice_language = node.firstChild.nodeValue;
 } 
if (node.nodeName == "description")
 {
 if (node.firstChild.nodeName == "#cdata-section") 
   var description = node.firstChild.nodeValue;
if (new String(description).indexOf("nil") != -1)
{
description = "";
}
 }
if (node.nodeName == "id")
 { 
var id = node.firstChild.nodeValue;
 } 
	   
}
  
              // Append extracted data to the HTML string.
 html += "<br><i><b>";
if (image_link!="nil")
{
 html += image_link;
}
 html += "<a href=\"http://www.rockle.com/yap/inbox?compose=true&id="+id+"\" target=\"_blank\">Contato "+ username+"</a>";
 html += "</b></i><br>";
html += "Idade: ";
 html += age; 
html += "&nbsp;&nbsp;<font color=\"blue\">"+country+"&nbsp;&nbsp;("+city+")</font>";
html += "&nbsp;&nbsp;<font color=\"red\">"+gender+"</font>";
html += "<br><font color=\"#6f6f6f\">Idioma nativo:</font><font color=\"brown\">" + native_language+"</font><br>";
html += "<font color=\"#6f6f6f\">Idioma praticado:</font><font color=\"brown\">" + practice_language+"</font>";
html += "<br><font color=\"green\">" + description+ "</font>"; 
html += "<br><br>";
    
        } 

if (counter == 0)
{
html += "<br><br><center><font color=\"#6f6f6f\">No results for query. </font></center>";
}

html += "<span style=\"font-family:arial;font-size:90%;\"><center><br><br>&copy; <a href=\"http://www.rockle.com\"  target=\"_blank\">Rockle</a> 2005 - 2007</center></span>";	

        html += "</div>";

		// Display HTML string in <div>
		_gel(div_name).innerHTML = html;   		 
	 });	   
  }

function trimString(aString) 
{
  while(aString.substring(0,1) == ' ')
  {
    aString = aString.substring(1, aString.length);
  }
  while(aString.substring(aString.length - 1, aString.length) == ' ')
  {
    aString = aString.substring(0,aString.length-1);
  }
  return aString;
}



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


   <div id="search_tab" style="display:none"><a href="http://www.rockle.com/language/amigo" target="_blank"><img src=http://hosting.gmodules.com/ig/gadgets/file/101976014698887854921/lingomigo.gif alt="Rockle Lingomigo" border="0"></a><br> <form name="buddy_search" id="buddy_search" action="javascript:display_results();" method="get"><span style="font-family:arial;font-size:80%">Seu idioma nativo:<br><br> <script type="text/javascript">write_language_list('spractice','Portuguese');</script><br><br>
                                         
                                                             <script type="text/javascript">

<!--
google_ad_client = "pub-0582656916058535";
google_ad_channel = "7985283619";
google_alternate_ad_url
=
"http://www.syvum.com/cgi/showad.cgi?bg=FFFFFF&footer=FFE6BC&text=0000FF&size=vert&reqpath=/cgi//index";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "990000";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>  
                                                             
                                                             
                                                                                 <br>Idioma que você quer aprender: <br><br><script type="text/javascript">write_language_list('snative','English');</script><br><br><input type="hidden" name="c" id="c" value=""><input type="hidden" name="gender" id="gender" value="No Preference"><input type="hidden" name="age_from" id="age_from" value="18"><input type="hidden" name="age_to" id="age_to" value="100"><input type="hidden" name="language" id="language" value="Portuguese"><input type="submit" value="Encontre Language Buddies"></form></span><span style="font-family:arial;font-size:60%;"><br><br><center>&copy; <a href="http://www.rockle.com"  target="_blank">Rockle</a> 2005 - 2007</center></span></div>

   <div id="content_div" style="display:none"></div>  
   
   <br />
    
                                                                 <script type="text/javascript">

<!--
google_ad_client = "pub-0582656916058535";
google_ad_channel = "7985283619";
google_alternate_ad_url
=
"http://www.syvum.com/cgi/showad.cgi?bg=FFFFFF&footer=FFE6BC&text=0000FF&size=vert&reqpath=/cgi//index";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "990000";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>   

   
  ]]>
  </Content>
</Module>
















































































































































































































































































































































