///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function TestForItemSelected(Ofm,currtype)
{
if(!(Ofm.rg1dptr.value=="00.00")){Load(this.form,"RG1","FullRim",Ofm.rg1dptr.value,Ofm.rg1qty.value,price1099,"Silv",currtype);select++;}
if(!(Ofm.rg1dptr2.value=="00.00")){Load(this.form,"RG1","FullRim",Ofm.rg1dptr2.value,Ofm.rg1qty2.value,price1099,"Silv",currtype);select++;}
if(!(Ofm.rg2dptr.value=="00.00")){Load(this.form,"RG2","FullRim",Ofm.rg2dptr.value,Ofm.rg2qty.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.rg2dptr2.value=="00.00")){Load(this.form,"RG2","FullRim",Ofm.rg2dptr2.value,Ofm.rg2qty2.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.rg3dptr.value=="00.00")){Load(this.form,"RG3","FullRim",Ofm.rg3dptr.value,Ofm.rg3qty.value,price1099,"Burg",currtype);select++;}
if(!(Ofm.rg3dptr2.value=="00.00")){Load(this.form,"RG3","FullRim",Ofm.rg3dptr2.value,Ofm.rg3qty2.value,price1099,"Burg",currtype);select++;}
if(!(Ofm.rg4dptr.value=="00.00")){Load(this.form,"RG4","HalfRim",Ofm.rg4dptr.value,Ofm.rg4qty.value,price1099,"Brnz",currtype);select++;}
if(!(Ofm.rg4dptr2.value=="00.00")){Load(this.form,"RG4","HalfRim",Ofm.rg4dptr2.value,Ofm.rg4qty2.value,price1099,"Brnz",currtype);select++;}
if(!(Ofm.rg5dptr.value=="00.00")){Load(this.form,"RG5","HalfRim",Ofm.rg5dptr.value,Ofm.rg5qty.value,price1099,"Gunm",currtype);select++;}
if(!(Ofm.rg5dptr2.value=="00.00")){Load(this.form,"RG5","HalfRim",Ofm.rg5dptr2.value,Ofm.rg5qty2.value,price1099,"Gunm",currtype);select++;}
if(!(Ofm.rg6dptr.value=="00.00")){Load(this.form,"RG6","HalfRim",Ofm.rg6dptr.value,Ofm.rg6qty.value,price1099,"Blue",currtype);select++;}
if(!(Ofm.rg6dptr2.value=="00.00")){Load(this.form,"RG6","HalfRim",Ofm.rg6dptr2.value,Ofm.rg6qty2.value,price1099,"Blue",currtype);select++;}
if(!(Ofm.rg8dptr.value=="00.00")){Load(this.form,"RG8","FullRim",Ofm.rg8dptr.value,Ofm.rg8qty.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.rg8dptr2.value=="00.00")){Load(this.form,"RG8","FullRim",Ofm.rg8dptr2.value,Ofm.rg8qty2.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.rg9dptr.value=="00.00")){Load(this.form,"RG9","HalfRim",Ofm.rg9dptr.value,Ofm.rg9qty.value,price1199,"Burg",currtype);select++;}
if(!(Ofm.rg9dptr2.value=="00.00")){Load(this.form,"RG9","HalfRim",Ofm.rg9dptr2.value,Ofm.rg9qty2.value,price1199,"Burg",currtype);select++;}
if(!(Ofm.rgadptr.value=="00.00")){Load(this.form,"RGA","FullRim",Ofm.rgadptr.value,Ofm.rgaqty.value,price999,"Black",currtype);select++;}
if(!(Ofm.rgadptr2.value=="00.00")){Load(this.form,"RGA","FullRim",Ofm.rgadptr2.value,Ofm.rgaqty2.value,price999,"Black",currtype);select++;}
if(!(Ofm.rgbdptr.value=="00.00")){Load(this.form,"RGB","FullRim",Ofm.rgbdptr.value,Ofm.rgbqty.value,price999,"AqSilv",currtype);select++;}
if(!(Ofm.rgbdptr2.value=="00.00")){Load(this.form,"RGB","FullRim",Ofm.rgbdptr2.value,Ofm.rgbqty2.value,price999,"AqSilv",currtype);select++;}
if(!(Ofm.rgcdptr.value=="00.00")){Load(this.form,"RGC","FullRim",Ofm.rgcdptr.value,Ofm.rgcqty.value,price999,"Blue",currtype);select++;}
if(!(Ofm.rgcdptr2.value=="00.00")){Load(this.form,"RGC","FullRim",Ofm.rgcdptr2.value,Ofm.rgcqty2.value,price999,"Blue",currtype);select++;}
if(!(Ofm.rgrdptr.value=="00.00")){Load(this.form,"RGR","FullRim",Ofm.rgrdptr.value,Ofm.rgrqty.value,price1199,"RedBlk",currtype);select++;}
if(!(Ofm.rgrdptr2.value=="00.00")){Load(this.form,"RGR","FullfRim",Ofm.rgrdptr2.value,Ofm.rgrqty2.value,price1199,"RedBlk",currtype);select++;}
if(!(Ofm.rgsdptr.value=="00.00")){Load(this.form,"RGS","HalfRim",Ofm.rgsdptr.value,Ofm.rgsqty.value,price1099,"Green",currtype);select++;}
if(!(Ofm.rgsdptr2.value=="00.00")){Load(this.form,"RGS","HalfRim",Ofm.rgsdptr2.value,Ofm.rgsqty2.value,price1099,"Green",currtype);select++;}
if(!(Ofm.rgtdptr.value=="00.00")){Load(this.form,"RGT","FullRim",Ofm.rgtdptr.value,Ofm.rgtqty.value,price899,"TortSh",currtype);select++;}
if(!(Ofm.rgtdptr2.value=="00.00")){Load(this.form,"RGT","FullRim",Ofm.rgtdptr2.value,Ofm.rgtqty2.value,price899,"TortSh",currtype);select++;}
if(!(Ofm.rgudptr.value=="00.00")){Load(this.form,"RGU","FullRim",Ofm.rgudptr.value,Ofm.rguqty.value,price899,"Grey",currtype);select++;}
if(!(Ofm.rgudptr2.value=="00.00")){Load(this.form,"RGU","FullRim",Ofm.rgudptr2.value,Ofm.rguqty2.value,price899,"Grey",currtype);select++;}
if(!(Ofm.rgkdptr.value=="00.00")){Load(this.form,"RGK","FullRim",Ofm.rgkdptr.value,Ofm.rgkqty.value,price1099,"Black",currtype);select++;}
if(!(Ofm.rgkdptr2.value=="00.00")){Load(this.form,"RGK","FullRim",Ofm.rgkdptr2.value,Ofm.rgkqty2.value,price1099,"Black",currtype);select++;}
if(!(Ofm.rgwdptr.value=="00.00")){Load(this.form,"RGW","FullRim",Ofm.rgwdptr.value,Ofm.rgwqty.value,price999,"Gold",currtype);select++;}
if(!(Ofm.rgwdptr2.value=="00.00")){Load(this.form,"RGW","FullRim",Ofm.rgwdptr2.value,Ofm.rgwqty2.value,price999,"Gold",currtype);select++;}
if(!(Ofm.acxdptr.value=="00.00")){Load(this.form,"ACX","Fashion",Ofm.acxdptr.value,Ofm.acxqty.value,price899,"Blue",currtype);select++;}
if(!(Ofm.acxdptr2.value=="00.00")){Load(this.form,"ACX","Fashion",Ofm.acxdptr2.value,Ofm.acxqty2.value,price899,"Blue",currtype);select++;}
if(!(Ofm.acydptr.value=="00.00")){Load(this.form,"ACY","Fashion",Ofm.acydptr.value,Ofm.acyqty.value,price899,"Mottld",currtype);select++;}
if(!(Ofm.acydptr2.value=="00.00")){Load(this.form,"ACY","Fashion",Ofm.acydptr2.value,Ofm.acyqty2.value,price899,"Mottld",currtype);select++;}
if(!(Ofm.aczdptr.value=="00.00")){Load(this.form,"ACZ","Fashion",Ofm.aczdptr.value,Ofm.aczqty.value,price899,"Black",currtype);select++;}
if(!(Ofm.aczdptr2.value=="00.00")){Load(this.form,"ACZ","Fashion",Ofm.aczdptr2.value,Ofm.aczqty2.value,price899,"Black",currtype);select++;}
if(!(Ofm.ac3dptr.value=="00.00")){Load(this.form,"AC3","Fashion",Ofm.ac3dptr.value,Ofm.ac3qty.value,price1499,"AmBlu",currtype);select++;}
if(!(Ofm.ac3dptr2.value=="00.00")){Load(this.form,"AC3","Fashion",Ofm.ac3dptr2.value,Ofm.ac3qty2.value,price1499,"AmBlu",currtype);select++;}
if(!(Ofm.ac4dptr.value=="00.00")){Load(this.form,"AC4","Fashion",Ofm.ac4dptr.value,Ofm.ac4qty.value,price1499,"RedBrn",currtype);select++;}
if(!(Ofm.ac4dptr2.value=="00.00")){Load(this.form,"AC4","Fashion",Ofm.ac4dptr2.value,Ofm.ac4qty2.value,price1499,"redBrn",currtype);select++;}
if(!(Ofm.ac5dptr.value=="00.00")){Load(this.form,"AC5","Fashion",Ofm.ac5dptr.value,Ofm.ac5qty.value,price1499,"RedTea",currtype);select++;}
if(!(Ofm.ac5dptr2.value=="00.00")){Load(this.form,"AC5","Fashion",Ofm.ac5dptr2.value,Ofm.ac5qty2.value,price1499,"RedTea",currtype);select++;}
if(!(Ofm.ac6dptr.value=="00.00")){Load(this.form,"AC6","Fashion",Ofm.ac6dptr.value,Ofm.ac6qty.value,price1499,"Black",currtype);select++;}
if(!(Ofm.ac6dptr2.value=="00.00")){Load(this.form,"AC6","Fashion",Ofm.ac6dptr2.value,Ofm.ac6qty2.value,price1499,"Black",currtype);select++;}
if(!(Ofm.eladptr.value=="00.00")){Load(this.form,"ELA","Fashion",Ofm.eladptr.value,Ofm.elaqty.value,price1199,"Purpl",currtype);select++;}
if(!(Ofm.eladptr2.value=="00.00")){Load(this.form,"ELA","Fashion",Ofm.eladptr2.value,Ofm.elaqty2.value,price1199,"Purpl",currtype);select++;}
if(!(Ofm.elbdptr.value=="00.00")){Load(this.form,"ELB","Fashion",Ofm.elbdptr.value,Ofm.elbqty.value,price1199,"Gunm",currtype);select++;}
if(!(Ofm.elbdptr2.value=="00.00")){Load(this.form,"ELB","Fashion",Ofm.elbdptr2.value,Ofm.elbqty2.value,price1199,"Gunm",currtype);select++;}
if(!(Ofm.elcdptr.value=="00.00")){Load(this.form,"ELC","Fashion",Ofm.elcdptr.value,Ofm.elcqty.value,price1199,"Gunm",currtype);select++;}
if(!(Ofm.elcdptr2.value=="00.00")){Load(this.form,"ELC","Fashion",Ofm.elcdptr2.value,Ofm.elcqty2.value,price1199,"Gunm",currtype);select++;}
if(!(Ofm.elddptr.value=="00.00")){Load(this.form,"ELD","Fashion",Ofm.elddptr.value,Ofm.eldqty.value,price1199,"Purpl",currtype);select++;}
if(!(Ofm.elddptr2.value=="00.00")){Load(this.form,"ELD","Fashion",Ofm.elddptr2.value,Ofm.eldqty2.value,price1199,"Purpl",currtype);select++;}
if(!(Ofm.flsdptr.value=="00.00")){Load(this.form,"FLS","Rimless",Ofm.flsdptr.value,Ofm.flsqty.value,price999,"Silver",currtype);select++;}
if(!(Ofm.flsdptr2.value=="00.00")){Load(this.form,"FLS","Rimless",Ofm.flsdptr2.value,Ofm.flsqty2.value,price999,"Silver",currtype);select++;}
if(!(Ofm.flbdptr.value=="00.00")){Load(this.form,"FLB","Rimless",Ofm.flbdptr.value,Ofm.flbqty.value,price999,"Blue",currtype);select++;}
if(!(Ofm.flbdptr2.value=="00.00")){Load(this.form,"FLB","Rimless",Ofm.flbdptr2.value,Ofm.flbqty2.value,price999,"Blue",currtype);select++;}
if(!(Ofm.flcdptr.value=="00.00")){Load(this.form,"FLC","Rimless",Ofm.flcdptr.value,Ofm.flcqty.value,price999,"Coffee",currtype);select++;}
if(!(Ofm.flcdptr2.value=="00.00")){Load(this.form,"FLC","Rimless",Ofm.flcdptr2.value,Ofm.flcqty2.value,price999,"Coffee",currtype);select++;}
if(!(Ofm.flmdptr.value=="00.00")){Load(this.form,"FLM","Rimless",Ofm.flmdptr.value,Ofm.flmqty.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.flmdptr2.value=="00.00")){Load(this.form,"FLM","Rimless",Ofm.flmdptr2.value,Ofm.flmqty2.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.fo1dptr.value=="00.00")){Load(this.form,"FO1","Folders",Ofm.fo1dptr.value,Ofm.fo1qty.value,price1099,"Gunm",currtype);select++;}
if(!(Ofm.fo1dptr2.value=="00.00")){Load(this.form,"FO1","Folders",Ofm.fo1dptr2.value,Ofm.fo1qty2.value,price1099,"Gunm",currtype);select++;}
if(!(Ofm.ft1dptr.value=="00.00")){Load(this.form,"FT1","Folders",Ofm.ft1dptr.value,Ofm.ft1qty.value,price1099,"Gunm",currtype);select++;}
if(!(Ofm.ft1dptr2.value=="00.00")){Load(this.form,"FT1","Folders",Ofm.ft1dptr2.value,Ofm.ft1qty2.value,price1099,"Gunm",currtype);select++;}
if(!(Ofm.htbdptr.value=="00.00")){Load(this.form,"HTB","Folders",Ofm.htbdptr.value,Ofm.htbqty.value,price999,"Blue",currtype);select++;}
if(!(Ofm.htbdptr2.value=="00.00")){Load(this.form,"HTB","Folders",Ofm.htbdptr2.value,Ofm.htbqty2.value,price999,"Blue",currtype);select++;}
if(!(Ofm.htgdptr.value=="00.00")){Load(this.form,"HTG","Folders",Ofm.htgdptr.value,Ofm.htgqty.value,price999,"Gold",currtype);select++;}
if(!(Ofm.htgdptr2.value=="00.00")){Load(this.form,"HTG","Folders",Ofm.htgdptr2.value,Ofm.htgqty2.value,price999,"Gold",currtype);select++;}
if(!(Ofm.htmdptr.value=="00.00")){Load(this.form,"HTM","Folders",Ofm.htmdptr.value,Ofm.htmqty.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.htmdptr2.value=="00.00")){Load(this.form,"HTM","Folders",Ofm.htmdptr2.value,Ofm.htmqty2.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.htrdptr.value=="00.00")){Load(this.form,"HTR","Folders",Ofm.htrdptr.value,Ofm.htrqty.value,price999,"Red",currtype);select++;}
if(!(Ofm.htrdptr2.value=="00.00")){Load(this.form,"HTR","Folders",Ofm.htrdptr2.value,Ofm.htrqty2.value,price999,"Red",currtype);select++;}
if(!(Ofm.ftldptr.value=="00.00")){Load(this.form,"FTL","SlimTube",Ofm.ftldptr.value,Ofm.ftlqty.value,price1299,"Lilac",currtype);select++;}
if(!(Ofm.ftldptr2.value=="00.00")){Load(this.form,"FTL","SlimTube",Ofm.ftldptr2.value,Ofm.ftlqty2.value,price1299,"Lilac",currtype);select++;}
if(!(Ofm.ftkdptr.value=="00.00")){Load(this.form,"FTK","SlimTube",Ofm.ftkdptr.value,Ofm.ftkqty.value,price1299,"Black",currtype);select++;}
if(!(Ofm.ftkdptr2.value=="00.00")){Load(this.form,"FTK","SlimTube",Ofm.ftkdptr2.value,Ofm.ftkqty2.value,price1299,"Black",currtype);select++;}
if(!(Ofm.ftmdptr.value=="00.00")){Load(this.form,"FTM","SlimTube",Ofm.ftmdptr.value,Ofm.ftmqty.value,price1299,"Gunm",currtype);select++;}
if(!(Ofm.ftmdptr2.value=="00.00")){Load(this.form,"FTM","SlimTube",Ofm.ftmdptr2.value,Ofm.ftmqty2.value,price1299,"Gunm",currtype);select++;}
if(!(Ofm.tbgdptr.value=="00.00")){Load(this.form,"TBG","SlimTube",Ofm.tbgdptr.value,Ofm.tbgqty.value,price999,"Gold",currtype);select++;}
if(!(Ofm.tbgdptr2.value=="00.00")){Load(this.form,"TBG","SlimTube",Ofm.tbgdptr2.value,Ofm.tbgqty2.value,price999,"Gold",currtype);select++;}
if(!(Ofm.tbkdptr.value=="00.00")){Load(this.form,"TBK","SlimTube",Ofm.tbkdptr.value,Ofm.tbkqty.value,price999,"Black",currtype);select++;}
if(!(Ofm.tbkdptr2.value=="00.00")){Load(this.form,"TBK","SlimTube",Ofm.tbkdptr2.value,Ofm.tbkqty2.value,price999,"Black",currtype);select++;}
if(!(Ofm.tbbdptr.value=="00.00")){Load(this.form,"TBB","SlimTube",Ofm.tbbdptr.value,Ofm.tbbqty.value,price999,"Blue",currtype);select++;}
if(!(Ofm.tbbdptr2.value=="00.00")){Load(this.form,"TBB","SlimTube",Ofm.tbbdptr2.value,Ofm.tbbqty2.value,price999,"Blue",currtype);select++;}
if(!(Ofm.thmdptr.value=="00.00")){Load(this.form,"THM","SlimTube",Ofm.thmdptr.value,Ofm.thmqty.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.thmdptr2.value=="00.00")){Load(this.form,"THM","SlimTube",Ofm.thmdptr2.value,Ofm.thmqty2.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.thbdptr.value=="00.00")){Load(this.form,"THB","SlimTube",Ofm.thbdptr.value,Ofm.thbqty.value,price999,"Blue",currtype);select++;}
if(!(Ofm.thbdptr2.value=="00.00")){Load(this.form,"THB","SlimTube",Ofm.thbdptr2.value,Ofm.thbqty2.value,price999,"Blue",currtype);select++;}
if(!(Ofm.thgdptr.value=="00.00")){Load(this.form,"THG","SlimTube",Ofm.thgdptr.value,Ofm.thgqty.value,price999,"Gold",currtype);select++;}
if(!(Ofm.thgdptr2.value=="00.00")){Load(this.form,"THG","SlimTube",Ofm.thgdptr2.value,Ofm.thgqty2.value,price999,"Gold",currtype);select++;}
if(!(Ofm.tbmdptr.value=="00.00")){Load(this.form,"TBM","SlimTube",Ofm.tbmdptr.value,Ofm.tbmqty.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.tbmdptr2.value=="00.00")){Load(this.form,"TBM","SlimTube",Ofm.tbmdptr2.value,Ofm.tbmqty2.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.tbrdptr.value=="00.00")){Load(this.form,"TBR","SlimTube",Ofm.tbrdptr.value,Ofm.tbrqty.value,price999,"Red",currtype);select++;}
if(!(Ofm.tbrdptr2.value=="00.00")){Load(this.form,"TBR","SlimTube",Ofm.tbrdptr2.value,Ofm.tbrqty2.value,price999,"Red",currtype);select++;}
if(!(Ofm.pcmdptr.value=="00.00")){Load(this.form,"PCM","SlimTube",Ofm.pcmdptr.value,Ofm.pcmqty.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.pcmdptr2.value=="00.00")){Load(this.form,"PCM","SlimTube",Ofm.pcmdptr2.value,Ofm.pcmqty2.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.pcbdptr.value=="00.00")){Load(this.form,"PCB","SlimTube",Ofm.pcbdptr.value,Ofm.pcbqty.value,price999,"Blue",currtype);select++;}
if(!(Ofm.pcbdptr2.value=="00.00")){Load(this.form,"PCB","SlimTube",Ofm.pcbdptr2.value,Ofm.pcbqty2.value,price999,"Blue",currtype);select++;}
if(!(Ofm.pcgdptr.value=="00.00")){Load(this.form,"PCG","SlimTube",Ofm.pcgdptr.value,Ofm.pcgqty.value,price999,"Gold",currtype);select++;}
if(!(Ofm.pcgdptr2.value=="00.00")){Load(this.form,"PCG","SlimTube",Ofm.pcgdptr2.value,Ofm.pcgqty2.value,price999,"Gold",currtype);select++;}
if(!(Ofm.ctsdptr.value=="00.00")){Load(this.form,"CTS","CigTube",Ofm.ctsdptr.value,Ofm.ctsqty.value,price999,"Silver",currtype);select++;}
if(!(Ofm.ctsdptr2.value=="00.00")){Load(this.form,"CTS","CigTube",Ofm.ctsdptr2.value,Ofm.ctsqty2.value,price999,"Silver",currtype);select++;}
if(!(Ofm.ctgdptr.value=="00.00")){Load(this.form,"CTG","CigTube",Ofm.ctgdptr.value,Ofm.ctgqty.value,price999,"Gold",currtype);select++;}
if(!(Ofm.ctgdptr2.value=="00.00")){Load(this.form,"CTG","CigTube",Ofm.ctgdptr2.value,Ofm.ctgqty2.value,price999,"Gold",currtype);select++;}
if(!(Ofm.ctkdptr.value=="00.00")){Load(this.form,"CTK","CigTube",Ofm.ctkdptr.value,Ofm.ctkqty.value,price999,"Black",currtype);select++;}
if(!(Ofm.ctkdptr2.value=="00.00")){Load(this.form,"CTK","CigTube",Ofm.ctkdptr2.value,Ofm.ctkqty2.value,price999,"Black",currtype);select++;}
if(!(Ofm.scsdptr.value=="00.00")){Load(this.form,"SCS","SlimCase",Ofm.scsdptr.value,Ofm.scsqty.value,price1199,"AqSilv",currtype);select++;}
if(!(Ofm.scsdptr2.value=="00.00")){Load(this.form,"SCS","SlimCase",Ofm.scsdptr2.value,Ofm.scsqty2.value,price1199,"AqSilv",currtype);select++;}
if(!(Ofm.scbdptr.value=="00.00")){Load(this.form,"SCB","SlimCase",Ofm.scbdptr.value,Ofm.scbqty.value,price1199,"AqBlu",currtype);select++;}
if(!(Ofm.scbdptr2.value=="00.00")){Load(this.form,"SCB","SlimCase",Ofm.scbdptr2.value,Ofm.scbqty2.value,price1199,"AqBlu",currtype);select++;}
if(!(Ofm.scvdptr.value=="00.00")){Load(this.form,"SCV","SlimCase",Ofm.scvdptr.value,Ofm.scvqty.value,price999,"Gold",currtype);select++;}
if(!(Ofm.scvdptr2.value=="00.00")){Load(this.form,"SCV","SlimCase",Ofm.scvdptr2.value,Ofm.scvqty2.value,price999,"Gold",currtype);select++;}
if(!(Ofm.scwdptr.value=="00.00")){Load(this.form,"SCW","SlimCase",Ofm.scwdptr.value,Ofm.scwqty.value,price999,"Silver",currtype);select++;}
if(!(Ofm.scwdptr2.value=="00.00")){Load(this.form,"SCW","SlimCase",Ofm.scwdptr2.value,Ofm.scwqty2.value,price999,"Silver",currtype);select++;}
if(!(Ofm.scldptr.value=="00.00")){Load(this.form,"SCL","SlimCase",Ofm.scldptr.value,Ofm.sclqty.value,price1199,"Lilac",currtype);select++;}
if(!(Ofm.scldptr2.value=="00.00")){Load(this.form,"SCL","SlimCase",Ofm.scldptr2.value,Ofm.sclqty2.value,price1199,"Lilac",currtype);select++;}
if(!(Ofm.scgdptr.value=="00.00")){Load(this.form,"SCG","SlimCase",Ofm.scgdptr.value,Ofm.scgqty.value,price1199,"Gold",currtype);select++;}
if(!(Ofm.scgdptr2.value=="00.00")){Load(this.form,"SCG","SlimCase",Ofm.scgdptr2.value,Ofm.scgqty2.value,price1199,"Gold",currtype);select++;}
if(!(Ofm.bcbdptr.value=="00.00")){Load(this.form,"BCB","SlimCase",Ofm.bcbdptr.value,Ofm.bcbqty.value,price1199,"Blue",currtype);select++;}
if(!(Ofm.bcbdptr2.value=="00.00")){Load(this.form,"BCB","SlimCase",Ofm.bcbdptr2.value,Ofm.bcbqty2.value,price1199,"Blue",currtype);select++;}
if(!(Ofm.bcsdptr.value=="00.00")){Load(this.form,"BCS","SlimCase",Ofm.bcsdptr.value,Ofm.bcsqty.value,price1199,"Silv",currtype);select++;}
if(!(Ofm.bcsdptr2.value=="00.00")){Load(this.form,"BCS","SlimCase",Ofm.bcsdptr2.value,Ofm.bcsqty2.value,price1199,"Silv",currtype);select++;}
if(!(Ofm.bczdptr.value=="00.00")){Load(this.form,"BCZ","SlimCase",Ofm.bczdptr.value,Ofm.bczqty.value,price1199,"Gold",currtype);select++;}
if(!(Ofm.bczdptr2.value=="00.00")){Load(this.form,"BCZ","SlimCase",Ofm.bczdptr2.value,Ofm.bczqty2.value,price1199,"Gold",currtype);select++;}
if(!(Ofm.mchdptr.value=="00.00")){Load(this.form,"MCH","MultColr",Ofm.mchdptr.value,Ofm.mchqty.value,price1099,"Multi",currtype);select++;}
if(!(Ofm.mchdptr2.value=="00.00")){Load(this.form,"MCH","MultColr",Ofm.mchdptr2.value,Ofm.mchqty2.value,price1099,"Multi",currtype);select++;}
if(!(Ofm.mcidptr.value=="00.00")){Load(this.form,"MCI","MultColr",Ofm.mcidptr.value,Ofm.mciqty.value,price1099,"Multi",currtype);select++;}
if(!(Ofm.mcidptr2.value=="00.00")){Load(this.form,"MCI","MultColr",Ofm.mcidptr2.value,Ofm.mciqty2.value,price1099,"Multi",currtype);select++;}
if(!(Ofm.mcjdptr.value=="00.00")){Load(this.form,"MCJ","MultColr",Ofm.mcjdptr.value,Ofm.mcjqty.value,price1099,"Multi",currtype);select++;}
if(!(Ofm.mcjdptr2.value=="00.00")){Load(this.form,"MCJ","MultColr",Ofm.mcjdptr2.value,Ofm.mcjqty2.value,price1099,"Multi",currtype);select++;}
if(!(Ofm.mckdptr.value=="00.00")){Load(this.form,"MCK","MultColr",Ofm.mckdptr.value,Ofm.mckqty.value,price1099,"Multi",currtype);select++;}
if(!(Ofm.mckdptr2.value=="00.00")){Load(this.form,"MCK","MultColr",Ofm.mckdptr2.value,Ofm.mckqty2.value,price1099,"Multi",currtype);select++;}
if(!(Ofm.mc1dptr.value=="00.00")){Load(this.form,"MC1","MultColr",Ofm.mc1dptr.value,Ofm.mc1qty.value,price999,"Brown",currtype);select++;}
if(!(Ofm.mc1dptr2.value=="00.00")){Load(this.form,"MC1","MultColr",Ofm.mc1dptr2.value,Ofm.mc1qty2.value,price999,"Brown",currtype);select++;}
if(!(Ofm.mc2dptr.value=="00.00")){Load(this.form,"MC2","MultColr",Ofm.mc2dptr.value,Ofm.mc2qty.value,price999,"NavBlu",currtype);select++;}
if(!(Ofm.mc2dptr2.value=="00.00")){Load(this.form,"MC2","MultColr",Ofm.mc2dptr2.value,Ofm.mc2qty2.value,price999,"NavBlu",currtype);select++;}
if(!(Ofm.mcydptr.value=="00.00")){Load(this.form,"MCY","MultColr",Ofm.mcydptr.value,Ofm.mcyqty.value,price1099,"MltColr",currtype);select++;}
if(!(Ofm.mcydptr2.value=="00.00")){Load(this.form,"MCY","MultColr",Ofm.mcydptr2.value,Ofm.mcyqty2.value,price1099,"MltColr",currtype);select++;}
if(!(Ofm.mczdptr.value=="00.00")){Load(this.form,"MCZ","MultColr",Ofm.mczdptr.value,Ofm.mczqty.value,price1099,"MltColr",currtype);select++;}
if(!(Ofm.mczdptr2.value=="00.00")){Load(this.form,"MCZ","MultColr",Ofm.mczdptr2.value,Ofm.mczqty2.value,price1099,"MltColr",currtype);select++;}
if(!(Ofm.srgdptr.value=="00.00")){Load(this.form,"SRG","SunReadr",Ofm.srgdptr.value,Ofm.srgqty.value,price999,"Gold",currtype);select++;}
if(!(Ofm.srgdptr2.value=="00.00")){Load(this.form,"SRG","SunReadr",Ofm.srgdptr2.value,Ofm.srgqty2.value,price999,"Gold",currtype);select++;}
if(!(Ofm.srmdptr.value=="00.00")){Load(this.form,"SRM","SunReadr",Ofm.srmdptr.value,Ofm.srmqty.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.srmdptr2.value=="00.00")){Load(this.form,"SRM","SunReadr",Ofm.srmdptr2.value,Ofm.srmqty2.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.sradptr.value=="00.00")){Load(this.form,"SRA","SunReadr",Ofm.sradptr.value,Ofm.sraqty.value,price1199,"Tshell",currtype);select++;}
if(!(Ofm.sradptr2.value=="00.00")){Load(this.form,"SRA","SunReadr",Ofm.sradptr2.value,Ofm.sraqty2.value,price1199,"Tshell",currtype);select++;}
if(!(Ofm.srcdptr.value=="00.00")){Load(this.form,"SRC","SunReadr",Ofm.srcdptr.value,Ofm.srcqty.value,price999,"Tshell",currtype);select++;}
if(!(Ofm.srcdptr2.value=="00.00")){Load(this.form,"SRC","SunReadr",Ofm.srcdptr2.value,Ofm.srcqty2.value,price999,"Tshell",currtype);select++;}
if(!(Ofm.srbdptr.value=="00.00")){Load(this.form,"SRB","SunReadr",Ofm.srbdptr.value,Ofm.srbqty.value,price999,"Brown",currtype);select++;}
if(!(Ofm.srbdptr2.value=="00.00")){Load(this.form,"SRB","SunReadr",Ofm.srbdptr2.value,Ofm.srbqty2.value,price999,"Brown",currtype);select++;}
if(!(Ofm.srkdptr.value=="00.00")){Load(this.form,"SRK","SunReadr",Ofm.srkdptr.value,Ofm.srkqty.value,price999,"Black",currtype);select++;}
if(!(Ofm.srkdptr2.value=="00.00")){Load(this.form,"SRK","SunReadr",Ofm.srkdptr2.value,Ofm.srkqty2.value,price999,"Black",currtype);select++;}
if(!(Ofm.srldptr.value=="00.00")){Load(this.form,"SRL","SunReadr",Ofm.srldptr.value,Ofm.srlqty.value,price999,"Blue",currtype);select++;}
if(!(Ofm.srldptr2.value=="00.00")){Load(this.form,"SRL","SunReadr",Ofm.srldptr2.value,Ofm.srlqty2.value,price999,"Blue",currtype);select++;}
if(!(Ofm.srpdptr.value=="00.00")){Load(this.form,"SRP","SunReadr",Ofm.srpdptr.value,Ofm.srpqty.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.srpdptr2.value=="00.00")){Load(this.form,"SRP","SunReadr",Ofm.srpdptr2.value,Ofm.srpqty2.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.srqdptr.value=="00.00")){Load(this.form,"SRQ","SunReadr",Ofm.srqdptr.value,Ofm.srqqty.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.srqdptr2.value=="00.00")){Load(this.form,"SRQ","SunReadr",Ofm.srqdptr2.value,Ofm.srqqty2.value,price999,"Gunm",currtype);select++;}
if(!(Ofm.bf1dptr.value=="00.00")){Load(this.form,"BF1","Bifocal",Ofm.bf1dptr.value,Ofm.bf1qty.value,price1399,"Tshell",currtype);select++;}
if(!(Ofm.bf1dptr2.value=="00.00")){Load(this.form,"BF1","Bifocal",Ofm.bf1dptr2.value,Ofm.bf1qty2.value,price1399,"Tshell",currtype);select++;}
if(!(Ofm.bf2dptr.value=="00.00")){Load(this.form,"BF2","Bifocal",Ofm.bf2dptr.value,Ofm.bf2qty.value,price1399,"Tshell",currtype);select++;}
if(!(Ofm.bf2dptr2.value=="00.00")){Load(this.form,"BF2","Bifocal",Ofm.bf2dptr2.value,Ofm.bf2qty2.value,price1399,"Tshell",currtype);select++;}
if(!(Ofm.fxbdptr.value=="00.00")){Load(this.form,"FXB","MemFlex",Ofm.fxbdptr.value,Ofm.fxbqty.value,price999,"Blue",currtype);select++;}
if(!(Ofm.fxbdptr2.value=="00.00")){Load(this.form,"FXB","MemFlex",Ofm.fxbdptr2.value,Ofm.fxbqty2.value,price999,"Blue",currtype);select++;}
if(!(Ofm.fxgdptr.value=="00.00")){Load(this.form,"FXG","MemFlex",Ofm.fxgdptr.value,Ofm.fxgqty.value,price999,"Grey",currtype);select++;}
if(!(Ofm.fxgdptr2.value=="00.00")){Load(this.form,"FXG","MemFlex",Ofm.fxgdptr2.value,Ofm.fxgqty2.value,price999,"Grey",currtype);select++;}
if(!(Ofm.fxkdptr.value=="00.00")){Load(this.form,"FXK","MemFlex",Ofm.fxkdptr.value,Ofm.fxkqty.value,price999,"Black",currtype);select++;}
if(!(Ofm.fxkdptr2.value=="00.00")){Load(this.form,"FXK","MemFlex",Ofm.fxkdptr2.value,Ofm.fxkqty2.value,price999,"Black",currtype);select++;}
if(!(Ofm.fxwdptr.value=="00.00")){Load(this.form,"FXW","MemFlex",Ofm.fxwdptr.value,Ofm.fxwqty.value,price999,"Rainbw",currtype);select++;}
if(!(Ofm.fxwdptr2.value=="00.00")){Load(this.form,"FXW","MemFlex",Ofm.fxwdptr2.value,Ofm.fxwqty2.value,price999,"Rainbw",currtype);select++;}
if(!(Ofm.qx1dptr.value=="00.00")){Load(this.form,"QX1","MakeUp",Ofm.qx1dptr.value,Ofm.qx1qty.value,price999,"Tshell",currtype);select++;}
if(!(Ofm.qx1dptr2.value=="00.00")){Load(this.form,"QX1","MakeUp",Ofm.qx1dptr2.value,Ofm.qx1qty2.value,price999,"Tshell",currtype);select++;}
if(!(Ofm.qx2dptr.value=="00.00")){Load(this.form,"QX2","MakeUp",Ofm.qx2dptr.value,Ofm.qx2qty.value,price999,"Red",currtype);select++;}
if(!(Ofm.qx2dptr2.value=="00.00")){Load(this.form,"QX2","MakeUp",Ofm.qx2dptr2.value,Ofm.qx2qty2.value,price999,"Red",currtype);select++;}
if(!(Ofm.sgaqty.value=="0")){Load(this.form,"SGA","Safety","_____",Ofm.sgaqty.value,price999,"Smoke",currtype);select++;}
if(!(Ofm.sgbqty.value=="0")){Load(this.form,"SGB","Safety","_____",Ofm.sgbqty.value,price999,"Blue",currtype);select++;}
if(!(Ofm.sgcqty.value=="0")){Load(this.form,"SGC","Safety","_____",Ofm.sgcqty.value,price999,"Crystal",currtype);select++;}
if(!(Ofm.sgdqty.value=="0")){Load(this.form,"SGD","Safety","_____",Ofm.sgdqty.value,price999,"Rose",currtype);select++;}
if(!(Ofm.sgeqty.value=="0")){Load(this.form,"SGE","Safety","_____",Ofm.sgeqty.value,price999,"Clear",currtype);select++;}
if(!(Ofm.sgfqty.value=="0")){Load(this.form,"SGF","Safety","_____",Ofm.sgfqty.value,price999,"Smoke",currtype);select++;}
if(!(Ofm.sggqty.value=="0")){Load(this.form,"SGG","Safety","_____",Ofm.sggqty.value,price999,"Clear",currtype);select++;}
if(!(Ofm.sghqty.value=="0")){Load(this.form,"SGH","Safety","_____",Ofm.sghqty.value,price999,"Brown",currtype);select++;}
if(!(Ofm.sgiqty.value=="0")){Load(this.form,"SGI","Safety","_____",Ofm.sgiqty.value,price1199,"Clear",currtype);select++;}
if(!(Ofm.caseqty.value=="0")){select=7;Load(this.form,"Case","HardShel","_____",Ofm.caseqty.value,price150,"NA",currtype);select++;}
}// end function TestForItemSelected(Ofm,currtype)

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ValidateItemData(Ofm)
{
if 	(
	(Ofm.rg1dptr.value=="00.00") && (Ofm.rg1qty.value=="0") && (Ofm.rg1dptr2.value=="00.00") && (Ofm.rg1qty2.value=="0") &&
	(Ofm.rg2dptr.value=="00.00") && (Ofm.rg2qty.value=="0") && (Ofm.rg2dptr2.value=="00.00") && (Ofm.rg2qty2.value=="0") &&
	(Ofm.rg3dptr.value=="00.00") && (Ofm.rg3qty.value=="0") && (Ofm.rg3dptr2.value=="00.00") && (Ofm.rg3qty2.value=="0") &&
	(Ofm.rg4dptr.value=="00.00") && (Ofm.rg4qty.value=="0") && (Ofm.rg4dptr2.value=="00.00") && (Ofm.rg4qty2.value=="0") &&
	(Ofm.rg5dptr.value=="00.00") && (Ofm.rg5qty.value=="0") && (Ofm.rg5dptr2.value=="00.00") && (Ofm.rg5qty2.value=="0") &&
	(Ofm.rg6dptr.value=="00.00") && (Ofm.rg6qty.value=="0") && (Ofm.rg6dptr2.value=="00.00") && (Ofm.rg6qty2.value=="0") &&
	(Ofm.rg8dptr.value=="00.00") && (Ofm.rg8qty.value=="0") && (Ofm.rg8dptr2.value=="00.00") && (Ofm.rg8qty2.value=="0") &&
	(Ofm.rg9dptr.value=="00.00") && (Ofm.rg9qty.value=="0") && (Ofm.rg9dptr2.value=="00.00") && (Ofm.rg9qty2.value=="0") &&
	(Ofm.rgadptr.value=="00.00") && (Ofm.rgaqty.value=="0") && (Ofm.rgadptr2.value=="00.00") && (Ofm.rgaqty2.value=="0") &&
	(Ofm.rgbdptr.value=="00.00") && (Ofm.rgbqty.value=="0") && (Ofm.rgbdptr2.value=="00.00") && (Ofm.rgbqty2.value=="0") &&
	(Ofm.rgcdptr.value=="00.00") && (Ofm.rgcqty.value=="0") && (Ofm.rgcdptr2.value=="00.00") && (Ofm.rgcqty2.value=="0") &&
	(Ofm.rgrdptr.value=="00.00") && (Ofm.rgrqty.value=="0") && (Ofm.rgrdptr2.value=="00.00") && (Ofm.rgrqty2.value=="0") &&
	(Ofm.rgsdptr.value=="00.00") && (Ofm.rgsqty.value=="0") && (Ofm.rgsdptr2.value=="00.00") && (Ofm.rgsqty2.value=="0") &&
	(Ofm.rgtdptr.value=="00.00") && (Ofm.rgtqty.value=="0") && (Ofm.rgtdptr2.value=="00.00") && (Ofm.rgtqty2.value=="0") &&
	(Ofm.rgudptr.value=="00.00") && (Ofm.rguqty.value=="0") && (Ofm.rgudptr2.value=="00.00") && (Ofm.rguqty2.value=="0") &&
	(Ofm.rgkdptr.value=="00.00") && (Ofm.rgkqty.value=="0") && (Ofm.rgkdptr2.value=="00.00") && (Ofm.rgkqty2.value=="0") &&
	(Ofm.rgwdptr.value=="00.00") && (Ofm.rgwqty.value=="0") && (Ofm.rgwdptr2.value=="00.00") && (Ofm.rgwqty2.value=="0") &&
	(Ofm.acxdptr.value=="00.00") && (Ofm.acxqty.value=="0") && (Ofm.acxdptr2.value=="00.00") && (Ofm.acxqty2.value=="0") &&
	(Ofm.acydptr.value=="00.00") && (Ofm.acyqty.value=="0") && (Ofm.acydptr2.value=="00.00") && (Ofm.acyqty2.value=="0") &&
	(Ofm.aczdptr.value=="00.00") && (Ofm.aczqty.value=="0") && (Ofm.aczdptr2.value=="00.00") && (Ofm.aczqty2.value=="0") &&
	(Ofm.ac3dptr.value=="00.00") && (Ofm.ac3qty.value=="0") && (Ofm.ac3dptr2.value=="00.00") && (Ofm.ac3qty2.value=="0") &&
	(Ofm.ac4dptr.value=="00.00") && (Ofm.ac4qty.value=="0") && (Ofm.ac4dptr2.value=="00.00") && (Ofm.ac4qty2.value=="0") &&
	(Ofm.ac5dptr.value=="00.00") && (Ofm.ac5qty.value=="0") && (Ofm.ac5dptr2.value=="00.00") && (Ofm.ac5qty2.value=="0") &&
	(Ofm.ac6dptr.value=="00.00") && (Ofm.ac6qty.value=="0") && (Ofm.ac6dptr2.value=="00.00") && (Ofm.ac6qty2.value=="0") &&
	(Ofm.eladptr.value=="00.00") && (Ofm.elaqty.value=="0") && (Ofm.eladptr2.value=="00.00") && (Ofm.elaqty2.value=="0") &&
	(Ofm.elbdptr.value=="00.00") && (Ofm.elbqty.value=="0") && (Ofm.elbdptr2.value=="00.00") && (Ofm.elbqty2.value=="0") &&
	(Ofm.elcdptr.value=="00.00") && (Ofm.elcqty.value=="0") && (Ofm.elcdptr2.value=="00.00") && (Ofm.elcqty2.value=="0") &&
	(Ofm.elddptr.value=="00.00") && (Ofm.eldqty.value=="0") && (Ofm.elddptr2.value=="00.00") && (Ofm.eldqty2.value=="0") &&
	(Ofm.flsdptr.value=="00.00") && (Ofm.flsqty.value=="0") && (Ofm.flsdptr2.value=="00.00") && (Ofm.flsqty2.value=="0") &&
	(Ofm.flbdptr.value=="00.00") && (Ofm.flbqty.value=="0") && (Ofm.flbdptr2.value=="00.00") && (Ofm.flbqty2.value=="0") &&
	(Ofm.flcdptr.value=="00.00") && (Ofm.flcqty.value=="0") && (Ofm.flcdptr2.value=="00.00") && (Ofm.flcqty2.value=="0") &&
	(Ofm.flmdptr.value=="00.00") && (Ofm.flmqty.value=="0") && (Ofm.flmdptr2.value=="00.00") && (Ofm.flmqty2.value=="0") &&
	(Ofm.fo1dptr.value=="00.00") && (Ofm.fo1qty.value=="0") && (Ofm.fo1dptr2.value=="00.00") && (Ofm.fo1qty2.value=="0") &&
	(Ofm.ft1dptr.value=="00.00") && (Ofm.ft1qty.value=="0") && (Ofm.ft1dptr2.value=="00.00") && (Ofm.ft1qty2.value=="0") &&
	(Ofm.htbdptr.value=="00.00") && (Ofm.htbqty.value=="0") && (Ofm.htbdptr2.value=="00.00") && (Ofm.htbqty2.value=="0") &&
	(Ofm.htgdptr.value=="00.00") && (Ofm.htgqty.value=="0") && (Ofm.htgdptr2.value=="00.00") && (Ofm.htgqty2.value=="0") &&
	(Ofm.htmdptr.value=="00.00") && (Ofm.htmqty.value=="0") && (Ofm.htmdptr2.value=="00.00") && (Ofm.htmqty2.value=="0") &&
	(Ofm.htrdptr.value=="00.00") && (Ofm.htrqty.value=="0") && (Ofm.htrdptr2.value=="00.00") && (Ofm.htrqty2.value=="0") &&
	(Ofm.ftldptr.value=="00.00") && (Ofm.ftlqty.value=="0") && (Ofm.ftldptr2.value=="00.00") && (Ofm.ftlqty2.value=="0") &&
	(Ofm.ftkdptr.value=="00.00") && (Ofm.ftkqty.value=="0") && (Ofm.ftkdptr2.value=="00.00") && (Ofm.ftkqty2.value=="0") &&
	(Ofm.ftmdptr.value=="00.00") && (Ofm.ftmqty.value=="0") && (Ofm.ftmdptr2.value=="00.00") && (Ofm.ftmqty2.value=="0") &&
	(Ofm.tbgdptr.value=="00.00") && (Ofm.tbgqty.value=="0") && (Ofm.tbgdptr2.value=="00.00") && (Ofm.tbgqty2.value=="0") &&
	(Ofm.tbkdptr.value=="00.00") && (Ofm.tbkqty.value=="0") && (Ofm.tbkdptr2.value=="00.00") && (Ofm.tbkqty2.value=="0") &&
	(Ofm.tbbdptr.value=="00.00") && (Ofm.tbbqty.value=="0") && (Ofm.tbbdptr2.value=="00.00") && (Ofm.tbbqty2.value=="0") &&
	(Ofm.thmdptr.value=="00.00") && (Ofm.thmqty.value=="0") && (Ofm.thmdptr2.value=="00.00") && (Ofm.thmqty2.value=="0") &&
	(Ofm.thbdptr.value=="00.00") && (Ofm.thbqty.value=="0") && (Ofm.thbdptr2.value=="00.00") && (Ofm.thbqty2.value=="0") &&
	(Ofm.thgdptr.value=="00.00") && (Ofm.thgqty.value=="0") && (Ofm.thgdptr2.value=="00.00") && (Ofm.thgqty2.value=="0") &&
	(Ofm.tbmdptr.value=="00.00") && (Ofm.tbmqty.value=="0") && (Ofm.tbmdptr2.value=="00.00") && (Ofm.tbmqty2.value=="0") &&
	(Ofm.tbrdptr.value=="00.00") && (Ofm.tbrqty.value=="0") && (Ofm.tbrdptr2.value=="00.00") && (Ofm.tbrqty2.value=="0") &&
	(Ofm.pcbdptr.value=="00.00") && (Ofm.pcbqty.value=="0") && (Ofm.pcbdptr2.value=="00.00") && (Ofm.pcbqty2.value=="0") &&
	(Ofm.pcgdptr.value=="00.00") && (Ofm.pcgqty.value=="0") && (Ofm.pcgdptr2.value=="00.00") && (Ofm.pcgqty2.value=="0") &&
	(Ofm.pcmdptr.value=="00.00") && (Ofm.pcmqty.value=="0") && (Ofm.pcmdptr2.value=="00.00") && (Ofm.pcmqty2.value=="0") &&
	(Ofm.ctsdptr.value=="00.00") && (Ofm.ctsqty.value=="0") && (Ofm.ctsdptr2.value=="00.00") && (Ofm.ctsqty2.value=="0") &&
	(Ofm.ctgdptr.value=="00.00") && (Ofm.ctgqty.value=="0") && (Ofm.ctgdptr2.value=="00.00") && (Ofm.ctgqty2.value=="0") &&
	(Ofm.ctkdptr.value=="00.00") && (Ofm.ctkqty.value=="0") && (Ofm.ctkdptr2.value=="00.00") && (Ofm.ctkqty2.value=="0") &&
	(Ofm.scsdptr.value=="00.00") && (Ofm.scsqty.value=="0") && (Ofm.scsdptr2.value=="00.00") && (Ofm.scsqty2.value=="0") &&
	(Ofm.scbdptr.value=="00.00") && (Ofm.scbqty.value=="0") && (Ofm.scbdptr2.value=="00.00") && (Ofm.scbqty2.value=="0") &&
	(Ofm.scvdptr.value=="00.00") && (Ofm.scvqty.value=="0") && (Ofm.scvdptr2.value=="00.00") && (Ofm.scvqty2.value=="0") &&
	(Ofm.scwdptr.value=="00.00") && (Ofm.scwqty.value=="0") && (Ofm.scwdptr2.value=="00.00") && (Ofm.scwqty2.value=="0") &&
	(Ofm.scldptr.value=="00.00") && (Ofm.sclqty.value=="0") && (Ofm.scldptr2.value=="00.00") && (Ofm.sclqty2.value=="0") &&
	(Ofm.scgdptr.value=="00.00") && (Ofm.scgqty.value=="0") && (Ofm.scgdptr2.value=="00.00") && (Ofm.scgqty2.value=="0") &&
	(Ofm.bcbdptr.value=="00.00") && (Ofm.bcbqty.value=="0") && (Ofm.bcbdptr2.value=="00.00") && (Ofm.bcbqty2.value=="0") &&
	(Ofm.bcsdptr.value=="00.00") && (Ofm.bcsqty.value=="0") && (Ofm.bcsdptr2.value=="00.00") && (Ofm.bcsqty2.value=="0") &&
	(Ofm.bczdptr.value=="00.00") && (Ofm.bczqty.value=="0") && (Ofm.bczdptr2.value=="00.00") && (Ofm.bczqty2.value=="0") &&
	(Ofm.mchdptr.value=="00.00") && (Ofm.mchqty.value=="0") && (Ofm.mchdptr2.value=="00.00") && (Ofm.mchqty2.value=="0") &&
	(Ofm.mcidptr.value=="00.00") && (Ofm.mciqty.value=="0") && (Ofm.mcidptr2.value=="00.00") && (Ofm.mciqty2.value=="0") &&
	(Ofm.mcjdptr.value=="00.00") && (Ofm.mcjqty.value=="0") && (Ofm.mcjdptr2.value=="00.00") && (Ofm.mcjqty2.value=="0") &&
	(Ofm.mckdptr.value=="00.00") && (Ofm.mckqty.value=="0") && (Ofm.mckdptr2.value=="00.00") && (Ofm.mckqty2.value=="0") &&
	(Ofm.mc1dptr.value=="00.00") && (Ofm.mc1qty.value=="0") && (Ofm.mc1dptr2.value=="00.00") && (Ofm.mc1qty2.value=="0") &&
	(Ofm.mc2dptr.value=="00.00") && (Ofm.mc2qty.value=="0") && (Ofm.mc2dptr2.value=="00.00") && (Ofm.mc2qty2.value=="0") &&
	(Ofm.mcydptr.value=="00.00") && (Ofm.mcyqty.value=="0") && (Ofm.mcydptr2.value=="00.00") && (Ofm.mcyqty2.value=="0") &&
	(Ofm.mczdptr.value=="00.00") && (Ofm.mczqty.value=="0") && (Ofm.mczdptr2.value=="00.00") && (Ofm.mczqty2.value=="0") &&
	(Ofm.srgdptr.value=="00.00") && (Ofm.srgqty.value=="0") && (Ofm.srgdptr2.value=="00.00") && (Ofm.srgqty2.value=="0") &&
	(Ofm.srmdptr.value=="00.00") && (Ofm.srmqty.value=="0") && (Ofm.srmdptr2.value=="00.00") && (Ofm.srmqty2.value=="0") &&
	(Ofm.sradptr.value=="00.00") && (Ofm.sraqty.value=="0") && (Ofm.sradptr2.value=="00.00") && (Ofm.sraqty2.value=="0") &&
	(Ofm.srcdptr.value=="00.00") && (Ofm.srcqty.value=="0") && (Ofm.srcdptr2.value=="00.00") && (Ofm.srcqty2.value=="0") &&
	(Ofm.srbdptr.value=="00.00") && (Ofm.srbqty.value=="0") && (Ofm.srbdptr2.value=="00.00") && (Ofm.srbqty2.value=="0") &&
	(Ofm.srkdptr.value=="00.00") && (Ofm.srkqty.value=="0") && (Ofm.srkdptr2.value=="00.00") && (Ofm.srkqty2.value=="0") &&
	(Ofm.srldptr.value=="00.00") && (Ofm.srlqty.value=="0") && (Ofm.srldptr2.value=="00.00") && (Ofm.srlqty2.value=="0") &&
	(Ofm.srpdptr.value=="00.00") && (Ofm.srpqty.value=="0") && (Ofm.srpdptr2.value=="00.00") && (Ofm.srpqty2.value=="0") &&
	(Ofm.srqdptr.value=="00.00") && (Ofm.srqqty.value=="0") && (Ofm.srqdptr2.value=="00.00") && (Ofm.srqqty2.value=="0") &&
	(Ofm.bf1dptr.value=="00.00") && (Ofm.bf1qty.value=="0") && (Ofm.bf1dptr2.value=="00.00") && (Ofm.bf1qty2.value=="0") &&
	(Ofm.bf2dptr.value=="00.00") && (Ofm.bf2qty.value=="0") && (Ofm.bf2dptr2.value=="00.00") && (Ofm.bf2qty2.value=="0") &&
	(Ofm.fxbdptr.value=="00.00") && (Ofm.fxbqty.value=="0") && (Ofm.fxbdptr2.value=="00.00") && (Ofm.fxbqty2.value=="0") &&
	(Ofm.fxgdptr.value=="00.00") && (Ofm.fxgqty.value=="0") && (Ofm.fxgdptr2.value=="00.00") && (Ofm.fxgqty2.value=="0") &&
	(Ofm.fxkdptr.value=="00.00") && (Ofm.fxkqty.value=="0") && (Ofm.fxkdptr2.value=="00.00") && (Ofm.fxkqty2.value=="0") &&
	(Ofm.fxwdptr.value=="00.00") && (Ofm.fxwqty.value=="0") && (Ofm.fxwdptr2.value=="00.00") && (Ofm.fxwqty2.value=="0") &&
	(Ofm.qx1dptr.value=="00.00") && (Ofm.qx1qty.value=="0") && (Ofm.qx1dptr2.value=="00.00") && (Ofm.qx1qty2.value=="0") &&
	(Ofm.qx2dptr.value=="00.00") && (Ofm.qx2qty.value=="0") && (Ofm.qx2dptr2.value=="00.00") && (Ofm.qx2qty2.value=="0") &&
	(Ofm.sgaqty.value=="0") && (Ofm.sgbqty.value=="0") && (Ofm.sgcqty.value=="0") && (Ofm.sgdqty.value=="0") && (Ofm.sgeqty.value=="0") &&
	(Ofm.sgfqty.value=="0") && (Ofm.sggqty.value=="0") && (Ofm.sghqty.value=="0") && (Ofm.sgiqty.value=="0") &&
	(Ofm.caseqty.value=="0")
	)
	{alert("ERROR:\nPLEASE SELECT DIOPTRE AND QUANTITY");return false;	}

if	(
	(!(Ofm.rg1dptr.value=="00.00") && (Ofm.rg1qty.value=="0")) || (!(Ofm.rg1dptr2.value=="00.00") && (Ofm.rg1qty2.value=="0")) ||
	(!(Ofm.rg2dptr.value=="00.00") && (Ofm.rg2qty.value=="0")) || (!(Ofm.rg2dptr2.value=="00.00") && (Ofm.rg2qty2.value=="0")) ||
	(!(Ofm.rg3dptr.value=="00.00") && (Ofm.rg3qty.value=="0")) || (!(Ofm.rg3dptr2.value=="00.00") && (Ofm.rg3qty2.value=="0")) ||
	(!(Ofm.rg4dptr.value=="00.00") && (Ofm.rg4qty.value=="0")) || (!(Ofm.rg4dptr2.value=="00.00") && (Ofm.rg4qty2.value=="0")) ||
	(!(Ofm.rg5dptr.value=="00.00") && (Ofm.rg5qty.value=="0")) || (!(Ofm.rg5dptr2.value=="00.00") && (Ofm.rg5qty2.value=="0")) ||
	(!(Ofm.rg6dptr.value=="00.00") && (Ofm.rg6qty.value=="0")) || (!(Ofm.rg6dptr2.value=="00.00") && (Ofm.rg6qty2.value=="0")) ||
	(!(Ofm.rg8dptr.value=="00.00") && (Ofm.rg8qty.value=="0")) || (!(Ofm.rg8dptr2.value=="00.00") && (Ofm.rg8qty2.value=="0")) ||
	(!(Ofm.rg9dptr.value=="00.00") && (Ofm.rg9qty.value=="0")) || (!(Ofm.rg9dptr2.value=="00.00") && (Ofm.rg9qty2.value=="0")) ||
	(!(Ofm.rgadptr.value=="00.00") && (Ofm.rgaqty.value=="0")) || (!(Ofm.rgadptr2.value=="00.00") && (Ofm.rgaqty2.value=="0")) ||
	(!(Ofm.rgbdptr.value=="00.00") && (Ofm.rgbqty.value=="0")) || (!(Ofm.rgbdptr2.value=="00.00") && (Ofm.rgbqty2.value=="0")) ||
	(!(Ofm.rgcdptr.value=="00.00") && (Ofm.rgcqty.value=="0")) || (!(Ofm.rgcdptr2.value=="00.00") && (Ofm.rgcqty2.value=="0")) ||
	(!(Ofm.rgrdptr.value=="00.00") && (Ofm.rgrqty.value=="0")) || (!(Ofm.rgrdptr2.value=="00.00") && (Ofm.rgrqty2.value=="0")) ||
	(!(Ofm.rgsdptr.value=="00.00") && (Ofm.rgsqty.value=="0")) || (!(Ofm.rgsdptr2.value=="00.00") && (Ofm.rgsqty2.value=="0")) ||
	(!(Ofm.rgtdptr.value=="00.00") && (Ofm.rgtqty.value=="0")) || (!(Ofm.rgtdptr2.value=="00.00") && (Ofm.rgtqty2.value=="0")) ||
	(!(Ofm.rgudptr.value=="00.00") && (Ofm.rguqty.value=="0")) || (!(Ofm.rgudptr2.value=="00.00") && (Ofm.rguqty2.value=="0")) ||
	(!(Ofm.rgkdptr.value=="00.00") && (Ofm.rgkqty.value=="0")) || (!(Ofm.rgkdptr2.value=="00.00") && (Ofm.rgkqty2.value=="0")) ||
	(!(Ofm.rgwdptr.value=="00.00") && (Ofm.rgwqty.value=="0")) || (!(Ofm.rgwdptr2.value=="00.00") && (Ofm.rgwqty2.value=="0")) ||
	(!(Ofm.acydptr.value=="00.00") && (Ofm.acyqty.value=="0")) || (!(Ofm.acydptr2.value=="00.00") && (Ofm.acyqty2.value=="0")) ||
	(!(Ofm.acxdptr.value=="00.00") && (Ofm.acxqty.value=="0")) || (!(Ofm.acxdptr2.value=="00.00") && (Ofm.acxqty2.value=="0")) ||
	(!(Ofm.aczdptr.value=="00.00") && (Ofm.aczqty.value=="0")) || (!(Ofm.aczdptr2.value=="00.00") && (Ofm.aczqty2.value=="0")) ||
	(!(Ofm.ac3dptr.value=="00.00") && (Ofm.ac3qty.value=="0")) || (!(Ofm.ac3dptr2.value=="00.00") && (Ofm.ac3qty2.value=="0")) ||
	(!(Ofm.ac4dptr.value=="00.00") && (Ofm.ac4qty.value=="0")) || (!(Ofm.ac4dptr2.value=="00.00") && (Ofm.ac4qty2.value=="0")) ||
	(!(Ofm.ac5dptr.value=="00.00") && (Ofm.ac5qty.value=="0")) || (!(Ofm.ac5dptr2.value=="00.00") && (Ofm.ac5qty2.value=="0")) ||
	(!(Ofm.ac6dptr.value=="00.00") && (Ofm.ac6qty.value=="0")) || (!(Ofm.ac6dptr2.value=="00.00") && (Ofm.ac6qty2.value=="0")) ||
	(!(Ofm.eladptr.value=="00.00") && (Ofm.elaqty.value=="0")) || (!(Ofm.eladptr2.value=="00.00") && (Ofm.elaqty2.value=="0")) ||
	(!(Ofm.elbdptr.value=="00.00") && (Ofm.elbqty.value=="0")) || (!(Ofm.elbdptr2.value=="00.00") && (Ofm.elbqty2.value=="0")) ||
	(!(Ofm.elcdptr.value=="00.00") && (Ofm.elcqty.value=="0")) || (!(Ofm.elcdptr2.value=="00.00") && (Ofm.elcqty2.value=="0")) ||
	(!(Ofm.elddptr.value=="00.00") && (Ofm.eldqty.value=="0")) || (!(Ofm.elddptr2.value=="00.00") && (Ofm.eldqty2.value=="0")) ||
	(!(Ofm.flsdptr.value=="00.00") && (Ofm.flsqty.value=="0")) || (!(Ofm.flsdptr2.value=="00.00") && (Ofm.flsqty2.value=="0")) ||
	(!(Ofm.flbdptr.value=="00.00") && (Ofm.flbqty.value=="0")) || (!(Ofm.flbdptr2.value=="00.00") && (Ofm.flbqty2.value=="0")) ||
	(!(Ofm.flcdptr.value=="00.00") && (Ofm.flcqty.value=="0")) || (!(Ofm.flcdptr2.value=="00.00") && (Ofm.flcqty2.value=="0")) ||
	(!(Ofm.flmdptr.value=="00.00") && (Ofm.flmqty.value=="0")) || (!(Ofm.flmdptr2.value=="00.00") && (Ofm.flmqty2.value=="0")) ||
	(!(Ofm.fo1dptr.value=="00.00") && (Ofm.fo1qty.value=="0")) || (!(Ofm.fo1dptr2.value=="00.00") && (Ofm.fo1qty2.value=="0")) ||
	(!(Ofm.ft1dptr.value=="00.00") && (Ofm.ft1qty.value=="0")) || (!(Ofm.ft1dptr2.value=="00.00") && (Ofm.ft1qty2.value=="0")) ||
	(!(Ofm.htbdptr.value=="00.00") && (Ofm.htbqty.value=="0")) || (!(Ofm.htbdptr2.value=="00.00") && (Ofm.htbqty2.value=="0")) ||
	(!(Ofm.htgdptr.value=="00.00") && (Ofm.htgqty.value=="0")) || (!(Ofm.htgdptr2.value=="00.00") && (Ofm.htgqty2.value=="0")) ||
	(!(Ofm.htmdptr.value=="00.00") && (Ofm.htmqty.value=="0")) || (!(Ofm.htmdptr2.value=="00.00") && (Ofm.htmqty2.value=="0")) ||
	(!(Ofm.htrdptr.value=="00.00") && (Ofm.htrqty.value=="0")) || (!(Ofm.htrdptr2.value=="00.00") && (Ofm.htrqty2.value=="0")) ||
	(!(Ofm.ftldptr.value=="00.00") && (Ofm.ftlqty.value=="0")) || (!(Ofm.ftldptr2.value=="00.00") && (Ofm.ftlqty2.value=="0")) ||
	(!(Ofm.ftkdptr.value=="00.00") && (Ofm.ftkqty.value=="0")) || (!(Ofm.ftkdptr2.value=="00.00") && (Ofm.ftkqty2.value=="0")) ||
	(!(Ofm.ftmdptr.value=="00.00") && (Ofm.ftmqty.value=="0")) || (!(Ofm.ftmdptr2.value=="00.00") && (Ofm.ftmqty2.value=="0")) ||
	(!(Ofm.tbgdptr.value=="00.00") && (Ofm.tbgqty.value=="0")) || (!(Ofm.tbgdptr2.value=="00.00") && (Ofm.tbgqty2.value=="0")) ||
	(!(Ofm.tbkdptr.value=="00.00") && (Ofm.tbkqty.value=="0")) || (!(Ofm.tbkdptr2.value=="00.00") && (Ofm.tbkqty2.value=="0")) ||
	(!(Ofm.tbbdptr.value=="00.00") && (Ofm.tbbqty.value=="0")) || (!(Ofm.tbbdptr2.value=="00.00") && (Ofm.tbbqty2.value=="0")) ||
	(!(Ofm.thmdptr.value=="00.00") && (Ofm.thmqty.value=="0")) || (!(Ofm.thmdptr2.value=="00.00") && (Ofm.thmqty2.value=="0")) ||
	(!(Ofm.thbdptr.value=="00.00") && (Ofm.thbqty.value=="0")) || (!(Ofm.thbdptr2.value=="00.00") && (Ofm.thbqty2.value=="0")) ||
	(!(Ofm.thgdptr.value=="00.00") && (Ofm.thgqty.value=="0")) || (!(Ofm.thgdptr2.value=="00.00") && (Ofm.thgqty2.value=="0")) ||
	(!(Ofm.tbmdptr.value=="00.00") && (Ofm.tbmqty.value=="0")) || (!(Ofm.tbmdptr2.value=="00.00") && (Ofm.tbmqty2.value=="0")) ||
	(!(Ofm.tbrdptr.value=="00.00") && (Ofm.tbrqty.value=="0")) || (!(Ofm.tbrdptr2.value=="00.00") && (Ofm.tbrqty2.value=="0")) ||
	(!(Ofm.pcbdptr.value=="00.00") && (Ofm.pcbqty.value=="0")) || (!(Ofm.pcbdptr2.value=="00.00") && (Ofm.pcbqty2.value=="0")) ||
	(!(Ofm.pcgdptr.value=="00.00") && (Ofm.pcgqty.value=="0")) || (!(Ofm.pcgdptr2.value=="00.00") && (Ofm.pcgqty2.value=="0")) ||
	(!(Ofm.pcmdptr.value=="00.00") && (Ofm.pcmqty.value=="0")) || (!(Ofm.pcmdptr2.value=="00.00") && (Ofm.pcmqty2.value=="0")) ||
	(!(Ofm.ctsdptr.value=="00.00") && (Ofm.ctsqty.value=="0")) || (!(Ofm.ctsdptr2.value=="00.00") && (Ofm.ctsqty2.value=="0")) ||
	(!(Ofm.ctgdptr.value=="00.00") && (Ofm.ctgqty.value=="0")) || (!(Ofm.ctgdptr2.value=="00.00") && (Ofm.ctgqty2.value=="0")) ||
	(!(Ofm.ctkdptr.value=="00.00") && (Ofm.ctkqty.value=="0")) || (!(Ofm.ctkdptr2.value=="00.00") && (Ofm.ctkqty2.value=="0")) ||
	(!(Ofm.scsdptr.value=="00.00") && (Ofm.scsqty.value=="0")) || (!(Ofm.scsdptr2.value=="00.00") && (Ofm.scsqty2.value=="0")) ||
	(!(Ofm.scbdptr.value=="00.00") && (Ofm.scbqty.value=="0")) || (!(Ofm.scbdptr2.value=="00.00") && (Ofm.scbqty2.value=="0")) ||
	(!(Ofm.scvdptr.value=="00.00") && (Ofm.scvqty.value=="0")) || (!(Ofm.scvdptr2.value=="00.00") && (Ofm.scvqty2.value=="0")) ||
	(!(Ofm.scwdptr.value=="00.00") && (Ofm.scwqty.value=="0")) || (!(Ofm.scwdptr2.value=="00.00") && (Ofm.scwqty2.value=="0")) ||
	(!(Ofm.scldptr.value=="00.00") && (Ofm.sclqty.value=="0")) || (!(Ofm.scldptr2.value=="00.00") && (Ofm.sclqty2.value=="0")) ||
	(!(Ofm.scgdptr.value=="00.00") && (Ofm.scgqty.value=="0")) || (!(Ofm.scgdptr2.value=="00.00") && (Ofm.scgqty2.value=="0")) ||
	(!(Ofm.bcbdptr.value=="00.00") && (Ofm.bcbqty.value=="0")) || (!(Ofm.bcbdptr2.value=="00.00") && (Ofm.bcbqty2.value=="0")) ||
	(!(Ofm.bcsdptr.value=="00.00") && (Ofm.bcsqty.value=="0")) || (!(Ofm.bcsdptr2.value=="00.00") && (Ofm.bcsqty2.value=="0")) ||
	(!(Ofm.bczdptr.value=="00.00") && (Ofm.bczqty.value=="0")) || (!(Ofm.bczdptr2.value=="00.00") && (Ofm.bczqty2.value=="0")) ||
	(!(Ofm.mchdptr.value=="00.00") && (Ofm.mchqty.value=="0")) || (!(Ofm.mchdptr2.value=="00.00") && (Ofm.mchqty2.value=="0")) ||
	(!(Ofm.mcidptr.value=="00.00") && (Ofm.mciqty.value=="0")) || (!(Ofm.mcidptr2.value=="00.00") && (Ofm.mciqty2.value=="0")) ||
	(!(Ofm.mcjdptr.value=="00.00") && (Ofm.mcjqty.value=="0")) || (!(Ofm.mcjdptr2.value=="00.00") && (Ofm.mcjqty2.value=="0")) ||
	(!(Ofm.mckdptr.value=="00.00") && (Ofm.mckqty.value=="0")) || (!(Ofm.mckdptr2.value=="00.00") && (Ofm.mckqty2.value=="0")) ||
	(!(Ofm.mc1dptr.value=="00.00") && (Ofm.mc1qty.value=="0")) || (!(Ofm.mc1dptr2.value=="00.00") && (Ofm.mc1qty2.value=="0")) ||
	(!(Ofm.mc2dptr.value=="00.00") && (Ofm.mc2qty.value=="0")) || (!(Ofm.mc2dptr2.value=="00.00") && (Ofm.mc2qty2.value=="0")) ||
	(!(Ofm.mcydptr.value=="00.00") && (Ofm.mcyqty.value=="0")) || (!(Ofm.mcydptr2.value=="00.00") && (Ofm.mcyqty2.value=="0")) ||
	(!(Ofm.mczdptr.value=="00.00") && (Ofm.mczqty.value=="0")) || (!(Ofm.mczdptr2.value=="00.00") && (Ofm.mczqty2.value=="0")) ||
	(!(Ofm.srgdptr.value=="00.00") && (Ofm.srgqty.value=="0")) || (!(Ofm.srgdptr2.value=="00.00") && (Ofm.srgqty2.value=="0")) ||
	(!(Ofm.srmdptr.value=="00.00") && (Ofm.srmqty.value=="0")) || (!(Ofm.srmdptr2.value=="00.00") && (Ofm.srmqty2.value=="0")) ||
	(!(Ofm.sradptr.value=="00.00") && (Ofm.sraqty.value=="0")) || (!(Ofm.sradptr2.value=="00.00") && (Ofm.sraqty2.value=="0")) ||
	(!(Ofm.srcdptr.value=="00.00") && (Ofm.srcqty.value=="0")) || (!(Ofm.srcdptr2.value=="00.00") && (Ofm.srcqty2.value=="0")) ||
	(!(Ofm.srbdptr.value=="00.00") && (Ofm.srbqty.value=="0")) || (!(Ofm.srbdptr2.value=="00.00") && (Ofm.srbqty2.value=="0")) ||
	(!(Ofm.srkdptr.value=="00.00") && (Ofm.srkqty.value=="0")) || (!(Ofm.srkdptr2.value=="00.00") && (Ofm.srkqty2.value=="0")) ||
	(!(Ofm.srldptr.value=="00.00") && (Ofm.srlqty.value=="0")) || (!(Ofm.srldptr2.value=="00.00") && (Ofm.srlqty2.value=="0")) ||
	(!(Ofm.srpdptr.value=="00.00") && (Ofm.srpqty.value=="0")) || (!(Ofm.srpdptr2.value=="00.00") && (Ofm.srpqty2.value=="0")) ||
	(!(Ofm.srqdptr.value=="00.00") && (Ofm.srqqty.value=="0")) || (!(Ofm.srqdptr2.value=="00.00") && (Ofm.srqqty2.value=="0")) ||
	(!(Ofm.bf1dptr.value=="00.00") && (Ofm.bf1qty.value=="0")) || (!(Ofm.bf1dptr2.value=="00.00") && (Ofm.bf1qty2.value=="0")) ||
	(!(Ofm.bf2dptr.value=="00.00") && (Ofm.bf2qty.value=="0")) || (!(Ofm.bf2dptr2.value=="00.00") && (Ofm.bf2qty2.value=="0")) ||
	(!(Ofm.fxbdptr.value=="00.00") && (Ofm.fxbqty.value=="0")) || (!(Ofm.fxbdptr2.value=="00.00") && (Ofm.fxbqty2.value=="0")) ||
	(!(Ofm.fxgdptr.value=="00.00") && (Ofm.fxgqty.value=="0")) || (!(Ofm.fxgdptr2.value=="00.00") && (Ofm.fxgqty2.value=="0")) ||
	(!(Ofm.fxkdptr.value=="00.00") && (Ofm.fxkqty.value=="0")) || (!(Ofm.fxkdptr2.value=="00.00") && (Ofm.fxkqty2.value=="0")) ||
	(!(Ofm.qx1dptr.value=="00.00") && (Ofm.qx1qty.value=="0")) || (!(Ofm.qx1dptr2.value=="00.00") && (Ofm.qx1qty2.value=="0")) ||
	(!(Ofm.qx2dptr.value=="00.00") && (Ofm.qx2qty.value=="0")) || (!(Ofm.qx2dptr2.value=="00.00") && (Ofm.qx2qty2.value=="0")) ||
	(!(Ofm.fxwdptr.value=="00.00") && (Ofm.fxwqty.value=="0")) || (!(Ofm.fxwdptr2.value=="00.00") && (Ofm.fxwqty2.value=="0")) 
	)		
	{alert("ERROR:\nDIOPTRE SELECTED WITHOUT QUANTITY");return false;}

if	(
	((Ofm.rg1dptr.value=="00.00") && !(Ofm.rg1qty.value=="0")) || ((Ofm.rg1dptr2.value=="00.00") && !(Ofm.rg1qty2.value=="0")) ||
	((Ofm.rg2dptr.value=="00.00") && !(Ofm.rg2qty.value=="0")) || ((Ofm.rg2dptr2.value=="00.00") && !(Ofm.rg2qty2.value=="0")) ||
	((Ofm.rg3dptr.value=="00.00") && !(Ofm.rg3qty.value=="0")) || ((Ofm.rg3dptr2.value=="00.00") && !(Ofm.rg3qty2.value=="0")) ||
	((Ofm.rg4dptr.value=="00.00") && !(Ofm.rg4qty.value=="0")) || ((Ofm.rg4dptr2.value=="00.00") && !(Ofm.rg4qty2.value=="0")) ||
	((Ofm.rg5dptr.value=="00.00") && !(Ofm.rg5qty.value=="0")) || ((Ofm.rg5dptr2.value=="00.00") && !(Ofm.rg5qty2.value=="0")) ||
	((Ofm.rg6dptr.value=="00.00") && !(Ofm.rg6qty.value=="0")) || ((Ofm.rg6dptr2.value=="00.00") && !(Ofm.rg6qty2.value=="0")) ||
	((Ofm.rg8dptr.value=="00.00") && !(Ofm.rg8qty.value=="0")) || ((Ofm.rg8dptr2.value=="00.00") && !(Ofm.rg8qty2.value=="0")) ||
	((Ofm.rg9dptr.value=="00.00") && !(Ofm.rg9qty.value=="0")) || ((Ofm.rg9dptr2.value=="00.00") && !(Ofm.rg9qty2.value=="0")) ||
	((Ofm.rgadptr.value=="00.00") && !(Ofm.rgaqty.value=="0")) || ((Ofm.rgadptr2.value=="00.00") && !(Ofm.rgaqty2.value=="0")) ||
	((Ofm.rgbdptr.value=="00.00") && !(Ofm.rgbqty.value=="0")) || ((Ofm.rgbdptr2.value=="00.00") && !(Ofm.rgbqty2.value=="0")) ||
	((Ofm.rgcdptr.value=="00.00") && !(Ofm.rgcqty.value=="0")) || ((Ofm.rgcdptr2.value=="00.00") && !(Ofm.rgcqty2.value=="0")) ||
	((Ofm.rgrdptr.value=="00.00") && !(Ofm.rgrqty.value=="0")) || ((Ofm.rgrdptr2.value=="00.00") && !(Ofm.rgrqty2.value=="0")) ||
	((Ofm.rgsdptr.value=="00.00") && !(Ofm.rgsqty.value=="0")) || ((Ofm.rgsdptr2.value=="00.00") && !(Ofm.rgsqty2.value=="0")) ||
	((Ofm.rgtdptr.value=="00.00") && !(Ofm.rgtqty.value=="0")) || ((Ofm.rgtdptr2.value=="00.00") && !(Ofm.rgtqty2.value=="0")) ||
	((Ofm.rgudptr.value=="00.00") && !(Ofm.rguqty.value=="0")) || ((Ofm.rgudptr2.value=="00.00") && !(Ofm.rguqty2.value=="0")) ||
	((Ofm.rgkdptr.value=="00.00") && !(Ofm.rgkqty.value=="0")) || ((Ofm.rgkdptr2.value=="00.00") && !(Ofm.rgkqty2.value=="0")) ||
	((Ofm.rgwdptr.value=="00.00") && !(Ofm.rgwqty.value=="0")) || ((Ofm.rgwdptr2.value=="00.00") && !(Ofm.rgwqty2.value=="0")) ||
	((Ofm.aczdptr.value=="00.00") && !(Ofm.aczqty.value=="0")) || ((Ofm.aczdptr2.value=="00.00") && !(Ofm.aczqty2.value=="0")) ||
	((Ofm.acydptr.value=="00.00") && !(Ofm.acyqty.value=="0")) || ((Ofm.acydptr2.value=="00.00") && !(Ofm.acyqty2.value=="0")) ||
	((Ofm.acxdptr.value=="00.00") && !(Ofm.acxqty.value=="0")) || ((Ofm.acxdptr2.value=="00.00") && !(Ofm.acxqty2.value=="0")) ||
	((Ofm.ac3dptr.value=="00.00") && !(Ofm.ac3qty.value=="0")) || ((Ofm.ac3dptr2.value=="00.00") && !(Ofm.ac3qty2.value=="0")) ||
	((Ofm.ac4dptr.value=="00.00") && !(Ofm.ac4qty.value=="0")) || ((Ofm.ac4dptr2.value=="00.00") && !(Ofm.ac4qty2.value=="0")) ||
	((Ofm.ac5dptr.value=="00.00") && !(Ofm.ac5qty.value=="0")) || ((Ofm.ac5dptr2.value=="00.00") && !(Ofm.ac5qty2.value=="0")) ||
	((Ofm.ac6dptr.value=="00.00") && !(Ofm.ac6qty.value=="0")) || ((Ofm.ac6dptr2.value=="00.00") && !(Ofm.ac6qty2.value=="0")) ||
	((Ofm.eladptr.value=="00.00") && !(Ofm.elaqty.value=="0")) || ((Ofm.eladptr2.value=="00.00") && !(Ofm.elaqty2.value=="0")) ||
	((Ofm.elbdptr.value=="00.00") && !(Ofm.elbqty.value=="0")) || ((Ofm.elbdptr2.value=="00.00") && !(Ofm.elbqty2.value=="0")) ||
	((Ofm.elcdptr.value=="00.00") && !(Ofm.elcqty.value=="0")) || ((Ofm.elcdptr2.value=="00.00") && !(Ofm.elcqty2.value=="0")) ||
	((Ofm.elddptr.value=="00.00") && !(Ofm.eldqty.value=="0")) || ((Ofm.elddptr2.value=="00.00") && !(Ofm.eldqty2.value=="0")) ||
	((Ofm.flsdptr.value=="00.00") && !(Ofm.flsqty.value=="0")) || ((Ofm.flsdptr2.value=="00.00") && !(Ofm.flsqty2.value=="0")) ||
	((Ofm.flbdptr.value=="00.00") && !(Ofm.flbqty.value=="0")) || ((Ofm.flbdptr2.value=="00.00") && !(Ofm.flbqty2.value=="0")) ||
	((Ofm.flcdptr.value=="00.00") && !(Ofm.flcqty.value=="0")) || ((Ofm.flcdptr2.value=="00.00") && !(Ofm.flcqty2.value=="0")) ||
	((Ofm.flmdptr.value=="00.00") && !(Ofm.flmqty.value=="0")) || ((Ofm.flmdptr2.value=="00.00") && !(Ofm.flmqty2.value=="0")) ||
	((Ofm.fo1dptr.value=="00.00") && !(Ofm.fo1qty.value=="0")) || ((Ofm.fo1dptr2.value=="00.00") && !(Ofm.fo1qty2.value=="0")) ||
	((Ofm.ft1dptr.value=="00.00") && !(Ofm.ft1qty.value=="0")) || ((Ofm.ft1dptr2.value=="00.00") && !(Ofm.ft1qty2.value=="0")) ||
	((Ofm.htbdptr.value=="00.00") && !(Ofm.htbqty.value=="0")) || ((Ofm.htbdptr2.value=="00.00") && !(Ofm.htbqty2.value=="0")) ||
	((Ofm.htgdptr.value=="00.00") && !(Ofm.htgqty.value=="0")) || ((Ofm.htgdptr2.value=="00.00") && !(Ofm.htgqty2.value=="0")) ||
	((Ofm.htmdptr.value=="00.00") && !(Ofm.htmqty.value=="0")) || ((Ofm.htmdptr2.value=="00.00") && !(Ofm.htmqty2.value=="0")) ||
	((Ofm.htrdptr.value=="00.00") && !(Ofm.htrqty.value=="0")) || ((Ofm.htrdptr2.value=="00.00") && !(Ofm.htrqty2.value=="0")) ||
	((Ofm.ftldptr.value=="00.00") && !(Ofm.ftlqty.value=="0")) || ((Ofm.ftldptr2.value=="00.00") && !(Ofm.ftlqty2.value=="0")) ||
	((Ofm.ftkdptr.value=="00.00") && !(Ofm.ftkqty.value=="0")) || ((Ofm.ftkdptr2.value=="00.00") && !(Ofm.ftkqty2.value=="0")) ||
	((Ofm.ftmdptr.value=="00.00") && !(Ofm.ftmqty.value=="0")) || ((Ofm.ftmdptr2.value=="00.00") && !(Ofm.ftmqty2.value=="0")) ||
	((Ofm.tbgdptr.value=="00.00") && !(Ofm.tbgqty.value=="0")) || ((Ofm.tbgdptr2.value=="00.00") && !(Ofm.tbgqty2.value=="0")) ||
	((Ofm.tbkdptr.value=="00.00") && !(Ofm.tbkqty.value=="0")) || ((Ofm.tbkdptr2.value=="00.00") && !(Ofm.tbkqty2.value=="0")) ||
	((Ofm.tbbdptr.value=="00.00") && !(Ofm.tbbqty.value=="0")) || ((Ofm.tbbdptr2.value=="00.00") && !(Ofm.tbbqty2.value=="0")) ||
	((Ofm.thmdptr.value=="00.00") && !(Ofm.thmqty.value=="0")) || ((Ofm.thmdptr2.value=="00.00") && !(Ofm.thmqty2.value=="0")) ||
	((Ofm.thbdptr.value=="00.00") && !(Ofm.thbqty.value=="0")) || ((Ofm.thbdptr2.value=="00.00") && !(Ofm.thbqty2.value=="0")) ||
	((Ofm.thgdptr.value=="00.00") && !(Ofm.thgqty.value=="0")) || ((Ofm.thgdptr2.value=="00.00") && !(Ofm.thgqty2.value=="0")) ||
	((Ofm.tbmdptr.value=="00.00") && !(Ofm.tbmqty.value=="0")) || ((Ofm.tbmdptr2.value=="00.00") && !(Ofm.tbmqty2.value=="0")) ||
	((Ofm.tbrdptr.value=="00.00") && !(Ofm.tbrqty.value=="0")) || ((Ofm.tbrdptr2.value=="00.00") && !(Ofm.tbrqty2.value=="0")) ||
	((Ofm.pcbdptr.value=="00.00") && !(Ofm.pcbqty.value=="0")) || ((Ofm.pcbdptr2.value=="00.00") && !(Ofm.pcbqty2.value=="0")) ||
	((Ofm.pcgdptr.value=="00.00") && !(Ofm.pcgqty.value=="0")) || ((Ofm.pcgdptr2.value=="00.00") && !(Ofm.pcgqty2.value=="0")) ||
	((Ofm.pcmdptr.value=="00.00") && !(Ofm.pcmqty.value=="0")) || ((Ofm.pcmdptr2.value=="00.00") && !(Ofm.pcmqty2.value=="0")) ||
	((Ofm.ctsdptr.value=="00.00") && !(Ofm.ctsqty.value=="0")) || ((Ofm.ctsdptr2.value=="00.00") && !(Ofm.ctsqty2.value=="0")) ||
	((Ofm.ctgdptr.value=="00.00") && !(Ofm.ctgqty.value=="0")) || ((Ofm.ctgdptr2.value=="00.00") && !(Ofm.ctgqty2.value=="0")) ||
	((Ofm.ctkdptr.value=="00.00") && !(Ofm.ctkqty.value=="0")) || ((Ofm.ctkdptr2.value=="00.00") && !(Ofm.ctkqty2.value=="0")) ||
	((Ofm.scsdptr.value=="00.00") && !(Ofm.scsqty.value=="0")) || ((Ofm.scsdptr2.value=="00.00") && !(Ofm.scsqty2.value=="0")) ||
	((Ofm.scbdptr.value=="00.00") && !(Ofm.scbqty.value=="0")) || ((Ofm.scbdptr2.value=="00.00") && !(Ofm.scbqty2.value=="0")) ||
	((Ofm.scvdptr.value=="00.00") && !(Ofm.scvqty.value=="0")) || ((Ofm.scvdptr2.value=="00.00") && !(Ofm.scvqty2.value=="0")) ||
	((Ofm.scwdptr.value=="00.00") && !(Ofm.scwqty.value=="0")) || ((Ofm.scwdptr2.value=="00.00") && !(Ofm.scwqty2.value=="0")) ||
	((Ofm.scldptr.value=="00.00") && !(Ofm.sclqty.value=="0")) || ((Ofm.scldptr2.value=="00.00") && !(Ofm.sclqty2.value=="0")) ||
	((Ofm.scgdptr.value=="00.00") && !(Ofm.scgqty.value=="0")) || ((Ofm.scgdptr2.value=="00.00") && !(Ofm.scgqty2.value=="0")) ||
	((Ofm.bcbdptr.value=="00.00") && !(Ofm.bcbqty.value=="0")) || ((Ofm.bcbdptr2.value=="00.00") && !(Ofm.bcbqty2.value=="0")) ||
	((Ofm.bcsdptr.value=="00.00") && !(Ofm.bcsqty.value=="0")) || ((Ofm.bcsdptr2.value=="00.00") && !(Ofm.bcsqty2.value=="0")) ||
	((Ofm.bczdptr.value=="00.00") && !(Ofm.bczqty.value=="0")) || ((Ofm.bczdptr2.value=="00.00") && !(Ofm.bczqty2.value=="0")) ||
	((Ofm.mchdptr.value=="00.00") && !(Ofm.mchqty.value=="0")) || ((Ofm.mchdptr2.value=="00.00") && !(Ofm.mchqty2.value=="0")) ||
	((Ofm.mcidptr.value=="00.00") && !(Ofm.mciqty.value=="0")) || ((Ofm.mcidptr2.value=="00.00") && !(Ofm.mciqty2.value=="0")) ||
	((Ofm.mcjdptr.value=="00.00") && !(Ofm.mcjqty.value=="0")) || ((Ofm.mcjdptr2.value=="00.00") && !(Ofm.mcjqty2.value=="0")) ||
	((Ofm.mckdptr.value=="00.00") && !(Ofm.mckqty.value=="0")) || ((Ofm.mckdptr2.value=="00.00") && !(Ofm.mckqty2.value=="0")) ||
	((Ofm.mc1dptr.value=="00.00") && !(Ofm.mc1qty.value=="0")) || ((Ofm.mc1dptr2.value=="00.00") && !(Ofm.mc1qty2.value=="0")) ||
	((Ofm.mc2dptr.value=="00.00") && !(Ofm.mc2qty.value=="0")) || ((Ofm.mc2dptr2.value=="00.00") && !(Ofm.mc2qty2.value=="0")) ||
	((Ofm.mcydptr.value=="00.00") && !(Ofm.mcyqty.value=="0")) || ((Ofm.mcydptr2.value=="00.00") && !(Ofm.mcyqty2.value=="0")) ||
	((Ofm.mczdptr.value=="00.00") && !(Ofm.mczqty.value=="0")) || ((Ofm.mczdptr2.value=="00.00") && !(Ofm.mczqty2.value=="0")) ||
	((Ofm.srgdptr.value=="00.00") && !(Ofm.srgqty.value=="0")) || ((Ofm.srgdptr2.value=="00.00") && !(Ofm.srgqty2.value=="0")) ||
	((Ofm.srmdptr.value=="00.00") && !(Ofm.srmqty.value=="0")) || ((Ofm.srmdptr2.value=="00.00") && !(Ofm.srmqty2.value=="0")) ||
	((Ofm.sradptr.value=="00.00") && !(Ofm.sraqty.value=="0")) || ((Ofm.sradptr2.value=="00.00") && !(Ofm.sraqty2.value=="0")) ||
	((Ofm.srcdptr.value=="00.00") && !(Ofm.srcqty.value=="0")) || ((Ofm.srcdptr2.value=="00.00") && !(Ofm.srcqty2.value=="0")) ||
	((Ofm.srbdptr.value=="00.00") && !(Ofm.srbqty.value=="0")) || ((Ofm.srbdptr2.value=="00.00") && !(Ofm.srbqty2.value=="0")) ||
	((Ofm.srkdptr.value=="00.00") && !(Ofm.srkqty.value=="0")) || ((Ofm.srkdptr2.value=="00.00") && !(Ofm.srkqty2.value=="0")) ||
	((Ofm.srldptr.value=="00.00") && !(Ofm.srlqty.value=="0")) || ((Ofm.srldptr2.value=="00.00") && !(Ofm.srlqty2.value=="0")) ||
	((Ofm.srpdptr.value=="00.00") && !(Ofm.srpqty.value=="0")) || ((Ofm.srpdptr2.value=="00.00") && !(Ofm.srpqty2.value=="0")) ||
	((Ofm.srqdptr.value=="00.00") && !(Ofm.srqqty.value=="0")) || ((Ofm.srqdptr2.value=="00.00") && !(Ofm.srqqty2.value=="0")) ||
	((Ofm.bf1dptr.value=="00.00") && !(Ofm.bf1qty.value=="0")) || ((Ofm.bf1dptr2.value=="00.00") && !(Ofm.bf1qty2.value=="0")) ||
	((Ofm.bf2dptr.value=="00.00") && !(Ofm.bf2qty.value=="0")) || ((Ofm.bf2dptr2.value=="00.00") && !(Ofm.bf2qty2.value=="0")) ||
	((Ofm.fxbdptr.value=="00.00") && !(Ofm.fxbqty.value=="0")) || ((Ofm.fxbdptr2.value=="00.00") && !(Ofm.fxbqty2.value=="0")) ||
	((Ofm.fxgdptr.value=="00.00") && !(Ofm.fxgqty.value=="0")) || ((Ofm.fxgdptr2.value=="00.00") && !(Ofm.fxgqty2.value=="0")) ||
	((Ofm.fxkdptr.value=="00.00") && !(Ofm.fxkqty.value=="0")) || ((Ofm.fxkdptr2.value=="00.00") && !(Ofm.fxkqty2.value=="0")) ||
	((Ofm.qx1dptr.value=="00.00") && !(Ofm.qx1qty.value=="0")) || ((Ofm.qx1dptr2.value=="00.00") && !(Ofm.qx1qty2.value=="0")) ||
	((Ofm.qx2dptr.value=="00.00") && !(Ofm.qx2qty.value=="0")) || ((Ofm.qx2dptr2.value=="00.00") && !(Ofm.qx2qty2.value=="0")) ||
	((Ofm.fxwdptr.value=="00.00") && !(Ofm.fxwqty.value=="0")) || ((Ofm.fxwdptr2.value=="00.00") && !(Ofm.fxwqty2.value=="0")) 
	)		
	{alert("ERROR:\nQUANTITY SELECTED WITHOUT DIOPTRE");return false;}
}// end function ValidateItemData(Ofm)


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function TestForInvalidQty(Ofm)
	{
	if (M_itemcnt > qtymax)
		{
		alert("\nERROR:"+
		"\nYOU HAVE SELECTED OVER "+qtymax+" ITEMS."+
		"\nIF A MISTAKE, THEN HIT RESET BUTTON."+
		"\nIF YOU REQUIRE OVER "+qtymax+" ITEMS, THEN"+
		"\nCONTACT RDGGLSS@AOL.COM.")
		return 0;
		}
	}


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function TestForInvalidChars(Ofm)
	{
	if ((( M_itemcnt != "1") && ( M_itemcnt != "2") && ( M_itemcnt != "3") &&
		( M_itemcnt != "4") && ( M_itemcnt != "5") && ( M_itemcnt != "6") && (Ofm.caseqty.value == 0)))
		{
		alert("ERROR:"+
		"\nINVALID QUANTITY ENTERED."+
		"\nPLEASE ENTER EITHER 1, 2, 3, 4, 5 OR 6.");
		return 0;
		}
	}


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function TestForSameTypeDiffDptr(Ofm)
	{	
//alert ("typeArray[k] = "+typeArray[0]+", typeArray[k+1] = "+typeArray[1]+", dptrArray[k] = "+dptrArray[0]+", dptrArray[k+1] = "+dptrArray[1])

	for (var k=0; k < 7; k++)
		{

			if (typeArray[k] == typeArray[k+1])
				{
					if (dptrArray[k] == dptrArray[k+1])
						{
						alert(
								"\nPLEASE SELECT DISSIMILAR DIOPTRE FOR "+typeArray[k]+
								"\n"+
								"\nIf you want to order another pair of glasses of the same type "+
								"\nbut in a different dioptre, then use 2ndPAIR drop-down menu."+
								"\nThe above error message has been returned because you have"+ 
								"\nselected the same dioptre value in the 1stPAIR drop-down and"+ 
								"\nthe 2ndPAIR drop-down menu."+
								"\n"+
								"\nNOW CLICK ON 'RESET' BUTTON AND RE-ENTER."
							);
						return 0;
						}
				}
		}
	}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function CalcDiscount(Ofm)
	{
	var discntfactor = 0.5  //50% off per i
	// BubbleSort

	for (var k=0; k<(i-1); k++)
		{

     		for (var j=k+1; j<i; j++)
			{
           		if (pricearray[j] < pricearray[k]) 
				{
				var holder = pricearray[k]; 
				pricearray[k] = pricearray[j]; 
				pricearray[j] = holder;
				}	
			}
		}

		var accum=0
		
		//determines if total num items bought is odd-even
		if (i%2 == 0)
			{for (var x=0; x < (i)/2; x++) {accum+=pricearray[x]}}
		else
			{for (var x=0; x < (i)/2-1; x++) {accum+=pricearray[x]}}

		//pricearray[] contains prices that qualify for discnt
		M_totdiscntpnd=accum * discntfactor
		M_totdiscnteuro=	M_totdiscntpnd * euro2pnd
		M_totdiscntusd = M_totdiscntpnd * usd2pnd
		M_totdiscntcad = M_totdiscntpnd * cad2pnd
		M_totdiscntaud = M_totdiscntpnd * aud2pnd
		M_totdiscntdkk = M_totdiscntpnd * dkk2pnd
		M_totdiscntnok = M_totdiscntpnd * nok2pnd

	}// end function CalcDiscount(Ofm)




