/***************/
/* calculators */
/***************/
function getClientWidth()
{
  var cw = document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
  alert(cw);
}

function getClientHeight()
{
  var ch = document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
  alert(ch);
}


function calcshow(action, id) {
	var overlay    = document.getElementById("overlay");
	var deposit    = document.getElementById(id);
	var valuta     = document.getElementById("valuta");
	//var fci        = document.getElementById("flash-container-inner");
	//var fbg        = document.getElementById("flash-background");
		
	var ch = document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
	var bs = document.body.scrollHeight;
		
	if(action == 'open' && id == 'valuta') 
	{
		overlay.style.display = 'block';
		valuta.style.display  = 'block';
		window.scroll(0,0);
		valuta.style.top = 100 + "px";
		//fci.style.visibility = 'hidden';
		//fbg.style.visibility = 'visible';
	}
	
	if(action == 'open' && id != 'valuta') 
	{
		overlay.style.display = 'block';
		deposit.style.display  = 'block';
		deposit.style.top = 100 + "px";
		window.scroll(0,0);
		//fci.style.visibility = 'hidden';
		//fbg.style.visibility = 'visible';
	}

	if(action == 'close')
	{
		overlay.style.display = 'none';
		valuta.style.display  = 'none';
		deposit.style.display = 'none';
		//fci.style.visibility = 'visible';
		//fbg.style.visibility = 'hidden';
		
			document.getElementById('head111').value='';
	document.getElementById('srocklll').value='';
	document.getElementById('summallp').innerHTML='';
	document.getElementById('summall').innerHTML='';
	document.getElementById('allproc').innerHTML='';
	}
}
function calcallshownanana(id)
{	id = document.getElementById("calckid").value;
	val  = document.getElementById("valutte"+id).value;

 summ = Math.abs(document.getElementById("head111").value)*1; 
 srock = document.getElementById("srocklll").value; 
 
	proc = document.getElementById("proc"+id).value

 	it = (summ*srock*(proc/100))/365;

    ddd = it.toFixed(2)*1;
  //	alert(ddd);
//	d = 11;
 document.getElementById("summallp").innerHTML = ddd+' '+val;
	 document.getElementById("summall").innerHTML = (summ+ddd)+' '+val;
	 
}