function check_wish_form(form)
    {
        if (form.username.value == 'введите имя' || form.username.value.length == 0) 
        {
            alert('Введите Ваше имя'); 
            return false;
        }
        if (!form.usermail.value.match (/^[0-9a-z_]+@[0-9a-z\-_^.]+\.[a-z]{2,3}$/i)) 
        {
            alert('Укажите Ваш email'); 
            return false;
        } 
        if (form.usertext.value == 'введите сообщение' || form.usertext.value.length == 0) 
        {
            alert('Введите Ваше сообщение'); 
            return false;
        }
        if (form.code.value == 'введите код подтверждения' || form.code.value.length == 0) 
        {
            alert('Введите код подтверждения'); 
            return false;
        }
        return true;
    }

function process_copyright (id, data)
{
	data['rel'] = 'nofollow';
	data['target'] = '_blank';

	var elem = document.getElementById (id);
	var text = '<' + 'a';

	for (var i in data)
		text += ' ' + i + '="' + data[i] + '"';
	text += '>' + elem.innerHTML + '<' + '/' + 'a>';

	elem.innerHTML = text;
}

function cTip()
{
	var box=false, p;

	function where (obj) {
		var pos = {
			x: obj.offsetLeft,
			y: obj.offsetTop
		};
	
		while (obj = obj.offsetParent) {
			pos.x += obj.offsetLeft;
			pos.y += obj.offsetTop;
	   	}
	
		return pos;
	}

	function init()
	{
		box = document.body.appendChild(document.createElement('div'));
		box.id = 'tip';		
		box.style.zIndex='10000';
		box.innerHTML='<div><em><b></b><i></i><span></span></em><ul><li><p></p></li></ul><span><b></b><i></i><em></em></span></div>';
		p = box.getElementsByTagName('p')[0];
		box.style.display='none';
	}

	this.show = function(obj, txt)
	{
		if(!box) init();
		
		p.innerHTML = txt ? txt : obj.alt;
		var pos = where(obj);
		box.style.left = parseInt(pos.x) + 'px';		
		box.style.display = '';
		box.style.top = parseInt(pos.y - box.offsetHeight + 22) + 'px';
		
		if(!obj.onmouseout)
			obj.onmouseout=hide;
	}

	function hide()
	{
		box.style.display='none';
	}
}