function submitConfirm(action)
{
   if(confirm("Are you sure?"))
   {
		eval(action);
		return true;	
   }
   return false;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

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\']);window.moveTo((screen.width-document.splash[\'width\'])/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=640;
	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;
}

//floating image
var Type = 'Z';

function StartFloat() {
if(document.all) {
//	document.all.AdFloater.style.pixelLeft = 10;
	document.all.AdFloater.style.visibility = 'visible';
	Type = 'A';
	}
else if(document.layers) {
//	document.AdFloater.left = 10;
	document.AdFloater.visibility = 'show';
	Type = 'B';
	}
else if(document.getElementById) {
//	document.getElementById('AdFloater').style.left = 10 + 'px';
	document.getElementById('AdFloater').style.visibility = 'visible';
	Type = 'C';
	}
if (document.all) { window.onscroll = Float; }
else { setInterval('Float()', 100); }
}

function Float() {
if (Type == 'A') { document.all.AdFloater.style.pixelTop = document.documentElement.scrollTop;/*document.body.scrollTop;*/ }
else if (Type == 'B') { document.AdFloater.top = window.pageYOffset; }
else if (Type == 'C') { document.getElementById('AdFloater').style.top = window.pageYOffset + 'px'; }
}