

function portraitAddEndRow() {

 

var getTable3 = document.getElementById('CustomPortraits');

var countRow3 = getTable3.rows.length; 

var iteration3=countRow3;





var pTR=document.createElement('tr');

var pTD=document.createElement('td');

var cat = document.createElement('select');



 cat.name = "Category_Cus_Port["+iteration3+"]";

 cat.id="Category_Cus_Port["+iteration3+"]";

 cat.options[0] = new Option('1Person', '1Person');

 cat.options[1] = new Option('2Persons', '2Persons');

 cat.options[2] = new Option('3Persons', '3Persons');

 cat.options[3] = new Option('4Persons', '4Persons');

 cat.options[4] = new Option('5Persons', '5Persons');

cat.onchange=function(){onchangPersonsPortrait2(this.value,iteration3);getUnitPrice_Portrait2(iteration3); startPortrait2(iteration3);}; 

//cat.onfocus=function(){startCalframe2(iteration3);}; 

cat.onblur=function(){}; 

pTD.appendChild(cat);







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

var pTD2=document.createElement('td');



 var streching = document.createElement('select');

 streching.name = "Streching_Cus_Port["+iteration3+"]";

 streching.id="Streching_Cus_Port["+iteration3+"]";

 streching.options[0] = new Option('NON', 'NON');

 streching.options[1] = new Option('3/4" Bar', '3/4" Bar');

 streching.options[2] = new Option('Gallery-3/4" Bar', 'Gallery-3/4" Bar');

 streching.options[3] = new Option('Gallery- 1-1/2" Bar', 'Gallery- 1-1/2" Bar');

 

streching.onchange=function(){getUnitPrice_Portrait2(iteration3);startPortrait2(iteration3);};

//streching.onfocus=function(){startCalframe2(iteration3);}; 

streching.onblur=function(){}; 



pTD2.appendChild(streching);



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



var pTD3=document.createElement('td');

var portSize = document.createElement('select');

 portSize.name = "Size_Cus_Port["+iteration3+"]";

 portSize.id="Size_Cus_Port["+iteration3+"]";

 portSize.options[0] = new Option('16x20', '16x20');

 portSize.options[1] = new Option('20x24', '20x24');

 portSize.options[2] = new Option('24x36', '24x36');

 portSize.options[3] = new Option('30x40 ', '30x40'); 

 portSize.options[4] = new Option('36x48', '36x48');

 portSize.options[5] = new Option('48x72', '48x72'); 

 

portSize.onchange=function(){getUnitPrice_Portrait2(iteration3);startPortrait2(iteration3);};



//portSize.onfocus=function(){startCalframe2(iteration3);}; 

portSize.onblur=function(){}; 



pTD3.appendChild(portSize);





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



var pTD4=document.createElement('td');



var cSize = document.createElement('input');

 cSize.type = 'text'; 

 cSize.size=13; 

 cSize.id = "Cus_Size["+iteration3+"]";

 cSize.name = "Cus_Size["+iteration3+"]";

 

cSize.onfocus=function(){startcustomesizePortrait2(iteration3);}; 

pTD4.appendChild(cSize);  

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

var pTD5=document.createElement('td');



var quantity = document.createElement('input');

 quantity.type = 'text'; 

 quantity.value=''; 

 quantity.size=13;

 

 quantity.name = "Quantity_Cus_Port["+iteration3+"]";

 quantity.id="Quantity_Cus_Port["+iteration3+"]";



quantity.onclick=function(){getUnitPrice_Portrait2(iteration3);}; 

quantity.onfocus=function(){startPortrait2(iteration3);}; 

quantity.onblur=function(){stopPortrait2();}; 

 pTD5.appendChild(quantity);

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





var pTD6=document.createElement('td');





var up = document.createElement('input');

 up.type = 'hidden'; 

 up.value=''; 

 up.size=13; 

 up.id = "UP_Display_Portrait["+iteration3+"]"; 

 up.name="UP_Display_Portrait["+iteration3+"]";  



var upd = document.createElement('div');

upd.innerHTML = "";

upd.name = "divupp"+iteration3;

upd.id = "divupp"+iteration3; 



pTD6.appendChild(upd);

pTD6.appendChild(up);

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



var pTD7=document.createElement('td');





var st = document.createElement('input');

 st.type = 'hidden'; 

 st.value=''; 

 st.size=13;

// st.disabled='disabled';

 st.id = "SubTotal_Portrait["+iteration3+"]";

 st.name = "SubTotal_Portrait["+iteration3+"]";

 

var std = document.createElement('div');

std.innerHTML = "";

std.align="right";

std.name = "divstp"+iteration3;

std.id = "divstp"+iteration3;

 

 

 pTD7.appendChild(std);

 pTD7.appendChild(st);

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



pTR.appendChild(pTD);

pTR.appendChild(pTD2);

pTR.appendChild(pTD3);

pTR.appendChild(pTD4);

pTR.appendChild(pTD5);

pTR.appendChild(pTD6);

pTR.appendChild(pTD7);





document.getElementById('CustomPortraits').appendChild(pTR);



}





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

	

