//

function ss_makeparam(param, omit) {
    var pa = new Array();

    for(attr in param) {
        if (attr in omit) {
            //
        } else {
            var p = sprintf('%s=%s', attr, encodeURIComponent(param[attr]));
            pa.push(p);
        }
    }
    return pa.join('&');

}

function generate_sim_iframe(url) {
    sureshot.srcurl = url
    var param = ss_makeparam(sureshot, {'iframe_height': '', 'iframe_width':''});
    var stmt = sprintf('<iframe src="http://asp.sure-shot.jp/similar_html?%s" frameborder="0"  height="%s" width="%s" scrolling="no">', param, sureshot.iframe_height, sureshot.iframe_width);
    return stmt;
}

function dosimsearch() {
    var result = document.getElementById("sureshotSimilarResultArea");
    var stmt = generate_sim_iframe(location.href);
    result.innerHTML = stmt;
}

// sureshotパラメタデフォルト値
sureshot = {};
sureshot.result_size = 3;
sureshot.iframe_height = '200px';
sureshot.iframe_width = '100%';
sureshot.base_float = 'left';
sureshot.background_color = '#ffffff';
sureshot.border = '1px solid #cccccc';
sureshot.pimg_width = '80px';
sureshot.ptitle_font_size = '12px';
sureshot.price_font_size = '12px';
sureshot.price_color = '#ff0000';
