function getObj(name)
{
//alert("id="+name);
  if (document.getElementById)
  {
  	this.o = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.o = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.o = document.layers[name];
   	this.style = document.layers[name];
  }
}

function adjustIFrameSize (iwin, winp) 
{
  if (iwin.document.height) {
    var ifElement = parent.document.getElementById(iwin.name);
    ifElement.style.height = iwin.document.height + 40 + 'px';
  }
  else if (document.all) {
  
    var ifElement = parent.document.all[iwin.name];
    if (iwin.document.compatMode &&  iwin.document.compatMode != 'BackCompat') 
    {
      ifElement.style.height = iwin.document.documentElement.scrollHeight + 25 + 'px';
    }
    else {	
      ifElement.style.height = iwin.document.body.scrollHeight + 'px';
    }	
  }
  aWinSize (winp);
}

function aWinSize (iwin) 
{
  if (iwin.document.height) { // netscape, mozilla
	var h = iwin.document.height + 40;
	var w = iwin.innerWidth + 6;  
	var ah = screen.availHeight;
	var aw = screen.availWidth;
	h = ah > h ? h : ah ;
	w = aw > w ? w : aw ;
	iwin.resizeTo(w, h);
  }
  else if (document.all) {
    if (iwin.document.compatMode &&  iwin.document.compatMode != 'BackCompat') 
    {// opera
      var h = iwin.document.documentElement.scrollHeight + 30;
      var w = iwin.document.documentElement.scrollWidth  + 25;

	var ah = screen.availHeight;
	var aw = screen.availWidth;
	h = ah > h ? h : ah ;
	w = aw > w ? w : aw ;
	iwin.resizeTo(w, h);
    }
    else { // ie
      var h = iwin.document.body.scrollHeight + 80;
      var w = document.body.offsetWidth+8; //iwin.document.body.scrollWidth  + 80;

	var ah = screen.availHeight;
	var aw = screen.availWidth;
	h = ah > h ? h : ah ;
	w = aw > w ? w : aw ;
	iwin.resizeTo(w, h);
    }
  }
}
function ss(){event.srcElement.className="on";}
function uu(){event.srcElement.className="in";}
function OnVGC(f)
{
var vg = f.V_g.options[f.V_g.selectedIndex].value;
switch (vg){
case 'LTL': i='0'; break;
case 'USD': i='1'; break;
case 'EUR': i='2'; break;
}
for(j=0;j<=max_i;j++)
 {
  for(k=0;k<=2;k++)
  {
    wId='id_'+j+k; //co = document.all(wId); co.style.display = i==k ? "" : "none"; 
	id_show(wId, (i==k ? true : false));
  }
 }
} 

function id_show(id, show) { 
if (document.getElementById) { // DOM3 = IE5, NS6
  if (show){
    document.getElementById(id).style.display = ''; 
  } else {
    document.getElementById(id).style.display = 'none'; 
  }
} else { 
  if (document.layers) {
    if (show){
      document.id.display = ''; 
    } else {
      document.id.display = 'none'; 
    }
  } else {
    if (show){
      document.all.id.style.display = ''; 
    } else {
      document.all.id.style.display = 'none'; 
    }
  } 
}
}

function ch_bx_i(i)
{

function check_id(ee)
{
	ee = ee.substr(3,i); 
	var ff=document.FORM1;
	//eval("var ich = ff.D_c"+ee);
	//eval("var isu = ff.D_s"+ee);
	var ich = new getObj("D_c"+ee);
	var isu = new getObj("D_s"+ee);
	
	OnC(ff);
	if(ich.o.checked==true){
		isu.o.className="in";
		isu.o.disabled=false;
		//isu.o.readonly='';
		return (true); 
	}else
	{ 
		isu.o.className="in1";
		isu.o.disabled=true;
		//isu.o.value="";
		//isu.o.readonly=true;
		return (false); 
	}
}

if(!document.all)
{
	function doIt(e) { return (check_id(e.target.id)); } 
//	document.onmouseup = doIt;
	return(document.onclick = doIt);
}else{
	var ee = event.srcElement.id;
	return(check_id(ee));
   }
}

function ch_ka(ich_name, isu_name, v, sub_mit)
{
	var ff = document.forms['FORM1'];
	var ich = new getObj(ich_name);		
	var isu = new getObj(isu_name);	 
	/////////////////////-> OnC(ff); nukelta zemiau
	
	if(ich.o.checked==true){
		//alert(ee+" "+isu.disabled); 
		isu.o.className="in";
		isu.o.disabled=false;		
		isu.o.value = v; //
		//isu.readonly='';
		if(sub_
