function MakeCccItems() {
	for (var i=0; i < tamMonedas; i++) {
		this[i]=new MakeItem(monedas[i][0],monedas[i][1],monedas[i][2],monedas[i][3]);
	}

/*   
   this[0]=new MakeItem('EUE','European Monetary Union','Euro',0.694203);
   this[1]=new MakeItem('AUD','Australia','Dollar',1.08566);
   this[2]=new MakeItem('BRR','Brazil','Real',1.7555);
   this[3]=new MakeItem('CAD','Canada','Dollar',0.9547);
   this[4]=new MakeItem('CHY','China, P.R.','Yuan',7.4728);   
   this[5]=new MakeItem('DEK','Denmark','Krone',5.17794 );   
   this[6]=new MakeItem('HOD','Hong Kong','Dollar',7.7511);
   this[7]=new MakeItem('INR','India','Rupee',39.32000);
   this[8]=new MakeItem('JAY','Japan','Yen',114.69000);
   this[9]=new MakeItem('MAR','Malaysia','Ringgit',3.3425);
   this[10]=new MakeItem('MEP','Mexico','Peso',10.7087);
   this[11]=new MakeItem('NED','New Zealand','Dollar',1.28205);
   this[12]=new MakeItem('NOK','Norway','Krone',5.3554);
   this[13]=new MakeItem('SID','Singapore','Dollar',1.4519);
   this[14]=new MakeItem('SOR','South Africa','Rand',6.5529);
   this[15]=new MakeItem('SOW','South Korea','Won',910.20000);
   this[16]=new MakeItem('RUR','Russia','Rubles',24.7190);
   this[17]=new MakeItem('SWK','Sweden','Krona',6.3836);
   this[18]=new MakeItem('SWF','Switzerland','Franc',1.1654);
   this[19]=new MakeItem('TAN','Taiwan','N.T. Dollar',33.03600);
   this[20]=new MakeItem('THB','Thailand','Baht',32.39000);
   this[21]=new MakeItem('UNP','United Kingdom','Pound',0.485225);
   this[22]=new MakeItem('VEB','Venezuela','Bolivar',2144.6000);
   this[23]=new MakeItem('USD','USA','Dollar',1.0000);
*/
   this.Ilength=tamMonedas;
//	 this.Ititle='Daily Exchange Rate Oct 29, 2007 ';
	 this.Ititle=Titulo;
   return this; 
}
             
function MakeItem(co,h1,h2,fa) {
   this.code=co;
   this.head1=h1;
   this.head2=h2;
   this.factor=parseFloat(fa);
   return this;
}
function ConvertForm(form){
	var userin=0.0;
	for (var i=0; i < obj.items.Ilength; i++) {
		if (form.elements[i].value != "") {
			if (i == 0 && form.elements[1].value != "") 
				return false;
			userin=parseFloat(form.elements[i].value) /
			obj.items[i].factor;
			form.elements[i].blur();		
			break;
		}
	}
	if (userin == 0.0) {
		 ClearForm(form);
		 return false;
	}
	for (var i=0; i < obj.items.Ilength; i++)
		 form.elements[i].value = FormatMoney(userin * obj.items[i].factor,14);
			
	return true;
}
var WGdc="."; var WGgc=","; var WGnc="(";
function FormatMoney(A,W) {
  var N=Math.abs(Math.round(A*100));
  var S=((N<10)?"00":((N<100)?"0":""))+N;
  S=((A<0)?WGnc:"")+Group(S.substring(0,(S.length-2)))+WGdc+
    S.substring((S.length-2),S.length)+((A<0&&WGnc=="(")?")":"");
  return (S.length>W)?"over":S;
}
function Group(S) {
  return (S.length<4)?S:(Group(S.substring(0,S.length-3))+
    WGgc+S.substring(S.length-3,S.length));
}
function ClearForm(form) {
    for (var i=0; i < obj.items.Ilength; i++) form.elements[i].value = "";
    return true;
}
function MakeCccObj() {
   this.items=new MakeCccItems(); 
   return this;
}

var obj = new MakeCccObj();