function show_div(id_cur){
	var div_set=null;
	div_set=document.getElementById(id_cur);
	if (div_set!=null) {
div_set.style.display="block";
	}
}


function show_parent_div(div_par){
    var IDParentElement="", NextParentElement="";
		var obj=null;
		var obj1=null;
    if (document.getElementById(div_par)!=null)
    {
			obj1=document.getElementById(div_par);
			for(var i=0; i<10; i++) {
				obj=obj1;
				if (obj!=null) {
					if (obj.id!="" && obj.className!="act") {
						obj.className="act";
						bright_cat_path(div_par);
					}
				}
				else break;
				obj1=eval("obj.parentElement");
			}
		}
}

function bright_cat_path(id_obj){
		var obj=document.getElementById(id_obj);
		if (obj!=null) obj.className="act";
}

function show_parent_pic(id_obj){
		var obj=document.getElementById(id_obj);
		if (obj!=null) obj.style.display="block";
}

function add_bask(idc,idg){
     var a_url='/vcd-'+idc+'/2basket.html?idg='+idg+'&c=addbask&ctype=showbask';
     var a_tag='<a href="javascript:show_win(500,200,'+"'"+a_url+"'"+');">';
     document.write(a_tag+'<img src="/i/goods_bask.gif" width="18" height="13">в корзину</a>');
}

function show_win(width,height,s_url){
     var p_top=(window.screen.height-height)/2, p_left=(window.screen.width-width)/2;
     var imgnwin=window.open(s_url,"imgswin","resizable=yes,scrollbars=yes,toolbar=no,location=no,directoties=no,status=no,menubar=no,width="+width+",height="+height+",top="+p_top+",left="+p_left);
     imgnwin.focus();
}

/* -- картинки в новом окне -- */

function ie_img(tit,imgf){
rand_id='image'+(Math.round(Math.random()*1000));
imgf=""+imgf;
outf="<html>"
 +"<head>"
 +"<title>"+tit+"</title>"
 +"<style>body{margin:0px}</style>"
 +"</head>"
 +"<body leftmargin=0 topmargin=0>"
 +"<img src=\""+imgf+"\">";
iopen="iwin=self.open('"+imgf+"', '"+rand_id+"', 'width='+(img1.width)+',height='+(img1.height)+',top=0,left=0');"
 +"iwin.document.write('"+outf+"');"
 +"iwin.focus();";
img1=new Image();
img1.src=imgf;
if(img1.width!=0) eval(iopen);
else{
iwin = self.open('about:blank', 'f'+rand_id, 'width=100,height=100,top=0,left=0');
iwin.document.write("<html>"
+"<body>Загрузка...<br>"
 +"<"+"script>"
  +"function imo(img1){"+iopen
  +"self.close();"
 +"}<"+"/script>"
 +"<img src='"+imgf+"' onload='imo(this);'>");
 }
}

function opera_img(title,s_url){
     var s_img = new Image();
     s_img.src=s_url;
     var width=s_img.width;
     var height=s_img.height;
     var imgnwin=window.open("","imgswin","resizable=no,scrollbars=no,toolbar=no,location=no,directoties=no,status=no,menubar=no,width="+width+",height="+height);
     imgnwin.document.open();
     imgnwin.document.write("<html><head><title>"+title+"</title></head><body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0><img src='"+s_url+"' border=0></body></html>");
     imgnwin.document.close();
     imgnwin.focus();
}

function show_img(title,s_url){
var oPera = navigator.userAgent.indexOf('Opera');
if (oPera >-1) opera_img(title,s_url); else ie_img(title,s_url);
}

/* -- /картинки в новом окне -- */