function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",80)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=40
}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

//просмотр фото в новом окне
function baza(clipart, ww) {
if (screen.height < 730){
if (!ww || ww < 600) { ww = 600; }
	windop = window.open("foto.php?src="+clipart+"","foto","width="+ww+",scrollbars=1,resizable=1,top=30,left=30");
	windop.focus();
	  }
else {
if (!ww || ww < 600) { ww = 600; } else { ww = ww+60; }
windop = window.open("foto.php?src="+clipart+"","foto","height=550,width="+ww+",top=30,left=30,scrollbars=1,resizable=1");
windop.focus();
}
}

function prew_pic(clipart) {
	windop = window.open("foto.html?"+clipart+"","uvelich","scrollbars=1,resizable=1,menubar=1");
	windop.focus();
}
function Help(name) {
	windop = window.open("help/"+name+".php","help","height=270,width=350,scrollbars=1,resizable=1");
		windop.focus();
}

function novost(fail,papka,h,w) {
if (screen.height < 730){
	windop = window.open(""+papka+"/"+fail+".html","news","width=400,scrollbars=1,resizable=1,menubar=1");
	windop.focus();
	  }
else {
windop = window.open(""+papka+"/"+fail+".html","news","height=300,width=400,scrollbars=1,resizable=1,menubar=1");
windop.focus();
}
}

function menuover(obj)
{ obj.style.cursor="hand"; }
function menuout(obj)
{ }
function menuclick(obj)
{ window.location.href=obj.all.tags('A').item(0).href; }

//скрыть-показать
function showDiv(div_id){
div = document.getElementById(div_id);
div.style.display = (div.style.display == 'none') ? 'block' : 'none';
}
function show(div_id){
div = document.getElementById(div_id);
div.style.display = 'block';
}
function hide(div_id){
div = document.getElementById(div_id);
div.style.display = 'none';
}

function pokaz(name, x, y, stat, txt, w) {
	//if (event.x < 300) x_s = 10 else x_s = -260;
	
	if (navigator) if (navigator.userAgent) if (navigator.userAgent.indexOf ('MSIE') != -1) 
	{ x = event.x + 0; 
	  y = event.y + 52; 
	} else 
	{ x = x + 0; 
	y = y + 52; 
	}
	if ( x > 550 ) x_s = -205; else x_s = 105;
	document.getElementById(name).style.margin = "0 0 0 " + x_s;
	document.getElementById(name).style.display = stat;
	if (txt) document.getElementById(name).firstChild.nodeValue = txt;
}
//скрыть-показать картинку
function showImg(id, srс1, src2){
obj = document.getElementById(id);
obj.src = (obj.src.indexOf(srс1) != -1)? src2: srс1;
}

function showTitle(id, title1, title2){
obj = document.getElementById(id);
obj.title = (obj.title == title1)? title2: title1;
}

function showBackground(id, bg1, bg2){
obj = document.getElementById(id);
obj.style.background = (obj.style.background == bg1)? bg2: bg1;
}

//установка куки
function setCookie(name, value){
	document.cookie = name+"="+escape(value)+";path=/";
}
