// Copyright John J. Popovic, 2007 1stmuse.com
var s0, s, tax1= 0.;

function Modify_Classe(form) {
	form.Classe.value = form.Classe_m.value;
}

function Modify_Modalita_pagamento(form) {
	form.Modalita_pagamento.value = form.Modalita_pagamento_m.value;
}

function Modify_operazione(form) {
	form.operazione.value = form.operazione_m.value;
}

function Modify_Provenienza(form) {
	form.Provenienza.value = form.Provenienza_m.value;
}

<!-- This script locksout <CR> i.e. Enter Key and requires the SUBMIT button to be clicked to send form -->
<!-- Begin

function tabOnEnter (field, evt) {
      var keyCode = document.layers ? evt.which : document.all ? 
     evt.keyCode : evt.keyCode;
      if (keyCode != 13)
        return true;
      else {
        getNextElement(field).focus();
        return false;
      }
}


function getNextElement (field) 
{
    var frm = field.form;
    var again = false;
    for (var e=0;e<frm.length;e++)
    {
      if(frm[e].type!="hidden" && again) return frm.elements[e];
      if (field==frm[e]) again=true;
    }
}

// JavaScript Order Calculator
// Copyright John J. Popovic, 2004 1stmuse.com
var s0, s, tax1= 0.;

function twoPlaces(amount) {
	// returns the amount in the .99 format
        round(amount,2);
	return (amount == Math.floor(amount)) ? amount + '.00' : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);
	}

function round(number,X) {
	// rounds number to X decimal places, defaults to 3
	X = (!X ? 3 : X);
	return Math.round(number*Math.pow(10,X))/Math.pow(10,X);
	}

function totals(num) {
	return twoPlaces(Math.floor((num - 0.) * 100) / 100);
	}

function RoundMultiply(a,b)
{ result=parseFloat(a * b);
return round(result,2);
};

function IncrementTotal(t,a)
{ result=t + parseFloat(a);
return round(result,2);
};


function uncheckAll(form) {
box = eval(form.scorpora1); 
}


function Calc_status(form) {
	
// assign values for Status
 document.myForm.Status.value =  form.status_description.value;
// end of assign values for ICONOGRAFIA_liberatorie_disponibili

}




function Calc(form) {
// assign values for PROPOSAL_amenities
/*


*/
        x1 = '';
        x2 = '';
        x3 = '';
        x4 = '';
        x5 = '';
        x6 = '';
        x7 = '';
        x8 = '';
        x9 = '';
        x10 = '';
        x11 = '';
        x12 = '';
        x13 = '';
        x14 = '';
        x15 = '';
        x16 = '';
        x17 = '';
        x18 = '';
        x19 = '';
        x20 = '';
        x21 = '';
        x22 = '';


	if (form.concierge.checked)    {x1='Concierge, ';};
	if (form.newspapers.checked)   {x2='Complimentary newspapers, ';};
	if (form.bar.checked)    {x3='Bar, ';};
	if (form.conference_room.checked) {x4='Conference room, ';};
	if (form.dry_cleaning.checked)    {x5='Dry cleaning, ';};
	if (form.air_condition.checked)   {x6='Air condition, ';};
	if (form.lift.checked)    {x7='Lift, ';};
	if (form.internet.checked)    {x8='Internet access, ';};
	if (form.breakfast.checked)   {x9='Complimentary breakfast, ';};
	if (form.checkin.checked)   {x10='Express checkin, ';};
	if (form.checkout.checked)   {x11='Express checkout, ';};
	if (form.fitness.checked)   {x12='Fitness equipment, ';};
	if (form.parking.checked)   {x13='Parking nearby, ';};	
	if (form.room_service.checked)   {x14='Room service 24 hours, ';};
	if (form.TV.checked)   {x15='TV, ';};
	if (form.dishwasher.checked)   {x16='Dishwasher, ';};
	if (form.maid.checked)   {x17='Maid Service Available, ';};
	if (form.microwave.checked)   {x18='Microwave, ';};
	if (form.washer.checked)   {x19='Washer, ';};
	if (form.towels.checked)   {x20='Linen and towels, ';};
	if (form.kitchen.checked)   {x21='Full Kitchen, ';};
	if (form.DVD.checked)   {x22='DVD, ';};
	
  document.myForm.PROPOSAL_amenities.value =  x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + 
                                              x10 + x11 + x12 + x13 + x14 + x15 + x16 + x17 + x18 + x19  + x20 + x21 + x22;

// end of assign values for PROPOSAL_amenities
                 
             
}



function Hnt(form,f) {

	var text = "No Hint available for this field!";

		if (f == "ICONOGRAFIA_riproduzioni_disponibili") {

			text = "Compilare o spuntare le cassele sotto";
			form.ICONOGRAFIA_riproduzioni_disponibili.value = text;

		}

		if (f == "ICONOGRAFIA_liberatorie_disponibili") {

			text = "Compilare o spuntare le cassele sotto";
			form.ICONOGRAFIA_liberatorie_disponibili.value = text;

		}


		

	}

function ValueTransfer(f) {
	self.opener.document.myForm.ICONOGRAFIA_file_web.value = f;
	}


function ValueTransfer_email(f) {
	self.opener.document.myForm.email_to.value = f;
	}
	

var myWind = ""

function doNew_x() {
// either open, or put on the top if it is already existing
	if (myWind == "" || myWind.closed || myWind.name == undefined) {

           pics = window.open("./ulisse_archive.cgi?operation=upload_1x","subWindow","HEIGHT=200,WIDTH=620,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes").focus();

	} else{	myWind.focus();	}
}


function doNew_y() {
// either open, or put on the top if it is already existing
	if (myWind == "" || myWind.closed || myWind.name == undefined) {

           pics = window.open("./ulisse_archive.cgi?operation=upload_1y","subWindow","HEIGHT=200,WIDTH=620,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes").focus();

	} else{	myWind.focus();	}
}



function openphotos(file,input,width,height) {
        attr = "top=5,left=75,width=" + width + ",height=" + height + ",resizable=1,scrollbars=yes";
        window.open(file, input, attr);
}




// end -->
