if (($ghead[$a]>=0)&&($ghead[$a]<=15)){
$MyIDX[i]="0";
}else if (($ghead[$a]>15)&&($ghead[$a]<=30)){
$MyIDX[i]="1";
}else if (($ghead[$a]>30)&&($ghead[$a]<=45)){
$MyIDX[i]="2";
}else if (($ghead[$a]>45)&&($ghead[$a]<=60)){
$MyIDX[i]="3";
}else if(($ghead[$a]>60)&&($ghead[$a]<=75)){
$MyIDX[i]="4";
}else if (($ghead[$a]>75)&&($ghead[$a]<=90)){
$MyIDX[i]="5";
}else if (($ghead[$a]>90)&&($ghead[$a]<=105)){
$MyIDX[i]="6";
}else if (($ghead[$a]>105)&&($ghead[$a]<=120)){
$MyIDX[i]="7";
}else if (($ghead[$a]>120)&&($ghead[$a]<=135)){
$MyIDX[i]="8";
}else if(($ghead[$a]>135)&&($ghead[$a]<=150)){
$MyIDX[i]="9";
}else if (($ghead[$a]>150)&&($ghead[$a]<=165)){
$MyIDX[i]="10";
}else if (($ghead[$a]>165)&&($ghead[$a]<=180)){
$MyIDX[i]="11";
}else if (($ghead[$a]>180)&&($ghead[$a]<=195)){
$MyIDX[i]="12";
}else if (($ghead[$a]>195)&&($ghead[$a]<=210)){
$MyIDX[i]="13";
}else if(($ghead[$a]>210)&&($ghead[$a]<=225)){
$MyIDX[i]="14";
}else if (($ghead[$a]>225)&&($ghead[$a]<=240)){
$MyIDX[i]="15";
}else if (($ghead[$a]>240)&&($ghead[$a]<=255)){
$MyIDX[i]="16";
}else if (($ghead[$a]>255)&&($ghead[$a]<=270)){
$MyIDX[i]="17";
}else if (($ghead[$a]>270)&&($ghead[$a]<=285)){
$MyIDX[i]="18";
}else if (($ghead[$a]>285)&&($ghead[$a]<=300)){
$MyIDX[i]="19";
}else if (($ghead[$a]>300)&&($ghead[$a]<=315)){
$MyIDX[i]="20";
}else if (($ghead[$a]>315)&&($ghead[$a]<=330)){
$MyIDX[i]="21";
}else if (($ghead[$a]>330)&&($ghead[$a]<=345)){
$MyIDX[i]="22";
}else if ($ghead[$a]>345){
$MyIDX[i]="23";
}