﻿function $(name) {
    return document.getElementById(name);
}
function px(num) {
    return num + "px";
}
var xmlHttp;
function CreatexmlHttpRequest() {
    if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if (window.XMLHttpRequest) {
        xmlHttp = new XMLHttpRequest();
    }
}
function changeTitleColor(setting) {

    var x;
    if (setting.parentNode.parentNode.style.backgroundPositionY == "undefined" || setting.parentNode.parentNode.style.backgroundPositionY == null)
        x = setting.parentNode.parentNode.style.backgroundPosition.split(' ')[1].replace("px", "");
    else
        x = setting.parentNode.parentNode.style.backgroundPositionY.replace("px", "");

    var yPos = x / 27;

    if (yPos != -9)
        yPos = (yPos - 1) * 27
    else
        yPos = 0;

    var pos = yPos + "px";

    if (setting.parentNode.parentNode.style.backgroundPositionY == "undefined" || setting.parentNode.parentNode.style.backgroundPositionY == null)
        setting.parentNode.parentNode.style.backgroundPosition = "0px " + pos;
    else
        setting.parentNode.parentNode.style.backgroundPositionY = pos;

}
var addPrcess = false;
function dn(id) {
    $(id).style.display = "none";
}
function dd(id) {
    $(id).style.display = "";
}