var vir_path = 'http://www.website-translate.com/';
var ROOT_DIR = vir_path + 'includes/js/getbutton/';
var IMAGE_BUTTONS = ROOT_DIR + 'images/buttons/';
var IMAGE_FLAGS = ROOT_DIR + 'images/flags/';
var IMAGE_POP_UP = ROOT_DIR + 'images/pop_up/';
var MENU_SHOW_TIME = 500;
var LANGUAGE_NAMES = new Array();
LANGUAGE_NAMES[0] = 'Afrikaans';
LANGUAGE_NAMES[1] = 'Albanian';
LANGUAGE_NAMES[2] = 'Arabic';
LANGUAGE_NAMES[3] = 'Armenian';
LANGUAGE_NAMES[4] = 'Azerbaijani';
LANGUAGE_NAMES[5] = 'Basque';
LANGUAGE_NAMES[6] = 'Belarusian';
LANGUAGE_NAMES[7] = 'Bulgarian';
LANGUAGE_NAMES[8] = 'Catalan';
LANGUAGE_NAMES[9] = 'Chinese';
LANGUAGE_NAMES[10] = 'Chinese(trad.)';
LANGUAGE_NAMES[11] = 'Croatian';
LANGUAGE_NAMES[12] = 'Czech';
LANGUAGE_NAMES[13] = 'Danish';
LANGUAGE_NAMES[14] = 'Dutch';
LANGUAGE_NAMES[15] = 'English';
LANGUAGE_NAMES[16] = 'Estonian';
LANGUAGE_NAMES[17] = 'Filipino';
LANGUAGE_NAMES[18] = 'Finnish';
LANGUAGE_NAMES[19] = 'French';
LANGUAGE_NAMES[20] = 'Galician';
LANGUAGE_NAMES[21] = 'Georgian';
LANGUAGE_NAMES[22] = 'German';
LANGUAGE_NAMES[23] = 'Greek';
LANGUAGE_NAMES[24] = 'Haitian Creole';
LANGUAGE_NAMES[25] = 'Hebrew';
LANGUAGE_NAMES[26] = 'Hindi';
LANGUAGE_NAMES[27] = 'Hungarian';
LANGUAGE_NAMES[28] = 'Icelandic';
LANGUAGE_NAMES[29] = 'Indonesian';
LANGUAGE_NAMES[30] = 'Irish';
LANGUAGE_NAMES[31] = 'Italian';
LANGUAGE_NAMES[32] = 'Japanese';
LANGUAGE_NAMES[33] = 'Korean';
LANGUAGE_NAMES[34] = 'Latvian';
LANGUAGE_NAMES[35] = 'Lithuanian';
LANGUAGE_NAMES[36] = 'Macedonian';
LANGUAGE_NAMES[37] = 'Malay';
LANGUAGE_NAMES[38] = 'Maltese';
LANGUAGE_NAMES[39] = 'Norwegian';
LANGUAGE_NAMES[40] = 'Persian';
LANGUAGE_NAMES[41] = 'Polish';
LANGUAGE_NAMES[42] = 'Portuguese';
LANGUAGE_NAMES[43] = 'Romanian';
LANGUAGE_NAMES[44] = 'Russian';
LANGUAGE_NAMES[45] = 'Serbian';
LANGUAGE_NAMES[46] = 'Slovak';
LANGUAGE_NAMES[47] = 'Slovenian';
LANGUAGE_NAMES[48] = 'Spanish';
LANGUAGE_NAMES[49] = 'Swahili';
LANGUAGE_NAMES[50] = 'Swedish';
LANGUAGE_NAMES[51] = 'Thai';
LANGUAGE_NAMES[52] = 'Turkish';
LANGUAGE_NAMES[53] = 'Ukrainian';
LANGUAGE_NAMES[54] = 'Urdu';
LANGUAGE_NAMES[55] = 'Vietnamese';
LANGUAGE_NAMES[56] = 'Welsh';
LANGUAGE_NAMES[57] = 'Yiddish';
var LANGUAGE_CODES = new Array();
LANGUAGE_CODES[0] = 'af';
LANGUAGE_CODES[1] = 'sq';
LANGUAGE_CODES[2] = 'ar';
LANGUAGE_CODES[3] = 'hy';
LANGUAGE_CODES[4] = 'az';
LANGUAGE_CODES[5] = 'eu';
LANGUAGE_CODES[6] = 'be';
LANGUAGE_CODES[7] = 'bg';
LANGUAGE_CODES[8] = 'ca';
LANGUAGE_CODES[9] = 'zh-CN';
LANGUAGE_CODES[10] = 'zh-TW';
LANGUAGE_CODES[11] = 'hr';
LANGUAGE_CODES[12] = 'cs';
LANGUAGE_CODES[13] = 'da';
LANGUAGE_CODES[14] = 'nl';
LANGUAGE_CODES[15] = 'en';
LANGUAGE_CODES[16] = 'et';
LANGUAGE_CODES[17] = 'tl';
LANGUAGE_CODES[18] = 'fi';
LANGUAGE_CODES[19] = 'fr';
LANGUAGE_CODES[20] = 'gl';
LANGUAGE_CODES[21] = 'ka';
LANGUAGE_CODES[22] = 'de';
LANGUAGE_CODES[23] = 'el';
LANGUAGE_CODES[24] = 'ht';
LANGUAGE_CODES[25] = 'iw';
LANGUAGE_CODES[26] = 'hi';
LANGUAGE_CODES[27] = 'hu';
LANGUAGE_CODES[28] = 'is';
LANGUAGE_CODES[29] = 'id';
LANGUAGE_CODES[30] = 'ga';
LANGUAGE_CODES[31] = 'it';
LANGUAGE_CODES[32] = 'ja';
LANGUAGE_CODES[33] = 'ko';
LANGUAGE_CODES[34] = 'lv';
LANGUAGE_CODES[35] = 'lt';
LANGUAGE_CODES[36] = 'mk';
LANGUAGE_CODES[37] = 'ms';
LANGUAGE_CODES[38] = 'mt';
LANGUAGE_CODES[39] = 'no';
LANGUAGE_CODES[40] = 'fa';
LANGUAGE_CODES[41] = 'pl';
LANGUAGE_CODES[42] = 'pt';
LANGUAGE_CODES[43] = 'ro';
LANGUAGE_CODES[44] = 'ru';
LANGUAGE_CODES[45] = 'sr';
LANGUAGE_CODES[46] = 'sk';
LANGUAGE_CODES[47] = 'sl';
LANGUAGE_CODES[48] = 'es';
LANGUAGE_CODES[49] = 'sw';
LANGUAGE_CODES[50] = 'sv';
LANGUAGE_CODES[51] = 'th';
LANGUAGE_CODES[52] = 'tr';
LANGUAGE_CODES[53] = 'uk';
LANGUAGE_CODES[54] = 'ur';
LANGUAGE_CODES[55] = 'vi';
LANGUAGE_CODES[56] = 'cy';
LANGUAGE_CODES[57] = 'yi';
var DROP_LANGUAGES = new Array(15, 48, 32, 19, 22, 42, 31, 9, 44);
var CURRENT_URL = website_urlencode(document.location.href);
var GOOGLE_BASE = 'http://translate.google.com/translate?u=' + CURRENT_URL;
var GOOGLE_SRC_TAG = 'sl';
var GOOGLE_TRG_TAG = 'tl';
var POP_UP_WIDTH = 600;
var POP_UP_HEIGHT = 560;
var DROP_DOWN_WIDTH = 240;
var DROP_DOWN_SD_BRD = 4;
var BUTTON_HEIGHT = 16;
var DROP_DOWN_X_OFF = 0;
var DROP_DOWN_Y_OFF = 10;
var SRC_LANG = 'en';
if (typeof translate_src != 'undefined') {
    SRC_LANG = translate_src
}
var menu_show_timer = '';
var url_is_ok = true;
if (true) {
    if (!document.getElementById('messageBox')) {
        if (SRC_LANG == 'en') {
            document.write('<div id="messageBox" onmouseout="start_timer();" onmouseover="stop_timer();" style="z-index: 3000; border: 2px solid #777799; position: absolute; width: ' + DROP_DOWN_WIDTH + 'px; height: auto; background-color: #FFFFFF; background-image:url(' + IMAGE_FLAGS + 'drop_all_english.gif); background-repeat: no-repeat; background-position: 0px 18px; display: none;"><div id="website_contents" style="width: 100%; height: auto; margin: 0px; padding: 0px;"></div></div>')
        } else {
            document.write('<div id="messageBox" onmouseout="start_timer();" onmouseover="stop_timer();" style="z-index: 3000; border: 2px solid #777799; position: absolute; width: ' + DROP_DOWN_WIDTH + 'px; height: auto; background-color: #FFFFFF; display: none;"><div id="website_contents" style="width: 100%; height: auto; margin: 0px; padding: 0px;"></div></div>')
        }
    }
    if (!document.getElementById('pop_up_background')) {
        document.write('<div id="pop_up_background" onclick="return ClosePopWindow();" style="background-color: transparent; background-image: url(' + IMAGE_POP_UP + 'lightbox_overlay.png); display: none; position: absolute; top: 0px; left: 0px; z-index: 3001;">');
        document.write('</div>');
        document.write('<div id="pop_up_content" style="width: ' + POP_UP_WIDTH + 'px; height: ' + POP_UP_HEIGHT + 'px; background-color: #FFFFFF; display: block; z-index: 3002; display: none; position: absolute; font-family: Arial, Helvetica, sans-serif; font-size: 12px;">');
		
		document.write('<div style="margin:0; width: ' + POP_UP_WIDTH + 'px;">');
		document.write('<div style="float:left;height:38px;width:10px;background:url('+vir_path+'templates/modern/img/sidebar_title_left.png) no-repeat #3f5a08;"></div>');
		document.write('<div style="float:left;height:38px;width:' + (POP_UP_WIDTH - 19) + 'px;background:url('+vir_path+'templates/modern/img/sidebar_title_bg.jpg) repeat-x;">');
		 document.write('<a href="#" onclick="return ClosePopWindow();"><img src="' + IMAGE_POP_UP + 'close.png" style="border: none; float: right; margin-top: 5px; margin-right: 5px;" /></a>');
		 document.write('<h1 style="margin: 0px; padding: 5px; font-size: 18px; letter-spacing: 1px; color: #FFFFFF; font-weight:bold; text-align: left;">WEBSITE-TRANSLATION.COM</h1>');
		 document.write('</div>');
		document.write('<div style="float:left;height:38px;width:9px;background:url('+vir_path+'templates/modern/img/sidebar_title_right.png) no-repeat #3f5a08;"></div>');
		document.write('</div>');
		document.write('<div style="clear:both;"></div>');
		
        document.write('<div style="margin: 0; padding: 0; width: ' + POP_UP_WIDTH + 'px;">');
        document.write('<p style="color: #000000; margin-left: 5px; padding: 0; text-align: left;">Translate Into:</p>');
        document.write('<div style="height: 445px; margin: 0; overflow: auto; padding-left: 10px; width: ' + (POP_UP_WIDTH - 10) + 'px;">');
        document.write('<table width="100%" style="border: 0; margin: 0; padding: 0;">');
        document.write('<tbody style="border: 0; margin: 0; padding: 0;">');
        for (var i = 0; i < LANGUAGE_NAMES.length; i++) {
            if (SRC_LANG == LANGUAGE_CODES[i]) {
                if ((i + 1) < LANGUAGE_NAMES.length) {
                    i++
                } else {
                    continue
                }
            }
            var url = GOOGLE_BASE + '&' + GOOGLE_SRC_TAG + '=' + SRC_LANG + '&' + GOOGLE_TRG_TAG + '=' + LANGUAGE_CODES[i];
            document.write('<tr style="border: 0; margin: 0; padding: 0;">');
            document.write('<td onclick="GoogleRedirect(\'' + url + '\')" onmouseout="this.style.backgroundColor=\'#FFFFFF\'" onmouseover="this.style.backgroundColor=\'#e5f9bd\'" style="background-color: #FFFFFF; border: 0; color: #000000; cursor: pointer; margin: 0; padding: 2px; text-align: left;"><img src="' + IMAGE_FLAGS + LANGUAGE_CODES[i] + '.gif" style="vertical-align: middle;">&nbsp;' + LANGUAGE_NAMES[i] + '</td>');
            if ((i + 1) < LANGUAGE_NAMES.length) {
                i++;
                if (SRC_LANG == LANGUAGE_CODES[i]) {
                    if ((i + 1) < LANGUAGE_NAMES.length) {
                        i++
                    } else {
                        continue
                    }
                }
                url = GOOGLE_BASE + '&' + GOOGLE_SRC_TAG + '=' + SRC_LANG + '&' + GOOGLE_TRG_TAG + '=' + LANGUAGE_CODES[i];
                document.write('<td onclick="GoogleRedirect(\'' + url + '\')" onmouseout="this.style.backgroundColor=\'#FFFFFF\'" onmouseover="this.style.backgroundColor=\'#e5f9bd\'" style="background-color: #FFFFFF; border: 0; color: #000000; cursor: pointer; margin: 0; padding: 2px; text-align: left;"><img src="' + IMAGE_FLAGS + LANGUAGE_CODES[i] + '.gif" style="vertical-align: middle;">&nbsp;' + LANGUAGE_NAMES[i] + '</td>')
            } else {
                document.write('<td style="background-color: #FFFFFF; border: 0; color: #000000; cursor: pointer; margin: 0; padding: 2px; text-align: left;">&nbsp;</td>')
            }
            if ((i + 1) < LANGUAGE_NAMES.length) {
                i++;
                if (SRC_LANG == LANGUAGE_CODES[i]) {
                    if ((i + 1) < LANGUAGE_NAMES.length) {
                        i++
                    } else {
                        continue
                    }
                }
                url = GOOGLE_BASE + '&' + GOOGLE_SRC_TAG + '=' + SRC_LANG + '&' + GOOGLE_TRG_TAG + '=' + LANGUAGE_CODES[i];
                document.write('<td onclick="GoogleRedirect(\'' + url + '\')" onmouseout="this.style.backgroundColor=\'#FFFFFF\'" onmouseover="this.style.backgroundColor=\'#e5f9bd\'" style="background-color: #FFFFFF; border: 0; color: #000000; cursor: pointer; margin: 0; padding: 2px; text-align: left;"><img src="' + IMAGE_FLAGS + LANGUAGE_CODES[i] + '.gif" style="vertical-align: middle;">&nbsp;' + LANGUAGE_NAMES[i] + '</td>')
            } else {
                document.write('<td style="background-color: #FFFFFF; border: 0; color: #000000; cursor: pointer; margin: 0; padding: 2px; text-align: left;">&nbsp;</td>')
            }
            if ((i + 1) < LANGUAGE_NAMES.length) {
                i++;
                if (SRC_LANG == LANGUAGE_CODES[i]) {
                    if ((i + 1) < LANGUAGE_NAMES.length) {
                        i++
                    } else {
                        continue
                    }
                }
                url = GOOGLE_BASE + '&' + GOOGLE_SRC_TAG + '=' + SRC_LANG + '&' + GOOGLE_TRG_TAG + '=' + LANGUAGE_CODES[i];
                document.write('<td onclick="GoogleRedirect(\'' + url + '\')" onmouseout="this.style.backgroundColor=\'#FFFFFF\'" onmouseover="this.style.backgroundColor=\'#e5f9bd\'" style="background-color: #FFFFFF; border: 0; color: #000000; cursor: pointer; margin: 0; padding: 2px; text-align: left;"><img src="' + IMAGE_FLAGS + LANGUAGE_CODES[i] + '.gif" style="vertical-align: middle;">&nbsp;' + LANGUAGE_NAMES[i] + '</td>')
            } else {
                document.write('<td style="background-color: #FFFFFF; border: 0; color: #000000; cursor: pointer; margin: 0; padding: 2px; text-align: left;">&nbsp;</td>')
            }
            document.write('</tr>')
        }
        document.write('</tbody>');
        document.write('</table>');
        document.write('</div>');
        document.write('<div style="margin: 9px;">');
        document.write('<p style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-left: 5px; padding: 0; text-align: right;">');
        document.write('<a href="'+vir_path+'get-your-button" style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-align: right;">Get Your Button</a>');
        document.write('</p>');
		
         

        document.write('</div>');
        document.write('</div>');
        document.write('</div>')
    }
    if (typeof old_onload == 'undefined') {
        var old_onload = '';
        if (typeof window.onload != 'function') {
            window.onload = websiteOnload
        } else {
            old_onload = window.onload;
            window.onload = function () {
                if (old_onload) {
                    old_onload()
                }
                websiteOnload()
            }
        }
        if (!old_onload) {
            old_onload = ''
        }
    }
}
function websiteOnload() {
    document.body.appendChild(document.getElementById('messageBox'));
    document.body.appendChild(document.getElementById('pop_up_background'));
    document.body.appendChild(document.getElementById('pop_up_content'));
    if (typeof a == 'undefined') {
        var a = '';
        styleButtons()
    }
    if (window.top !== window.self) {
        window.top.location = window.self.location
    }
    if (typeof b == 'undefined') {
        var b = '';
        if (typeof _tipon == 'function') {
            _tipon = function () {
                return false
            }
        }
    }
    if (typeof c == 'undefined') {
        var c = '';
        if (typeof _tipoff == 'function') {
            _tipoff = function () {
                return false
            }
        }
    }
}
function website_urlencode(a) {
    a = escape(a);
    return a
}
function showDropDown(a) {
    document.getElementById("website_contents").innerHTML = "<div style=\"width: 230px; padding-left:10px; padding-top:2px; font: 12px Arial, Helvetica, sans-serif; font-weight:normal; font-style:normal; float:left; text-align:left; color:black; background-color:#EEEEEE; \">Select a target language:</div>";
    for (i = 0; i < DROP_LANGUAGES.length; i++) {
        if (SRC_LANG != LANGUAGE_CODES[DROP_LANGUAGES[i]]) {
            var b = GOOGLE_BASE + '&' + GOOGLE_SRC_TAG + '=' + SRC_LANG + '&' + GOOGLE_TRG_TAG + '=' + LANGUAGE_CODES[DROP_LANGUAGES[i]];
            if (SRC_LANG == 'en') {
                document.getElementById("website_contents").innerHTML += "<div id=\"link_list\" onclick=\"GoogleRedirect(\'" + b + "\')\" onmouseover=\"style.backgroundColor = '#B5B8FF';\" onmouseout=\"style.backgroundColor = 'transparent';\" style=\"cursor: pointer; width: 94px; height:15px; margin-top:6px; margin-left: 24px; margin-right: 2px; display: inline; float: left; text-align: left; font: 11px Arial, Helvetica, sans-serif; font-weight: normal; font-style: normal; color: black; \">&nbsp;" + LANGUAGE_NAMES[DROP_LANGUAGES[i]] + "</div>"
            } else {
                document.getElementById("website_contents").innerHTML += "<div id=\"link_list\" onclick=\"GoogleRedirect(\'" + b + "\')\" onmouseover=\"style.backgroundColor='#B5B8FF';\" onmouseout=\"style.backgroundColor='#FFFFFF'\" style=\"cursor: pointer; margin-top: 5px; float: left; text-align: left; width: 49%; height: 16px; font-size: 11px; font-family: Arial; font-weight: normal; font-style: normal; color: black; padding-left: 2px;\"><img src=\"" + IMAGE_FLAGS + LANGUAGE_CODES[DROP_LANGUAGES[i]] + ".gif\" style=\"vertical-align:top;\" />&nbsp;" + LANGUAGE_NAMES[DROP_LANGUAGES[i]] + "</div>"
            }
        }
    }
    document.getElementById("website_contents").innerHTML += "<div id=\"link_list\" onclick=\"showPopWindow()\" onmouseover=\"style.backgroundColor='#B5B8FF';\" onmouseout=\"style.backgroundColor='#FFFFFF'\" style=\"cursor:pointer; margin-top:5px; float:left; text-align:left; width:49%; height:16px; font: 11px Arial, Helvetica, sans-serif; font-weight: normal; font-style: normal; color: black; padding-left:2px;\"> >> More...</div>";
    document.getElementById("website_contents").innerHTML += "<div style=\"width: 95%; padding-left: 10px; margin-top: 4px; font: 10px Arial, Helvetica, sans-serif; font-weight: normal; font-style: normal; float: left; color: black; background-color: #EEEEEE; text-align:right; \">powered by <a href=\"http://www.website-translation.com\"><span style=\"text-decoration: underline; color: #0000EE;\">WEBSITE-TRANSLATION.COM</span></a>&nbsp;</div>";
    var c = getAbsolutePosition(a);
    document.getElementById("messageBox").style.display = 'block';
    var d = document.getElementById('messageBox').offsetHeight;
    document.getElementById("messageBox").style.display = 'none';
    if ((c.y + BUTTON_HEIGHT + DROP_DOWN_Y_OFF + d + DROP_DOWN_SD_BRD) > (getViewportHeight() + getScrollTop() - getScrollBarWidth())) {
        document.getElementById("messageBox").style.top = (c.y - DROP_DOWN_Y_OFF - d) + 'px'
    } else {
        document.getElementById("messageBox").style.top = (c.y + BUTTON_HEIGHT + DROP_DOWN_Y_OFF) + 'px'
    }
    if ((c.x + DROP_DOWN_X_OFF + DROP_DOWN_WIDTH + DROP_DOWN_SD_BRD) > (getViewportWidth() + getScrollLeft() - getScrollBarWidth())) {
        document.getElementById("messageBox").style.left = (getViewportWidth() + getScrollLeft() - DROP_DOWN_WIDTH - DROP_DOWN_SD_BRD - getScrollBarWidth()) + 'px'
    } else {
        document.getElementById("messageBox").style.left = (c.x + DROP_DOWN_X_OFF) + 'px'
    }
    document.getElementById("messageBox").style.display = "block";
    stop_timer()
}
function showPopWindow() {
    var a = (getViewportHeight() / 2) - (POP_UP_HEIGHT / 2) + getScrollTop();
    if (a < 0) {
        a = 0
    }
    var b = (getViewportWidth() / 2) - (POP_UP_WIDTH / 2) + getScrollLeft();
    if (b < 0) {
        b = 0
    }
    var c = coverWholePage();
    var d = c[1];
    var e = c[0];
    document.getElementById('pop_up_content').style.display = 'block';
    document.getElementById('pop_up_content').style.top = a + 'px';
    document.getElementById('pop_up_content').style.left = b + 'px';
    document.getElementById('pop_up_background').style.height = d + 'px';
    document.getElementById('pop_up_background').style.width = e + 'px';
    document.getElementById('pop_up_background').style.display = 'block';
    return false
}
function ClosePopWindow() {
    document.getElementById('pop_up_background').style.display = 'none';
    document.getElementById('pop_up_content').style.display = 'none';
    return false
}
function GoogleRedirect(a) {
    window.location = a
}
function close_menu() {
    document.getElementById('messageBox').style.display = 'none';
    if (typeof menu_show_timer != 'undefined') {
        clearTimeout(menu_show_timer)
    }
}
function start_timer() {
    menu_show_timer = setTimeout('close_menu()', MENU_SHOW_TIME)
}
function stop_timer() {
    if (typeof menu_show_timer != 'undefined') {
        clearTimeout(menu_show_timer)
    }
}
function getAbsolutePosition(a) {
    var b = {
        x: a.offsetLeft,
        y: a.offsetTop
    };
    if (a.offsetParent) {
        var c = getAbsolutePosition(a.offsetParent);
        b.x += c.x;
        b.y += c.y
    }
    return b
}
function getViewportWidth() {
    if (typeof(window.innerWidth) == "number") {
        return window.innerWidth
    } else {
        if (document.documentElement && document.documentElement.clientWidth) {
            return document.documentElement.clientWidth
        } else {
            if (document.body && document.body.clientWidth) {
                return document.body.clientWidth
            } else {
                return 0
            }
        }
    }
}
function getViewportHeight() {
    if (typeof(window.innerHeight) == "number") {
        return window.innerHeight
    } else {
        if (document.documentElement && document.documentElement.clientHeight) {
            return document.documentElement.clientHeight
        } else {
            if (document.body && document.body.clientHeight) {
                return document.body.clientHeight
            } else {
                return 0
            }
        }
    }
}
function getScrollTop() {
    if (typeof(window.pageYOffset) == "number") {
        return window.pageYOffset
    } else {
        if (document.body && document.body.scrollTop) {
            return document.body.scrollTop
        } else {
            if (document.documentElement && document.documentElement.scrollTop) {
                return document.documentElement.scrollTop
            } else {
                return 0
            }
        }
    }
}
function getScrollLeft() {
    if (typeof(window.pageXOffset) == "number") {
        return window.pageXOffset
    } else {
        if (document.body && document.body.scrollLeft) {
            return document.body.scrollLeft
        } else {
            if (document.documentElement && document.documentElement.scrollLeft) {
                return document.documentElement.scrollLeft
            } else {
                return 0
            }
        }
    }
}
function getScrollBarWidth() {
    var a = document.createElement('p');
    a.style.width = "100%";
    a.style.height = "200px";
    var b = document.createElement('div');
    b.style.position = "absolute";
    b.style.top = "0px";
    b.style.left = "0px";
    b.style.visibility = "hidden";
    b.style.width = "200px";
    b.style.height = "150px";
    b.style.overflow = "hidden";
    b.appendChild(a);
    document.body.appendChild(b);
    var c = a.offsetWidth;
    b.style.overflow = 'scroll';
    var d = a.offsetWidth;
    if (c == d) d = b.clientWidth;
    document.body.removeChild(b);
    return (c - d)
}
function styleButtons() 
{
    var b = new Array();
    b = document.getElementsByTagName('div');
    for (var i = 0; i < b.length; i++) {
        if (b[i].className == 'translate') {
            b[i].style.height = '16px';
            b[i].style.font = '13px Helvetica, Arial, \'Liberation Sans\', FreeSans,sans-serif';
            var c = new Array();
            c = b[i].getElementsByTagName('A');
            for (var j = 0; j < c.length; j++) {
                if (c[j].className == 'translate_drop') {
                    c[j].style.cssFloat = 'left';
                    c[j].style.styleFloat = 'left';
                    c[j].style.padding = '0 2px';
                    c[j].style.color = '#115BB5';
                    c[j].style.textDecoration = 'none';
                    c[j].onmouseover = function () {
                        showDropDown(this)
                    };
                    c[j].onmouseout = function () {
                        start_timer()
                    };
                    c[j].onclick = function () {
                        return showPopWindow()
                    }
                } else if (c[j].className == 'translate_no_drop') {
                    c[j].style.cssFloat = 'left';
                    c[j].style.styleFloat = 'left';
                    c[j].style.color = '#115BB5';
                    c[j].style.textDecoration = 'none'
                }
            }
            var d = new Array();
            d = b[i].getElementsByTagName('SPAN');
            for (var j = 0; j < d.length; j++) {
                if (d[j].className == 'translate_left_image') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'four_flag.gif) no-repeat';
                    d[j].style.marginRight = '4px';
                    d[j].style.display = 'block';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.height = '16px';
                    d[j].style.width = '15px';
                    d[j].style.textIndent = '-9999px'
                } else if (d[j].className == 'translate_seperator') {
                    d[j].style.lineHeight = '13px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.display = 'inline';
                    d[j].style.margin = '0 1px'
                } else if (d[j].className == 'translate_image_english') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'four_flag.gif) no-repeat -15px 0';
                    d[j].style.display = 'block';
                    d[j].style.height = '16px';
                    d[j].style.width = '22px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '0 2px';
                    d[j].onclick = function () {
                        var a = GOOGLE_BASE + '&' + GOOGLE_SRC_TAG + '=' + SRC_LANG + '&' + GOOGLE_TRG_TAG + '=en';
                        GoogleRedirect(a);
                        return false
                    }
                } else if (d[j].className == 'translate_image_spanish') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'four_flag.gif) no-repeat -37px 0';
                    d[j].style.display = 'block';
                    d[j].style.height = '16px';
                    d[j].style.width = '22px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '0 2px';
                    d[j].onclick = function () {
                        var a = GOOGLE_BASE + '&' + GOOGLE_SRC_TAG + '=' + SRC_LANG + '&' + GOOGLE_TRG_TAG + '=es';
                        GoogleRedirect(a);
                        return false
                    }
                } else if (d[j].className == 'translate_image_german') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'four_flag.gif) no-repeat -59px 0';
                    d[j].style.display = 'block';
                    d[j].style.height = '16px';
                    d[j].style.width = '22px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '0 2px';
                    d[j].onclick = function () {
                        var a = GOOGLE_BASE + '&' + GOOGLE_SRC_TAG + '=' + SRC_LANG + '&' + GOOGLE_TRG_TAG + '=de';
                        GoogleRedirect(a);
                        return false
                    }
                } else if (d[j].className == 'translate_image_chinese') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'four_flag.gif) no-repeat -81px 0';
                    d[j].style.display = 'block';
                    d[j].style.height = '16px';
                    d[j].style.width = '22px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '0 2px';
                    d[j].onclick = function () {
                        var a = GOOGLE_BASE + '&' + GOOGLE_SRC_TAG + '=' + SRC_LANG + '&' + GOOGLE_TRG_TAG + '=zh-CN';
                        GoogleRedirect(a);
                        return false
                    }
                } else if (d[j].className == 'translate_image_japanese') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'four_flag.gif) no-repeat -103px 0';
                    d[j].style.display = 'block';
                    d[j].style.height = '16px';
                    d[j].style.width = '22px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '0 2px';
                    d[j].onclick = function () {
                        var a = GOOGLE_BASE + '&' + GOOGLE_SRC_TAG + '=' + SRC_LANG + '&' + GOOGLE_TRG_TAG + '=ja';
                        GoogleRedirect(a);
                        return false
                    }
                } else if (d[j].className == 'translate_button_1') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'buttons.gif) no-repeat 0 0';
                    d[j].style.display = 'block';
                    d[j].style.height = '23px';
                    d[j].style.width = '150px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '-4px 0 0 0'
                } else if (d[j].className == 'translate_button_2') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'buttons.gif) no-repeat -150px 0';
                    d[j].style.display = 'block';
                    d[j].style.height = '23px';
                    d[j].style.width = '190px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '0 2px'
                } else if (d[j].className == 'translate_button_3') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'buttons.gif) no-repeat -339px 0';
                    d[j].style.display = 'block';
                    d[j].style.height = '23px';
                    d[j].style.width = '100px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '-4px 0 0 0'
                    d[j].onclick = function () {
                        return showPopWindow()
                    }
                } else if (d[j].className == 'translate_button_4') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'buttons.gif) no-repeat 0 -23px';
                    d[j].style.display = 'block';
                    d[j].style.height = '23px';
                    d[j].style.width = '150px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '-4px 0 0 0'
                } else if (d[j].className == 'translate_button_5') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'buttons.gif) no-repeat -150px -23px';
                    d[j].style.display = 'block';
                    d[j].style.height = '23px';
                    d[j].style.width = '190px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '-4px 0 0 0'
                } else if (d[j].className == 'translate_button_6') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'buttons.gif) no-repeat -339px -23px';
                    d[j].style.display = 'block';
                    d[j].style.height = '23px';
                    d[j].style.width = '100px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '-4px 0 0 0'
                    d[j].onclick = function () {
                        return showPopWindow()
                    }
                } else if (d[j].className == 'translate_button_7') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'buttons.gif) no-repeat -339px -46px';
                    d[j].style.display = 'block';
                    d[j].style.height = '23px';
                    d[j].style.width = '100px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '-4px 0 0 0'
                    d[j].onclick = function () {
                        return showPopWindow()
                    }
                } else if (d[j].className == 'translate_button_8') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'buttons.gif) no-repeat -339px -69px';
                    d[j].style.display = 'block';
                    d[j].style.height = '23px';
                    d[j].style.width = '100px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '-4px 0 0 0'
                    d[j].onclick = function () {
                        return showPopWindow()
                    }
                } else if (d[j].className == 'translate_button_9') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'buttons.gif) no-repeat 0 -46px';
                    d[j].style.display = 'block';
                    d[j].style.height = '23px';
                    d[j].style.width = '150px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '-4px 0 0 0'
                } else if (d[j].className == 'translate_button_10') {
                    d[j].style.background = 'url(' + IMAGE_BUTTONS + 'buttons.gif) no-repeat -150px -46px';
                    d[j].style.display = 'block';
                    d[j].style.height = '23px';
                    d[j].style.width = '190px';
                    d[j].style.textIndent = '-9999px';
                    d[j].style.cssFloat = 'left';
                    d[j].style.styleFloat = 'left';
                    d[j].style.margin = '-4px 0 0 0'
                }
            }
        }
    }
}
function showErrors(a) 
{
    var b = false;
    var c = new Array();
    c = document.getElementsByTagName('div');
    for (var i = 0; i < c.length; i++) {
        if (c[i].className == 'translate') {
            c[i].innerHTML = a;
            b = true
        }
    }
    if (!b) {
        document.write(a)
    }
}
function coverWholePage() 
{
    var a = getViewportWidth() + document.documentElement.scrollWidth - document.documentElement.clientWidth;
    var b = getViewportHeight() + document.documentElement.scrollHeight - document.documentElement.clientHeight;
    if (navigator.appVersion.indexOf('MSIE') == -1) {
        if (document.documentElement.scrollWidth > document.documentElement.clientWidth) {
            b -= getScrollBarWidth()
        }
        if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
            a -= getScrollBarWidth()
        }
    }
    var c = new Array(a, b);
    return c
}
