function addPartnerLinks() {
    if(document.createElement){
        var textLink = document.createElement("a");
        textLink.setAttribute("href","/partners/");
        textLink.appendChild(document.createTextNode("Для партнеров"));

        var imgLink = document.createElement("a");
        imgLink.setAttribute("href","/partners/");
        var img = document.createElement("img");
        img.setAttribute("src","6.gif");
		img.setAttribute("border","0");
        imgLink.appendChild(img);
        
        var tLinkCont = document.getElementById("pTextLink");
        var tImgCont = document.getElementById("pImgLink");
        tLinkCont.appendChild(textLink);
        tImgCont.appendChild(imgLink);
    }
}

function checkCookies(){
    // Read the cookie property. This returns all cookies for this document.
    var allcookies = document.cookie;
    // Look for the start of the cookie named "nl"
//alert(allcookies);
    var pos = allcookies.indexOf("nl=");
    // If we find a cookie by that name, extract and use its value
    if (pos != -1) {
/*
        var start = pos + 3;                       // Start of cookie value
        var end = allcookies.indexOf(";", start);  // End of cookie value
        if (end == -1) end = allcookies.length;
        var value = allcookies.substring(start, end);  // Extract the value
        value = unescape(value);                       // Decode it
        window.alert(value);
*/
        return true;
    } else return false;
}

function checkPartner(){
    if (checkCookies()) addPartnerLinks();
}
