function submitConfirm(action)
{
   if(confirm("Are you sure?"))
   {
		eval(action);
		return true;	
   }
   return false;
}

function popupWin(pictureURL,wintitle) 
{ 
	var w,h;
	w=460;
	h=350;
	var options = "toolbar=0,status=0,menubar=0,scrollbars=0,resizable=1,WIDTH="+w+",HEIGHT="+h+",Left=" + (screen.width-w)/2 + ",Top=" + (screen.height-h)/2;
	newwindow=window.open('','newwin',options);
	newwindow.document.open();
	newwindow.document.write('<html><head><title>' + wintitle + '</title></head><body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" bgcolor="#999999" onload="window.resizeTo(document.splash[\'width\'],document.splash[\'height\']+100);window.moveTo((screen.width-document.splash[\'width\']+20)/2,(screen.height-document.splash[\'Height\'])/2);return true;">');
	newwindow.document.write('<center><a href="#" onClick="window.close();return true;"><img src="'+pictureURL+'" name="splash" border="0"></a></center></body></html>');
	newwindow.document.close();
	newwindow.focus();
}

function popupWinFile(pictureURL,wintitle) 
{ 
	var w,h;
	w=800;
	h=600;
	var options = "toolbar=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+w+",height="+h;
	window.open(pictureURL,'newwin',options);
}

function showHide($el)
{
	if (document.getElementById($el+'_div').style.visibility == 'visible')
	{
		document.getElementById($el+'_div').style.display='none';
		document.getElementById($el+'_div').style.visibility='hidden';
		document.getElementById($el+'_bullet').src='images/bullet-blue.gif';
	}
	else
	{
		document.getElementById($el+'_div').style.display='block';
		document.getElementById($el+'_div').style.visibility='visible';
		document.getElementById($el+'_bullet').src='images/bullet-blue-down.gif';
	}
}

function clr()
{
	document.getElementById('bgn').value = '0.00';
	document.getElementById('usd').value = '0.00';
	document.getElementById('eur').value = '0.00';
	document.getElementById('gbp').value = '0.00';			
}	
	
function calc1()
{
	document.getElementById('eur').value = Math.round(document.getElementById('bgn').value / 1.95583/1 * 10000) / 10000;
	document.getElementById('gbp').value = Math.round(document.getElementById('bgn').value / 2.83125/1 * 10000) / 10000;
	document.getElementById('usd').value = Math.round(document.getElementById('bgn').value / 1.63408/1 * 10000) / 10000;
}

function calc2()
{
	document.getElementById('bgn').value = Math.round(document.getElementById('usd').value * 1.63408/1 * 10000) / 10000;
	document.getElementById('gbp').value = Math.round(document.getElementById('bgn').value / 2.83125/1 * 10000) / 10000;
	document.getElementById('eur').value = Math.round(document.getElementById('bgn').value / 1.95583/1 * 10000) / 10000;
}

function calc3()
{
	document.getElementById('bgn').value = Math.round(document.getElementById('eur').value * 1.95583/1 * 10000) / 10000;
	document.getElementById('gbp').value = Math.round(document.getElementById('bgn').value / 2.83125/1 * 10000) / 10000;
	document.getElementById('usd').value = Math.round(document.getElementById('bgn').value / 1.63408/1 * 10000) / 10000;
}
	
function calc4()
{
	document.getElementById('bgn').value = Math.round(document.getElementById('gbp').value * 2.83125/1 * 10000) / 10000;
	document.getElementById('eur').value = Math.round(document.getElementById('bgn').value / 1.95583/1 * 10000) / 10000;
	document.getElementById('usd').value = Math.round(document.getElementById('bgn').value / 1.63408/1 * 10000) / 10000;
}