function  portraitremoveRow()

{

  var tbl = document.getElementById('CustomPortraits');

  var lastRow = tbl.rows.length;

  if (lastRow > 2) tbl.deleteRow(lastRow - 1);

}







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



function onchangPersonsPortrait2(person,iteration){		

		

var Type=person;

var itr=iteration;



var SizeId="Size_Cus_Port["+itr+"]";





var lb=document.getElementById(SizeId);



switch (Type){

case ('1Person'):

case ('2Persons'):



for (var i=lb.options.length-1; i>=0; i--){

    lb.options[i] = null;

  }

document.getElementById(SizeId).options[0]=new Option('16x20', '16x20');

document.getElementById(SizeId).options[1]=new Option('20x24', '20x24');

document.getElementById(SizeId).options[2]=new Option('24x36', '24x36');

document.getElementById(SizeId).options[3]=new Option('30x40', '30x40');

document.getElementById(SizeId).options[4]=new Option('36x48', '36x48');

document.getElementById(SizeId).options[5]=new Option('48x72', '48x72');

break





case ('3Persons'):



for (var i=lb.options.length-1; i>=0; i--){

    lb.options[i] = null;

}



document.getElementById(SizeId).options[0]=new Option('20x24', '20x24');

document.getElementById(SizeId).options[1]=new Option('24x36', '24x36');

document.getElementById(SizeId).options[2]=new Option('30x40', '30x40');

document.getElementById(SizeId).options[3]=new Option('36x48', '36x48');

document.getElementById(SizeId).options[4]=new Option('48x72', '48x72');



break 



case ('4Persons'):

case ('5Persons'):



for (var i=lb.options.length-1; i>=0; i--){

    lb.options[i] = null;

}



document.getElementById(SizeId).options[0]=new Option('24x36', '24x36');

document.getElementById(SizeId).options[1]=new Option('30x40', '30x40');

document.getElementById(SizeId).options[2]=new Option('36x48', '36x48');

document.getElementById(SizeId).options[3]=new Option('48x72', '48x72');



break 

}

}





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



function getUnitPrice_Portrait2(iteration){

	

	var Portrait_up;



var cusSizeId="Size_Cus_Port["+iteration+"]";

var CategoryId="Category_Cus_Port["+iteration+"]";

var StrechingId="Streching_Cus_Port["+iteration+"]";

var UPId="UP_Display_Portrait["+iteration+"]";

var UPdivId="divupp"+iteration;



var Size_Portrait=document.getElementById(cusSizeId).value;

var category=document.getElementById(CategoryId).value;

var streching=document.getElementById(StrechingId).value;







switch (category){

case ('1Person'):

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

	

					switch (Size_Portrait){

						

					case ('16x20'):

					Portrait_up=75.00;

					break

					

					case ('20x24'):

					Portrait_up=95.00;

					break

					

					case ('24x36'):

					Portrait_up=135.00;

					break

					

					case ('30x40'):

					Portrait_up=160.00;

					break

					

					case ('36x48'):

					Portrait_up=175.00;

					break					

					

					case ('48x72'):

					Portrait_up=300.00;

					break

					}

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

break





case ('2Persons'):

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

					switch (Size_Portrait){

					case ('16x20'):

					Portrait_up=90.00;

					break

					

					case ('20x24'):

					Portrait_up=110.00;

					break

					

					case ('24x36'):

					Portrait_up=160.00;

					break

					

					case ('30x40'):

					Portrait_up=175.00;

					break

					

					case ('36x48'):

					Portrait_up=195.00;

					break

					

					case ('48x72'):

					Portrait_up=325.00;

					break

					}

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

break





case ('3Persons'):

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

					switch (Size_Portrait){

								

					case ('20x24'):

					Portrait_up=125.00;

					break

					

					case ('24x36'):

					Portrait_up=180.00;

					break

					

					case ('30x40'):

					Portrait_up=195.00;

					break

					

					case ('36x48'):

					Portrait_up=215.00;

					break

					

					case ('48x72'):

					Portrait_up=350.00;

					break

					}

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

break



case ('4Persons'):

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

					switch (Size_Portrait){

								

					case ('24x36'):

					Portrait_up=195.00;

					break

					

					case ('30x40'):

					Portrait_up=215.00;

					break

					

					case ('36x48'):

					Portrait_up=230.00;

					break				

					

					case ('48x72'):

					Portrait_up=375.00;

					break

					}

					

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

break



case ('5Persons'):

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

					switch (Size_Portrait){

								

					case ('24x36'):

					Portrait_up=205.00;

					break

					

					case ('30x40'):

					Portrait_up=230.00;

					break

					

					case ('36x48'):

					Portrait_up=245.00;

					break				

					

					case ('48x72'):

					Portrait_up=400.00;

					break

					}

					

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

break

}



if(	streching=='NON'){

document.getElementById(UPId).value=roundNumber(Portrait_up,2);	

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up,2);

	}



