ref = location.href;
// 1. See if there is anything called (? or &)page=somepage_nr1
// within the string

pageRE = /(\?|\&)page=(\w|,)*/;
pageStr = ref.match(pageRE);

// 2. Set the default page to be shown in the frame when the
// frameset is loaded without parameters
// (like example: frameset.html)

page = "principal.html";

if(pageStr != null) {
// remove the (? or &)page= part of the string
///page = pageStr[0].substring(6, pageStr[0].length);
// change all comma's back to slashes
///page = page.replace("/,/", "/\//");
///while (page > page.replace("xxx",":"))
///{page = page.replace("xxx",":");}
///while (page > page.replace("yyy","/"))
///{page = page.replace("yyy","/");}
///while (page > page.replace("zzz","."))
///{page = page.replace("zzz",".");}
pageStr = ref.slice(ref.search("page="),255);
page = pageStr.slice(5,255);
}
document.write("<frameset framespacing='0' border='false' frameborder='0' rows='*,55'>" +
                   "<frame name='principal' src='" + page + "'>" +
                   "<frame name='menu' scrolling='no' noresize target='principal' src='menu.html'>" +
               "</frameset>");
//document.write(page);




