/**
 * @name       sp
 * @version    2.00
 * @updated    2007/12/04
 * @copyright  Copyright (c) 2007, SOFTBANK MOBILE Corp.
 */



(function () {
	//var base      = 'http://mb.softbank.jp/mb/shared/js';
	var base      = '/mb/shared/js';
	var base_json = base.replace(/shared\/js/, 'special/shared/js');
	
	if (typeof(SBM) == 'undefined') {
		document.write('<script src="' + base + '/sbm_plain.js"  type="text/javascript"></script>');
	}
	
	if (document.all) {
		document.write('<script src="' + base + '/spl/pngfix.js" type="text/javascript"></script>');
	}
	
	var json = '/json.js?nocache=' + new Date().getTime();
	window['use_spl'] = true;
	document.write('<script src="' + base      + '/spl/spl.js"      type="text/javascript"></script>');
	document.write('<script src="' + base_json + json          + '" type="text/javascript"></script>');
	document.write('<link  href="' + base      + '/spl/css/spl.css" type="text/css" rel="stylesheet" media="all" />');
	
	window.onload = function () {
		SBM.spl.create(base);
		if (document.all) { PNGFix.fix('spl'); }
		this.focus();
	};
})();



/**
 * @param  {string}  url
 */
function openServiceSite (url) {
	SBM.win.opener(url);
}



/**
 * @param  {string}  url
 */
function openSpecialSite (url) {
	var name    = 'sb_sp07';
	var width   = 950;
	var height  = 650;
	var options = '0,1,0,1,1,1,0';
	
	SBM.win.open(url, width, height, name, options);
}
