window.onload = function (){
	document.forms['header-search']['q'].onfocus = function(){ if (this.value=='Поиск по сайту') this.value=''; }
	document.forms['header-search']['q'].onblur = function(){ if (this.value=='') this.value='Поиск по сайту'; }

	document.forms['subscription']['text'].onfocus = function(){ if (this.value=='ваш e-mail') this.value=''; }
	document.forms['subscription']['text'].onblur = function(){ if (this.value=='') this.value='ваш e-mail'; }

	document.forms['comment']['name'].onfocus = function(){ if (this.value=='Ваше имя') this.value=''; }
	document.forms['comment']['name'].onblur = function(){ if (this.value=='') this.value='Ваше имя'; }

	document.forms['comment']['text'].onfocus = function(){ if (this.value=='Текст комментария') this.value=''; }
	document.forms['comment']['text'].onblur = function(){ if (this.value=='') this.value='Текст комментария'; }
	
	document.forms['comment']['cpc'].onfocus = function(){ if (this.value=='Код с картинки справа') this.value=''; }
	document.forms['comment']['cpc'].onblur = function(){ if (this.value=='') this.value='Код с картинки справа'; }
}

var winSubscribe = null;

function subscribeWin( f ) {
    f.elements.email.value = f.elements.text.value;
    f.elements.text.value = '';
    if ( winSubscribe && ! winSubscribe.closed ) winSubscribe.close();
    winSubscribe = window.open('', 'subscribe', 'resizable=yes,menubar=no,status=no,scrollbars=yes,width=730,height=470' );
    winSubscribe.focus();
    return true;
}