This code was posted on the forum, but I forget by who ...anyways I use this to scale all my panels to the correct size of the users rez
//////////////////////////////
// function panelRefresh(PANEL* sPanel)
// Rescales sPanel to fit the new resouloution
//////////////////////////////
function panelRefresh(PANEL* sPanel)
{
var HUD_reference[2] = {1600, 1200};
var PosX;
var PosY;
//Temp Postion
PosX = sPanel.pos_x;
PosY = sPanel.pos_y;
//Position
sPanel.pos_x = (screen_size.x / HUD_reference[0]) * PosX;
sPanel.pos_y = (screen_size.y / HUD_reference[1]) * PosY;
//Scaling
sPanel.scale_x = (screen_size.x / HUD_reference[0]);
sPanel.scale_y = (screen_size.y / HUD_reference[1]);
}