function ajaxFunction(c1, c2, c3, c4, c5, c6, op)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
	      document.shopForm.price.value = xmlHttp.responseText;
		  if (document.shopForm.price.value ==0){
			document.shopForm.initial_price.value = "";
			initial_payment =   0;
		  }
		  else{
			initial_payment =   Math.round ( (20 * document.shopForm.price.value) / 100 )
		  }
		  document.shopForm.initial_price.value = initial_payment;
      }
    }
	surl = "getprice.asp?c1="+c1+"&c2="+c2+"&c3="+c3+"&c4="+c4+"&c5="+c5+"&c6="+c6+"&op="+op;

 	xmlHttp.open("GET",surl,true);
  	xmlHttp.send(null);
  }
	
	function calculatePrice_new() {

		original_packing = document.shopForm.packing_method.value;
	
		c1 = document.shopForm.currency.value;
		
		splitvalueSelect1=document.shopForm.painting_type.value.split("#")
		c2 = splitvalueSelect1[0];
				
		splitvalueSelect1=document.shopForm.painting_style.value.split("#")
		c3 = splitvalueSelect1[0];
		
		splitvalueSelect1=document.shopForm.painting_size.value.split("#")
		c4 = splitvalueSelect1[0];

		splitvalueSelect1=document.shopForm.painting_subjects_type.value.split("#")
		c5 = splitvalueSelect1[0];

		c6 = document.shopForm.petfigs.value
		
		ajaxFunction(c1, c2, c3, c4, c5, c6, original_packing);
		
		
		
		if (document.shopForm.currency.value=="1")
		{
			document.shopForm.price_currrency.value = "USD";
			document.shopForm.price_currrency2.value = "USD";
		}
		else if (document.shopForm.currency.value=="2")
		{
			document.shopForm.price_currrency.value = "EUR";
			document.shopForm.price_currrency2.value = "EUR";
		}
		else if (document.shopForm.currency.value=="3")
		{
			document.shopForm.price_currrency.value = "AUD";
			document.shopForm.price_currrency2.value = "AUD";
		}
		else if (document.shopForm.currency.value=="4")
		{
			document.shopForm.price_currrency.value = "CAD";
			document.shopForm.price_currrency2.value = "CAD";
		}
		else if (document.shopForm.currency.value=="5")
		{
			document.shopForm.price_currrency.value = "GBP";
			document.shopForm.price_currrency2.value = "GBP";
		}
		else if (document.shopForm.currency.value=="6")
		{
			document.shopForm.price_currrency.value = "JYP";
			document.shopForm.price_currrency2.value = "JYP";
		}
		
	}
function fncShowHideBoxComment(typeid) {
	if (typeid == 4) {
		fncShowHideBox('lbl_0', 1);			
		fncShowHideBox('lbl_1', 1);			
		fncShowHideBox('lbl_2', 0);			
		fncShowHideBox('sel_1', 1);			
	}
	else {
		fncShowHideBox('lbl_0', 0);			
		fncShowHideBox('lbl_1', 0);			
		fncShowHideBox('sel_1', 0);			
		fncShowHideBox('lbl_2', 1);			
	}
	return false;
}

function fncShowHideBox(divID, from) {	
	objDiv = document.getElementById(divID);
	if (objDiv != null) {
		if (from == 1) {
			objDiv.style.display = 'block';
		} else {
			objDiv.style.display = 'none';
		}
	}
	return false;
}
