function popOffsite(location) {
	var x=10;
	var y=10;
	var dx=650;
	var dy=450;

	if(location.indexOf("http://") == -1) location = "http://" + location;
//alert(location);
	var w = window.open();
	w.document.writeln("<html><head></head>");
	w.document.writeln("<frameset border=0 rows=50,* frameborder=no framespacing=0>");
	w.document.writeln("<frame frameborder=no framespacing=0 marginheight=0 marginwidth=0 name=nav noresize scrolling=no src=\"popOffsiteNav.htm\">");
	w.document.writeln("<frame frameborder=no framespacing=0 name=body noresize src=\"" + location + "\">");
	w.document.writeln("</frameset>");
	w.document.writeln("</html>");

	w.focus();
}

function createFormElement(element, type, name, id, value, parent) {
    var e = document.createElement(element);
    e.setAttribute("name", name);
    e.setAttribute("type", type);
    e.setAttribute("id", id);
    e.setAttribute("value", value);
    parent.appendChild(e);
}

function register() {
    securePage('registration.chn');
}

function trialMembership() {
    securePage('trialMembership.chn');
}

function securePage(which) {
    var loc = 'aa' + document.location;
    if(loc.indexOf('clubhawaii.net') != -1) {
        if(loc.indexOf('beta.clubhawaii.net') != -1)
            document.location.replace('https://beta.clubhawaii.net/' + which);
        else
            document.location.replace('https://www.clubhawaii.net/' + which);            
    } else {
        document.location.replace(which);
    }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}