function show_img(width,height,s_url){
	var imgnwin=window.open(s_url,"imgswin","resizable=yes,scrollbars=yes,toolbar=yes,location=no,directoties=no,status=no,menubar=no,width="+width+",height="+height);
}

function show_bask(width,height,s_url){
	var basknwin=window.open(s_url,"baskswin","resizable=yes,scrollbars=yes,toolbar=no,location=no,directoties=no,status=no,menubar=no,width="+width+",height="+height);
}

function active_win(surl){
	window.opener.document.location=surl;
}

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 add_bask(idc,idg){
// document.write('<a href="basket.html@idg=.htm'+idg+'&c=addbask&ctype=showbask&back='+idc+'&r='+Math.round(10000*Math.random())+'" class="bask"><b>////// Добавить в корзину&nbsp;&#187;</b></a><br><br>');
// }

function add_bask(idb,idc,idg){
     var a_url='2basket.html@idg=.htm'+idg+'&c=addbask&ctype=showbask&back='+idc+'&r='+Math.round(10000*Math.random());
     var a_tag='<a href="javascript:show_win(500,200,'+"'"+a_url+"'"+');" class="bask">';
     document.write(a_tag+'<b>Добавить в корзину&nbsp;&#187;</b></a><br><br>');
}

var v_basket_str='';

var valute_cash=0;

function normalize(price)
{       var pr, str;
        pr=parseInt(Math.round(price*100));
        str = new String(pr);
        pr="";
        if (str.length>2)
                pr += str.substring(0, str.length-2);
        else
                pr += "0";
        /*
				pr += ".";
        if (str.length>2)
                pr += str.substring(str.length-2, str.length);
        else
        {       if (str.length==1)
                        pr += "0";
                pr += str;
        }
				*/
        return pr;
}

function price_rur(flag_usd,str_price){
	var price=0.0;
	if (flag_usd!="" && valute_cash!=0 && str_price!="&nbsp;") {price=parseFloat(str_price); document.write (normalize(price*valute_cash) + " руб."); }
}

function price(str_price){
	if (str_price!="&nbsp;" && str_price.length >= 3) document.write(str_price.substring(0, str_price.length-3));
}