else if(streching=='3/4" Bar'){

switch (Size_Portrait){

case ('16x20'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+3.75,2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+3.75,2);

break

case ('20x24'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+4,2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+4,2);

break

case ('24x36'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+5,2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+5,2);

break

case ('30x40'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+8,2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+8,2);

break

case ('36x48'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+9,2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+9,2);

break

case ('48x72'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+24,2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+24,2);

break

	}

	}

else if(streching=='Gallery-3/4" Bar'){

switch (Size_Portrait){

case ('16x20'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(3.75*2),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(3.75*2),2);

break

case ('20x24'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(4*2),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(4*2),2);

break

case ('24x36'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(5*2),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(5*2),2);

break

case ('30x40'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(8*2),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(8*2),2);

break

case ('36x48'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(9*2),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(9*2),2);

break

case ('48x72'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(24*2),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(24*2),2);

break

	}

	}
	
	
else if(streching=='Gallery- 1-1/2" Bar'){

switch (Size_Portrait){

case ('16x20'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(3.75*3),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(3.75*3),2);

break

case ('20x24'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(4*3),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(4*3),2);

break

case ('24x36'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(5*3),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(5*3),2);

break

case ('30x40'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(8*3),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(8*3),2);

break

case ('36x48'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(9*3),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(9*3),2);

break

case ('48x72'):	

document.getElementById(UPId).value=roundNumber(Portrait_up+(24*3),2);

document.getElementById(UPdivId).innerHTML=roundNumber(Portrait_up+(24*3),2);

break

	}

	}
	

	}






	

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

var Itval;



function startPortrait2(iteration){

	 Itval=iteration;

intervalPortrait = setInterval("calSubTotal_Portrait2()",1);

}



function calSubTotal_Portrait2(){

	

	var subtotal;

	var quanId="Quantity_Cus_Port["+Itval+"]";

	var customeId="Cus_Size["+Itval+"]";

	var UpId="UP_Display_Portrait["+Itval+"]";	

	var subtotalId="SubTotal_Portrait["+Itval+"]";	

	var subtotaldivId="divstp"+Itval;	

	

var quan=document.getElementById(quanId).value;	

var cusSize=document.getElementById(customeId).value;

var up=document.getElementById(UpId).value;



	if (cusSize==''){

		subtotal=quan*up;

		//subtotal=Math.round(subtotal*100)/100

		subtotal=roundNumber(subtotal,2);

		

		document.getElementById(subtotalId).value=subtotal;

		document.getElementById(subtotaldivId).innerHTML=subtotal;

		}

		else{

		document.getElementById(subtotalId).value='';

		document.getElementById(subtotaldivId).innerHTML='';

			}

	}

	

	



function stopPortrait2(){

clearInterval(intervalPortrait);

}	



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



var cusSizeIteration;

function startcustomesizePortrait2(iteration){

	cusSizeIteration=iteration;

intervalPortrait = setInterval("customeSize2()",1);

}



function customeSize2(){

	var CustomeSizeId="Cus_Size["+cusSizeIteration+"]";

	var psizeId="Size_Cus_Port["+cusSizeIteration+"]";

	var unitPId="UP_Display_Portrait["+cusSizeIteration+"]";

	var unitPdivId="divupp"+cusSizeIteration;

	var SubtotalId="SubTotal_Portrait["+cusSizeIteration+"]";

	var SubtotaldivId="divstp"+cusSizeIteration;





var customesize=document.getElementById(CustomeSizeId).value;

var psize=document.getElementById(psizeId);





if (customesize==""){

psize.disabled=false; 

	}

else{		

psize.disabled=true;

//psize.value="";

document.getElementById(unitPId).value="";

document.getElementById(SubtotalId).value="";

document.getElementById(unitPdivId).innerHTML="";

document.getElementById(SubtotaldivId).innerHTML="";



}	

	}

	

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



