/*------------------------- 実行処理 -------------------------*/

// スタイルスイーツの適用
if (document.layers){ // Netscape Communicator ver.4
	document.write("<link rel=\"stylesheet\" href=\"../css/nc4.css\">");
}
else if (!document.all && document.getElementById){ // Netscape Communicator ver.6 以降
	document.write("<link rel=\"stylesheet\" href=\"../css/nc6.css\">");
}
else if( document.all && !document.getElementById){ // Internet Explorer ver.4
	document.write("<link rel=\"stylesheet\" href=\"../css/ie4.css\">");
}
else if (document.all && document.getElementById){ // Internet Explorer ver.5 以降
	document.write("<link rel=\"stylesheet\" href=\"../css/ie5.css\">");
}
else{ // その他
	window.alert("表示が適切でないかもしれませんが、悪しからずご了承下さい。");
}

/*------------------------------------------------------------*/

/*----------------------- サブルーチン -----------------------*/

// PreLoadExe(n) => プリロード処理
//  n => 読み込む画像のあるディレクトリ (s)
// 任意の引数 => 読み込む画像のファイル名 (s)
function PreLoadExe(n){
	// ローカル変数の宣言
	var n;

	// ディレクトリ名のチェック
	if (-1 == n.indexOf("/",n.length-1)){
		n +=  "/";
	}
	//プリロード処理
	ImageArray = new Array();
	for (i=1;i<PreLoadExe.arguments.length;i++){
		ImageArray[i-1] = new Image();
		ImageArray[i-1].src = n + PreLoadExe.arguments[i];
	}
}

// ImageSwap(n,m) => 画像スワップ処理
//  n => スワップさせる画像のオブジェクト名
//  m => スワップ後の画像のファイル名 (s)
function ImageSwap(n,m){
	// ローカル変数の宣言
	var n;
	var m;

	// 画像のスワップ
	n.src = m;
}

// Spacer(n) => 自動調整のスペーサ
//  n => スペー差までのオフセット値
function Spacer(n){
	// ローカル変数の宣言
	var DocumentHeight;

	if (document.all){
		DocumentHeight = document.body.clientHeight;
	}
	else if (document.layers){
		DocumentHeight = innerHeight;
	}
	else if (!document.all && document.getElementById){
		DocumentHeight = innerHeight;
	}
	else {
		DocumentHeight = 0 ;
	}
	if (DocumentHeight){
			document.write("<table border='0' cellspacing='0' cellpadding='0' height='",parseInt(DocumentHeight)-n,"'>");
			document.write("<tr><td>&nbsp;</td></tr>");
			document.write("</table>");
		}
	}

function WindowOpen(n){
		var W = 380;
		var H = 290;
		if(navigator.platform.charAt(0) == "W"){
			W += 28;
			H += 18;
		}
		W = W.toString();
		H = H.toString();
		window.open(n,"Image1","toolbar=0,location=0,status=0,resizable=1,scrollbars=1,width="+W+",height="+H);
}

function WindowOpenR(n){
		var W = 510;
		var H = 510;
		if(navigator.platform.charAt(0) == "W"){
			W += 28;
			H += 18;
		}
		W = W.toString();
		H = H.toString();
		window.open(n,"Image2","toolbar=0,location=0,status=0,resizable=1,scrollbars=1,width="+W+",height="+H);
}

function WindowOpenS(n){
		var W = 750;
		var H = 600;
		var x;
		var y;
		
		x = (screen.width  - W) / 2;
		y = (screen.height - H) / 2;
		
		if(navigator.platform.charAt(0) == "W"){
			W += 28;
			H += 18;
		}
		W = W.toString();
		H = H.toString();
		
		window.open(n,"Image3","toolbar=0,location=0,status=0,resizable=1,scrollbars=0,left="+x+",top="+y+",width="+W+",height="+H);
}

function WindowOpenA(n){
		var W = 600;
		var H = 630;
		if(navigator.platform.charAt(0) == "W"){
			W += 28;
			H += 18;
		}
		W = W.toString();
		H = H.toString();
		window.open(n,"Image2","toolbar=0,location=0,status=0,resizable=1,scrollbars=1,width="+W+",height="+H);
}

function SetCookie(n){
	var n;
	document.cookie = "image=" + n;
}


/*------------------------------------------------------------*/

function OpenCatalog(page){
    x = (screen.width) / 1;
    y = (screen.height) / 1;
var win = window.open("../catalog/index.html", "flipper", "screenX=0,screenY=0,left=0,top=0,width="+x+",height="+y+",scrollbars=no,resizable=yes");
}
