var TargmneComBrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"unknown_b";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"unknown_v";},searchString: function (data) {for (var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if (dataString){if(dataString.indexOf(data[i].subString)!=-1)return data[i].identity;}else if (dataProp)return data[i].identity;}},searchVersion: function (dataString) {var index=dataString.indexOf(this.versionSearchString);if (index==-1) return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"}]};TargmneComBrowserDetect.init();

//if (TargmneComMoveTranslatorOnSelection == true) {TargmneComRemoveMainTranslator = true;}
if (TargmneComRemoveMainTranslator == false) {
	TargmneComMoveTranslatorOnSelection = false;
}

TargmneComIframeHeight = 310;

TargmneComIframeWidthDefault = 220;
TargmneComIframeHeightDefault= 400;
TargmneComRemoveMainTranslatorAccept = false;
//TargmneComMoveTranslatorOnSelection  = false;

try {TargmneComIframeWidth = parseInt(TargmneComIframeWidth) || TargmneComIframeWidthDefault;}
catch (e) {TargmneComIframeWidth = TargmneComIframeWidthDefault;}
try {TargmneComIframeHeight = parseInt(TargmneComIframeHeight) || TargmneComIframeHeightDefault;}
catch (e) {TargmneComIframeHeight = TargmneComIframeHeightDefault;}
try {TargmneComDefaultDictionary = parseInt(TargmneComDefaultDictionary) || -1;}
catch (e) {TargmneComDefaultDictionary = -1;}

if (!TargmneComIframeWidth || !TargmneComIframeHeight) {ABC = 0;}
else {
	TargmneComDoc=document;
	try {
		if (TargmneComRemoveMainTranslator==true && TargmneComMoveTranslatorOnSelection) {
			TargmneComRemoveMainTranslatorAccept = true;
		}
	}
	catch(e) {a=1};
	
	if (TargmneComRemoveMainTranslatorAccept) {
		TargmneComDoc.write('<a href="http://www.targmne.com/freeservicecode/" target="_blank"><img src="http://www.targmne.com/images/code_200x49.png" width="200" height="49" alt="Targmne.com - Free Service Code" style="border:0px;"></a>');
	}
	else {
		TargmneComDoc.write('<iframe id="TargmneCom_FreeServiceIframe" name="TargmneCom_FreeServiceIframe" src="http://www.targmne.com/free_service?tw=' + TargmneComIframeWidth + '&th=' + TargmneComIframeHeight + '&DefDict='+ TargmneComDefaultDictionary +'" width="'+ TargmneComIframeWidth +'" height="'+ TargmneComIframeHeight +'" frameborder="0" style="padding: 0px; margin:0px;" marginheight="0" marginwidth="0" scrolling="auto" style="overflow-x:hidden;"></iframe>');
	}
	if (TargmneComMoveTranslatorOnSelection) {
		if (TargmneComBrowserDetect.browser == 'Explorer' && TargmneComBrowserDetect.version<7) {
			// Load Fucking PNG FIX for IE6
			TargmneComDoc.write('<script type="text/javascript" language="javascript">function TargmneComTransparent(element){try {if(/MSIE (5\.5|6).+Win/.test(navigator.userAgent)) {var src=element.src;var realSrc=src;if(/\.png$/.test(realSrc.toLowerCase())){element.src = "./images/spacer.gif";if (src) {element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'" + src + "\',sizingMethod=\'scale\')";}}}}catch (e) {var a=5;}}</script>');
			TargmneComDoc.write('<style type="text/css">.TargmneComPngFix { filter:expression(TargmneComTransparent(this)); }</style>');
		}
		TargmneComHTMLstart = '<table width="200" border="0" cellspacing="0" cellpadding="0"><tr><td height="10" align="right"><img src="http://www.targmne.com/free_service/images/tl.png" class="TargmneComPngFix" width="10" height="10"></td><td style="font-size:1px; background:url(\'http://www.targmne.com/free_service/images/bg_t.png\') repeat-x top white;">&nbsp;</td><td width="16" height="10" align="left"><img class="TargmneComPngFix" src="http://www.targmne.com/free_service/images/tr.png" width="16" height="10"></td></tr><tr><td style="font-size:1px; background:url(\'http://www.targmne.com/free_service/images/bg_l.png\') repeat-y right;">&nbsp;</td><td>';
		TargmneComHTMLend   = '</td><td style="font-size:1px; background:url(\'http://www.targmne.com/free_service/images/bg_r.png\') repeat-y left;">&nbsp;</td></tr><tr><td valign="top" align="right"><img class="TargmneComPngFix" src="http://www.targmne.com/free_service/images/bl.png" width="23" height="37"></td><td valign="top"><table border="0" width="100%" style="width:100%" cellspacing="0" cellpadding="0"><tr><td width="32"><img class="TargmneComPngFix" src="http://www.targmne.com/free_service/images/bc.png" width="32" height="37"></td><td style="font-size:1px; background:url(\'http://www.targmne.com/free_service/images/bg_b.png\') repeat-x top;">&nbsp;</td></tr></table></td><td valign="top"><img class="TargmneComPngFix" src="http://www.targmne.com/free_service/images/br.png" width="16" height="18"></td></tr></table>';
		TargmneComDoc.write('<div id="TargmneCom_FreeServiceIframeABS_div" name="TargmneCom_FreeServiceIframeABS_div" style="display:none; position:absolute; width:'+TargmneComIframeWidth+'; height:'+TargmneComIframeHeight+'">'+TargmneComHTMLstart+'<iframe id="TargmneCom_FreeServiceIframeABS" name="TargmneCom_FreeServiceIframeABS" src="http://www.targmne.com/free_service?tw=' + TargmneComIframeWidth + '&th=' + TargmneComIframeHeight + '&DefDict='+ TargmneComDefaultDictionary +'" width="'+ TargmneComIframeWidth +'" height="'+ TargmneComIframeHeight +'" frameborder="0" style="padding: 0px; margin:0px;" marginheight="0" marginwidth="0" scrolling="auto" style="overflow-x:hidden;"></iframe>'+TargmneComHTMLend+'</div>');
	}
	TargmneComDoc.write('<script type="text/javascript" src="http://www.targmne.com/free_service/code_utils.js.php?tw=' + TargmneComIframeWidth + '&th=' + TargmneComIframeHeight + '&DefDict='+ TargmneComDefaultDictionary +'" language="javascript"></script>');
	TargmneComDoc.close();
}
