<script LANGUAGE="JavaScript">
/* Copyright Reaz Hoque http://rhoque.com
rhoque@rhoque.com
This code can be used for non-profit use only if the copyright notice is kept. */
var called=false;
var T_Price=0;
var Line1_flag;
var Line1_print="";
var Line2_flag;
var Line2_print;
var Line3_flag;
var Line3_print;
var Line4_flag;
var Line4_print;
var Line5_flag;
var Line5_print;
var Line6_flag;
var Line6_print;
function compute(form){
called=true;
//-------Productos 1----------
if (form.Productline1[0].selected){
Line1_print= "Ninguno [$0]";
Line1_flag=0;
}
if (form.Productline1[1].selected){
Line1_flag =84.95;
Line1_print="Producto 1 [$84.95]";
}
else if (form.Productline1[2].selected){
Line1_flag =84.95;
Line1_print="Producto 2 [$84.95]";
}
else if (form.Productline1[3].selected){
Line1_flag =54.95;
Line1_print="Producto 3 [$54.95]";
}
else if (form.Productline1[4].selected){
Line1_flag =54.95;
Line1_print="Producto 4 [$54.95]";
}
else if (form.Productline1[5].selected){
Line1_flag =19.95;
Line1_print="Producto 5 [$19.95]";
}
//-------Productos 2----------
if (form.Productline2[0].selected){
Line2_flag=0;
Line2_print="Ninguno [$0]";
}
if (form.Productline2[1].selected){
Line2_flag=150;
Line2_print="Producto 1 [$150]";
}
if (form.Productline2[2].selected){
Line2_flag=250;
Line2_print="Producto 2 [$250]";
}
if (form.Productline2[3].selected){
Line2_flag=350;
Line2_print="Producto 3 [$350]";
}
//-------Productos 3-----------
if (form.Productline3[0].selected){
Line3_flag=0;
Line3_print="Ninguno [$0]";
}
if (form.Productline3[1].selected){
Line3_flag=10;
Line3_print="Producto 1 [$10]";
}
if (form.Productline3[2].selected){
Line3_flag=20;
Line3_print="Producto 2 [$20]";
}
if (form.Productline3[3].selected){
Line3_flag=30;
Line3_print="Producto 3 [$30]";
}
//-------Productos 4-------
if (form.Productline4[0].selected){
Line4_flag=0;
Line4_print="Ninguno [$0]";
}
if (form.Productline4[1].selected){
Line4_flag=100;
Line4_print="Producto 1 [$100]";
}
if (form.Productline4[2].selected){
Line4_flag=200;
Line4_print="Producto 2 [$200]";
}
if (form.Productline4[3].selected){
Line4_flag=300;
Line4_print="Producto 3 [$300]";
}
//-------Productos 5-------
if (form.Productline5[0].selected){
Line5_flag=0;
Line5_print="Ninguno [$0]";
}
if (form.Productline5[1].selected){
Line5_flag=50;
Line5_print="Producto 1 [$50]";
}
if (form.Productline5[2].selected){
Line5_flag=60;
Line5_print="Producto 2 [$60]";
}
if (form.Productline5[3].selected){
Line5_flag=70;
Line5_print="Producto 3 [$70]";
}
//-------Productos 6-------
if (form.Productline6[0].selected){
Line6_flag=0;
Line6_print="Ninguno [$0]";
}
if (form.Productline6[1].selected){
Line6_flag=75;
Line6_print="Producto 1 [$75]";
}
if (form.Productline6[2].selected){
Line6_flag=85;
Line6_print="Producto 2 [$85]";
}
if (form.Productline6[3].selected){
Line6_flag=95;
Line6_print="Producto 3 [$95]";
}
T_Price=Line1_flag+Line2_flag+Line3_flag+Line4_flag+Line5_flag+Line6_flag;
form.T_Price.value=" $ "+ T_Price;
}
function print(form){
if(!called){
compute(form);
}
text = ("<HEAD><TITLE>'Costo Estimado'</TITLE></HEAD>");
text = (text +"<BODY BGCOLOR = '#FFFFFF' ><CENTER><B><FONT SIZE = 3><FONT COLOR=BLUE>Costo Estimado</FONT></FONT></B>");
text= (text +"<br></CENTER>");
text=(text+"<hr>");
text=(text+"<TABLE BORDER =0><TR VALIGN=Top><TD VALIGN=Top>");
text=(text+"<B>Producto 1:<BR>Producto 2: <BR>Producto 3: <BR>Producto 4: <BR>Producto 5: <BR>Producto 6:");
text=(text+"</B></TD><TD>")
text=(text+"<B>"+ Line1_print+"<BR>"+ Line2_print+"<BR>"+ Line3_print+"<BR>");
text=(text+ Line4_print+"<BR>"+ Line5_print+"<BR>"+ Line6_print+"<BR>");
text=(text+"<TD></TR></TABLE><hr>");
text=(text+"<B><FONT COLOR=RED>Costo Total:</FONT>"+" $"+T_Price);
text=(text+"</body></html>");
msgWindow=window.open("","displayWindow","toolbar=no,width=320,height=240,directories=no,status=no,scrollbars=no,resize=no,menubar=no")
msgWindow.document.write(text)
msgWindow.document.close()
}
</script>