function stopcustomesizePortrait2(){

clearInterval(intervalPortrait);

}







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

var UnitPrice_Portrait;

var subtotal_Portrait;





function onchangPersonsPortrait(person){		

		

var Type=person;



var lb=document.getElementById("Size_Cus_Port[]");



switch (Type){

case ('1Person'):

case ('2Persons'):



for (var i=lb.options.length-1; i>=0; i--){

    lb.options[i] = null;

  }

document.getElementById("Size_Cus_Port[]").options[0]=new Option('16x20', '16x20');

document.getElementById("Size_Cus_Port[]").options[1]=new Option('20x24', '20x24');

document.getElementById("Size_Cus_Port[]").options[2]=new Option('24x36', '24x36');

document.getElementById("Size_Cus_Port[]").options[3]=new Option('30x40', '30x40');

document.getElementById("Size_Cus_Port[]").options[4]=new Option('36x48', '36x48');

document.getElementById("Size_Cus_Port[]").options[5]=new Option('48x72', '48x72');

break





case ('3Persons'):



for (var i=lb.options.length-1; i>=0; i--){

    lb.options[i] = null;

}



document.getElementById("Size_Cus_Port[]").options[0]=new Option('20x24', '20x24');

document.getElementById("Size_Cus_Port[]").options[1]=new Option('24x36', '24x36');

document.getElementById("Size_Cus_Port[]").options[2]=new Option('30x40', '30x40');

document.getElementById("Size_Cus_Port[]").options[3]=new Option('36x48', '36x48');

document.getElementById("Size_Cus_Port[]").options[4]=new Option('48x72', '48x72');



break 



case ('4Persons'):

case ('5Persons'):



for (var i=lb.options.length-1; i>=0; i--){

    lb.options[i] = null;

}



document.getElementById("Size_Cus_Port[]").options[0]=new Option('24x36', '24x36');

document.getElementById("Size_Cus_Port[]").options[1]=new Option('30x40', '30x40');

document.getElementById("Size_Cus_Port[]").options[2]=new Option('36x48', '36x48');

document.getElementById("Size_Cus_Port[]").options[3]=new Option('48x72', '48x72');



break 

}

}





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



function getUnitPrice_Portrait(){



var Size_Portrait=document.getElementById("Size_Cus_Port[]").value;

var category=document.getElementById("Category_Cus_Port[]").value;

var streching=document.getElementById("Streching_Cus_Port[]").value;







switch (category){

case ('1Person'):

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

	

					switch (Size_Portrait){

						

					case ('16x20'):

					UnitPrice_Portrait=75.00;

					break

					

					case ('20x24'):

					UnitPrice_Portrait=95.00;

					break

					

					case ('24x36'):

					UnitPrice_Portrait=135.00;

					break

					

					case ('30x40'):

					UnitPrice_Portrait=160.00;

					break

					

					case ('36x48'):

					UnitPrice_Portrait=175.00;

					break					

					

					case ('48x72'):

					UnitPrice_Portrait=300.00;

					break

					}

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

break





case ('2Persons'):

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

					switch (Size_Portrait){

					case ('16x20'):

					UnitPrice_Portrait=90.00;

					break

					

					case ('20x24'):

					UnitPrice_Portrait=110.00;

					break

					

					case ('24x36'):

					UnitPrice_Portrait=160.00;

					break

					

					case ('30x40'):

					UnitPrice_Portrait=175.00;

					break

					

					case ('36x48'):

					UnitPrice_Portrait=195.00;

					break

					

					case ('48x72'):

					UnitPrice_Portrait=325.00;

					break

					}

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

break





case ('3Persons'):

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

					switch (Size_Portrait){

								

					case ('20x24'):

					UnitPrice_Portrait=125.00;

					break

					

					case ('24x36'):

					UnitPrice_Portrait=180.00;

					break

					

					case ('30x40'):

					UnitPrice_Portrait=195.00;

					break

					

					case ('36x48'):

					UnitPrice_Portrait=215.00;

					break

					

					case ('48x72'):

					UnitPrice_Portrait=350.00;

					break

					}

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

break



case ('4Persons'):

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

					switch (Size_Portrait){

								

					case ('24x36'):

					UnitPrice_Portrait=195.00;

					break

					

					case ('30x40'):

					UnitPrice_Portrait=215.00;

					break

					

					case ('36x48'):

					UnitPrice_Portrait=230.00;

					break				

					

					case ('48x72'):

					UnitPrice_Portrait=375.00;

					break

					}

					

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

break



case ('5Persons'):

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

					switch (Size_Portrait){

								

					case ('24x36'):

					UnitPrice_Portrait=205.00;

					break

					

					case ('30x40'):

					UnitPrice_Portrait=230.00;

					break

					

					case ('36x48'):

					UnitPrice_Portrait=245.00;

					break				

					

					case ('48x72'):

					UnitPrice_Portrait=400.00;

					break

					}

					

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

break

}







if(	streching=='NON'){

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait,2);	

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait,2);	

	}

