function size(){
	//alert(document.body.clientWidth);
	var W = document.body.clientWidth;
	/*var nWidth = "988";
	if(W > nWidth){
		document.getElementById('base').style.width = nWidth + "px";
	}else{
		document.getElementById('base').style.width = "100%";
	}*/
	window.status = document.body.clientWidth + "x" + document.body.clientHeight;
}

function PrintVersion(){
	if (document.print_form){
		PR=window.open("","wndPrint","alwaysRaised=yes,left=0,top=0,height=500,width=730,menubar=yes,toolbar=yes,resizable=yes,status=yes,scrollbars=yes");
		document.print_form.submit();

	}else{
		alert("No print version for this page!");
	}

}
//		for SEARCH -------------------------------------------------
function SEARCH(){
	if(document.search.keywords.value != "Пошук по сайту"){
		document.search.submit();
	}else{
		alert("Введіть слово для пошуку")
	}
}

function sSearch(lang){
var error	= Array();
	error['ukr'] = "Введіть слова для пошуку";
	error['rus'] = "Ввседите слова для поиска";
	error['eng'] = "Enter search words";

var text	= Array();
	text["ukr"]	= "пошук";
	text["rus"] = "поиск";
	text["eng"] = "search";

	if(document.srch.search_words.value == '' || document.srch.search_words.value  == text[lang]){
		alert(error[lang]);
		return false;
	}else{
		document.srch.submit();
	}
}

//		/for SEARCH -------------------------------------------------


//		MENU	------------------------------------------------------------------------------
var iMenu = new Array();
//var iMenu;
function Menu(flag,id){
	//alert('fsdfsdfds');
	switch(flag){
		case "show":
			clearInterval(iMenu[id]);
			document.getElementById(id).style.visibility='visible';
			//Links('start');
			break;
		case "hide":
			document.getElementById(id).style.visibility='hidden';
			
			break;
		case "start":
			clearInterval(iMenu[id]);
			iMenu[id] = setInterval("Menu('hide','"+id+"')", 300);
			break;
		case "stop":
			clearInterval(iMenu[id]);
			break;
	}

}
//		/MENU	------------------------------------------------------------------------------

function printDate(){
	var d = new Date();
	var month = d.getMonth() + 1;
	var day = d.getDate();
	if(d.getDate() < 10)
		day = "0" + d.getDate();

	if(month < 10)
		month = "0" + month;
//alert(d.getYear())
	document.getElementById("date").innerHTML = day+"."+month+"."+d.getYear()
	//return (day+"."+month+"."+d.getYear());
}


function wopen(_wurl,_wn,_ww,_wh,_wscrl){

/***************
	wurl: window URL
	wh: window height
	ww: window width
	wsr: scrollbars 1 - yes, 0 - no
***************/
 if(screen.width){
  wpos_x = (screen.width-_ww)/2;
  if (wpos_x < 0){ wpos_x = 0;}
  wpos_y = (screen.height-_wh)/2;
  if (wpos_y < 0){ wpos_y = 0;}
 }else{
  wpos_x = 0;
  wpos_y = 0;
 }
// if(_wscrl==undefined){ _wscrl = 0;}
 if(_wn==""){ _wn = "w_test";}
 wind_desc = window.open(_wurl,_wn,"alwaysRaised=0,top="+wpos_y+",left="+wpos_x+",height="+_wh+",width="+_ww+",menubar=0,resizable=0,scrollbars="+_wscrl+",status=0");
 wind_desc.focus();
}


// Atention!!! Link on this function insert into FCk-editor!!!
function wo(_wurl,_ww,_wh,_wscrl){

/***************
	wurl: window URL
	wh: window height
	ww: window width
	wsr: scrollbars 1 - yes, 0 - no
***************/
 if(screen.width){
  wpos_x = (screen.width-_ww)/2;
  if (wpos_x < 0){ wpos_x = 0;}
  wpos_y = (screen.height-_wh)/2;
  if (wpos_y < 0){ wpos_y = 0;}
 }else{
  wpos_x = 0;
  wpos_y = 0;
 }
// if(_wscrl==undefined){ _wscrl = 0;}
 wind_desc = window.open(_wurl,"","alwaysRaised=0,top="+wpos_y+",left="+wpos_x+",height="+_wh+",width="+_ww+",menubar=0,resizable=1,scrollbars="+_wscrl+",status=0");
 wind_desc.focus();
}
///