/*****************************************
(C) http://www.calculator.net all right reserved.  
*****************************************/
function gcSN(A){A=parseFloat(A)+1;gObj("gcid"+A).style.display="block"}function calc(){uj=false;nN=0;bG=0;vq=0;Kr=0;HR="";cr=false;GN=(document.domain+"").toLowerCase();if((GN!="\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74")&&(GN.indexOf("\x63\x61\x6C\x63\x75\x6C\x61\x74\x6F\x72\x2E\x6E\x65\x74")<0)){cc="a";return }if(typeof (cc)!="undefined"){return }for(An=1;An<11;An++){PU=trimAll(gObj("gccrd"+An).value+"");HP=trimAll(gObj("gcscore"+An).value+"");if((PU!="")||(HP!="")){nN++;cr=false;if(!isNumber(PU)){uj=true;HR+="* The credit of item # "+An+" need to be a number<br>"}HP=HP.toLowerCase();if(HP=="a+"){HP="4.3"}if(HP=="a"){HP="4"}if(HP=="a-"){HP="3.7"}if(HP=="b+"){HP="3.3"}if(HP=="b"){HP="3"}if(HP=="b-"){HP="2.7"}if(HP=="c+"){HP="2.3"}if(HP=="c"){HP="2"}if(HP=="c-"){HP="1.7"}if(HP=="d+"){HP="1.3"}if(HP=="d"){HP="1"}if(HP=="d-"){HP="0.7"}if(HP=="f"){HP="0"}if((HP=="p")||(HP=="np")||(HP=="i")||(HP=="w")){cr=true}if(!(cr)){if(!isNumber(HP)){uj=true;HR+="* The score of item #"+An+" need to be a number or the value of A, A-, B+, B, B-, C+, C, C-, D+, D, D-, F, P, NP, I, or W<br>"}else{if(!uj){vq+=parseFloat(PU);Kr+=parseFloat(PU);bG+=parseFloat(PU)*parseFloat(HP)}}}else{if(!uj){Kr+=parseFloat(PU)}}}}if(nN==0){uj=true;HR+="please provide at least one group of data."}if(uj){showquickmsg(HR,true)}else{ZP=bG/vq;ZP=ZP.toFixed(3);showquickmsg("GPA: <font color=green><b>"+ZP+"</b></font> with a total of "+Kr+" credits.",false)}};