else if(streching=='3/4" Bar'){

switch (Size_Portrait){

case ('16x20'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+3.75,2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+3.75,2);

break

case ('20x24'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+4,2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+4,2);

break

case ('24x36'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+5,2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+5,2);

break

case ('30x40'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+8,2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+8,2);

break

case ('36x48'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+9,2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+9,2);

break

case ('48x72'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+24,2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+24,2);

break

	}

	}

else if(streching=='Gallery-3/4" Bar'){

switch (Size_Portrait){

case ('16x20'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(3.75*2),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(3.75*2),2);

break

case ('20x24'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(4*2),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(4*2),2);

break

case ('24x36'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(5*2),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(5*2),2);

break

case ('30x40'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(8*2),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(8*2),2);

break

case ('36x48'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(9*2),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(9*2),2);

break

case ('48x72'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(24*2),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(24*2),2);

break

	}

	}
	
	
else if(streching=='Gallery- 1-1/2" Bar'){

switch (Size_Portrait){

case ('16x20'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(3.75*3),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(3.75*3),2);

break

case ('20x24'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(4*3),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(4*3),2);

break

case ('24x36'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(5*3),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(5*3),2);

break

case ('30x40'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(8*3),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(8*3),2);

break

case ('36x48'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(9*3),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(9*3),2);

break

case ('48x72'):	

document.getElementById('UP_Display_Portrait[]').value=roundNumber(UnitPrice_Portrait+(24*3),2);

document.getElementById('UP_div_Portrait').innerHTML=roundNumber(UnitPrice_Portrait+(24*3),2);

break

	}

	}
	

	}

	

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



function calSubTotal_Portrait(){

var quan=document.getElementById('Quantity_Cus_Port[]').value;	

var cusSize=document.getElementById('Cus_Size[]').value;

var up=document.getElementById('UP_Display_Portrait[]').value;



	

	if (cusSize==''){

		subtotal_Portrait=quan*up;

		subtotal_Portrait=Math.round(subtotal_Portrait*100)/100

		subtotal_Portrait=roundNumber(subtotal_Portrait,2);

		document.getElementById('SubTotal_Portrait[]').value=subtotal_Portrait;

		document.getElementById('SubTotal_Portrait').innerHTML=subtotal_Portrait;

		}

		else{

			document.getElementById('SubTotal_Portrait[]').value='';

			document.getElementById('SubTotal_Portrait').innerHTML='';

			}

	}

	

	

function startPortrait(){

intervalPortrait = setInterval("calSubTotal_Portrait()",1);

}



function stopPortrait(){

clearInterval(intervalPortrait);

}	





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



function customeSize(){



var customesize=document.getElementById('Cus_Size[]').value;

var psize=document.getElementById('Size_Cus_Port[]');





if (customesize==""){	

psize.disabled=false; 	

	}

	else{		

psize.disabled=true;

//psize.value="";

document.getElementById('UP_Display_Portrait[]').value="";

document.getElementById('SubTotal_Portrait[]').value="";

document.getElementById('UP_div_Portrait').innerHTML="";

document.getElementById('SubTotal_Portrait').innerHTML="";

}	

	}

	

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



function startcustomesizePortrait(){

intervalPortrait = setInterval("customeSize()",1);

}



function stopcustomesizePortrait(){

clearInterval(intervalPortrait);

}



//-------------------Check Quantity-----------------	



function quantitycheckportrait1(){

var q=document.getElementById("Quantity_Cus_Port[]").value;



if(q==""){

alert("PLEASE ENTER QUANTITY")	

	}	

	}

	

function quantitycheckportrait2(){
var getTable3 = document.getElementById('CustomPortraits');
var countRow3 = getTable3.rows.length; 
var iteration=countRow3-2;

var qId="Quantity_Cus_Port["+iteration+"]";

var q=document.getElementById(qId).value;



if(q==""){

alert("PLEASE ENTER QUANTITY")	

	}	

	}

