var MenuOn=0, MenuSH = new Array, TimeId;


browser_name = navigator.appName;
browser_version = parseFloat(navigator.appVersion);

if (browser_name == "Netscape" && browser_version >= 3.0) { roll = 'true'; }
else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 3.0) { roll = 'true'; }
else { roll = 'false'; }

function over(img,ref) { if (roll == 'true') { document.images[img].src = ref; } }
function out(img,ref)  { if (roll == 'true') { document.images[img].src = ref; } }

browser_name = navigator.appName;
browser_version = parseFloat(navigator.appVersion);

if (browser_name == "Netscape" && browser_version >= 3.0) { roll = 'true'; }
else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 3.0) { roll = 'true'; }
else { roll = 'false'; }

	if(document.images) 
	{
		up1=new Image();  up1.src="http://brand.dn.ua/dvor/images/up_act.gif";
		up2=new Image();  up2.src="http://brand.dn.ua/dvor/images/up.gif";
		}

function over(img,ref) { if (roll == 'true') { document.images[img].src = ref; } }
function out(img,ref)  { if (roll == 'true') { document.images[img].src = ref; } }

	function Over(imgDocID,imgObjName) {
		if (document.images) {
		document.images[imgDocID].src = eval(imgObjName + ".src") }
		}


function preloadImg(file){
  image = new Image();
  image.src = file;
}

function rol_img() {
preloadImg('images/giftbaskets.gif');
preloadImg('images/giftbaskets_on.gif');
preloadImg('images/flowersandplants.gif');
preloadImg('images/flowersandplants_on.gif');
preloadImg('images/fruitbaskets.gif');
preloadImg('images/fruitbaskets_on.gif');
}




function navig_d (par,type,nIdDiv,source) {
var lay=document.getElementById(par);

if (type==0) {
MenuOn=0;
HideAllDivs();
MenuSH[par]=1;
MenuOn=1;
clearTimeout(TimeId);
//lay.style.visibility="visible";
lay.style.display="block";
lay.style.visibility="visible";
} //end if type=0

if (type==1) {
MenuSH[par]=0;
if (source=="div") {
	MenuOn=0;
	HideAllDivs();
	clearTimeout(TimeId);
	TimeId=setTimeout('HideAllDivs()',1);
} else {
	if (MenuOn) {
	HideAllDivs();
		clearTimeout(TimeId);
		TimeId=setTimeout('MenuOff("'+par+'")',100);
//		MenuOff(par);
	}

}
}//end if type==1

}
function hideChild(arr) {
		for (i=0; i < arr.length; i++) {	
			document.getElementById(arr[i]).style.display="none";
			document.getElementById(arr[i]).style.visibility="hidden";
		}
}

function HideAllDivs () {
	if (!MenuOn) {
		for (i=0; i < MainDivs.length; i++) {
			document.getElementById(MainDivs[i]).style.display="none";
			document.getElementById(MainDivs[i]).style.visibility="hidden";
		}
	}
}

function MenuOff (lid) {
	if ( (!MenuSH[lid]) ) {	
		document.getElementById(lid).style.display="none";
		document.getElementById(lid).style.visibility="hidden";
	}
}

function HideShow (par,t) {
var lay=document.getElementById(par);
if (t==0) { 
	lay.style.display="block";
	lay.style.visibility="visible"; 
	}
if (t==1) {
	lay.style.display="none"; 
	lay.style.visibility="hidden";
	}
}


function menu (td,p,color,colorf,img)
{
if (p==1) {
document.getElementById(td).style.background=color; 
document.getElementById(td).style.color=colorf;
document.getElementById(td).style.textDecoration="none";
}
if (p==2) {
document.getElementById(td).style.background=color+' url(images/'+img+') no-repeat right'; 
document.getElementById(td).style.color=colorf; 
document.getElementById(td).style.textDecoration="underline"; 
}
if (p==3) {
document.getElementById(td).style.background=color+' url(images/'+img+') no-repeat center'; 
document.getElementById(td).style.color=colorf; 
document.getElementById(td).style.textDecoration="underline"; 
}

}
function menuIns (td,p,color,colorf,img)
{
if (p==1) {
document.getElementById(td).style.background=color+' url(images/'+img+') no-repeat left'; 
//document.getElementById(td).style.color=colorf;
//document.getElementById(td).style.textDecoration="underline"; 
}
if (p==2) {
document.getElementById(td).style.background=color+' url(images/'+img+') no-repeat center top'; 
//document.getElementById(td).style.color=colorf;
document.getElementById(td).style.textDecoration="none"; 
}

}

function menuImg (td,p,color,colorf)
{
if (p==1) {
document.getElementById(td).style.backgroundImage='url(images/'+color+')'; 
document.getElementById(td).style.color=colorf;
}
if (p==2) {
document.getElementById(td).style.backgroundImage='url(images/'+color+')';
document.getElementById(td).style.color=colorf; 
}

}

function add_click (url,target) {
if (url) {
//alert("Debug:"+url);
//alert("Debug:"+target);
if (target=="_parent") {
parent.location.href=url;
}
if (target=="_blank") {
window.open(url);
}
if (target=="_self") {
location.href=url;
}
if (target=="_top") {
top.location.href=url;
}
}//end if !url
}

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->