//
//ウィンドウを開く（IE）[window.open('URL','ウィンドウ名','ステータス') を実行。]
//
function winopen() {
window.open("map.html","","resizable=yes,location=no,status=no,menubar=yes,scrollbars=no,toolbar=no,width=800, height=502") 
} 
//
//rollover
//
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		preloadFlag = true;
	}
}

//
// swfファイル差し替え
// 及び、2006年2月のIEアップデートで、flash等の ActiveX コントロール上でクリックしてアクティブ化しないと使用出来ないようになったのを回避（JAVAスクリプトを経由するとアクティブ化の制限を回避できる）
//
function roadSwf()
{
    // 乱数（0 から 9）をつくる
    var zutsukirand = Math.floor(Math.random()*10);	
    var swfFile;
    // サイズと背景色
	var stBgc = 'ffffff';
    var stHeight;
    var stWidth = '756';
    var bSwf = false;
    
	if (zutsukirand < 3){
		//swfFile = 'musen6b';
		//stHeight = '204';
		//bSwf = true;
		swfFile = 'main07.png';		// フレンドシップデーセールで一時コメント
		//swfFile = 'mainFD2010.png';
	}else if (zutsukirand < 6){
		swfFile = 'main07.png';		// フレンドシップデーセールで一時コメント
		//swfFile = 'mainFD2010.png';
	}else{
		swfFile = 'main07.png';		// フレンドシップデーセールで一時コメント
		//swfFile = 'mainFD2010.png';
	}
	
    // 出力
    if (bSwf){
    	var swfPath = swfFile + '.swf';
	    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="' + stWidth + '" height="' + stHeight + '" id="' + swfFile + '" align="middle">\n');
		document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
		document.write('<param name="movie" value="' + swfPath + '" />\n');
		document.write('<param name="quality" value="high" />\n');
		document.write('<param name="bgcolor" value="#' + stBgc + '" />\n');
		document.write('<embed src="' + swfPath + '" quality="high" bgcolor="#' + stBgc + '" width="' + stWidth + '" height="' + stHeight + '" name="' + swfFile + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" />\n');
		document.write('</object>\n');
	}else{
		if (swfFile == 'main04.jpg')
			document.write('<div style="height:162px; margin:0px; padding:98px 0px 0px 526px; background-image:url(' + swfFile + '); background-repeat:no-repeat; background-position:top center; text-align:left;"><table style="width:1%;"><tr><td><a style="background-color:transparent;" href="tk1230tools.html"><img style="margin:0px;" src="images/spacer.gif" width="220" height="51" /></a></td></tr><tr><td style="padding:11px 0px 0px 0px;"><a style="background-color:transparent;" href="tk1230b/kaibou-top.html"><img style="margin:0px;" src="images/spacer.gif" width="220" height="51" /></a><td></tr></table></div>\n');
		else if (swfFile == 'main05.jpg')
			document.write('<div style="height:186px; margin:0px; padding:11px 0px 0px 545px; background-image:url(' + swfFile + '); background-repeat:no-repeat; background-position:top center; text-align:left;"><table style="width:1%;"><tr><td><a style="background-color:transparent;" href="tk1230tools.html"><img style="margin:0px;" src="images/spacer.gif" width="197" height="16" /></a></td></tr><tr><td style="padding:5px 0px 0px 0px;"><a style="background-color:transparent;" href="tk1230b/kaibou-top.html"><img style="margin:0px;" src="images/spacer.gif" width="177" height="16" /></a><td></tr></table></div>\n');
		else if (swfFile == 'main06.gif')
			document.write('<div style="height:173px; margin:0px; padding:25px 0px 0px 250px; background-image:url(' + swfFile + '); background-repeat:no-repeat; background-position:top center; text-align:left;"><table style="width:1%; vertical-align:top;"><tr><td rowspan="3"><a style="background-color:transparent;" href="items/phone.html"><img style="margin:0px;" src="images/spacer.gif" width="250" height="155" /></a></td><td style="height:1px; padding:6px 0px 0px 25px;"><a style="background-color:transparent;" href="tk1230tools.html"><img style="margin:0px;" src="images/spacer.gif" width="197" height="16" /></a></td></tr><tr><td style="height:1px; padding:5px 0px 0px 25px;"><a style="background-color:transparent;" href="tk1230b/kaibou-top.html"><img style="margin:0px;" src="images/spacer.gif" width="177" height="16" /></a><td></tr><tr><td><img style="margin:0px;" src="images/spacer.gif" width="1" height="112" /></td></tr></table></div>\n');
		else if (swfFile == 'main07.png')
			document.write('<div style="height:198px; width:742px; margin:0px; padding:0px; background-image:url(' + swfFile + '); background-repeat:no-repeat; background-position:top center; text-align:left;"><table style="width:1%; vertical-align:top;"><tr><td rowspan="4"><img style="margin:0px;" src="images/spacer.gif" width="201" height="198" /></td><td rowspan="4"><a style="background-color:transparent;" href="items/phone.html"><img style="margin:0px;" src="images/spacer.gif" width="210" height="198" /></a></td><td style="height:1px; padding:0px;"><a style="background-color:transparent;" href="tk1230tools.html"><img style="margin:0px;" src="images/spacer.gif" width="118" height="55" /></a></td><td rowspan="3" style="height:1px; padding:0px;"><a style="background-color:transparent;" href="https://patok.serveftp.net/WebApp/netStore/manager.aspx" target="_blank"><img style="margin:0px;" src="images/spacer.gif" width="210" height="140" /></a></td></tr><tr><td style="height:1px; padding:0px;"><a style="background-color:transparent;" href="tk1230b/kaibou-top.html"><img style="margin:0px;" src="images/spacer.gif" width="118" height="55" /></a></td></tr><tr><td><img style="margin:0px;" src="images/spacer.gif" width="1" height="30" /></td></tr><tr><td><img style="margin:0px;" src="images/spacer.gif" width="1" height="55" /></td><td><img style="margin:0px;" src="images/spacer.gif" width="1" height="1" /></td></tr></table></div>\n');
		else if (swfFile == 'mainFD2010.png')
			document.write('<div style="height:198px; width:742px; margin:0px; padding:0px; background-image:url(' + swfFile + '); background-repeat:no-repeat; background-position:top center; text-align:left;"><table style="width:1%; vertical-align:top;"><tr><td><a style="background-color:transparent;" href="fd2010.png" target="_blank"><img style="margin:0px;" src="images/spacer.gif" width="213" height="196" /></a></td><td><a style="background-color:transparent;" href="https://patok.serveftp.net/WebApp/netStore/manager.aspx" target="_blank"><img style="margin:0px;" src="images/spacer.gif" width="79" height="196" /></a></td><td><a style="background-color:transparent;" href="https://patok.serveftp.net/WebApp/netStore/manager.aspx" target="_blank"><img style="margin:0px;" src="images/spacer.gif" width="73" height="196" /></a></td><td><a style="background-color:transparent;" href="https://patok.serveftp.net/WebApp/netStore/manager.aspx" target="_blank"><img style="margin:0px;" src="images/spacer.gif" width="75" height="196" /></a></td><td><a style="background-color:transparent;" href="https://patok.serveftp.net/WebApp/netStore/manager.aspx" target="_blank"><img style="margin:0px;" src="images/spacer.gif" width="72" height="196" /></a></td></tr></table></div>\n');
		else
			document.write('<img src="' + swfFile + '">\n');
	}
}

//
// 2006年2月のIEアップデートで、flash等の ActiveX コントロール上でクリックしてアクティブ化しないと使用出来ないようになったのを回避（JAVAスクリプトを経由するとアクティブ化の制限を回避できる）
function roadSwfsp(swfPath, stBgc, stWidth, stHeight)
{
	//musen3special2.swf … bgcolor="#ffffff" width="758" height="150"
	
    //var swfPath = 'http://www.zutsuki.com/img/test.swf' とか 'img/test.swf' とか 'test.swf';　
	//var stBgc = 'ff0000';file:///D:/AS_Works/ワーク_Web/松本無線ホームページ/musen改060811_UTF-8_ASP版_オンラインショップ稼動時はこっちに移行/xxx.html
	//var stWidth = '500';
	//var stHeight = '50';file:///D:/AS_Works/ワーク_Web/松本無線ホームページ/musen改060811_UTF-8_ASP版_オンラインショップ稼動時はこっちに移行/xxx.html
	
	//var swfFile = 'test';
	// swfPathからswfファイル名のみ抽出
	var n = swfPath.lastIndexOf('/',swfPath.length);
	var swfFile = swfPath.substring(n+1);
	swfFile = swfFile.replace('.swf','');
    
    // 出力
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="' + stWidth + '" height="' + stHeight + '" id="' + swfFile + '" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="' + swfPath + '" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="bgcolor" value="#' + stBgc + '" />\n');
	document.write('<embed src="' + swfPath + '" quality="high" bgcolor="#' + stBgc + '" width="' + stWidth + '" height="' + stHeight + '" name="' + swfFile + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" />\n');
	document.write('</object>\n');
}
//