///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function RoundTotals(Ofm)
	{
	//round postage and packing
	M_ppeurope =  (((Math.round(M_ppeurope * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_ppusa =  (((Math.round(M_ppusa * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_ppaus =  (((Math.round(M_ppaus * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_ppcan =  (((Math.round(M_ppcan * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_ppden =  (((Math.round(M_ppden * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_ppnor =  (((Math.round(M_ppnor * Math.pow(10,2))) / (Math.pow(10,2))) - 0);

	//round discount
	M_totdiscntpnd =  (((Math.round(M_totdiscntpnd * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totdiscnteuro =  (((Math.round(M_totdiscnteuro * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totdiscntusd =  (((Math.round(M_totdiscntusd * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totdiscntcad =  (((Math.round(M_totdiscntcad * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totdiscntaud =  (((Math.round(M_totdiscntaud * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totdiscntdkk =  (((Math.round(M_totdiscntdkk * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totdiscntnok =  (((Math.round(M_totdiscntnok * Math.pow(10,2))) / (Math.pow(10,2))) - 0);

	//round subtotal charge
	M_subtotcostpnd =  (((Math.round(M_subtotcostpnd * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_subtotcosteuro = (((Math.round(M_subtotcosteuro * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_subtotcostusd = (((Math.round(M_subtotcostusd * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_subtotcostcad = (((Math.round(M_subtotcostcad * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_subtotcostaud = (((Math.round(M_subtotcostaud * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_subtotcostdkk = (((Math.round(M_subtotcostdkk * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_subtotcostnok = (((Math.round(M_subtotcostnok * Math.pow(10,2))) / (Math.pow(10,2))) - 0);

	//round charge including postage and packing
	M_totcostpnd = (((Math.round(M_totcostpnd * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totcosteuro = (((Math.round(M_totcosteuro * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totcostusd = (((Math.round(M_totcostusd * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totcostcad = (((Math.round(M_totcostcad * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totcostaud = (((Math.round(M_totcostaud * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totcostdkk = (((Math.round(M_totcostdkk * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	M_totcostnok = (((Math.round(M_totcostnok * Math.pow(10,2))) / (Math.pow(10,2))) - 0);
	}


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function DisplayOrder(Ofm,currtype)
	{
	if (currtype == "USD") {var header = "\n$_Subtot\t$_Each\tQty\tDptr\tStyle\tType\tColr";}
	else if (currtype == "EUR") {var header = "\n€_Subtot\t€_Each\tQty\tDptr\tStyle\tType\tColr";}
	else if (currtype == "CAD") {var header = "\nC$subtot\tC$each\tQty\tDptr\tStyle\tType\tColr";}
	else if (currtype == "AUD") {var header = "\nA$subtot\tA$each\tQty\tDptr\tStyle\tType\tColr";}
	else if (currtype == "DKK") {var header = "\nDkSubtot\tDkEach\tQty\tDptr\tStyle\tType\tColr";}
	else if (currtype == "NOK") {var header = "\nNkSubtot\tNkEach\tQty\tDptr\tStyle\tType\tColr";}
	else  {var header = "\n£_Subtot\t£_Each\tQty\tDptr\tStyle\tType\tColr";}
	

	alert(
		"\n                                         ORDER SUMMARY"
		+"\n"
		+header
		+nl1+M_i1totprice+tab1+M_i1price+tab1+M_i1totqty+tab1+M_i1dptr+tab1+M_i1style+tab1+M_i1type+tab1+M_i1colr
		+nl2+M_i2totprice+tab2+M_i2price+tab2+M_i2totqty+tab2+M_i2dptr+tab2+M_i2style+tab2+M_i2type+tab2+M_i2colr
		+nl3+M_i3totprice+tab3+M_i3price+tab3+M_i3totqty+tab3+M_i3dptr+tab3+M_i3style+tab3+M_i3type+tab3+M_i3colr
		+nl4+M_i4totprice+tab4+M_i4price+tab4+M_i4totqty+tab4+M_i4dptr+tab4+M_i4style+tab4+M_i4type+tab4+M_i4colr
		+nl5+M_i5totprice+tab5+M_i5price+tab5+M_i5totqty+tab5+M_i5dptr+tab5+M_i5style+tab5+M_i5type+tab5+M_i5colr
		+nl6+M_i6totprice+tab6+M_i6price+tab6+M_i6totqty+tab6+M_i6dptr+tab6+M_i6style+tab6+M_i6type+tab6+M_i6colr
		+nl7+M_ctotprice+tab7+M_cprice+tab7+M_ctotqty+tab7+M_cnull+tab7+M_cstyle+tab7+M_ctype+tab7+M_ccolr
		+"\n"
		+"\n"
		+"\nGBP:  "+M_subtotcostpnd+"  -  "+M_totdiscntpnd+" Discount  + "+M_ppuk+" Shipping  = "+M_totcostpnd
		+"\nEUR:  "+M_subtotcosteuro+"  -  "+M_totdiscnteuro+" Discount  + "+M_ppeurope+" Shipping  = "+M_totcosteuro		
		+"\nUSD:  "+M_subtotcostusd+"  -  "+M_totdiscntusd+" Discount  + "+M_ppusa+" Shipping  = "+M_totcostusd
		+"\nDKK:  "+M_subtotcostdkk+"  -  "+M_totdiscntdkk+" Discount  + "+M_ppden+" Shipping  = "+M_totcostdkk
		+"\nNOK:  "+M_subtotcostnok+"  -  "+M_totdiscntnok+" Discount  + "+M_ppnor+" Shipping  = "+M_totcostnok
		+"\nCAD:  "+M_subtotcostcad+"  -  "+M_totdiscntcad+" Discount  + "+M_ppcan+" Shipping  = "+M_totcostcad
		+"\nAUD:  "+M_subtotcostaud+"  -  "+M_totdiscntaud+" Discount  + "+M_ppaus+" Shipping  = "+M_totcostaud
		) //end alert()

	}


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function Load(Ofm,typ,styl,dptr,totqty,price,colr,currtype)
	{

	pnd="£";
	totprice = (price*totqty)
	if ( select == 1 ) 
		{
		nl1="\n"; tab1="\t";
		M_i1type=typ,M_i1style=styl,M_i1dptr=dptr,M_i1totqty=totqty,M_i1price=price,M_i1totprice=totprice,M_i1colr=colr
 		if (currtype == "USD") {M_i1price=rnd(M_i1price*usd2pnd,2);M_i1totprice=rnd(M_i1totprice*usd2pnd,2);} 
		if (currtype == "EUR") {M_i1price=rnd(M_i1price*euro2pnd,2);M_i1totprice=rnd(M_i1totprice*euro2pnd,2);}  
		if (currtype == "CAD") {M_i1price=rnd(M_i1price*cad2pnd,2);M_i1totprice=rnd(M_i1totprice*cad2pnd,2);}  
		if (currtype == "AUD") {M_i1price=rnd(M_i1price*aud2pnd,2);M_i1totprice=rnd(M_i1totprice*aud2pnd,2);}  
		if (currtype == "DKK") {M_i1price=rnd(M_i1price*dkk2pnd,2);M_i1totprice=rnd(M_i1totprice*dkk2pnd,2);}  
		if (currtype == "NOK") {M_i1price=rnd(M_i1price*nok2pnd,2);M_i1totprice=rnd(M_i1totprice*nok2pnd,2);}  
		}
	if ( select == 2 ) 
		{
		nl2="\n"; tab2="\t";
		M_i2type=typ,M_i2style=styl,M_i2dptr=dptr,M_i2totqty=totqty,M_i2price=price,M_i2totprice=totprice,M_i2colr=colr
		if (currtype == "USD") {M_i2price=rnd(M_i2price*usd2pnd,2);M_i2totprice=rnd(M_i2totprice*usd2pnd,2);}  
		if (currtype == "EUR") {M_i2price=rnd(M_i2price*euro2pnd,2);M_i2totprice=rnd(M_i2totprice*euro2pnd,2);}
		if (currtype == "CAD") {M_i2price=rnd(M_i2price*cad2pnd,2);M_i2totprice=rnd(M_i2totprice*cad2pnd,2);}  
		if (currtype == "AUD") {M_i2price=rnd(M_i2price*aud2pnd,2);M_i2totprice=rnd(M_i2totprice*aud2pnd,2);}  
		if (currtype == "DKK") {M_i2price=rnd(M_i2price*dkk2pnd,2);M_i2totprice=rnd(M_i2totprice*dkk2pnd,2);}  
		if (currtype == "NOK") {M_i2price=rnd(M_i2price*nok2pnd,2);M_i2totprice=rnd(M_i2totprice*nok2pnd,2);}  
		}
	if ( select == 3 ) 
		{
		nl3="\n"; tab3="\t";
		M_i3type=typ,M_i3style=styl,M_i3dptr=dptr,M_i3totqty=totqty,M_i3price=price,M_i3totprice=totprice,M_i3colr=colr
		if (currtype == "USD") {M_i3price=rnd(M_i3price*usd2pnd,2);M_i3totprice=rnd(M_i3totprice*usd2pnd,2);}  
		if (currtype == "EUR") {M_i3price=rnd(M_i3price*euro2pnd,2);M_i3totprice=rnd(M_i3totprice*euro2pnd,2);}
		if (currtype == "CAD") {M_i3price=rnd(M_i3price*cad2pnd,2);M_i3totprice=rnd(M_i3totprice*cad2pnd,2);}  
		if (currtype == "AUD") {M_i3price=rnd(M_i3price*aud2pnd,2);M_i3totprice=rnd(M_i3totprice*aud2pnd,2);}  
		if (currtype == "DKK") {M_i3price=rnd(M_i3price*dkk2pnd,2);M_i3totprice=rnd(M_i3totprice*dkk2pnd,2);}  
		if (currtype == "NOK") {M_i3price=rnd(M_i3price*nok2pnd,2);M_i3totprice=rnd(M_i3totprice*nok2pnd,2);}  
		}
	if ( select == 4 ) 
		{
		nl4="\n"; tab4="\t";
		M_i4type=typ,M_i4style=styl,M_i4dptr=dptr,M_i4totqty=totqty,M_i4price=price,M_i4totprice=totprice,M_i4colr=colr
		if (currtype == "USD") {M_i4price=rnd(M_i4price*usd2pnd,2);M_i4totprice=rnd(M_i4totprice*usd2pnd,2);}  
		if (currtype == "EUR") {M_i4price=rnd(M_i4price*euro2pnd,2);M_i4totprice=rnd(M_i4totprice*euro2pnd,2);}
		if (currtype == "CAD") {M_i4price=rnd(M_i4price*cad2pnd,2);M_i4totprice=rnd(M_i4totprice*cad2pnd,2);}  
		if (currtype == "AUD") {M_i4price=rnd(M_i4price*aud2pnd,2);M_i4totprice=rnd(M_i4totprice*aud2pnd,2);}  
		if (currtype == "DKK") {M_i4price=rnd(M_i4price*dkk2pnd,2);M_i4totprice=rnd(M_i4totprice*dkk2pnd,2);}  
		if (currtype == "NOK") {M_i4price=rnd(M_i4price*nok2pnd,2);M_i4totprice=rnd(M_i4totprice*nok2pnd,2);}  
		}
	if ( select == 5 ) 
		{
		nl5="\n"; tab5="\t";
		M_i5type=typ,M_i5style=styl,M_i5dptr=dptr,M_i5totqty=totqty,M_i5price=price,M_i5totprice=totprice,M_i5colr=colr
		if (currtype == "USD") {M_i5price=rnd(M_i5price*usd2pnd,2);M_i5totprice=rnd(M_i5totprice*usd2pnd,2);}  
		if (currtype == "EUR") {M_i5price=rnd(M_i5price*euro2pnd,2);M_i5totprice=rnd(M_i5totprice*euro2pnd,2);}
		if (currtype == "CAD") {M_i5price=rnd(M_i5price*cad2pnd,2);M_i5totprice=rnd(M_i5totprice*cad2pnd,2);}  
		if (currtype == "AUD") {M_i5price=rnd(M_i5price*aud2pnd,2);M_i5totprice=rnd(M_i5totprice*aud2pnd,2);}  
		if (currtype == "DKK") {M_i5price=rnd(M_i5price*dkk2pnd,2);M_i5totprice=rnd(M_i5totprice*dkk2pnd,2);}  
		if (currtype == "NOK") {M_i5price=rnd(M_i5price*nok2pnd,2);M_i5totprice=rnd(M_i5totprice*nok2pnd,2);}  
		}
	if ( select == 6 ) 
		{
		nl6="\n"; tab6="\t";
		M_i6type=typ,M_i6style=styl,M_i6dptr=dptr,M_i6totqty=totqty,M_i6price=price,M_i6totprice=totprice,M_i6colr=colr
		if (currtype == "USD") {M_i6price=rnd(M_i6price*usd2pnd,2);M_i6totprice=rnd(M_i6totprice*usd2pnd,2);}  
		if (currtype == "EUR") {M_i6price=rnd(M_i6price*euro2pnd,2);M_i6totprice=rnd(M_i6totprice*euro2pnd,2);}
		if (currtype == "CAD") {M_i6price=rnd(M_i6price*cad2pnd,2);M_i6totprice=rnd(M_i6totprice*cad2pnd,2);}  
		if (currtype == "AUD") {M_i6price=rnd(M_i6price*aud2pnd,2);M_i6totprice=rnd(M_i6totprice*aud2pnd,2);}  
		if (currtype == "DKK") {M_i6price=rnd(M_i6price*dkk2pnd,2);M_i6totprice=rnd(M_i6totprice*dkk2pnd,2);}  
		if (currtype == "NOK") {M_i6price=rnd(M_i6price*nok2pnd,2);M_i6totprice=rnd(M_i6totprice*nok2pnd,2);}  
		}
	if ( select == 7 ) 
		{
		nl7="\n"; tab7="\t";
		M_ctype=typ,M_cstyle=styl,M_cnull=dptr,M_ctotqty=totqty,M_cprice=price,M_ctotprice=totprice,
		M_ccolr=colr 		
		if (currtype == "USD") {M_cprice=rnd(M_cprice*usd2pnd,2);M_ctotprice=rnd(M_ctotprice*usd2pnd,2);}  
		if (currtype == "EUR") {M_cprice=rnd(M_cprice*euro2pnd,2);M_ctotprice=rnd(M_ctotprice*euro2pnd,2);}
		if (currtype == "CAD") {M_cprice=rnd(M_cprice*cad2pnd,2);M_ctotprice=rnd(M_ctotprice*cad2pnd,2);}  
		if (currtype == "AUD") {M_cprice=rnd(M_cprice*aud2pnd,2);M_ctotprice=rnd(M_ctotprice*aud2pnd,2);}  
		if (currtype == "DKK") {M_cprice=rnd(M_cprice*dkk2pnd,2);M_ctotprice=rnd(M_ctotprice*dkk2pnd,2);}  
		if (currtype == "NOK") {M_cprice=rnd(M_cprice*nok2pnd,2);M_ctotprice=rnd(M_ctotprice*nok2pnd,2);}  
		}


		M_subtotcostpnd += (totprice - 0)
		if (select != 7) {M_itemcnt += (totqty - 0)}
		if (select != 7) {for (var cnt=0; cnt < totqty; cnt++) {pricearray[i]=price; i++;}}


	for (var k=0; k < 7; k++) {typeArray[7-k]=typeArray[6-k];}; typeArray[0]=typ;
	for (var l=0; l < 7; l++) {dptrArray[7-l]=dptrArray[6-l];}; dptrArray[0]=dptr;

	} //end function Load()

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function CopyOver(Copy)
	{
	Copy.M_delivtitle.value = Copy.M_title.value; 
	Copy.M_delivlastname.value = Copy.M_lastname.value; 
	Copy.M_delivaddress.value = Copy.address.value; 
	Copy.M_delivpostcode.value = Copy.postcode.value; 
	Copy.M_delivcountry.value = Copy.country.value; 
	}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function AssociateParamsWithForm(Ofm)
	{
	///////////////////////////// WORLDPAY MANDATORY PARAMS //////////////////
	//Ofm.desc.value			=desc
	//Ofm.cartId.value			=cartId
	//Ofm.amount.value		=amount
	/////////////////////////////// TRANSACTION IDENT //////////////////////////////////////
	//Ofm.trans_id.value		=trans_id
	///////////////////////////// ITEM PARAMS //////////////////////
	Ofm.M_i1type.value      =M_i1type 
	Ofm.M_i1style.value     =M_i1style
	Ofm.M_i1dptr.value       =M_i1dptr
	Ofm.M_i1totqty.value    =M_i1totqty	
	Ofm.M_i1price.value     =M_i1price
	Ofm.M_i1totprice.value =M_i1totprice
	Ofm.M_i1colr.value       =M_i1colr
	Ofm.M_i2type.value      =M_i2type
	Ofm.M_i2style.value     =M_i2style
	Ofm.M_i2dptr.value       =M_i2dptr
	Ofm.M_i2totqty.value    =M_i2totqty  	
	Ofm.M_i2price.value     =M_i2price
	Ofm.M_i2totprice.value =M_i2totprice
	Ofm.M_i2colr.value       =M_i2colr
	Ofm.M_i3type.value      =M_i3type
	Ofm.M_i3style.value     =M_i3style
	Ofm.M_i3dptr.value       =M_i3dptr
	Ofm.M_i3totqty.value    =M_i3totqty  	
	Ofm.M_i3price.value     =M_i3price
	Ofm.M_i3totprice.value =M_i3totprice
	Ofm.M_i3colr.value       =M_i3colr
	Ofm.M_i4type.value      =M_i4type
	Ofm.M_i4style.value     =M_i4style
	Ofm.M_i4dptr.value       =M_i4dptr
	Ofm.M_i4totqty.value    =M_i4totqty  	
	Ofm.M_i4price.value     =M_i4price
	Ofm.M_i4totprice.value =M_i4totprice
	Ofm.M_i4colr.value       =M_i4colr
	Ofm.M_i5type.value      =M_i5type
	Ofm.M_i5style.value     =M_i5style
	Ofm.M_i5dptr.value       =M_i5dptr
	Ofm.M_i5totqty.value    =M_i5totqty  	
	Ofm.M_i5price.value     =M_i5price
	Ofm.M_i5totprice.value =M_i5totprice
	Ofm.M_i5colr.value       =M_i5colr
	Ofm.M_i6type.value      =M_i6type
	Ofm.M_i6style.value     =M_i6style
	Ofm.M_i6dptr.value       =M_i6dptr
	Ofm.M_i6totqty.value    =M_i6totqty  	
	Ofm.M_i6price.value     =M_i6price
	Ofm.M_i6totprice.value =M_i6totprice
	Ofm.M_i6colr.value		=M_i6colr
	Ofm.M_ctype.value		=M_ctype
	Ofm.M_cstyle.value		=M_cstyle
	Ofm.M_cnull.value		=M_cnull
	Ofm.M_ctotqty.value		=M_ctotqty
	Ofm.M_cprice.value		=M_cprice
	Ofm.M_ctotprice.value	=M_ctotprice
	Ofm.M_ccolr.value		=M_ccolr

	/////////////////////////////// DELIVERY COSTS //////////////////////////////////////
	Ofm.M_ppuk.value		=M_ppuk
	Ofm.M_ppeurope.value	=M_ppeurope
	Ofm.M_ppden.value		=M_ppden
	Ofm.M_ppnor.value		=M_ppnor
	Ofm.M_ppcan.value		=M_ppcan
	Ofm.M_ppusa.value		=M_ppusa
	Ofm.M_ppaus.value		=M_ppaus
	/////////////////////////////// DISCOUNTS //////////////////////////////////////
	Ofm.M_totdiscntpnd.value	=M_totdiscntpnd
	Ofm.M_totdiscnteuro.value	=M_totdiscnteuro
	Ofm.M_totdiscntusd.value	=M_totdiscntusd
	Ofm.M_totdiscntcad.value	=M_totdiscntcad
	Ofm.M_totdiscntaud.value	=M_totdiscntaud
	Ofm.M_totdiscntdkk.value		=M_totdiscntdkk
	Ofm.M_totdiscntnok.value	=M_totdiscntnok
	/////////////////////////////// QTY TOTALS ////////////////////////////
	Ofm.M_itemcnt.value		=M_itemcnt
	/////////////////////////////// PRICE TOTALS //////////////////////////////////////
	Ofm.M_subtotcostpnd.value	=M_subtotcostpnd
	Ofm.M_subtotcosteuro.value	=M_subtotcosteuro
	Ofm.M_subtotcostusd.value	=M_subtotcostusd
	Ofm.M_subtotcostcad.value	=M_subtotcostcad
	Ofm.M_subtotcostaud.value	=M_subtotcostaud
	Ofm.M_subtotcostdkk.value	=M_subtotcostdkk
	Ofm.M_subtotcostnok.value	=M_subtotcostnok
	Ofm.M_totcostpnd.value		=M_totcostpnd
	Ofm.M_totcosteuro.value		=M_totcosteuro
	Ofm.M_totcostusd.value		=M_totcostusd
	Ofm.M_totcostcad.value		=M_totcostcad
	Ofm.M_totcostaud.value		=M_totcostaud
	Ofm.M_totcostdkk.value		=M_totcostdkk
	Ofm.M_totcostnok.value		=M_totcostnok
	}// end function AssociateParamsWithForm(Ofm)

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function rnd(n,dec){
	var num=parseFloat(n);
	num=Math.round(num*Math.pow(10, dec))/Math.pow(10, dec);
	var s=new String();
	s=""+num;
	if(dec!=0){
		if(s.charAt(s.length-2)=='.') s+="0";
		if(s.charAt(s.length-3)!='.') s+=".00";
        }
	return(s);
}


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function OrderProc(Ofm,glassestype,dptr,and,qty)
	{
	alert(	"\n"+
			"\n                               ORDERING PROCEDURE"+
			"\n"+
			"\n1. SELECT DIOPTRE FROM THE 1stPAIR DROP-DOWN MENU."+ 
			"\n2. ENTER QUANTITY."+
			"\n If you want to order another pair of glasses of the same type "+
			"\n but in a different dioptre, then use 2ndPAIR drop-down menu."+
			"\n3. CLICK ON THE ''CHECK ORDER'' BUTTON."+ 
			"\n4. CLICK ON THE ''GO TO CUSTOMER DETAILS BOX'' LINK."+ 
			"\n5. COMPLETE''CUSTOMER DETAIL'' BOX."+
			"\n6. CLICK ON THE ''SUBMIT FORM'' BUTTON THEN WAIT."+
			"\n7. COMPLETE THE WORDPAY PAYMENT FORM."+
			"\n8. SEND THE WORDPAY PAYMENT FORM."
		)
 	} //end function OrderProc()


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function Reset(Ofm)
	{
	nl1=""; nl2=""; nl3=""; nl4=""; nl5=""; nl6=""; nl7=""; nl8=""; pnd=""; tab1=""; tab2=""; tab3=""; tab4=""; tab5=""; tab6=""; tab7="";tab8="";
	M_i1type=""; M_i1style=""; M_i1dptr="";	M_i1totqty=""; M_i1price=""; M_i1totprice=""; M_i1colr=""; 
 	M_i2type=""; M_i2style=""; M_i2dptr="";	M_i2totqty=""; M_i2price=""; M_i2totprice=""; M_i2colr="";
 	M_i3type=""; M_i3style=""; M_i3dptr="";	M_i3totqty=""; M_i3price=""; M_i3totprice=""; M_i3colr="";
 	M_i4type=""; M_i4style=""; M_i4dptr="";	M_i4totqty=""; M_i4price=""; M_i4totprice=""; M_i4colr="";
 	M_i5type=""; M_i5style=""; M_i5dptr="";	M_i5totqty=""; M_i5price=""; M_i5totprice=""; M_i5colr="";
 	M_i6type=""; M_i6style=""; M_i6dptr="";	M_i6totqty=""; M_i6price=""; M_i6totprice=""; M_i6colr="";
	M_ctype="";M_cstyle="";M_cnull="";M_ctotqty="";M_cprice="";M_ctotprice="";M_ccolr=""; 
	M_totdiscntpnd=0; M_totdiscnteuro=0;M_totdiscntusd=0;M_subtotcostpnd=0;M_itemcnt=0;
	//amount = 0; 
	M_totcostpnd =0; M_subtotcosteuro = 0; M_totcosteuro = 0;
	M_subtotcostusd = 0; M_totcostusd = 0; M_itemcnt = 0; i=0; totprice = 0
	for (var cnt=0; cnt < 10; cnt++) {pricearray[i]=0; i++}

 	} //end function Reset(Ofm)



///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function scvnewWindow() {scvWindow = window.open('scv.jpg', 'scvWin','width=660,height=420,left=30,top=30')}
function scwnewWindow() {scwWindow = window.open('scw.jpg', 'scwWin','width=660,height=420,left=30,top=30')}
function bcbnewWindow() {bcbWindow = window.open('bcb.jpg', 'bcbWin','width=660,height=420,left=30,top=30')}
function bcsnewWindow() {bcsWindow = window.open('bcs.jpg', 'bcsWin','width=660,height=420,left=30,top=30')}
function bcznewWindow() {bczWindow = window.open('bcz.jpg', 'bczWin','width=660,height=420,left=30,top=30')}
function sganewWindow() {sgaWindow = window.open('sga.jpg', 'sgaWin','width=660,height=420,left=30,top=30')}
function sgbnewWindow() {sgbWindow = window.open('sgb.jpg', 'sgbWin','width=660,height=420,left=30,top=30')}
function sgcnewWindow() {sgcWindow = window.open('sgc.jpg', 'sgcWin','width=660,height=420,left=30,top=30')}
function sgdnewWindow() {sgdWindow = window.open('sgd.jpg', 'sgdWin','width=660,height=420,left=30,top=30')}
function sgenewWindow() {sgeWindow = window.open('sge.jpg', 'sgeWin','width=660,height=420,left=30,top=30')}
function sgfnewWindow() {sgfWindow = window.open('sgf.jpg', 'sgfWin','width=660,height=420,left=30,top=30')}
function sggnewWindow() {sggWindow = window.open('sgg.jpg', 'sggWin','width=660,height=420,left=30,top=30')}
function sghnewWindow() {sghWindow = window.open('sgh.jpg', 'sghWin','width=660,height=420,left=30,top=30')}
function sginewWindow() {sgiWindow = window.open('sgi.jpg', 'sgiWin','width=660,height=420,left=30,top=30')}
function qx1newWindow() {qx1Window = window.open('qx1.jpg', 'qx1Win','width=660,height=420,left=30,top=30')}
function qx2newWindow() {qx2Window = window.open('qx2.jpg', 'qx2Win','width=660,height=420,left=30,top=30')}
function elanewWindow() 	{elaWindow = window.open('ela.jpg', 'elaWin','width=660,height=420,left=30,top=30')}
function elbnewWindow() 	{elbWindow = window.open('elb.jpg', 'elbWin','width=660,height=420,left=30,top=30')}
function elcnewWindow() 	{elcWindow = window.open('elc.jpg', 'elcWin','width=660,height=420,left=30,top=30')}
function eldxnewWindow() 	{eldxWindow = window.open('eldx.jpg', 'eldxWin','width=620,height=360,left=30,top=30')}
function rgtnewWindow() {rgtWindow = window.open('rgt.jpg', 'rgtWin','width=660,height=420,left=30,top=30')}
function rgunewWindow() {rguWindow = window.open('rgu.jpg', 'rguWin','width=660,height=420,left=30,top=30')}
function rgknewWindow() 	{rgkWindow = window.open('rgk.jpg', 'rgkWin','width=660,height=420,left=30,top=30')}
function rgwnewWindow() {rgwWindow = window.open('rgw.jpg', 'rgwWin','width=610,height=370,left=30,top=30')}
function rg1newWindow() 	{rg1Window = window.open('rg1.jpg', 'rg1Win','width=660,height=420,left=30,top=30')}
function rg2newWindow() 	{rg2Window = window.open('rg2.jpg', 'rg2Win','width=660,height=420,left=30,top=30')}
function rg3newWindow() 	{rg3Window = window.open('rg3.jpg', 'rg3Win','width=660,height=420,left=30,top=30')}
function rg4newWindow() {rg4Window = window.open('rg4.jpg', 'rg4Win','width=660,height=440,left=30,top=30')}
function rg5newWindow() {rg5Window = window.open('rg5.jpg', 'rg5Win','width=660,height=440,left=30,top=30')}
function rg6newWindow() {rg6Window = window.open('rg6.jpg', 'rg6Win','width=660,height=440,left=30,top=30')}
function rg8newWindow() 	{rg8Window = window.open('rg8.jpg', 'rg8Win','width=660,height=420,left=30,top=30')}
function rg9newWindow() 	{rg9Window = window.open('rg9.jpg', 'rg9Win','width=660,height=420,left=30,top=30')}
function rganewWindow() 	{rgaWindow = window.open('rga.jpg', 'rgaWin','width=660,height=420,left=30,top=30')}
function rgbnewWindow() 	{rgbWindow = window.open('rgb.jpg', 'rgbWin','width=660,height=420,left=30,top=30')}
function rgcnewWindow() 	{rgcWindow = window.open('rgc.jpg', 'rgcWin','width=660,height=420,left=30,top=30')}
function rgrnewWindow() 	{rgrWindow = window.open('rgr.jpg', 'rgrWin','width=660,height=420,left=30,top=30')}
function rgsnewWindow() 	{rgsWindow = window.open('rgs.jpg', 'rgsWin','width=660,height=420,left=30,top=30')}
function acxnewWindow() {acxWindow = window.open('acx.jpg', 'acxWin','width=660,height=420,left=30,top=30')}
function acynewWindow() {acyWindow = window.open('acy.jpg', 'acyWin','width=660,height=420,left=30,top=30')}
function acznewWindow() {aczWindow = window.open('acz.jpg', 'aczWin','width=660,height=420,left=30,top=30')}
function ac3newWindow() {ac3Window = window.open('ac3.jpg', 'ac3Win','width=620,height=370,left=30,top=30')}
function ac4newWindow() {ac4Window = window.open('ac4.jpg', 'ac4Win','width=620,height=370,left=30,top=30')}
function ac5newWindow() {ac5Window = window.open('ac5.jpg', 'ac5Win','width=620,height=370,left=30,top=30')}
function ac6newWindow() {ac6Window = window.open('ac6.jpg', 'ac6Win','width=620,height=370,left=30,top=30')}
function flsnewWindow() {flsWindow = window.open('fls.jpg', 'flsWin','width=660,height=420,left=30,top=30')}
function flbnewWindow() {flbWindow = window.open('flb.jpg', 'flbWin','width=660,height=420,left=30,top=30')}
function flcnewWindow() {flcWindow = window.open('flc.jpg', 'flcWin','width=660,height=420,left=30,top=30')}
function flmnewWindow() {flmWindow = window.open('flm.jpg', 'flmWin','width=660,height=420,left=30,top=30')}
function fo1newWindow()  {fo1Window = window.open('fo1.jpg', 'fo1Win','width=660,height=420,left=30,top=30')}
function ft1newWindow()   {ft1Window = window.open('ft1.jpg', 'ft1Win','width=660,height=420,left=30,top=30')}
function htbnewWindow() 	{htbWindow = window.open('htb.jpg', 'htbWin','width=660,height=420,left=30,top=30')}
function htgnewWindow() 	{htgWindow = window.open('htg.jpg', 'htgWin','width=660,height=420,left=30,top=30')}
function htmnewWindow()	{htmWindow = window.open('htm.jpg', 'htmWin','width=660,height=420,left=30,top=30')}
function thmnewWindow() {thmWindow = window.open('thm.jpg', 'thmWin','width=660,height=420,left=30,top=30')}
function thbnewWindow() {thbWindow = window.open('thb.jpg', 'thbWin','width=660,height=420,left=30,top=30')}
function thgnewWindow() {thgWindow = window.open('thg.jpg', 'thgWin','width=660,height=420,left=30,top=30')}
function htrnewWindow() 	{htrWindow = window.open('htr.jpg', 'htrWin','width=660,height=420,left=30,top=30')}
function ftlnewWindow() 	{ftlWindow = window.open('ftl_map.jpg', 'ftlWin','width=660,height=420,left=30,top=30')}
function ftknewWindow() 	{ftkWindow = window.open('ftk_map.jpg', 'ftkWin','width=660,height=420,left=30,top=30')}
function ftmnewWindow() 	{ftmWindow = window.open('ftm_map.jpg', 'ftmWin','width=660,height=420,left=30,top=30')}
function tbbnewWindow() 	{tbbWindow = window.open('tbb.jpg', 'tbbWin','width=660,height=420,left=30,top=30')}
function tbrnewWindow() 	{tbrWindow = window.open('tbr.jpg', 'tbrWin','width=660,height=420,left=30,top=30')}
function tbgnewWindow()	{tbgWindow = window.open('tbg.jpg', 'tbgWin','width=660,height=420,left=30,top=30')}
function tbknewWindow()	{tbkWindow = window.open('tbk.jpg', 'tbkWin','width=660,height=420,left=30,top=30')}
function tbmnewWindow() {tbmWindow = window.open('tbm.jpg', 'tbmWin','width=660,height=420,left=30,top=30')}
function pcbnewWindow() {pcbWindow = window.open('pcb.jpg', 'pcbWin','width=660,height=420,left=30,top=30')}
function pcgnewWindow() {pcgWindow = window.open('pcg.jpg', 'pcgWin','width=660,height=420,left=30,top=30')}
function pcmnewWindow(){pcmWindow = window.open('pcm.jpg', 'pcmWin','width=660,height=420,left=30,top=30')}
function ctgnewWindow() 	{ctgWindow = window.open('ctg.jpg', 'ctgWin','width=660,height=420,left=30,top=30')}
function ctsnewWindow() 	{ctsWindow = window.open('cts.jpg', 'ctsWin','width=660,height=420,left=30,top=30')}
function ctknewWindow() 	{ctkWindow = window.open('ctk.jpg', 'ctkWin','width=660,height=420,left=30,top=30')}
function scs_ptnewWindow() {scs_ptWindow = window.open('scs_pt.jpg', 'scs_ptWin','width=660,height=420,left=30,top=30')}
function scbnewWindow() {scbWindow = window.open('scb.jpg', 'scbWin','width=620,height=410,left=30,top=30')}
function sclnewWindow() {sclWindow = window.open('scl.jpg', 'sclWin','width=620,height=470,left=30,top=30')}
function scgnewWindow() {scgWindow = window.open('scg.jpg', 'scgWin','width=620,height=470,left=30,top=30')}
function mchnewWindow() 	{mchWindow = window.open('mch.jpg', 'mchWin','width=660,height=420,left=30,top=30')}
function mcinewWindow() 	{mciWindow = window.open('mci.jpg', 'mciWin','width=660,height=420,left=30,top=30')}
function mcjnewWindow() 	{mcjWindow = window.open('mcj.jpg', 'mcjWin','width=660,height=420,left=30,top=30')}
function mcknewWindow() 	{mckWindow = window.open('mck.jpg', 'mckWin','width=660,height=420,left=30,top=30')}
function mc1newWindow(){mc1Window = window.open('mc1.jpg', 'mc1Win','width=660,height=420,left=30,top=30')}
function mc2newWindow() {mc2Window = window.open('mc2.jpg', 'mc2Win','width=660,height=420,left=30,top=30')}
function mcynewWindow() {mcyWindow = window.open('mcy.jpg', 'mcyWin','width=660,height=420,left=30,top=30')}
function mcznewWindow() {mczWindow = window.open('mcz.jpg', 'mczWin','width=660,height=420,left=30,top=30')}
function srgnewWindow() 	{srgWindow = window.open('srg.jpg', 'srgWin','width=660,height=420,left=30,top=30')}
function srmnewWindow() 	{srmWindow = window.open('srm.jpg', 'srmWin','width=660,height=420,left=30,top=30')}
function sranewWindow() 	{sraWindow = window.open('sra.jpg', 'sraWin','width=660,height=420,left=30,top=30')}
function srcnewWindow() 	{srcWindow = window.open('src.jpg', 'srcWin','width=660,height=420,left=30,top=30')}
function srbnewWindow() 	{srbWindow = window.open('srb.jpg', 'srbWin','width=660,height=440,left=30,top=30')}
function srknewWindow() 	{srkWindow = window.open('srk.jpg', 'srkWin','width=660,height=440,left=30,top=30')}
function srlnewWindow() {srlWindow = window.open('srl.jpg', 'srlWin','width=620,height=410,left=30,top=30')}
function srpnewWindow() 	{srpWindow = window.open('srp.jpg', 'srpWin','width=660,height=420,left=30,top=30')}
function srqnewWindow() {srqWindow = window.open('srq.jpg', 'srqWin','width=660,height=420,left=30,top=30')}
function bf1newWindow() {bf1Window = window.open('bf1.jpg', 'bf1Win','width=660,height=420,left=30,top=30')}
function bf2newWindow() {bf2Window = window.open('bf2.jpg', 'bf2Win','width=660,height=420,left=30,top=30')}
function fxbnewWindow() 	{fxbWindow = window.open('fxb.jpg', 'fxbWin','width=660,height=420,left=30,top=30')}
function fxgnewWindow() 	{fxgWindow = window.open('fxg.jpg', 'fxgWin','width=660,height=420,left=30,top=30')}
function fxknewWindow() 	{fxkWindow = window.open('fxk.jpg', 'fxkWin','width=660,height=420,left=30,top=30')}
function fxwnewWindow()	{fxwWindow = window.open('fxw.jpg', 'fxwWin','width=660,height=420,left=30,top=30')}
function hardshellcase1newWindow() 
	{hardshellcase1Window = window.open('hardshellcase1.jpg', 'hardshellcase1Win','width=410,height=370,left=30,top=30')}




///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function TestDiffDptr(Ofm)
	{	
	if 	(((Ofm.rg2dptr.value != "00.00") || (Ofm.rg2dptr2.value != "00.00") ||(Ofm.rg2qty.value != "0")) && ((Ofm.rg2dptr.value) == (Ofm.rg2dptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR RG2");	return false;}
	if 	(((Ofm.rg8dptr.value != "00.00") || (Ofm.rg8dptr2.value != "00.00") ||(Ofm.rg8qty.value != "0")) && ((Ofm.rg8dptr.value) == (Ofm.rg8dptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR RG8");	return false;}
	if 	(((Ofm.rgbdptr.value != "00.00") || (Ofm.rgbdptr2.value != "00.00") ||(Ofm.rgbqty.value != "0")) && ((Ofm.rgbdptr.value) == (Ofm.rgbdptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR RGB");	return false;}
	if 	(((Ofm.flsdptr.value != "00.00") || (Ofm.flsdptr2.value != "00.00") ||(Ofm.flsqty.value != "0")) && ((Ofm.flsdptr.value) == (Ofm.flsdptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR FLS");	return false;}
	if 	(((Ofm.flbdptr.value != "00.00") || (Ofm.flbdptr2.value != "00.00") ||(Ofm.flbqty.value != "0")) && ((Ofm.flbdptr.value) == (Ofm.flbdptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR FLB");	return false;}
	if 	(((Ofm.tbgdptr.value != "00.00") || (Ofm.tbgdptr2.value != "00.00") ||(Ofm.tbgqty.value != "0")) && ((Ofm.tbgdptr.value) == (Ofm.tbgdptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR TBG");	return false;}
	if 	(((Ofm.tbbdptr.value != "00.00") || (Ofm.tbbdptr2.value != "00.00") ||(Ofm.tbbqty.value != "0")) && ((Ofm.tbbdptr.value) == (Ofm.tbbdptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR TBB");	return false;}
	if 	(((Ofm.tbmdptr.value != "00.00") || (Ofm.tbmdptr2.value != "00.00") ||(Ofm.tbmqty.value != "0")) && ((Ofm.tbmdptr.value) == (Ofm.tbmdptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR TBM");	return false;}
	if 	(((Ofm.tbrdptr.value != "00.00") || (Ofm.tbrdptr2.value != "00.00") ||(Ofm.tbrqty.value != "0")) && ((Ofm.tbrdptr.value) == (Ofm.tbrdptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR TBR");	return false;}
if (((Ofm.pcmdptr.value != "00.00") || (Ofm.pcmdptr2.value != "00.00") ||(Ofm.pcmqty.value != "0")) && ((Ofm.pcmdptr.value) == (Ofm.pcmdptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR PCM");	return false;}
if (((Ofm.pcbdptr.value != "00.00") || (Ofm.pcbdptr2.value != "00.00") ||(Ofm.pcbqty.value != "0")) && ((Ofm.pcbdptr.value) == (Ofm.pcbdptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR PCB");	return false;}
if (((Ofm.pcgdptr.value != "00.00") || (Ofm.pcgdptr2.value != "00.00") ||(Ofm.pcgqty.value != "0")) && ((Ofm.pcgdptr.value) == (Ofm.pcgdptr2.value))) 
			{alert("PLEASE SELECT DISSIMILAR DIOPTRE VALUES FOR PCG");	return false;}
	}
