window.defaultStatus='Все о розах';
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);
function layvis(id,state){
	if(ns6){
		document.getElementById(id).style.visibility=state;
	}else if(ie4){
		document.all[id].style.visibility=state;
	}else if(ns4){
		document.layers[id].visibility=state;
	}
}
function laydis(id,state){
	if(!document.all && document.getElementById){
		document.getElementById(id).style.display=state;
	}else if(document.all){
		document.all[id].style.display=state;
	}else if(document.layers){
		document.layers[id].display=state;
	}
}
function sizeText(textArea,count,cou1,cou2){
	var val=textArea.value;
	if (val.length > count){
  	alert('Извините, размер текста не должен превышать'+count+'символов');
  	textArea.value = val.substring(0,count);
  	textArea.focus()
	}
	cou1.value=parseInt(textArea.value.length);
	cou2.value=count-parseInt(textArea.value.length);
}
function open_photo(site, numb_photo){
	var Photow;
	if (Photow==null)Photow = window.open('', 'PfotoWindow', 'width='+sm_array[numb_photo].width+', height='+sm_array[numb_photo].height);
	Photow.blur();
	Photow.resizeTo(sm_array[numb_photo].width, sm_array[numb_photo].height);
	Photow.document.write('<html><head><title>'+alt[numb_photo]+'</title>');
	Photow.document.write('</head><body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0">');
	Photow.document.write('<a href="javascript:top.close();" title="'+alt[numb_photo]+'"><img src="http://'+site+'/images/'+numb_photo+'.jpg" name="photo" id="photo" width="100%" height="100%" alt="Закрыть" border="0"></a>');
	Photow.document.write('</body></html>');
	Photow.document.close();
	Photow.focus();
}
//menu constructor
function menu(cal_n,allsubitems,thisitem,div_n,startstate){ 
//  callname= cal_n+thisitem;
  divname=div_n+thisitem;  
  this.numberofmenuitems = allsubitems;
//  this.caller = document.getElementById(callname);
  this.thediv = document.getElementById(divname);
  this.thediv.style.visibility = startstate;
  this.menuname = cal_n;
}

//menu methods
function ehandler(event,theobj){
  for (var i=1; i<= theobj.numberofmenuitems; i++){
    var shutdiv =eval( "menuitem"+theobj.menuname+i+".thediv");
    shutdiv.style.visibility="hidden";
	 shutdiv.style.display="none";
  }
  theobj.thediv.style.visibility="visible";
  theobj.thediv.style.display="";
}

function showHelp(h,p) {
	var htarget='http://techservice/_contens/help.php?h='+h+'&page='+p;
	helpWin = window.open(htarget, "helpwin", "height=350,width=400,dependent");
}
function winPop(URL,x,y,scrb) {
	var scrParms="width="+x+",height="+y;
	var Descript;
	scrParms+=",scrollbars";
	if (Descript==null)Descript = window.open(URL,'Descript',scrParms);
	Descript.document.close();
	Descript.focus();
}
function chbvis(dname) {
	if (event.srcElement.checked){
		eval(dname+ "1.style.display = ''");
		eval(dname+ "0.style.display = 'none'");
	}else{
		eval(dname + "1.style.display = 'none'");
		eval(dname + "0.style.display = ''");
	}
}
