<?xml version="1.0" encoding="UTF-8"?>
<Module>
	<ModulePrefs author="LabPixies" author_email="info@labpixies.com" description="__MSG_description__" thumbnail="http://www.labpixies.com/campaigns/babylon/images/thumbnail.jpg" screenshot="http://www.labpixies.com/campaigns/babylon/images/screenshot.png" title_url="http://affiliates.babylon.com/z/16/CD448/" title="__MSG_gadget_name__" height="160">
	
	<Locale messages="http://www.labpixies.com/campaigns/babylon/i20/all_all.xml" />
	<Locale lang="de" messages="http://www.labpixies.com/campaigns/babylon/i20/de_all.xml" />
	<Locale lang="it" messages="http://www.labpixies.com/campaigns/babylon/i20/it_all.xml" />
	<Locale lang="fr" messages="http://www.labpixies.com/campaigns/babylon/i20/fr_all.xml" />
	<Locale lang="es" messages="http://www.labpixies.com/campaigns/babylon/i20/es_all.xml" />
	<Locale lang="pl" messages="http://www.labpixies.com/campaigns/babylon/i20/pl_all.xml" />
	<Locale lang="pt-PT" messages="http://www.labpixies.com/campaigns/babylon/i20/pt_pt_all.xml" />
	<Locale lang="pt-BR" messages="http://www.labpixies.com/campaigns/babylon/i20/pt_br_all.xml" />
	<Locale lang="nl" messages="http://www.labpixies.com/campaigns/babylon/i20/nl_all.xml" />
	<Locale lang="ja" messages="http://www.labpixies.com/campaigns/babylon/i20/ja_all.xml" />
	<Locale lang="zh-CN" messages="http://www.labpixies.com/campaigns/babylon/i20/zh_cn_all.xml" />
	<Locale lang="ru" messages="http://www.labpixies.com/campaigns/babylon/i20/ru_all.xml" />
	<Locale lang="bg" messages="http://www.labpixies.com/campaigns/babylon/i20/bg_all.xml" />
	<Locale lang="ca" messages="http://www.labpixies.com/campaigns/babylon/i20/ca_all.xml" />
	<Locale lang="zh-TW" messages="http://www.labpixies.com/campaigns/babylon/i20/zh_tw_all.xml" />
	<Locale lang="hr" messages="http://www.labpixies.com/campaigns/babylon/i20/hr_all.xml" />
	<Locale lang="cs" messages="http://www.labpixies.com/campaigns/babylon/i20/cs_all.xml" />
	<Locale lang="da" messages="http://www.labpixies.com/campaigns/babylon/i20/da_all.xml" />
	<Locale lang="fi" messages="http://www.labpixies.com/campaigns/babylon/i20/fi_all.xml" />
	<Locale lang="el" messages="http://www.labpixies.com/campaigns/babylon/i20/el_all.xml" />
	<Locale lang="iw" messages="http://www.labpixies.com/campaigns/babylon/i20/iw_all.xml" />
	<Locale lang="hi" messages="http://www.labpixies.com/campaigns/babylon/i20/hi_all.xml" />
	<Locale lang="hu" messages="http://www.labpixies.com/campaigns/babylon/i20/hu_all.xml" />
	<Locale lang="ko" messages="http://www.labpixies.com/campaigns/babylon/i20/ko_all.xml" />
	<Locale lang="lv" messages="http://www.labpixies.com/campaigns/babylon/i20/lv_all.xml" />
	<Locale lang="lt" messages="http://www.labpixies.com/campaigns/babylon/i20/lt_all.xml" />
	<Locale lang="ms" messages="http://www.labpixies.com/campaigns/babylon/i20/ms_all.xml" />
	<Locale lang="no" messages="http://www.labpixies.com/campaigns/babylon/i20/no_all.xml" />
	<Locale lang="ro" messages="http://www.labpixies.com/campaigns/babylon/i20/ro_all.xml" />
	<Locale lang="sr" messages="http://www.labpixies.com/campaigns/babylon/i20/sr_all.xml" />
	<Locale lang="sk" messages="http://www.labpixies.com/campaigns/babylon/i20/sk_all.xml" />
	<Locale lang="sl" messages="http://www.labpixies.com/campaigns/babylon/i20/sl_all.xml" />
	<Locale lang="sv" messages="http://www.labpixies.com/campaigns/babylon/i20/sv_all.xml" />
	<Locale lang="tl" messages="http://www.labpixies.com/campaigns/babylon/i20/tl_all.xml" />
	<Locale lang="th" messages="http://www.labpixies.com/campaigns/babylon/i20/th_all.xml" />
	<Locale lang="tr" messages="http://www.labpixies.com/campaigns/babylon/i20/tr_all.xml" />
	<Locale lang="uk" messages="http://www.labpixies.com/campaigns/babylon/i20/uk_all.xml" />
	<Locale lang="vi" messages="http://www.labpixies.com/campaigns/babylon/i20/vi_all.xml" />
	
	<Require feature="setprefs"/>
		<Require feature="analytics"/>
		<Require feature="views" />
		<Require feature="dynamic-height"/>
	</ModulePrefs>
	<UserPref name="babylonlang" default_value="EN" datatype="hidden"/>
	<UserPref name="recentTrans" default_value="" datatype="hidden"/>
	<Content type="html">
		<![CDATA[
		<!-- 
		     Copyright (C) LabPixies 2006.  All Rights Reserved.
		     
		     Babylon Box Module
		     Design & Code: LabPixies
		     All subsequent code and resources used are proprietary of LabPixies unless directly stated otherwise.
		     Copyright (C) 2006 LabPixies.    
		     www.labpixies.com
		     
		     This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License.
		     To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/2.5/ or
		     send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
		     
		     File:		babylon.html
		     -->
		<Title>Babylon Translation Box</title>
		<style type="text/css">
			
			.linkStyle {
			font-family: verdana; 
			color: #013972; 
			font-size: __MSG_link_font__px; 
			}
			a:link		{text-decoration : none; color: #013972;}
			a:Visited	{text-decoration : none; color: #013972;}
			a:Active	{text-decoration : none; color: #013972;}
			a:Hover		{text-decoration : underline; color: #013972;}
			td {direction:__MSG_tdDir__;}
		</style>

    <!-- PUT THIS TAG IN THE head SECTION -->
    <script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
    </script>
    <script type="text/javascript">
      GS_googleAddAdSenseService("ca-pub-8123415297019784");
      GS_googleEnableAllServices();
    </script>
    <script type="text/javascript">
      GA_googleAddSlot("ca-pub-8123415297019784", "babylon_txt");
    </script>
    <script type="text/javascript">
      GA_googleFetchAds();
    </script>
    <!-- END OF TAG FOR head SECTION -->

		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
		<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
    <script type="text/javascript">
			var _gadgetID = 3;
			var $lp=jQuery.noConflict();
			
			var prefs = new _IG_Prefs();
			var IMAGES_BASE = "http://www.labpixies.com/campaigns/babylon/images/";
			
			function getCachedImage(src){
			     return _IG_GetCachedUrl(IMAGES_BASE+src).replace("%rewriteMime%", "");
			}

			
      var lp_pageTracker = new _gat._getTracker("UA-345375-1");
      lp_pageTracker._initData();
  
      function lp_trackEvent(eventName,eventLable,eventVar) {
          try {
            lp_pageTracker._trackEvent("Babylon V1 - Home", eventName, eventLable, eventVar );
          }
          catch(ee) {
  
          }
      }
      
			function SaveSettings(){
			 
       var w = document.getElementById("sel").selectedIndex;
       var selected_text = document.getElementById("sel").options[w].text;
       lp_trackEvent('Set Translate Language',selected_text); 
			 prefs.set("babylonlang",document.getElementById("sel").value);
			}
			
			function openResultWindow(){
				document.getElementById("result").style.display="inline";
				document.getElementById("close_frame").style.display="block";
				document.getElementById("close_right").style.background="url"+"("+getCachedImage('close_button_right.jpg')+")";
				document.getElementById("close_left").style.background="url"+"("+getCachedImage('close_button_left.jpg')+")";
				document.getElementById("close_mid").style.background="url"+"("+getCachedImage('close_button_middle.jpg')+")";
        document.transbox.tl.value = document.getElementById("sel").value;
        lp_trackEvent('Translate Query','Translate');
        
				_IG_AdjustIFrameHeight();
				return true;
			}
			
			function toggleSettings(){
  			/* If setting screen is on - change to main table screen */
  			if (document.getElementById("set").style.display == "block") {
    			SaveSettings();
    			document.getElementById("mainTable").style.display = "inline";
    			document.getElementById("set").style.display = "none";
    			document.getElementById("ctrl").innerHTML = "__MSG_settings__";
    		/* Else - change to settings screen */
  			}else{
    			document.getElementById("mainTable").style.display = "none";
    			document.getElementById("set").style.display = "block";
    			document.getElementById("ctrl").innerHTML = "__MSG_save__";
  			}
			}
			
			function loadSettings(){
  			var temp = prefs.getString("babylonlang");
  			var selectElm = document.getElementById("sel");
  			var optionArr = selectElm.options;
  			var i = 0;
  			var arrLength = optionArr.length;
  		
      	for(i=0;i < arrLength; i++){
			    if(optionArr[i].value == temp){
  			    optionArr[i].selected=true;
  			    return;
			    }
			  }			
		  }
		    
		</script>
		<div style="height:10px;"></div> 
		<center>
		    <form target="babylon_frame" action="http://info.babylon.com/onlinebox.cgi" name="transbox"
			  method="post" style='display:inline' onsubmit="return openResultWindow();" ID="Form1">
			    
			    <input type="hidden" name="rt" value="ol" ID="Hidden6" />
			    <input type="hidden" name="tid" value="pop" ID="Hidden7" />
			    
			    <input type="hidden" name="uil" value="EN" ID="Hidden8" />
			    <input type="hidden" name="cid" value="CD448" ID="Hidden9" />
			    <input type="hidden" name="tl" value="EN" ID="Hidden10" />
			    <table cellpadding=0 border="0" cellspacing=0 style=" width : 254px; height: 101px;" ID="Table1">
				    <tr>
					    <td valign='bottom' style='height:27px;padding-top:0px;margin:0px;border:0px;padding-right:20px;'>
						    <!-- Main table-->
						    <div style="text-align:right;margin-bottom:4px">
							    <span id="ctrl" style="cursor: pointer;color: #ffffff;font-family: arial, sans-serif; font-size: 10px;" onclick="toggleSettings();">__MSG_settings__</span>
						    </div>
					    </td>
				    </tr>
				    <tr>
					    <td align="center" valign="middle">
						    <!-- Main table-->
						    <table id="mainTable" cellspacing=0 cellpadding=0 border=0>
							    <tr>
		    						<td height=19  width=190>
										<input type="text" name="term" value="__MSG_translate__" onfocus="if(this.value=='__MSG_translate__')this.select();"	style="width : 180px;padding:0px 5px 0px 5px; border-color: #7f9db9; border-width: 1px; border-style: solid;" ID="Text2" />		
									</td>
									<td height=19 align=center valign=middle>
										<input type="image" alt="__MSG_submmit_alt__" title="__MSG_submmit_title__" ID="Image2" NAME="Image1" />	
									</td>
								</tr>
								<tr>
									<td height=30 colspan=2>
										<table cellpadding=0 cellspacing=0>
										<tr>
										<td class="linkStyle"><a id="aff_link" href="" target="_blank" >__MSG_download__</a>&nbsp;</td>
									</tr>
								</table>
							</td>						
						</tr>
					</table>
					<!-- Settings table-->
					<div style='width:230px;height:25px; display: none;  color: #013972; font-size:10px; font-family: verdana;margin-bottom:10px;text-align:center;' id='set'>
						__MSG_select_lang__
						<select name='sel' ID="sel">
							<script type="text/javascript">
								langs=prefs.getMsg("arr_languages").split(',');
								values=new Array("EN","NL","DE","PT","SR","HR","FR","HE","ES","JA","IT","ZHS","ZHT","KO","RU","SV","TR","OT");
								for(i=0;i<langs.length;i++){
										document.write('<option value="'+values[i]+'">'+langs[i]+'</option>');
										}
									</script>
								</select>
							</div>
						</td>
					</tr>
				</table>
			</form>
			
			<div id="lp_ad_div" style="margin-top:5px;">
				<!-- PUT THIS TAG IN DESIRED LOCATION OF SLOT calculator_txt -->
				<script type="text/javascript">
				  GA_googleFillSlot("babylon_txt");
				</script>
				<!-- END OF TAG FOR SLOT calculator_txt -->
			</div>
			
			<div>
      	<script type="text/javascript">
          var mMENU = _IG_GetCachedUrl("http://cdn.labpixies.com/infra/js/lp_footer.js");
          mMENU  = mMENU.replace("%rewriteMime%", "");
          document.write('<scr'+'ipt type="text/javascript" src="'+mMENU+'"></scr'+'ipt>');
        </script>
      </div>

			<div onclick="document.getElementById('result').style.display='none';this.style.display='none';_IG_AdjustIFrameHeight()" style='cursor:pointer;float:right;display:none;margin-right:10px;margin-top:10px;' id='close_frame'>
				<div style='float:right;width:20px;height:20px;' id='close_right'></div>
				<div style="float:right;color:#d5e2f5;vertical-align:middle;font-weight:bold;height:20px;text-font:arial;font-size:11px;" id='close_mid' ><div style='margin-top:4px;'>__MSG_close__</div></div>
				<div style='float:right;width:12px;height:20px;' id='close_left'></div>
			</div>
			<iframe id='result' name="babylon_frame" style='width:100%;margin-top:10px;height:390px;border:0px;display:none;'></iframe>
		</center>
		
		<script type="text/javascript" >
			loadSettings();
		</script>
		<script type="text/javascript">
			function loadM() {
				document.getElementById("aff_link").href = "http://www.babylon.com/affiliates/landing/index.php?id=448&lang="+'__MSG_aff_lng__';
				document.getElementById('Image2').src=getCachedImage("babylon_go_new.gif");
				document.getElementById('Table1').style.background="url"+"("+getCachedImage('babylon_plate_new.gif')+")";
				$lp(function(){
					//lpgadgets.lp.menu.addMenuItem("__MSG_settings__",function(){toggleSettings();});
				});
				
				_IG_AdjustIFrameHeight();
			}
			_IG_RegisterOnloadHandler(loadM);
			_IG_Analytics("UA-345375-1", "/Babylon_V1");
		</script>
		
		<iframe width="1" height="1" style="width:1px; height:1px; overflow:hidden; position:absolute; visibility:hidden;" src="http://static.labpixies.com/campaigns/babylon/analytics.html"></iframe>
		
		]]> 
	</Content>

  <Content type="html" view="home,profile">
    <![CDATA[
    <title>Babylon Translation Box</title>
    
    <style type="text/css">
			
			.icons {
			 cursor:pointer; 
       height:12px; 
       width:12px;
       overflow:hidden;
      }
      
      .menu {
        cursor:pointer; 
        font-family:Verdana; 
        font-size:10px; 
        font-weight:regular; 
        color:#0E52B8;
      }
      
      #term {
        width:180px; 
        font-family:verdana;
        border-color:#7f9db9; 
        border-width: 1px; 
        border-style: solid; 
        margin-right: 6px;
        padding:0px 5px 0px 5px;
      }
      
      #goImg {
        cursor:pointer; 
        position:relative; 
        top:4px;
      }
      
      .linkStyle {
  			font-family: verdana; 
  			color: #013972; 
  			font-size: __MSG_link_font__px;
        text-align:left; 
        margin-left:20px; 
        position:relative; 
        top:10px; 
			}
			
			a:link		{text-decoration : none; color: #013972;}
			a:Visited	{text-decoration : none; color: #013972;}
			a:Active	{text-decoration : none; color: #013972;}
			a:Hover		{text-decoration : underline; color: #013972;}
		</style>
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
    <script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
    <!-- PUT THIS TAG IN THE head SECTION -->
    <script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
    </script>
  	<script type="text/javascript">
  	GS_googleAddAdSenseService("ca-pub-8123415297019784");
  	GS_googleEnableAllServices();
  	</script>
  	<script type="text/javascript">
  	GA_googleAddSlot("ca-pub-8123415297019784", "babylon_txt");
  	</script>
  	<script type="text/javascript">
  	GA_googleFetchAds();
  	</script>
  	<!-- END OF TAG FOR head SECTION -->
    <script type="text/javascript">
      var _gadgetID = 3;
			var $lp=jQuery.noConflict();     
    </script>
    
    <script type="text/javascript">
            
			var prefs = new _IG_Prefs();
			var IMAGES_BASE = "http://www.labpixies.com/campaigns/babylon/images/V2/gadget/";
			var params;
			
      var lp_pageTracker = new _gat._getTracker("UA-345375-1");
      lp_pageTracker._initData();
  
      function lp_trackEvent(eventName,eventLable,eventVar) {
          try {
            lp_pageTracker._trackEvent("Babylon V2 - Home", eventName, eventLable, eventVar );
          }
          catch(ee) {
  
          }
      }
      			
      function getCachedImage(src){
			 return _IG_GetCachedUrl(IMAGES_BASE+src).replace("%rewriteMime%", "");
       //return IMAGES_BASE+src;			 
			}
			
      function mouse_out(el){
        elName = el.id;
        
        if (elName == "leftMenu"){
          document.getElementById("icon1").style.backgroundPosition="0px 0px";
          document.getElementById("recentItems").style.color="#0E52B8";
          document.getElementById("recentItems").style.textDecoration="none";
        }
        if (elName == "rightMenu"){
          document.getElementById("icon2").style.backgroundPosition="0px -24px";
          document.getElementById("fullScreen").style.color="#0E52B8";
          document.getElementById("fullScreen").style.textDecoration="none";
        }
			}
      
      function mouse_over(el){
        elName = el.id;
        
       if (elName == "leftMenu"){
          document.getElementById("icon1").style.backgroundPosition="0px -12px";
          document.getElementById("recentItems").style.color="#6A8C12";
          document.getElementById("recentItems").style.textDecoration="underline";
        }
        if (elName == "rightMenu"){
          document.getElementById("icon2").style.backgroundPosition="0px -36px";
          document.getElementById("fullScreen").style.color="#6A8C12";
          document.getElementById("fullScreen").style.textDecoration="underline";
        }
			}
			
      function switchToCanvas( params ) {
        
          if ( typeof(params) != 'undefined' ){
              if (params != "trans_recent_item")
		  params = {'str':document.getElementById("term").value};
	      else 
		  params = {'str':'trans_recent_item'};
          }

        map = gadgets.views.getSupportedViews();
      	gadgets.views.requestNavigateTo( map['canvas'], params );
      }
      
      _IG_RegisterOnloadHandler(function(){
        document.getElementById("aff_link").href = "http://www.babylon.com/affiliates/landing/index.php?id=448&lang="+'__MSG_aff_lng__';
        document.getElementById('goImg').src = getCachedImage("babylon_go_new.png");				
				document.getElementById('mainDiv').style.background="url"+"("+getCachedImage('babylon_plate_new.png')+") no-repeat";
				document.getElementById('icon1').style.background="url"+"("+getCachedImage('top_icon_sprite.png')+") left 0px no-repeat";
				document.getElementById('icon2').style.background="url"+"("+getCachedImage('top_icon_sprite.png')+") left -24px no-repeat";
				
				_IG_AdjustIFrameHeight();
      });
      
      _IG_Analytics("UA-345375-1", "/Babylon_V2_Home");			
		</script>
		
		<center>
		  <div id="container" style="width:245px;">
		    <div style="height: 10px; line-height: 10px; font-size:1px;"></div>
        <div id="topRow"  style="height: 13px;">
		      <div id="leftMenu" onmouseover="mouse_over(this);" onmouseout="mouse_out(this);" onclick="switchToCanvas('trans_recent_item');lp_trackEvent('Open Canvas','Recent items button');">
            <div id="icon1" class="icons"  style="margin-left:10px; float:left;">&nbsp;</div> 
            <div id="recentItems" class="menu" style="margin-left:4px; float:left;">__MSG_recent_items__</div>
          </div>
          <div id="rightMenu" onmouseover="mouse_over(this);" onmouseout="mouse_out(this);" onclick="switchToCanvas();lp_trackEvent('Open Canvas','Full screen');">
            <div id="fullScreen" class="menu" style="margin-right:8px; float:right;">__MSG_full_screen__</div>
            <div id="icon2" class="icons" style="margin-right:5px; float:right ">&nbsp;</div>          
          </div>
        </div>
        <div style="height:3px; line-height:3px; font-size:1px; "></div>
        <div id="mainDiv" style="width:245px; height: 101px;">          
          <div style="width:245px; height: 27px; line-height: 27px;">
            
          </div>
          <div style="height:73px;">
            <div style="height:7px; line-height:7px; font-size:1px;"></div>
            <div id="search">
              <form onsubmit="switchToCanvas(true); lp_trackEvent('Open Canvas','Enter pressed'); return false;" style="padding: 0px; margin: 0px;" >
                <input type="text" id="term" name="term" maxlength="50" onfocus="this.select();" value="__MSG_translate__"> 
                <img id="goImg" name="goImg" title="__MSG_submmit_title__" onclick="switchToCanvas(true); lp_trackEvent('Open Canvas','Play button');"/>
              </form>            
            </div>
            <div style="height:30px;">
              <div id="link" class="linkStyle">
                <a id="aff_link" href="" target="_blank" onclick="lp_trackEvent('Open Babylon.com','Affiliate link');" >__MSG_download__</a>
              </div>
            </div>
          </div>
        </div>
        <div id="lp_ad_div" style="margin-top:5px;">
  				<!-- PUT THIS TAG IN DESIRED LOCATION OF SLOT calculator_txt -->
  				<script type="text/javascript">
  				  GA_googleFillSlot("babylon_txt");
  				</script>
  				<!-- END OF TAG FOR SLOT babylon_txt -->
  			</div>
      </div>
		</center>
		
		<div>
    	<script type="text/javascript">
        var mMENU = _IG_GetCachedUrl("http://cdn.labpixies.com/infra/js/lp_footer.js");
        mMENU  = mMENU.replace("%rewriteMime%", "");
        document.write('<scr'+'ipt type="text/javascript" src="'+mMENU+'"></scr'+'ipt>');
      </script>
    </div>

	<iframe width="1" height="1" style="width:1px; height:1px; overflow:hidden; position:absolute; visibility:hidden;" src="http://static.labpixies.com/campaigns/babylon/analytics.html"></iframe>
	
    ]]> 
	</Content>
	
<Content type="html" view="canvas">
    <![CDATA[
    <title>Babylon Translation Box</title>
    <style type="text/css">

			#loadingDiv {
        position:relative;
        top:30px;
        display:none;
        text-align:center;
        margin-left:2px;
      }

      #loading {
        font-family:Arial;
        font-size:11px;
        font-weight:Regular;
        color:#666666;
        margin-top:10px;
      }

      #result {
        margin-top:2px;
        margin-left:1px;
        margin-bottom:1px;
        height:376px;
        width:326px;
        border:0px;
        display:none;
      }

      #downloadDiv {
        width:147px;
        height:107px;
        cursor:pointer;
			}

			#downloadText {
			 margin:2px;
       font-family:Arial;
       font-size:13px;
       font-weight:Bold;
       color:#00AB10;
       line-height:14px;
       text-align:center;
		  }

      #trans_language_title, #recent_trans_title{
			 margin-left:10px;
       font-family:Verdana;
       font-size:11px;
       font-weight:Bold;
       color:#0E52B8;
       height:20px;
       line-height:20px;
			}

			#trans_language_content {
			 margin-top:12px;
       text-align:center;
			}

			#sel{
       font-family:Verdana;
       font-size:12px;
       font-weight:Regular;
       color:#000000;
       width:136px;
			}

			#opt{
			 margin:2px;
			}

			#term {
        width:300px;
        border-color:#7f9db9;
        border-width: 1px;
        border-style: solid;
        margin-right: 8px;
        padding:0px 5px 0px 5px;
      }

      #goImg {
        cursor:pointer;
        position:relative;
        top:4px;
      }

      .recResDiv {
        margin-left:10px;
        height:19px;
        width:135px;
        overflow:hidden;
      }

      .recRes {
        font-family:Verdana;
        font-size:12px;
        font-weight:regular;
        color:#000000;
        text-decoration:none;
      }

      .linkStyle {
  			font-family: verdana;
  			color: #013972;
  			font-size: 10px;
        text-align:left;
        margin-left:13px;
        position:relative;
        top:10px;
			}

			a:link		{text-decoration : none;}
			a:Visited	{text-decoration : none;}
			a:Active	{text-decoration : none;}
			a:Hover		{text-decoration : underline; color: #013972;}

		</style>

		<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>

    <!-- PUT THIS TAG IN THE head SECTION -->
    <script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
    </script>
    <script type="text/javascript">
     GS_googleAddAdSenseService("ca-pub-8123415297019784");
     GS_googleEnableAllServices();
    </script>
    <script type="text/javascript">
	 GA_googleAddSlot("ca-pub-8123415297019784", "babylon_box");
     GA_googleAddSlot("ca-pub-8123415297019784", "babylon_custom_1");
     GA_googleAddSlot("ca-pub-8123415297019784", "babylon_custom_2");
     GA_googleAddSlot("ca-pub-8123415297019784", "babylon_leaderboard_top");
    </script>
    <script type="text/javascript">
     GA_googleFetchAds();
    </script>
    <!-- END OF TAG FOR head SECTION -->

    <script type="text/javascript">
      var $lp=jQuery.noConflict();
      var _gadgetID = 3;
  	</script>

<script type="text/javascript">
    
    var IMAGES_BASE = "http://www.labpixies.com/campaigns/babylon/images/v2/canvas/";
    var prefs = new _IG_Prefs();

    var lp_pageTracker = new _gat._getTracker("UA-345375-1");
    lp_pageTracker._initData();

    function lp_trackEvent(eventName,eventLable,eventVar) {
        try {
          lp_pageTracker._trackEvent("Babylon V2 - Canvas", eventName, eventLable, eventVar );
        }
        catch(ee) {

        }
    }

    var MAX_LEN = 1300;
    var MAX_NO_OF_ITEMS = 13;
    var recent;
    var babLang;
    var loadURL;
    

    function getCanvasCachedImage(src){

        return _IG_GetCachedUrl(IMAGES_BASE+src).replace("%rewriteMime%", "");

    }

	function loadSettings(){
    	babLang = prefs.getString("babylonlang");
    	var selectElm = document.getElementById("sel");
    	var optionArr = selectElm.options;

    	for(var i=0;i < optionArr.length; i++){
        	 if(optionArr[i].value == babLang){
        	    optionArr[i].selected=true;
        		  return;
        	 }
  		  }
      }

    function SaveSettings(){

       var w = document.getElementById("sel").selectedIndex;
       var selected_text = document.getElementById("sel").options[w].text;
       lp_trackEvent('Set Translate Language',selected_text);
		prefs.set("babylonlang",document.getElementById("sel").value);
    }

    function mouse_over(el){
        el.style.color="#0F52B9";
        el.style.textDecoration="underline";
    }

    function mouse_out(el){
        el.style.color="#000000";
        el.style.textDecoration="none";
    }

	function trimSpaces(sString)  {

        if(sString){
          while (sString.substring(0,1) == ' ')
          {
            sString = sString.substring(1, sString.length);
          }
          while (sString.substring(sString.length-1, sString.length) == ' ')
          {
            sString = sString.substring(0,sString.length-1);
          }
        }
        return sString;
      }


	function showLanguageLst() {

        var langs=prefs.getMsg("arr_languages").split(',');
    		var values=new Array("EN","NL","DE","PT","SR","HR","FR","HE","ES","JA","IT","ZHS","ZHT","KO","RU","SV","TR","OT");
    		var html = [];

    		html.push('<select name="sel" id="sel" onchange="languageWasPicked();">');
        for(var i=0;i<langs.length;i++){
    			html.push("<option value=\""+values[i]+"\">"+langs[i]+"</option>");
        }
        html.push('</select>');
        document.getElementById("trans_language_content").innerHTML = html.join("");
      }

	function showRecentLst(){

			 var recent = prefs.getArray("recentTrans");
       if (recent.length > 0){
         var html = [];
         for (var i = recent.length-1; i >= 0; i--){
            var word = recent[i];
            word = trimSpaces(word);

            html.push("<div class='recResDiv'><span>- </span>");
            html.push("<a id='res"+i+"' title='"+word+"' href='javascript:void(0);' onmouseover='mouse_over(this);'");
            html.push(" onmouseout='mouse_out(this);' onclick='translateAgain(\""+ word +"\");' class='recRes'>");
            html.push(word.substring(0,14) + "</a></div>");
          }
          document.getElementById('translationLst').innerHTML = html.join("");
        }
			}

	function getRecentItem(){

			 var recent = prefs.getArray("recentTrans");
       if (recent.length > 0){
        return recent[recent.length-1];
       }
       else
        return null;
	}

      function removeItems(array, item) {
        var i = 0;
        while (i < array.length) {
          if (array[i] == item) {
            array.splice(i, 1);
          } else {
            i++;
          }
        }
        return array;
      }

			function setRecentLength(arr) {
			 //take it from prefs as a string to see if the length reaches MAX_LEN bytes
       var recentStr = prefs.getString("recentTrans");

       while (recentStr.length > MAX_LEN){
        var str_array = recentStr.split("|");
        str_array.splice(0, 1);
        recentStr = str_array.join("|");
       }

       if (str_array)
        arr = str_array;

       prefs.setArray('recentTrans', arr);
      }

			function insertToRecentLst(params){

        var recentT = prefs.getArray("recentTrans");

        if (params){
          if (params != '__MSG_translate__'){//if it's not the "Translate.." lable
            recentT = removeItems(recentT, params);//remove the word from the list if it's there
            if (recentT[recentT.length-1] != params){ //if it's not the last translated word
              if (recentT.length == MAX_NO_OF_ITEMS)
                recentT.shift();
              recentT.push(params);
              setRecentLength(recentT);
              showRecentLst();
              return true;
            }
          }
        }
        else
          return false;
   		}

   		function loadit(){
        var frm=document.getElementById('result');
        var load=document.getElementById('loadingDiv').style;
        var el=document.getElementById('ldImg');
        var im = document.createElement("img");

        if (!el.firstChild){
          im.src = loadURL;
          im.width = "16";
          im.height = "16";
          el.appendChild(im);
        }

        frm.style.display='none';
        load.display='block';
        if(frm.onload==null){
          frm.onload=function(){
            load.display='none';
            el.innerHTML="";
            frm.style.display='block';
          };
          if(window.attachEvent)
            frm.attachEvent('onload', frm.onload);
        }
        return true;
      }

      function openResultWindow(){

				loadit();
        document.transbox.tl.value = document.getElementById("sel").value;
				var w = trimSpaces(document.getElementById("term").value);
				document.getElementById("term").value = w;
        insertToRecentLst(w);
        lp_trackEvent('Translate Query','Translate');
				_IG_AdjustIFrameHeight();
				return true;
			}

			function submitForm() {
			   document.getElementById("transbox").submit();
			}

			function languageWasPicked() {

			 var word = document.getElementById("term").value;
       document.transbox.tl.value = document.getElementById("sel").value;
       setTimeout(SaveSettings,5);
       if (word != '__MSG_translate__'){
         setTimeout(submitForm,5);
         return openResultWindow();
       }
			}

			function translateFromProfile(params){
  
        params = trimSpaces(params);
        if (insertToRecentLst(params)){
          document.transbox.tl.value = babLang;
          document.getElementById("term").value = params;
          document.transbox.submit();
          return openResultWindow();
        }
			}

			function translateAgain(word){

			  document.getElementById("term").value = word;
        insertToRecentLst(word);
        document.transbox.tl.value = document.getElementById("sel").value;
        document.getElementById("transbox").submit();
        lp_trackEvent('Translate Recent Item','Click Recent items');
        return openResultWindow();
			}

      function translateRecentItem(){

			  var word = getRecentItem();
        if (word){
			    document.getElementById("term").value = word;
          document.transbox.tl.value = document.getElementById("sel").value;
          document.getElementById("transbox").submit();
          return openResultWindow();
        }
        else
          return null;
			}

			function loadImages() {

			  document.getElementById('goImg').src = getCanvasCachedImage("babylon_go_new.png");
        document.getElementById('downloadDiv').style.background="url"+"("+getCanvasCachedImage('banner_background.png')+") no-repeat";
        document.getElementById('translationDiv').style.background="url"+"("+getCanvasCachedImage('translation_box_background.png')+") no-repeat";
        document.getElementById('languageDiv').style.background="url"+"("+getCanvasCachedImage('left_background.png')+") no-repeat";

        //load the loading image:
        loadURL = getCanvasCachedImage('loading_anim.gif');
        var loadPic = new Image(1,1);
        loadPic.src = loadURL;
        loadPic.onload = function() {return;};
      }

      function initGadget() {

				document.getElementById("aff_link").href = "http://www.babylon.com/affiliates/landing/index.php?id=448&lang="+'__MSG_aff_lng__';
        document.getElementById("downloadDiv").onclick = function(){
					window.open("http://www.babylon.com/affiliates/landing/index.php?id=448&lang="+'__MSG_aff_lng__'); 
					lp_trackEvent('Open Babylon.com','Affiliate banner');
				};
				loadImages();

        showLanguageLst();
        loadSettings();
        showRecentLst();

        //if something was sent from profile:
        var params = gadgets.views.getParams();        
          if (typeof(params) == 'object' && 'str' in params) {
	      if(params.str == "trans_recent_item")
		  translateRecentItem();
              else
		  translateFromProfile(params.str);
	  }

        document.getElementById("term").focus();

        _IG_AdjustIFrameHeight();
      }



		</script>
<center>
    <div align="center">
      <div style="margin: 10px 0px 0px 0px; width: 760px; height: 106px; background:url(http://cdn.labpixies.com/infra/images/ad_unit_bg_760.png);" id="gadget_ad" align="center">
      	<div style="height:8px; font-size:1px;"></div>
      	<div id="ad_slt">
      	  <script>
      	     GA_googleFillSlot('babylon_leaderboard_top');
      	  </script>
      	</div>
      	<div style="height:8px; font-size:1px;"></div>
      </div>
    </div>
	
    <div id="container" style="width:760px;" align="center">
      <div style="height:20px; line-height:20px; font-size:1px;" align="center"></div>
      <table border="0" cellspacing="0" cellpadding="0" width="760" align="center">
        <tr>
          <td id="leftSide" width="147" align="left">
            <div id="downloadDiv">
              <!--------------------------downloadDiv--------------------------->
              <table cellspacing="0" cellpadding="0" border="0" width="77" height="47" align="right" valign="top">
                <tr>
                  <td valign="bottom">
                    <div id="downloadText">
                      __MSG_download_for_free__
                    </div>
                  </td>
                </tr>
              </table>
            </div>
          </td>
          <td rowspan="2" width="385" align="center">
            <div id="translationDiv" style="width:363px; height:495px;" align="center">
              <!--------------------------translationDiv------------------------>
              <div style="height:40px; line-height:40px; font-size:1px;"></div>
              <div id="search" style="height:20px;">
                <div align="left" style="margin-left:13px;">
                  <form target="result" action="http://info.babylon.com/onlinebox.cgi" name="transbox" id="transbox"
        					  method="post" onsubmit="return openResultWindow();"  style="padding: 0px; margin: 0px;">

      					    <input type="hidden" name="rt" value="ol" id="Hidden6" />
      					    <input type="hidden" name="tid" value="pop" id="Hidden7" />

      					    <input type="hidden" name="uil" value="EN" id="Hidden8" />
      					    <input type="hidden" name="cid" value="CD448" id="Hidden9" />
      					    <input type="hidden" name="tl" value="EN" id="Hidden10" />

                    <input type="text" id="term" maxlength="50" name="term" onClick="this.select();" value="__MSG_translate__" />
                    <img id="goImg" name="goImg" title="__MSG_submmit_title__" onclick="document.transbox.submit(); return openResultWindow();"/>
                  </form>
                </div>
              </div>
              <div id="down4Free" style="height:30px;">
                <div id="link" class="linkStyle">
                  <a id="aff_link" href="" onclick="lp_trackEvent('Open Babylon.com','Affiliate link');" target="_blank" text-decoration="none" >__MSG_download__</a>
                </div>
              </div>
              <div id="answerDiv" style="height:405px;">
                <div style="float:left; width:14px; line-height:14px; font-size:1px;">&nbsp;</div>
                <div id="answerBox" style="float:left; height:380px; width:329px;">
                  <div id="loadingDiv">
                    <div id="ldImg"></div>
                    <div id="loading">&nbsp;__MSG_loading__</div>
                  </div>
                  <iframe id="result" name="result" scrolling="no"></iframe>
                </div>
                <div style="float:left; width:14px; line-height:14px; font-size:1px;">&nbsp;</div>
              </div>
            </div>
          </td>
		  <td rowspan="2" width="228" align="right" valign="top">
				<div style="width:200px; margin-bottom:10px;">
                    <script type="text/javascript">
                      GA_googleFillSlot("babylon_custom_1");
                    </script>
                </div>
                <div style="width:200px; margin-bottom:10px;">
                    <script type="text/javascript">
                      GA_googleFillSlot("babylon_custom_2");
                    </script>
                </div>
                <div style="width:200px;">
                    <script type="text/javascript">
                      GA_googleFillSlot("babylon_box");
                    </script>
                </div>
		  </td>
        </tr>
        <tr>
          <td>
            <div id="languageDiv" style="width:147px; height:353px;">
              <!--------------------------languageDiv--------------------------->
              <div id="transLanguage" style="height: 62px;">
                <div id="trans_language_title" >
                  __MSG_translate_language__
                </div>
                <div style="height:42px;">
                  <div id="trans_language_content">

                  </div>
                </div>
              </div>
              <div id="recentTrans" style="height:291px;">
                <div id="recent_trans_title">
                  __MSG_recent_translations__
                </div>
                <div style="height:8px; line-height:8px; font-size:1px;"></div>
                <div id="translationLst" height="283">

                </div>
              </div>
            </div>
          </td>
        </tr>
      </table>
   
      <div style="height:8px; line-height:8px; font-size:1px;"></div>
        <div>
          <script type="text/javascript">
          google_ad_client = "pub-8123415297019784";
          google_ad_slot = "2637765815";
          google_ad_width = 728;
          google_ad_height = 15;
          </script>
          <script type="text/javascript"
          src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
          </script>
        </div>
         
      <div>
      	<script type="text/javascript">
          var mMENU = _IG_GetCachedUrl("http://cdn.labpixies.com/infra/js/lp_footer.js");
          mMENU  = mMENU.replace("%rewriteMime%", "");
          document.write('<scr'+'ipt type="text/javascript" src="'+mMENU+'"></scr'+'ipt>');
        </script>
      </div>
    </div>
    

    <script type="text/javascript">
      _IG_RegisterOnloadHandler(initGadget);
      _IG_Analytics("UA-345375-1", "/Babylon_V2_Canvas");
    </script>

</center>

	<iframe width="1" height="1" style="width:1px; height:1px; overflow:hidden; position:absolute; visibility:hidden;" src="http://static.labpixies.com/campaigns/babylon/analytics.html"></iframe>

    ]]>
	</Content>
</Module>