function smb(info,val) 
{
  document.changecont.submitted.value=info;
  if (val) {
    document.changecont.submitval.value=val;
    //alert(val);
  }
  document.changecont.submit();

}

function sval(name,val) 
{
  inputname=MM_findObj(name);
  inputname.valuec="grrr";

}

function insertMCE(src,alt) {
  tinyMCE.execCommand("mceInsertContent", false, '<img alt="' +alt+'" title="' +alt+'" src="' +src+ '" border="0">'); 
  //alert('<img alt="' +alt+'" title"' +alt+'" src="' +src+ '" border="0">');
} 

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length)
{
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function insertContPic(target) {
  contpic=MM_findObj('contpicture');
  contpic.value=target;
}

function changeup (from,num,type) {
 if (type && type==1) {
   psource=MM_findObj('pic_'+from);
   ptarget=MM_findObj('pic_'+(from-1));
   atm2=ptarget.src;
   ptarget.src=psource.src;
   psource.src=atm2;
  }
  for (i=1;i<=num;i++) {	
    if (from>1) {
      source=MM_findObj('inp'+from+'_'+i);
      target=MM_findObj('inp'+(from-1)+'_'+i);
      if (!source.checked && !target.checked) {
        atm=source.value;
        source.value=target.value;
        target.value=atm;
      } else {
          schk=source.checked;
          source.checked=target.checked;
          target.checked=schk;
      }
    }
  }
}

function changedown (from,num,type) {
 if (type && type==1) {
   psource=MM_findObj('pic_'+from);
   ptarget=MM_findObj('pic_'+(from+1));
   atm2=ptarget.src;
   ptarget.src=psource.src;
   psource.src=atm2;
  }
  for (i=1;i<=num;i++) {
      source=MM_findObj('inp'+from+'_'+i);
      tg=from+i;
      target=MM_findObj('inp'+(1*from+1*1)+'_'+i);
      if (source && target) {
        if (!source.checked && !target.checked) {
          atm=source.value;
          source.value=target.value;
          target.value=atm;
        } else {
          schk=source.checked;
          source.checked=target.checked;
          target.checked=schk;
        }
     }
  }
}
function popup (picture) {
}

