#!/usr/bin/perl

print "Content-type:text/html; charset=EUC-JP\n\n";

$res1 = '<IFRAME SRC="http://www14.ocn.ne.jp/~boin2/ad/hey/naked.html" width="745" height="6000" frameborder="no" SCROLLING="no"></IFRAME>';
$res2 = '<IFRAME SRC="http://www14.ocn.ne.jp/~boin2/ad/hey/m-ems-229.html" width="745" height="6000" frameborder="no" SCROLLING="no"></IFRAME>';
$res3 = '<IFRAME SRC="http://www14.ocn.ne.jp/~boin2/ad/hey/m-ems-228.html" width="745" height="6000" frameborder="no" SCROLLING="no"></IFRAME>';
$res4 = '<IFRAME SRC="http://www14.ocn.ne.jp/~boin2/ad/hey/m-ems-227.html" width="745" height="6000" frameborder="no" SCROLLING="no"></IFRAME>';
$res5 = '<IFRAME SRC="http://www14.ocn.ne.jp/~boin2/ad/hey/naked.html" width="745" height="6000" frameborder="no" SCROLLING="no"></IFRAME>';
$res6 = '<IFRAME SRC="http://www14.ocn.ne.jp/~boin2/ad/hey/m-ems-228.html" width="745" height="6000" frameborder="no" SCROLLING="no"></IFRAME>';
$res7 = '<IFRAME SRC="http://www14.ocn.ne.jp/~boin2/ad/hey/naked.html" width="745" height="6000" frameborder="no" SCROLLING="no"></IFRAME>';
$res8 = '<IFRAME SRC="http://www14.ocn.ne.jp/~boin2/ad/hey/m-ems-229.html" width="745" height="6000" frameborder="no" SCROLLING="no"></IFRAME>';
$res9 = '<IFRAME SRC="http://www14.ocn.ne.jp/~boin2/ad/hey/m-ems-228.html" width="745" height="6000" frameborder="no" SCROLLING="no"></IFRAME>';
$res10 = '<IFRAME SRC="http://www14.ocn.ne.jp/~boin2/ad/hey/m-ems-229.html" width="745" height="6000" frameborder="no" SCROLLING="no"></IFRAME>';

&getResult;

&dti;

exit;

## 乱数を発生させ/無作為に結果を取得する ##
sub getResult {
	#乱数生成
	srand;
	$r = rand;

	# $rは 0から1までの少数値。それを100倍し、0から100までの整数に変換
	$r = int($r * 100);

	# 0 - 10
	if ($r < 11) {
		$result = $res1;
	}
	# 11 - 20
        elsif ($r < 21) {
		 $result = $res2;
	}
	
	# 21 - 30
	elsif ($r < 31 ) {
		 $result = $res3;
	}

	# 31 - 40
	elsif ($r < 41) {
		 $result = $res4;
	}

	# 41 - 50
	elsif ($r < 51) {
		 $result = $res5;
	}

	# 51 - 60
	elsif ($r < 60) {
		 $result = $res6;
	}

	# 61 - 70
	elsif ($r < 70) {
		 $result = $res7;
	}

	# 70 - 81
	elsif ($r < 80) {
		 $result = $res8;
	}

	# 81 - 90
	elsif ($r < 90) {
		 $result = $res9;
	}

	# 91 - 100
	else {
		$result = $res10;
	}

}

## ＨＴＭＬとして出力 ##
sub dti {
print <<HTML;
<html>
	<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP">
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
	<head>
		<title></title>
	</head>
	<body leftmargin="0" topmargin="0">
			$result
  	</body>
</html>
HTML

}

