  function changeCur(name){

  	var value = document.getElementById('price');
  	var cur1 = document.getElementById('cur1');
  	var cur2 = document.getElementById('cur2');

	  	if(name == 'cur2' && cur2.disabled != false){
			cur1.style.fontWeight = 'normal';
	  		cur2.style.fontWeight = 'bold';
			cur1.disabled = true;
			cur2.disabled = false;

			value.innerHTML = number_format(value.innerHTML/110, 2, '.', '.');;
	  	}
	  	if(name == 'cur1' && cur1.disabled != false){
			cur1.style.fontWeight = 'bold';
			cur2.style.fontWeight = 'normal';
			cur1.disabled = false;
			cur2.disabled = true;

			value.innerHTML = number_format(value.innerHTML*110, 2, '.', '.');;
	  	}
 }


 /* Made by Mathias Bynens <http://mathiasbynens.be/> */
function number_format(a, b, c, d) {
 a = Math.round(a * Math.pow(10, b)) / Math.pow(10, b);
 e = a + '';
 f = e.split('.');
 if (!f[0]) {
  f[0] = '0';
 }
 if (!f[1]) {
  f[1] = '';
 }
 if (f[1].length < b) {
  g = f[1];
  for (i=f[1].length + 1; i <= b; i++) {
   g += '0';
  }
  f[1] = g;
 }
 if(d != '' && f[0].length > 3) {
  h = f[0];
  f[0] = '';
  for(j = 3; j < h.length; j+=3) {
   i = h.slice(h.length - j, h.length - j + 3);
   f[0] = d + i +  f[0] + '';
  }
  j = h.substr(0, (h.length % 3 == 0) ? 3 : (h.length % 3));
  f[0] = j + f[0];
 }
 c = (b <= 0) ? '' : c;
 return f[0] + c + f[1];
}


function checkMail(mail)
{
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(mail)) return true;
	else return false;
}


function checkEmailForm(form_target) {
	var frm = form_target;
	var error = 0;
	for(var i=0; i< frm.length; i++){
		if(frm[i].type == 'text' && frm[i].name.search('email') != -1){
			if(!checkMail(frm[i].value)){
				error = 1;
			}
		}
	}
	if(error == 1){
		alert('Please enter valid e-mail address!');
		return false;
	}else{
		frm.submit();

	}
}


