/* Author: Flavia Nascimento
   Date: March 04, 2002
   Developed for: Photo Features & Icruz Design
*/

// constants declaration - to easely update price list
// Colour Negative C41
// po = process Only  |pp = process & proof | ss = second set | pr = proofs 
po1= 5.05
pc1 = 15.00
ss1 = 2.88
pr1 = 8.40
po2 = 6.25
pc2 = 16.20
pr2 = 12.60
ss2 = 4.32
po3 =6.25
pc3 = 11.25
po4 =9.00
pc4 = 19.00
po5 = 3.45
pc5 = 6.45
po6 = 4.30
pc6 = 7.30
po7 = 5.50
pc7= 7.50

pull1 = 0.50*po1
pull2 = 0.50*po2
pull3 = 0.50*po3
pull4 = 0.50*po4
pull5 = 0.50*po5
pull6 = 0.50*po6
pull7 = 0.50*po7


// variable to hold the selected process value (if p.only or p. & contact)
proce1=po1
proce2=po2
proce3=po3
proce4=po4
proce5=po5
proce6=po6
proce7=po7



// variables to hold the totoal by line (depending on the film type)
totalline1 =0
totalline2 = 0
totalline3 =0
totalline4 =0
totalline5 =0
totalline6 =0
totalline7 =0
totalProcessing = 0



//------------------------------ functions --------------------------


	// checks weather the checkBox is selected or not. If it is gets the value 
	
function getCheckBoxValue(checkBox, value){
	with (checkBox.form) {

	if (checkBox.checked == true)
	return eval(value);
	else
	return 0;
		}
	}
	
// -------------------------------------




function checkQt(qt,chec){

// checks for quant entry.
	
	if(qt.value == "0"){
	alert ("Please enter a quantity")
	chec.checked = false;
	qt.focus()
	//qt.select()
	return false
	
	}else{
	return true
	}


}// end function

