﻿browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
condition = !(((browserName.indexOf("Explorer") >= 0) && (browserVer < 4)) || ((browserName.indexOf("Netscape") >= 0) && (browserVer < 2)));
if (condition == true)
    CanAnimate = true;
else
    CanAnimate = false;

function translator(pattern) {

    var thisurl = "http://translate.google.com/translate_c?langpair=" + pattern + "&u=" + document.location;



    if (CanAnimate) {
        msgWindow = window.open('', 'subwindow', 'toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');
        msgWindow.focus();
        msgWindow.location.href = thisurl;
    }
    else {
        msgWindow = window.open(thisurl, 'subwindow', 'toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');
    }
}
