function hideshow(which)
{
if (!document.getElementById|document.all)
        return
else{
        if (document.getElementById)
                oWhich = eval ("document.getElementById('" + which + "')")
        else
                oWhich = eval ("document.all." + which)
        }

        window.focus()

        if (oWhich.style.display=="none")
                oWhich.style.display=""
        else
                oWhich.style.display="none"
}

function hideshowPlus(which, imag)
{
if (!document.getElementById|document.all)
        return
else{

        if (document.getElementById){
                oWhich = eval ("document.getElementById('" + which + "')")
                oImag = eval ("document.getElementById('" + imag + "')")
        }else{
                oWhich = eval ("document.all." + which)
                oImag = eval ("document.all." + imag)
        }
        }

        window.focus()

        if (oWhich.style.display=="none"){
            oImag.src="img/minus.gif";
                oWhich.style.display=""
        }else{
                oWhich.style.display="none"
                oImag.src="img/plus.gif";
        }
}

function changeInput(sel,inp){
  if(sel.options[sel.selectedIndex].value==0)
    inp.value='';
  else  
    inp.value=sel.options[sel.selectedIndex].text;
}


function showPhoto1(idPhoto){
  window.open('show_photo.php?id='+idPhoto,'Photo', 'toolbar=no, status=no, scrollbars=yes, location=no, menubar=no,resizable=yes, directories=no, height=400, width=500');
}
function showPhoto(photoName){
  window.open(photoName,'Photo', 'toolbar=no, status=no, scrollbars=yes, location=no, menubar=no,resizable=yes, directories=no, height=400, width=500');
}


function auto_fill(form,field,text){
	eval('document.'+form+'.'+field+'.value="'+text+'"');
}

function delconfirm(get){
 
  return confirm("Уверены, что хотите удалить?");
    //window.document.location.href=get;
}

function set_date(day){
  action.date_open.value=day
  }

function open_calendar(href){
  popup = window.open(href,'calendar', 'location=0, toolbar=0, menubar=0, resizable=0, scrollbars=0,width=195,height=180,left=150, top=200')
 }

 function showGoods(src,n, c){
   if (!document.getElementById|document.all)
        return
   else{
     if (document.getElementById){
        img = document.getElementById('rightImg');
        name= document.getElementById('goodsName');
        comment= document.getElementById('goodsComment');
     }else{
        img = document.all.rightImg;
        name= document.all.goodsName;
        comment= document.all.goodsComment;        
     }
   }
   window.focus();
   img.src=src;
   name.innerHTML=n;
   comment.innerHTML=c;   
 }
 
 
