
    function o(id) { return document.getElementById(id); }
    function _createTag() {
        var tags = [];
        if ( o('imgSize') && o('imgSize').value != '120' )
            tags.push( 'size=' + o('imgSize').value );
        if ( o('splitNum') && o('splitNum').value != 3 )
            tags.push( 'num=' + o('splitNum').value );
        if ( o('imgUrl') && o('imgUrl').value.match(/^http:\/\//) )
            tags.push( 'img=' + encodeURIComponent( o('imgUrl').value ) );

        var tag = '';
        var src = 'http://resources.fenrir.co.jp/blogparts/logica/f9puzzle.js';
        if ( tags.length > 0 )
            tag = tags.join('&');
        if ( tag != '' )
            tag = '?' + tag;

        if ( o('puzzleJs') ) {
            var t = o('puzzleJs');
            while ( t.childNodes.length ) {
                t.removeChild( t.firstChild );
            };
            var s = document.createElement('iframe');
            s.setAttribute('frameborder', 0);
            s.width = '400px';


if ( o('imgSize').value == '120' ) s.height = '215px';
	 else if ( o('imgSize').value == '150' ) s.height = '245px';
	 else if ( o('imgSize').value == '180' ) s.height = '275px';
	 else if ( o('imgSize').value == '200' ) s.height = '295px';
	 else if ( o('imgSize').value == '240' ) s.height = '335px';
	 else s.height = '415px';


            s.scrolling = 'no';
			s.allowtransparency = 'true';
            s.src = 'labs/web/logica/f9puzzle.php' + tag;
            t.appendChild(s);
        }

	o('defaultTag').innerHTML = '&lt;script type=&quot;text/javascript&quot; src=&quot;' + src + tag + '&quot;&gt;&lt;/script&gt;&lt;noscript&gt;Need JavaScript&lt;/noscript&gt;';
    }
