var chk="";

function add_bask(idc,idg){
	var a_url='/vcd-'+idc+'/basket_info.html?idg='+idg+'&c=addbask&ctype=showbask';
	var a_tag='<a href="javascript:show_win(400,176,'+"'"+a_url+"'"+');">';
	document.write(a_tag+'<img src="/i/basket_1.gif" width=24 height=24 border=0 alt="Â êîðçèíó" align=left vspace=1></a>');
}

function show_img(title,width,height,s_url){
	var imgnwin=window.open("","imgswin","resizable=yes,scrollbars=yes,toolbar=no,location=no,directoties=no,status=no,menubar=no,width="+width+",height="+height);
	imgnwin.document.write("<html><title>"+title+"</title><body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0><center><img src='"+s_url+"' border=0></center></body></html>")
}

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 active_win(surl){
	window.opener.document.location=surl;
}

function set_selected(p,v){
	for (i=0; i < p.options.length; i++) {
		if (p.options[i].value==v) { p.options[i].selected=true; break; }
	}
}

// ÂÑÏËÛÂÀÞÙÈÅ ÌÅÍÞØÊÈ ÄËß ÂÛÂÎÄÀ ÑÎÂÌÅÑÒÈÌÛÕ ÑÈÑÒÅÌ - BEGIN

var div_arr=new Array(100);
var div_count=0;
var timeout_show=null,timeout_hide=null;
var div_set="";

function show_div(id_cur, id_par, obj)
{	var div_cur=""+id_cur, div_par=""+id_par;
	if ( !obj.contains(window.event.toElement) || obj.contains(window.event.fromElement) ) return; // ýòî ïðàâèëüíî
	obj.style.background="#EBE7E7";
	if (timeout_hide!=null) {	clearTimeout(timeout_hide); timeout_hide=null; }
	if (div_set!="" && div_set!=div_cur && div_set!=div_par && document.getElementById(div_set)!=null) {
		document.all[div_set].style.visibility="hidden"; // ñêðûëè òåêóùèé ñëîé
	}
	div_set=div_cur;
	if (document.getElementById(div_cur)!=null) document.all[div_cur].style.visibility="visible";
	if (document.getElementById(id_par)!=null) s_color(id_par);
}

function s_div(obj) { 
	if ( (obj.contains(window.event.toElement)) ) obj.style.visibility="visible"; 
}

function h_div(obj) {	if ( (obj.contains(window.event.fromElement)) ) obj.style.visibility="hidden"; }

function h2_div(id)
{	var obj=document.getElementById(id);
	if ( obj!=null && (obj.contains(window.event.fromElement)) ) obj.style.visibility="hidden"; 
}

function hide_all()
{	div_set="";
	for (var i=0; i<div_count; i++)
	{	if (document.getElementById(div_arr[i])!=null) document.all[div_arr[i]].style.visibility="hidden";
	}
	// VIC
	if (timeout_hide!=null) {	clearTimeout(timeout_hide); timeout_hide=null; }
	// VIC
}

function r_color(obj)
{	if ( !obj.contains(window.event.toElement) && obj.contains(window.event.fromElement) ) obj.style.background="";
}
function s_color(id_cur)
{	var obj=null;
	obj=document.all["tr"+id_cur];
	if (obj!=null) obj.style.background="#EBE7E7";
}

// ÂÑÏËÛÂÀÞÙÈÅ ÌÅÍÞØÊÈ ÄËß ÂÛÂÎÄÀ ÑÎÂÌÅÑÒÈÌÛÕ ÑÈÑÒÅÌ - END