// 
function checkQt_r1(qt, rad){
// this function resets the radio button	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	proce1=po1;

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_r2(qt, rad){
// this function resets the radio button	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	proce2=po2;

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_r3(qt, rad){
// this function resets the radio button	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	proce3=po3;

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_r4(qt, rad){
// this function resets the radio button	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	proce4=po4;

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_r5(qt, rad){
// this function resets the radio button	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	proce5=po5;

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_r6(qt, rad){
// this function resets the radio button	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	proce6=po6;

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_r7(qt, rad){
// this function resets the radio button	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	proce7=po7;

	return false
	
	}else{
	return true
	}


}// end function

// functions to reset the radio butt for B&W

function checkQt_bw1(qt, rad){
	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	bw_proce1=po1

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_bw2(qt, rad){
	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	bw_proce2=po2

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_bw3(qt, rad){
	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	bw_proce3=po3

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_bw4(qt, rad){
	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	bw_proce4=po4

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_bw5(qt, rad){
	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	bw_proce5=po5

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_bw6(qt, rad){
	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	bw_proce6=po6

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_bw7(qt, rad){
	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	bw_proce7=po7

	return false
	
	}else{
	return true
	}


}// end function


// ------------- functions to reset the proofs

function checkQt_proof1(qt, rad){
	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	
	bw_proof1=0

	return false
	
	}else{
	return true
	}


}// end function


function checkQt_proof2(qt, rad){
	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	
	bw_proof2=0

	return false
	
	}else{
	return true
	}


}// end function

function checkQt_proof3(qt, rad){
	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	
	bw_proof3=0

	return false
	
	}else{
	verifyFrames(document.frmFPbw.ddmFrame3);
	return true
	}


}// end function

function checkQt_proof4(qt, rad){
	

	if(qt.value == "0"){
	alert ("Please enter a quantity")
	qt.focus()
	rad.checked = false;
	rad[0].checked = true;
	
	
	bw_proof4=0

	return false
	
	}else{
	 verifyFrames(document.frmFPbw.ddmFrame4); 
	return true
	}


}// end function


function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num)) num = "0";
cents = Math.floor((num*100+0.5)%100);
num = Math.floor((num*100+0.5)/100).toString();
if(cents < 10) cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+num.substring(num.length-(4*i+3));
return ("$" + num + "." + cents);
}

// Is it A positive integer?- validates the quantity entry
function isInt(elm, msg, maxQuant) {
	if (elm.value >= 0 && elm.value < maxQuant){
		return true
	}else if (elm.value > maxQuant){
		alert ("For this amount, please contact us at (613) 729-9076 for a special volume discount")
		elm.focus()
		elm.value = 0
		return false

	}else if (elm.value ==""){
		alert ("Please enter a numeric value for the quantity of " + msg)
		elm.focus()
		elm.value = 0
		return false

	}else {
		alert ("Please enter a numeric value for the quantity of " + msg)
		elm.focus()
		elm.value = 0
		return false
		} // end if
	   	 
   }//end func ------------------------
   
function disableCheck(elm1, elm2){
// diselect the sset, index checkboxes on the selection of process only radio button
// it is called by the process only radio butt. (onClick)
	elm1.checked = 0
	elm2.checked = 0
	
	}// end func

// -------------------

function verifyProofCheck(checkp, checkss){

// do not allow selection of sset without proofs being selected
// it is called on the onBlur method of the checkboxes
	
	if (checkp.checked == false){
	alert ("Second Set is only available with proofs. Please, select the Proof check box")
	checkss.checked = 0
	}else{ // do nothing
	}

}// end func ---------------------

function validateQuant(total){ // prompt the user a message if all quantities is Zero 

	if (total =="0" ){
		alert("Please enter the number of films to be processed")}
		//frmFPc41.txtQuant1.focus()
		
}// end function ---------------------------------


function totalbyline(quant, processing, sset, proofs, pull){ // this is the basic formula

	return quant * (processing + sset + proofs + pull);
	
}// end func


//-------------- Colour Neg C41 ------------------------------
//--------------------------------------------------------------



function getTotalLine1(){

totalline1 = totalbyline(eval(document.frmFPc41.txtQuant1.value), proce1, getCheckBoxValue(document.frmFPc41.chkSset1, ss1), getCheckBoxValue(document.frmFPc41.chkProof1, pr1), getCheckBoxValue(document.frmFPc41.txtPull1, pull1)); 
document.frmFPc41.txtTotalLine1.value = formatCurrency(totalline1);

}// end func -------------

function getTotalLine2(){

totalline2 = totalbyline(eval(document.frmFPc41.txtQuant2.value), proce2, getCheckBoxValue(document.frmFPc41.chkSset2, ss2), getCheckBoxValue(document.frmFPc41.chkProof2, pr2), getCheckBoxValue(document.frmFPc41.txtPull2, pull2));
document.frmFPc41.txtTotalLine2.value = formatCurrency(totalline2);

}// end func -------------

function getTotalLine3(){

totalline3 = totalbyline(eval(document.frmFPc41.txtQuant3.value), proce3, 0, 0, getCheckBoxValue(document.frmFPc41.txtPull3, pull3)); 
document.frmFPc41.txtTotalLine3.value = formatCurrency(totalline3);

}// end func -------------

function getTotalLine4(){

totalline4 = totalbyline(eval(document.frmFPc41.txtQuant4.value), proce4, 0, 0, getCheckBoxValue(document.frmFPc41.txtPull4, pull4)); 
document.frmFPc41.txtTotalLine4.value = formatCurrency(totalline4);

}// end func -------------

function getTotalLine5(){

totalline5 = totalbyline(eval(document.frmFPc41.txtQuant5.value), proce5, 0, 0, getCheckBoxValue(document.frmFPc41.txtPull5, pull5)); 
document.frmFPc41.txtTotalLine5.value = formatCurrency(totalline5);

}// end func -------------

function getTotalLine6(){

totalline6 = totalbyline(eval(document.frmFPc41.txtQuant6.value), proce6, 0, 0, getCheckBoxValue(document.frmFPc41.txtPull6, pull6)); 
document.frmFPc41.txtTotalLine6.value = formatCurrency(totalline6);

}// end func -------------

function getTotalLine7(){

totalline7 = totalbyline(eval(document.frmFPc41.txtQuant7.value), proce7, 0, 0, getCheckBoxValue(document.frmFPc41.txtPull7, pull7)); 
document.frmFPc41.txtTotalLine7.value = formatCurrency(totalline7);

}// end func -------------




function getTotal(){

totalProcessing = totalline1 + totalline2 + totalline3 + totalline4 + totalline5 + totalline6 + totalline7;
document.frmFPc41.txtTotal1Hour.value = formatCurrency(totalProcessing);

}// end func ---------------



function getTotals(){
	clearVariables();

	if(isInt(document.frmFPc41.txtQuant1, "35mm - 24 Exp", 51)==false
	|| isInt(document.frmFPc41.txtQuant2, "35mm - 36 Exp", 51)==false
	|| isInt(document.frmFPc41.txtQuant3, "120", 51)==false
	|| isInt(document.frmFPc41.txtQuant4, "220", 51)==false
	|| isInt(document.frmFPc41.txtQuant5, "4x5", 51)==false
	|| isInt(document.frmFPc41.txtQuant6, "5x7", 51)==false
	|| isInt(document.frmFPc41.txtQuant7, "8x10", 51)==false){
	return false

	}else{

	
	getTotalLine1();
	getTotalLine2();
	getTotalLine3();
	getTotalLine4();
	getTotalLine5();
	getTotalLine6();
	getTotalLine7();
	getTotal();
	validateQuant(totalProcessing);
	}//end if

}// end func ------------

function clearVariables(){
// set the variables values to zero

totalline1 =0
totalline2 = 0
totalline3 =0
totalline4 =0
totalline5 =0
totalline6 = 0
totalline7 =0
totalProcessing = 0

}// end func
function setIniValues(){
// sets the process value to Proc. Only

proce1=po1
proce2=po2
proce3=po3
proce4=po4
proce5=po5
proce6=po6
proce7=po7


}// end function -------------
// end of colour negative c41  ------------------------------------------

// BLACK AND WHITE -----------------------

// constants declaration - to easely update price list
// B&W  Negative C41
// pr = proofs |tbwp = true B&W Proofs|pc = proc. & contact
pc1 = 15.00
pr1 = 8.40
pc2 = 16.20
pr2 = 12.60
pc3 = 11.25
pr3=1.25 //each
pc4 = 19.00
pr4 = 1.25 //each
pc5 = 6.45
pc6 = 7.30
pc7= 7.50

tbwp1 = 15.60
tbwp2 = 23.40
tbwp3 = 1.25 // each
tbwp4 = 1.25 // each
ss3 = 0.65 // each
ss4= 0.65


tbwsset1 = (0.40*24) // second set true BW 35mmx24
tbwsset2 = (0.40*36) 


// variable to hold the selected process value (if p.only or p. & contact)
bw_proce1=po1
bw_proce2=po2
bw_proce3=po3
bw_proce4=po4
bw_proce5=po5
bw_proce6=po6
bw_proce7=po7

bw_proof1=0
bw_proof2=0
bw_proof3=0
bw_proof4=0


// variables to hold the totoal by line (depending on the film type)
bw_totalline1 =0
bw_totalline2 = 0
bw_totalline3 =0
bw_totalline4 =0
bw_totalline5 =0
bw_totalline6 =0
bw_totalline7 =0
totalProcessing = 0

function verifyFrames(dropD){

var fra = 0
for (i=0; i<dropD.length; i++){
		if (dropD.options[i].selected==true){
		fra= dropD.options[i].value
		}// end if
	}// end loop

			if (fra=="0"){
			alert ("Please select the Frames")
			dropD.focus()
			return false
			}
			else {
			return true
			
			}// end nested if





}// end function

function getSset(checkBox, value, valueTbw, proofType){
	with (checkBox.form) {

	if (checkBox.checked == true){
	
		indexOp = -1
		for (i=0; proofType.length; i++){
			if(proofType[0].checked){
			return 0;
			}else if (proofType[1].checked){
			return value;
			}else if (proofType[2].checked){
			return valueTbw;
			}// end nested if
		}// end for
	}else{
	return 0;
	}// end 1st if
	
	}// end with

	
}// end func-------


function getSset_120_220(checkBox, valueTbw, proofType){
	with (checkBox.form) {

	if (checkBox.checked == true){
	
		indexOp = -1
		for (i=0; proofType.length; i++){
			if(proofType[0].checked){
			return 0;
			}else if (proofType[1].checked){
			return valueTbw;
			}// end nested if
		}// end for
	}else{
	return 0;
	}// end 1st if
	
	}// end with

	
}// end func-------


   
function disableCheckSet(elm1){
// diselect the sset, on the  bw form 
// it is called by the process only radio butt. (onClick)
	elm1.checked = 0
		
}// end func ------------------

function verifyProofR(radioProcess, checkBox){

// do not allow selection of sset, index and annotation checkboxes, if process only is selected
// it is called on the onBlur method of the checkboxes

	rProcess= -1
	for (i=0; i<radioProcess.length; i++){

		if (radioProcess[i].checked){
		 rProcess = i
		} // end loop

		}
		if (rProcess== 0){
		alert ("Second Set is only available with proofs.Please select one proof option (from C41 or True B & W)");
		checkBox.checked = false
		}else if (rProcess==1 || rProcess==2){
		//checkBox.checked = true
	}

}// end func ---------------------

function getFrame(dropDown){
	fras = -1
	for (i=0; i<dropDown.length; i++){
		if (dropDown.options[i].selected==true){
		return dropDown.options[i].value
		}
	}
		
	

}// end func ---------------------

function totalbylineWithFrames(quant, processing, sset, proofs, frame, pull){ // this is the basic formula
	
	
	return quant * (processing + (frame*sset) + (frame*proofs) + pull);
	
}// end func


//-------------- B & W ------------------------------
//--------------------------------------------------------------



function getbw_totalline1(){
bw_totalline1 = totalbyline(eval(document.frmFPbw.txtQuant1.value), bw_proce1, getSset(document.frmFPbw.chkSset1, ss1, tbwsset1, document.frmFPbw.grpProof1), bw_proof1, getCheckBoxValue(document.frmFPbw.chkPull1, pull1)); 
document.frmFPbw.txtTotalLine1.value = formatCurrency(bw_totalline1);

}// end func -------------

function getbw_totalline2(){

bw_totalline2 = totalbyline(eval(document.frmFPbw.txtQuant2.value), bw_proce2, getSset(document.frmFPbw.chkSset2, ss2, tbwsset2, document.frmFPbw.grpProof2), bw_proof2, getCheckBoxValue(document.frmFPbw.chkPull2, pull2));
document.frmFPbw.txtTotalLine2.value = formatCurrency(bw_totalline2);

}// end func -------------

function getbw_totalline3(){

bw_totalline3 = totalbylineWithFrames(eval(document.frmFPbw.txtQuant3.value), bw_proce3, getSset_120_220(document.frmFPbw.chkSset3, ss3, document.frmFPbw.grpProof3), bw_proof3, getFrame(document.frmFPbw.ddmFrame3), getCheckBoxValue(document.frmFPbw.chkPull3, pull3)); 
document.frmFPbw.txtTotalLine3.value = formatCurrency(bw_totalline3);


}// end func -------------

function getbw_totalline4(){

bw_totalline4 = totalbylineWithFrames(eval(document.frmFPbw.txtQuant4.value), bw_proce4, getSset_120_220(document.frmFPbw.chkSset4, ss4, document.frmFPbw.grpProof4), bw_proof4, getFrame(document.frmFPbw.ddmFrame4),getCheckBoxValue(document.frmFPbw.chkPull4, pull4)); 
document.frmFPbw.txtTotalLine4.value = formatCurrency(bw_totalline4);


}// end func -------------

function getbw_totalline5(){

bw_totalline5 = totalbyline(eval(document.frmFPbw.txtQuant5.value), bw_proce5, 0, 0, getCheckBoxValue(document.frmFPbw.chkPull5, pull5)); 
document.frmFPbw.txtTotalLine5.value = formatCurrency(bw_totalline5);

}// end func -------------

function getbw_totalline6(){

bw_totalline6 = totalbyline(eval(document.frmFPbw.txtQuant6.value), bw_proce6, 0, 0, getCheckBoxValue(document.frmFPbw.chkPull6, pull6)); 
document.frmFPbw.txtTotalLine6.value = formatCurrency(bw_totalline6);

}// end func -------------

function getbw_totalline7(){

bw_totalline7 = totalbyline(eval(document.frmFPbw.txtQuant7.value), bw_proce7, 0, 0, getCheckBoxValue(document.frmFPbw.chkPull7, pull7)); 
document.frmFPbw.txtTotalLine7.value = formatCurrency(bw_totalline7);

}// end func -------------




function bw_getTotal(){

totalProcessing = bw_totalline1 + bw_totalline2 + bw_totalline3 + bw_totalline4 + bw_totalline5 + bw_totalline6 + bw_totalline7;
document.frmFPbw.txtTotal1Hour.value = formatCurrency(totalProcessing);

}// end func ---------------



function bw_getTotals(){
	
	bw_clearVariables();

	if(isInt(document.frmFPbw.txtQuant1, "35mm - 24 Exp", 51)==false
	|| isInt(document.frmFPbw.txtQuant2, "35mm - 36 Exp", 51)==false
	|| isInt(document.frmFPbw.txtQuant3, "120", 51)==false
	|| isInt(document.frmFPbw.txtQuant4, "220", 51)==false
	|| isInt(document.frmFPbw.txtQuant5, "4x5", 51)==false
	|| isInt(document.frmFPbw.txtQuant6, "5x7", 51)==false
	|| isInt(document.frmFPbw.txtQuant7, "8x10", 51)==false){
	return false

	}else{
	
	getbw_totalline1();
	getbw_totalline2();
	getbw_totalline3();
	getbw_totalline4();
	getbw_totalline5();
	getbw_totalline6();
	getbw_totalline7();
	bw_getTotal();
	validateQuant(totalProcessing); 
	}//end if

}

function bw_clearVariables(){
// set the variables values to zero

bw_totalline1 =0
bw_totalline2 = 0
bw_totalline3 =0
bw_totalline4 =0
bw_totalline5 =0
bw_totalline6 = 0
bw_totalline7 =0
totalProcessing = 0

}// end func
function bw_setIniValues(){
// sets the process value to Proc. Only

bw_proce1=po1
bw_proce2=po2
bw_proce3=po3
bw_proce4=po4
bw_proce5=po5
bw_proce6=po6
bw_proce7=po7

}// end function -------------

// END BLACK & WHITE ------------------------------------------
// constants... price list... to facilitate the price list update...
// Film Processing ** Transparency Film **


// process only
tfp35x24=7.00
tfp35x36=8.30
tfp120=9.25
tfp220=12.75
tfp4x5=4.45
tfp8x10=6.50


// mount	
tfm35x24=2.40
tfm35x36=3.60

pullYes=0.50
clipc = 5.00

//-------------------------

// variables declaration to hold the totals ---------------------------

transpProc_35x24 = 0
transpProc_35x36  = 0
transpProc_120  = 0
transpProc_220  = 0
transpProc_4x5  = 0
transpProc_8x10  = 0
trans_theGrandTotal = 0

// -------------------- FUNCTIONS -----------------------------

function trans_clearVariables(){  // to empity the variables
// it is called on reset and on calculate

transpProc_35x24 = 0
transpProc_35x36  = 0
transpProc_120  = 0
transpProc_220  = 0
transpProc_4x5  = 0
transpProc_8x10  = 0
trans_theGrandTotal = 0


}// end func ---------------------------------------



function getTransProcPrice(quant, proc, pull, mount, clip){ // this is the basic formula

return quant * (proc + (proc * pull) + mount + clip);

}// end function -------------------------

function getTotal35x24(){

transpProc_35x24 = getTransProcPrice(eval(document.frmTransparencyFilm.txtQuantT35x24.value),
getCheckBoxValue(document.frmTransparencyFilm.chkp1, tfp35x24), 
getCheckBoxValue(document.frmTransparencyFilm.chkPush1, pullYes), 
getCheckBoxValue(document.frmTransparencyFilm.chkMount1, tfm35x24), 
getCheckBoxValue(document.frmTransparencyFilm.chkClip1, clipc));

document.frmTransparencyFilm.txtTotalT35x24.value = formatCurrency(transpProc_35x24);
}// end func ----------------------	


function getTotal35x36(){

transpProc_35x36 = getTransProcPrice(eval(document.frmTransparencyFilm.txtQuantT35x36.value),
getCheckBoxValue(document.frmTransparencyFilm.chkp2, tfp35x36), 
getCheckBoxValue(document.frmTransparencyFilm.chkPush2, pullYes), 
getCheckBoxValue(document.frmTransparencyFilm.chkMount2, tfm35x36), 
getCheckBoxValue(document.frmTransparencyFilm.chkClip2, clipc));

document.frmTransparencyFilm.txtTotalT35x36.value = formatCurrency(transpProc_35x36);
}// end func ----------------------	

function getTotal120(){

transpProc_120 = getTransProcPrice(eval(document.frmTransparencyFilm.txtQuantT120.value),
getCheckBoxValue(document.frmTransparencyFilm.chkp3, tfp120), 
getCheckBoxValue(document.frmTransparencyFilm.chkPush3, pullYes), 
0, 
getCheckBoxValue(document.frmTransparencyFilm.chkClip3, clipc));

document.frmTransparencyFilm.txtTotalT120.value = formatCurrency(transpProc_120);
}// end func ----------------------	


function getTotal220(){

transpProc_220 = getTransProcPrice(eval(document.frmTransparencyFilm.txtQuantT220.value),
getCheckBoxValue(document.frmTransparencyFilm.chkp4, tfp220), 
getCheckBoxValue(document.frmTransparencyFilm.chkPush4, pullYes), 
0, 
getCheckBoxValue(document.frmTransparencyFilm.chkClip4, clipc));

document.frmTransparencyFilm.txtTotalT220.value = formatCurrency(transpProc_220);
}// end func ----------------------	

function getTotal4x5(){

transpProc_4x5 = getTransProcPrice(eval(document.frmTransparencyFilm.txtQuantT4x5.value),
getCheckBoxValue(document.frmTransparencyFilm.chkp5, tfp4x5), 
getCheckBoxValue(document.frmTransparencyFilm.chkPush5, pullYes), 
0, 0);

document.frmTransparencyFilm.txtTotalT4x5.value = formatCurrency(transpProc_4x5);
}// end func ----------------------	


function getTotal8x10(){

transpProc_8x10 = getTransProcPrice(eval(document.frmTransparencyFilm.txtQuantT8x10.value),
getCheckBoxValue(document.frmTransparencyFilm.chkp6, tfp8x10), 
getCheckBoxValue(document.frmTransparencyFilm.chkPush6, pullYes), 
0, 0);

document.frmTransparencyFilm.txtTotalT8x10.value = formatCurrency(transpProc_8x10);
}// end func ----------------------	

function trans_getTheGrandTotal(){ 

trans_theGrandTotal = transpProc_35x24 + transpProc_35x36  + transpProc_120  + transpProc_220 +
transpProc_4x5  + transpProc_8x10;

document.frmTransparencyFilm.txtGrandTotalT.value = formatCurrency(trans_theGrandTotal);


}// end func

function trans_getTotals(){ // gets the totals

	
	
	// call the functions to get each total
	// it is called by the "calculate" Botton
	// validates the quantity entry
	
	trans_clearVariables(); // to clear all variables and avoid memory rest

	if(isInt(document.frmTransparencyFilm.txtQuantT35x24, "35mm - 24 Exp",51)==false
	|| isInt(document.frmTransparencyFilm.txtQuantT35x36, "35mm x 36 Exp", 51)==false
	|| isInt(document.frmTransparencyFilm.txtQuantT120, "120", 51)==false
	|| isInt(document.frmTransparencyFilm.txtQuantT220, "220", 51)==false
	|| isInt(document.frmTransparencyFilm.txtQuantT4x5, "4 x 5", 51)==false
	|| isInt(document.frmTransparencyFilm.txtQuantT8x10, "8x10", 51)==false){
	return false

	}else{

	getTotal35x24();
	getTotal35x36();
	getTotal120();
	getTotal220();
	getTotal4x5();
	getTotal8x10();
	trans_getTheGrandTotal();
	validateQuant(trans_theGrandTotal);
	}//end if
	
} // END FUNC