//<![CDATA[


	//アマゾンアソシエイト用データ
	amazon_ad_tag = "sstweb-22";
	amazon_ad_width = "120";
	amazon_ad_height = "600";
	amazon_color_border = "FFFFFF";
	amazon_color_logo = "FFFFFF";

// blank
function setTarget() {
	var AE = document.getElementsByTagName('a');
	for(i = 0; i < AE.length; i++){
		if(!AE[i].href.match('*chigek.*'))
		AE[i].setAttribute('target', '_blank');
	}
}
function blankTarget() {
	var AE = document.getElementsByTagName('a');
	for (i = 0; i < AE.length; i++) {
		AE[i].setAttribute('target', '_blank');
	}
}

// SelectMenu
function selectUrl(sel){
	if(sel.options[sel.selectedIndex].value){
		location.href = sel.options[sel.selectedIndex].value;
	}
}


// JavaScript Document

// DHTML用にドキュメントの仕様を判別
// [ a ] IE 5.x+, NN 6.x+, Opera 6.x+, Mosilla, Firefox; [ b ] IE 4.x-; [ c ] NN 4.x-

var DocType = ( document.getElementById ) ? 'a' : ( document.all ) ? 'b' : ( document.layers ) ? 'c' : 'unknw';


// OSの種類を判別、取得

var NavVer = navigator.appVersion;
var OsType = ( NavVer.indexOf ( 'Win' ) != -1 ) ? 'Win' : ( NavVer.indexOf ( 'Mac' ) != -1 ) ? 'Mac' : 'unknw';


// Browserの種類とバージョンを取得

var UsrAgt = navigator.userAgent;
var WbType = 'unknw';
var AgtProps = new Array ( );
var AP = 1;
if ( UsrAgt.match ( /Opera\// ) ) {	WbType = 'Opera'; AgtProps = UsrAgt.split ( '/' ); } // Opera 6.x+
else if ( UsrAgt.match ( /Opera / ) ) {	WbType = 'Opera'; AgtProps = UsrAgt.split ( 'Opera ' ); } // Opera 6.x+
else if ( UsrAgt.match ( /MSIE/ ) ) {	WbType = 'IE'; AgtProps = UsrAgt.split ( 'MSIE ' ); } // IE
else if ( UsrAgt.match ( /Netscape/ ) ) {	WbType = 'NN'; AgtProps = UsrAgt.split ( '/' ); AP = 3; } // NN 6.x+
else if ( UsrAgt.match ( /Gecko\/[0-9]{8}$/ ) ) {	WbType = 'Mozilla'; AgtProps = UsrAgt.split ( 'rv:' ); } // Mozilla
else if ( UsrAgt.match ( /Firefox/ ) ) {	WbType = 'Firefox'; AgtProps = UsrAgt.split ( '/' ); AP = 3; } // Firefox
else if ( UsrAgt.match ( /Safari/ ) ) {	WbType = 'Safari'; AgtProps = UsrAgt.split ( '/' ); AP = 3; } // Safari
else if ( UsrAgt.match ( / \[/ ) ) {	WbType = 'NN'; AgtProps = UsrAgt.split ( '/' ); } // NN 4.x-


function full( url ){
        if ( WbType == "IE" ){
           newwindow = window.open(url,"newwindow","scrollbars,width=" + window.screen.availWidth + ",height=" + window.screen.availHeight);
                newwindow.moveTo(0,0);
                newwindow.focus();
        }
		else{
           newwindow = window.open(url,"newwindow","scrollbars,outerwidth=" + window.screen.availWidth + ",outerheight=" + window.screen.availHeight);
                newwindow.moveTo(0,0);
                newwindow.focus();
        }
}
function newwin ( locationid, nameid, widthid, heightid, leftid, topid, conditionid ) {
	var attribute01 = 'no';
	var attribute02 = 'no';
	var attribute03 = 'no';
	var attribute04 = 'no';
	var attribute05 = 'no';

	if ( conditionid == 1 ) { attribute01 = 'yes'; }
	else if ( conditionid == 2 ) { attribute01 = 'yes'; attribute04 = 'yes'; }
	else if ( conditionid == 3 ) { attribute01 = 'yes'; attribute04 = 'yes'; attribute05 = 'yes'; }
	else if ( conditionid == 4 ) { attribute02 = 'yes'; }
	else if ( conditionid == 5 ) { attribute01 = 'yes'; attribute02 = 'yes'; }
	else if ( conditionid == 6 ) { attribute01 = 'yes'; attribute02 = 'yes'; attribute04 = 'yes'; }
	else if ( conditionid == 7 ) { attribute01 = 'yes'; attribute02 = 'yes'; attribute04 = 'yes'; attribute05 = 'yes'; }
	else if ( conditionid == 8 ) { attribute03 = 'yes'; }
	else if ( conditionid == 9 ) { attribute01 = 'yes'; attribute03 = 'yes'; }
	else if ( conditionid == 10 ) { attribute01 = 'yes'; attribute03 = 'yes'; attribute04 = 'yes'; }
	else if ( conditionid == 11 ) { attribute01 = 'yes'; attribute03 = 'yes'; attribute04 = 'yes'; attribute05 = 'yes'; }
	else if ( conditionid == 12 ) { attribute02 = 'yes'; attribute03 = 'yes'; }
	else if ( conditionid == 13 ) { attribute01 = 'yes'; attribute02 = 'yes'; attribute03 = 'yes'; }
	else if ( conditionid == 14 ) { attribute01 = 'yes'; attribute02 = 'yes'; attribute03 = 'yes'; attribute04 = 'yes'; }
	else if ( conditionid == 15 ) { attribute01 = 'yes'; attribute02 = 'yes'; attribute03 = 'yes'; attribute04 = 'yes'; attribute05 = 'yes'; }
	if ( attribute01 == 'yes' ) {
		if ( OsType == 'Win' && WbType == 'IE' ) { widthid += 17; }
		else if ( OsType == 'Win' && WbType == 'NN' && DocType == 'c' ) { widthid += 17; }
		else if ( OsType == 'Win' && WbType == 'NN' && DocType != 'c' ) { widthid += 16; }
		else if ( OsType == 'Mac' && WbType == 'IE' ) { widthid -= 1; }
		else if ( OsType == 'Mac' && WbType == 'NN' && DocType == 'c' ) { widthid += 16; }
		else if ( OsType == 'Mac' && WbType == 'NN' && DocType != 'c' ) { widthid += 15; }
	}
	var attributeid = 'width=' + widthid + ',height=' + heightid + ',left=' + leftid + ',top=' + topid + ',menubar=' + attribute02 + ',toolbar=' + attribute03 + ',location=no,directories=no,status=' + attribute04 + ',scrollbars=' + attribute01 + ',resizable=' + attribute05;
	window.open( locationid, nameid, attributeid );
}

var nSizeWidth;		//幅
var nSizeHeight;	//高さ
var nWinWidth;		//Windowの幅
var nWinHeight;		//Windowの高さ

function GetWindowSize() {
	nSizeWidth = 0;
	nSizeHeight = 0;
	//スクリーンサイズを取得
	nSizeWidth = screen.width;
	nSizeHeight = screen.height;
	//ブラウザのサイズを取得
	//NN
	if ( DocType == "c")
	{
		nWinWidth = window.outerWidth;
		nWinHeight = window.outerHeight;
	}
	//IE
	else
	{
		nWinWidth = document.body.offsetWidth;
		nWinHeight = document.body.offsetHeight;
	}
	//移動
	window.moveTo(((nSizeWidth-nWinWidth)/2),((nSizeHeight-nWinHeight)/2));
}
//]]>//
