﻿
function swithText(id, text, color)
{
    if (document.getElementById(id).value == '' || document.getElementById(id).value == text) {
        document.getElementById(id).value = '';
        document.getElementById(id).style.color = color;
    }
    else {
        document.getElementById(id).value = text;
	    document.getElementById(id).style.color = color;
    }
}



function showHide(id) {
    var element = document.getElementById(id);
    element.style.display = (element.style.display == 'none') ? '' : 'none';
}


var popUpWin = 0;
function OpenWindow(URL, winName, width, height) {
    if (popUpWin) {
        if (!popUpWin.closed) popUpWin.close();
    }

    if (parseInt(navigator.appVersion) >= 3) {
        if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5) {
            var tools = new Packages.java.awt.Toolkit.getDefaultToolkit();
            screen = tools.getScreenSize();
        }
        x = screen.width;
        y = screen.height;
    }
    popUpWin = open(URL, winName, 'top=' + parseInt(y / 2 - height / 2 - 16) + ',left=' + parseInt(x / 2 - width / 2 - 5) + ',width=' + width + ',height=' + height + ',scrollbars=yes,resizable=yes');
    popUpWin.focus();
}

