var DOM = (document.getElementById)?true:false;
var NN = (document.layers)?true:false;
var IE = (document.all)?true:false;
var NN6 = DOM;
var Opera = DOM && window.opera;
function getElement(objname)
{
  if (IE) return document.all[objname];
  if (NN) return getNNElement(null, objname);
  if (DOM) return document.getElementById(objname);
}

function process (action,request)
{
//strFeatures="left=4000,width=10,height=10,resizable=no,scrollbars=no,menubar=no,location=no,status=no,titlebar=no,toolbar=no";


//------------------------------------
if(action=="addtobasket")
{
var start,end,id;
start=request.indexOf("&id_products=")+13;
end=request.indexOf("&price=");
id=request.substring(start,end);
ids=getElement("cmd"+id);
ids.innerHTML="[&nbsp;в&nbsp;корзине&nbsp;]";
}
if(action=="count")
{
for(i=0; i<=request; i++)
{
var ids, amount, str;
ids=getElement("ids["+i+"]").value;
amount=getElement("amount["+i+"]").value;
if(str)
{
str=str+"&"+"data["+i+"]="+ids+"::"+amount;
}
else
{
str="data["+i+"]="+ids+"::"+amount;
}
}
request=str;
}
//------------------------------------
//window.open("/basket.php?action="+action+"&"+request,false,strFeatures);


if (IE)
{
data_frame.location.href="/basket.php?action="+action+"&"+request;
}
else
{
data_frame.location.href="/basket.php?action="+action+"&"+request;
}
}




function big_pic(x_size,y_size,address,pic_id)
{
status_str='toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+x_size+',height='+y_size+',top=80,left=80';
win='win'+pic_id;
window.open('/php/big_pic.php?url='+address, win, status_str);
}
function showpic(href) {
window.open(href, '_blank', 'location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=550,height=550,top=50,left=50');
}

function startList() {
if(!NiftyCheck())
return;
Rounded("div#box_serv","all","#FFF","#e5e5e5","smooth");
Rounded("div#box_firms","all","#FFF","#e5e5e5","smooth");
}
window.onload=startList;

function box_off(){
ele = document.getElementById("zayavka");
ele.className = "hiddenStatus";
ele = document.getElementById("box");
ele.className = "visibleStatus";
}
function box_on(){
ele = document.getElementById("zayavka");
ele.className = "visibleStatus";
ele = document.getElementById("box");
ele.className = "hiddenStatus";
}







