/* http://boreal-kiss.com/js/bookmark_distribute.js */

function change()
{
    var bgcolor = getByID('id_bgcolor');
    if (bgcolor){
        para1   = bgcolor.value;
    }
	else{
        para1   = '000000';
    }

    var url = getByID('id_url');
    if (url){
        para2   = url.value;
    }else{
        para2   = 'http://blog.boreal-kiss.com/';
    }

	var code =  String.fromCharCode(60)
					+ 'script type="text/javascript" src="http://boreal-kiss.com/js/bookmark.js"'
				+String.fromCharCode(62)
				+String.fromCharCode(60)
					+ '/script'
				+String.fromCharCode(62)
				+String.fromCharCode(60)
					+ 'script type="text/javascript"'
				+String.fromCharCode(62)
					+ 'book("#' + para1 + '", "' + para2 + '");'
				+String.fromCharCode(60)
					+ '/script'
				+String.fromCharCode(62)
				+String.fromCharCode(60)
					+ 'noscript'
				+String.fromCharCode(62)
					+ '<a href="http://blog.boreal-kiss.com/">flash boreal kiss</a>'
				+String.fromCharCode(60)
					+ '/noscript'
				+String.fromCharCode(62);


    var output = getByID('id_code');
    if (output)  output.value = code;
}

function getByID (n) {
    var d = window.document;
    if (d.getElementById)
        return d.getElementById(n);
    else if (d.all)
        return d.all[n];
}