function gebi(id){
	return document.getElementById(id)
}

function getCoords(obj){
	var o=typeof(obj) == 'string' ? gebi(obj) : obj
	var ret={'l':o.offsetLeft,'t':o.offsetTop,'w':o.offsetWidth,'h':o.offsetHeight}
	while(o=o.offsetParent){
		ret.l+=o.offsetLeft
		ret.t+=o.offsetTop
	}
	return ret
}

function helpAlt(obj, evnt, show) {
	var div = gebi(obj.getAttribute('div_id'));
	if (!div) return;
	var act1 = obj.getAttribute('act1');
	var act2 = obj.getAttribute('act2');
	if (show == 2) {
		document.onmousemove=function(e) {helpAlt(obj, e||event, 1)}
		div.style.display = 'block';
	}
	if (!show) {
		div.style.display = 'none';
		document.onmousemove=function(){}
		return;
	}

	var ex = evnt.clientX + document.body.scrollLeft;
	var ey = evnt.clientY + document.body.scrollTop;

	var x = evnt.clientX + div.offsetWidth > document.body.clientWidth - 7 ? ex - div.offsetWidth - 10 : ex + 10;
	var y = evnt.clientY + div.offsetHeight > document.body.clientHeight - 7 ? ey - div.offsetHeight - 10 : ey + 10;

	if (x < 0 ) {
		x = ex - div.offsetWidth/2
	}
	if (x < 7 ) {
		x = 7
	}
	if (x > document.body.clientWidth - div.offsetWidth - 7) {
		x= document.body.clientWidth - div.offsetWidth - 7
	}

	div.style.left = x;
	div.style.top = y;
}

getEShop = function () {
    var shops = new Array(
        'http://razminka.com.ua',
        'http://prival.net.ua',
        'http://andreich.com.ua',
        'http://sadko.kiev.ua',
        'http://activerest.com.ua',
        'http://pabos.com.ua',
        'http://picnic.in.ua',
        'http://fotomag.com.ua',
        'http://rozetka.com.ua',
        'http://insport.com.ua',
        'http://donsport.com.ua',
        'http://autosezon.ua',
        'http://plavniki.com.ua',
        'http://emaxi.com.ua',
        'http://uavto.com.ua'
    );

    var links = '<div>';

    for (var i = 0; i < shops.length; i++) {
        links += '<a href="' + shops[i] + '" target="_blanc">' + shops[i] + '</a>';

        if (i < shops.length - 1) {
            links += '<br />';
        }
    }

    links += '</div>';

    document.write(links);
}
