function enlarge(m,f){
	ShowPic = window.open("/view/image.php?mode=" + m + "&img=" + f, "ShowPic","resizable=no,screenX=16,screenY=16,titlebar=no,width=512,height=128");
	ShowPic.focus();
};

function str_replace(form_id){
	var f = document.getElementById(form_id);
	var q = f.q;

	var b = function(){
		if (q.value == ''){
			q.value = init_str;
		};
	};
	var f = function(){
		if (q.value == init_str){
			q.value = '';
		};
	};
	q.onfocus = f;
	q.onblur = b;
	q.style.cssText = '';
	q.className = 'query';
}

function toggle_month(month, p1, p2){
	$('#calendar').load('/cal/load_month.php?month=' + month + '&amp;p1=' + p1 + '&amp;p2=' + p2);
}

function counter(count, type){
	if (count){
		document.write('<a href="http://www.liveinternet.ru/click" target="_blank" rel="nofollow"><img'+
		' src="http://counter.yadro.ru/hit?t'+type+';r'+escape(document.referrer)+((typeof(screen)=="undefined")?"":
		";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
		";"+Math.random()+'" alt="" title="LiveInternet" class="translucent" onmouseover="this.className=\'\';" onmouseout="this.className=\'translucent\';" /><\/a>')
	}else{
		document.write('<img src="http://counter.yadro.ru/logo?'+type+'" alt="" title="LiveInternet" class="translucent"'+
		' onmouseover="this.className=\'\';" onmouseout="this.className=\'translucent\';" />')
	}
}

function mail_address(){
	var login  = 'order';
	var server = 'benefice.com.ua';
	var email  = login+'@'+server;
	var url = 'mailto:'+email;
	document.write('<a href="'+url+'">'+email+'</a>');
}

function order_page(id){
	document.getElementById('event_id').value = id;
	document.getElementById('to_order_form').submit();
}


function advert_1() {
	google_ad_client = "pub-2833484579122849";
	google_ad_width = 160;
	google_ad_height = 600;
	google_ad_format = "160x600_as";
	google_ad_type = "text_image";
	google_ad_channel = "";
	google_color_border = "ffffff";
	google_color_bg = "ffffff";
	google_color_link = "e06100";
	google_color_url = "0c803d";
	google_color_text = "52504d";
	document.write('<div id="advert_1"><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>');
}

