if (typeof(lingro_t) == "undefined") {
var lingro_t = new Object;
lingro_t_misc = new Object();

typeof(lingro_tiny_dictionary) != "undefined" ? lingro_t.dictionary = lingro_tiny_dictionary : lingro_t.dictionary = 'eng_eng';
typeof(lingro_tiny_word) != "undefined" ? lingro_t.word = lingro_tiny_word : lingro_t.word = '';


document.write('<div style="position: relative; height: 240px; #z-index: 10000;" id="frn_main_container"><div id="frn_tinydict_container" style="position: absolute; z-index: 1000; overflow-x: hidden; overflow-y: visible; border: 1px solid #ddd; -moz-border-radius-topLeft: 5px; -moz-border-radius-topRight: 5px; background-color: white; overflow-y: hidden;"></div></div>');
document.write('<scr' + 'ipt src="http://lingro.com/widgets/jquery.js"></scr' + 'ipt>');
		//$('#frn_tinydict_container').jqResize('#dupapies');
		// $('#frn_tinydict_container').jqResize('#DUPAPIES');
//});
/*******************************************************************************/
/* Main lingro_t functions                                                       */
/*******************************************************************************/


/*
 * Send a request to translate a clicked word (event, element).
 */
lingro_t.prepareTinydict = function() {

	var main_container = document.getElementById('frn_main_container');
	main_container.parentNode.style.overflow = 'visible';
	
	var iframe_container = document.getElementById('frn_tinydict_container');
	
	var height = 208;
	var width = 140;
	
	// IE size mod
	if (navigator.appVersion.search(/MSIE/) != -1) {
		height += 24;
/*		width = 335;*/
	}

	iframe_container.style.width = width + 'px';
	iframe_container.style.height = (height + 31) + 'px';
	/*
	iframe_container.style.width = width;
	iframe_container.style.height = height + 31;
	*/

	

	var style_string = "style='width: 100%; height: 100%; overflow: hidden;"
					+ " background: none; border: 0px black solid; z-index: 100'";

	var other_args = ' border="0" allowtransparency="true" ';

	var source_url = ' src="http://lingro.com/widgets/tinydict?dictionary=' + lingro_t.dictionary + '&word=' + lingro_t.word +
						'&url=' + window.location.href + '" ';

	var x = 0; var y = 0;

	var dragger =  '<div id="frn_dragger_t" style="display: none"></div>'; 
	var closer =  '<div id="frn_closer_t"></div>'

	var informer = '<div onclick="var frn_nw = window.open(\'http://lingro.com\', \'_blank\'); frn_nw.focus();" id="frn_informer_t" style="position: absolute; top: ' + (y + 5 + 8 + 127) + 'px; left: '
					+ (x + 4 + 215 - 74) + 'px; height: 20px; cursor: pointer; cursor: hand; '
					+ ' z-index: 1001; display: none;"><span style="position: relative; bottom: 7px; color: #eaeaea; font-size: 12px; font-family: sans-serif; #bottom: 4px; #left: -2px;">'
					+ 'dictionary by </span><img src="http://lingro.com/images/lingro_dictionary.png" style="#position: relative;" id="frn_l_s" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>'

/*
	iframe_container.innerHTML = '<div id="tiny_header_bar" style="width: 100%; background-image: url(http://lingro.com/images/tinydict_toolbar.png); -moz-box-sizing: border-box; cursor: move; border-bottom: 1px solid #90aaff;'
		+ 'padding-top: 2px; font-size: 12px; font-family: sans-serif; color: #ffe; height: 25px; overflow: hidden; text-align: center; margin-bottom: 1px;"><img src="http://lingro.com/images/lingro_dictionary.png"> <span style="position: relative; bottom: -2px; display: none">dictionary</span></div>';
*/

	iframe_container.innerHTML = '<div id="tiny_header_bar"  onmousedown="/*lingro_t_misc._dragStart(event, \'frn_tinydict_container\');*/" style="width: 100%; background-image: url(http://lingro.com/images/tinydict_toolbar.png); -moz-box-sizing: border-box; cursor: move; border-bottom: 1px solid #90aaff;'
		+ 'padding-top: 2px; font-size: 12px; font-family: sans-serif; color: #ffe; height: 25px; overflow: hidden; text-align: center; margin-bottom: 1px;"><img src="http://lingro.com/images/logo-notext.png" style="border: none; margin: 0px !important;"> <span style="position: relative; bottom: 4px; font-size: 11px;" onselectstart="return false">lingro dictionary</span></div>';


	iframe_container.innerHTML += '<iframe id="frn_iframe_t" ' + source_url + style_string + other_args + '></iframe><div id="frn_resizer" style="position: absolute; right: 0px; bottom: 0px; overflow: hidden; cursor: se-resize;"><img style="margin: 0px; border: 0px;" src="http://lingro.com/images/resize_corner.png" /></div>'
					+ dragger + closer + informer;
	
	

	// var dupa = document.createElement('div');
//	dupa.innerHTML = '<div id="ex1" class="jqDnR" style="position: absolute; border: 1px solid black;"> I am an example Box "#ex1"<br /> You can *RESIZE* Me.  <div class="jqHandle jqResize" style="background-color: red; width: 15px; height: 15px; position: absolute;  bottom: 0;  right: 0; cursor: se-resize;"></div><div id="dupapies">DUPAPIES</div> </div>'
	// document.body.appendChild(dupa);

	document.getElementById('frn_closer_t').onclick = function() {
		// document.getElementById('frn_informer_t').innerHTML = '';
		iframe_container.innerHTML = '';
		lingro_t._current_clicked_element.className = lingro_t._current_element_class;
	}
	
	

	return false;
}


/*****************************************************************************/
		
lingro_t._go = function() {
	// return;
	
	if (document.body) {

		var iframe_container = document.getElementById('frn_tinydict_container');
		if (iframe_container) {
			 lingro_t.prepareTinydict();
		}

	} else {
		setTimeout(function() { lingro_t._go() }, 500);
	}

}

 lingro_t._go();
/*
var x = document.createElement('style');
x.outerHTML = lingro_t._CSS();
document.write(x.outerHTML);
*/
}
// second litedict (for the webmaster tools page)
else {
	document.write('<div style="position: relative; height: 240px; #z-index: 10000;" id="frn_main_container2"><div id="frn_tinydict_container2" style="position: absolute; z-index: 1000; overflow-x: hidden; overflow-y: visible; border: 1px solid #ddd; -moz-border-radius-topLeft: 5px; -moz-border-radius-topRight: 5px; background-color: white; overflow-y: hidden;"></div></div>');
//	document.write('<scr' + 'ipt src="http://lingro.com/files/jquery.js"></scr' + 'ipt>');

	var main_container = document.getElementById('frn_main_container2');
	main_container.parentNode.style.overflow = 'visible';
	
	var iframe_container = document.getElementById('frn_tinydict_container2');
	
	var height = 208;
	var width = 140;
	
	// IE size mod
	if (navigator.appVersion.search(/MSIE/) != -1) {
		height += 24;
/*		width = 335;*/
	}

	iframe_container.style.width = width + 'px';
	iframe_container.style.height = (height + 31) + 'px';
	/*
	iframe_container.style.width = width;
	iframe_container.style.height = height + 31;
	*/

	

	var style_string = "style='width: 100%; height: 100%; overflow: hidden;"
					+ " background: none; border: 0px black solid; z-index: 100'";

	var other_args = ' border="0" allowtransparency="true" ';

	var source_url = ' src="http://lingro.com/widgets/tinydict?dictionary=' + lingro_t.dictionary + '&word=' + lingro_t.word + '" ';

	var x = 0; var y = 0;

	var dragger =  '<div id="frn_dragger_t2" style="display: none"></div>'; 
	var closer =  '<div id="frn_closer_t2"></div>'

	var informer = '<div onclick="var frn_nw = window.open(\'http://lingro.com\', \'_blank\'); frn_nw.focus();" id="frn_informer_t2" style="position: absolute; top: ' + (y + 5 + 8 + 127) + 'px; left: '
					+ (x + 4 + 215 - 74) + 'px; height: 20px; cursor: pointer; cursor: hand; '
					+ ' z-index: 1001; display: none;"><span style="position: relative; bottom: 7px; color: #eaeaea; font-size: 12px; font-family: sans-serif; #bottom: 4px; #left: -2px;">'
					+ 'dictionary by </span><img src="http://lingro.com/images/lingro_dictionary.png" style="#position: relative;" id="frn_l_s2" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>'

/*
	iframe_container.innerHTML = '<div id="tiny_header_bar" style="width: 100%; background-image: url(http://lingro.com/images/tinydict_toolbar.png); -moz-box-sizing: border-box; cursor: move; border-bottom: 1px solid #90aaff;'
		+ 'padding-top: 2px; font-size: 12px; font-family: sans-serif; color: #ffe; height: 25px; overflow: hidden; text-align: center; margin-bottom: 1px;"><img src="http://lingro.com/images/lingro_dictionary.png"> <span style="position: relative; bottom: -2px; display: none">dictionary</span></div>';
*/

	iframe_container.innerHTML = '<div id="tiny_header_bar2"  onmousedown="/*lingro_t_misc._dragStart(event, \'frn_tinydict_container\');*/" style="width: 100%; background-image: url(http://lingro.com/images/tinydict_toolbar.png); -moz-box-sizing: border-box; cursor: move; border-bottom: 1px solid #90aaff;'
		+ 'padding-top: 2px; font-size: 12px; font-family: sans-serif; color: #ffe; height: 25px; overflow: hidden; text-align: center; margin-bottom: 1px;"><img src="http://lingro.com/images/logo-notext.png" style="border: none; margin: 0px !important;"> <span style="position: relative; bottom: 4px; font-size: 11px;">lingro dictionary</span></div>';


	iframe_container.innerHTML += '<iframe id="frn_iframe_t2" ' + source_url + style_string + other_args + '></iframe><div id="frn_resizer2" style="position: absolute; right: 0px; bottom: 0px; overflow: hidden; cursor: se-resize;"><img style="margin: 0px; border: 0px;" src="http://lingro.com/images/resize_corner.png" /></div>'
					+ dragger + closer + informer;

}

/*
 * jqDnR - Minimalistic Drag'n'Resize for jQuery.
 *
 * Copyright (c) 2007 Brice Burgess <bhb@iceburg.net>, http://www.iceburg.net
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * $Version: 2007.08.19 +r2
 */

