if (typeof Geloetajax == 'undefined') {
    // opera needs some special love for not caching us
    document.write('<script type="text/javascript" src="http://register.jimdo.com//register.js?1259024453"></script>');
}

/**
 * onclick-handler for submit button
 */
function jimdoRegisterSubmit()
{
    var xhr = new Geloetajax();
    
    /*
     * callback for xss-xhr - just set the new registerbox html
     */
    xhr.onreadystatechange = function()
    {
        if (xhr.response) {
	        document.getElementById('jimdo-register-box-outer').innerHTML = xhr.response['html'];
	        
	        var elements = document.getElementById('jimdo-register-box-outer').getElementsByTagName('script');
	        
	        // eval the first script tag
	        if (elements && elements[0]) {
	            eval(elements[0].text);
	        }
        }
    };
    
    var username =  document.getElementById('jimdo-username').value;
    var email    =  document.getElementById('jimdo-email').value;
    
    xhr.open('http://register.jimdo.com//?username=' + username + '&email=' + email + '&t=1259024453.38&lg=ja&sub=0&jref=' + escape(document.location.href));
}

/*
 * load the css
 */
l = document.createElement('link');
l.setAttribute('rel', 'stylesheet');
l.setAttribute('type', 'text/css');
l.setAttribute('href', 'http://register.jimdo.com//style.css');
document.getElementsByTagName('head')[0].appendChild(l);
document.cookie = 'jref=' + escape(document.location.href);

/*
 * write the proxied request
 */
document.write('<div id="jimdo-register-box-outer"><div id="jimdo-register-box"><form  action="none" method="post" name="jimdo-register-form" id="jimdo-register-form"><strong>ご希望のユーザー名</strong><input id="jimdo-username" onkeyup="document.getElementById(\'jimdouser\').innerHTML = this.value;" name="username" type="text" class="single" /><div id="userdomain"><span id="jimdouser">username</span>.jimdo.com</div><strong id="label">e-mailアドレス</strong><input id="jimdo-email" name="email" type="text" class="single" /><input id="jimdo-register-box-submit" style="float: left" onclick="jimdoRegisterSubmit(); document.getElementById(\'jimdo-register-loading\').style.display=\'inline\'; this.disabled = true; return false;" name="submit" value="ホームぺージを作成する" type="button" /><div id="jimdo-register-loading">&#160;</div><br class="c" /></form></div></div><div style="clear: both" ></div>');

// Affiliate Integration
