// -------------------- Flash -------------------- //

function drawSwf(url, w, h, t){
	if(drawSwf.arguments.length > 3) var wm = "transparent";
	else var wm = "opaque";
	document.write('<object width="' +w+ '" height="' +h+ '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8">');
	document.write('<param name="movie" value="' +url+ '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="wmode" value="' +wm+ '" />');
	document.write('<param name="allowScriptAccess" value="always">');
	document.write('<embed src="' +url+ '" width="' +w+ '" height="' +h+ '" quality="high" menu="false" wmode="' +wm+ '" allowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash">');
	document.write('</embed>');
	document.write('</object>');
}


// -------------------- MouseOver -------------------- //

function setAjm(){
	var obj = document.getElementsByTagName("img");
	obj_i = new Array();
	for(var i=0; i<obj.length; i++){
		if(obj[i].className.indexOf("ajm") > -1){
			var obj_o = obj[i].src.slice(0, -4) +"_o"+ obj[i].src.slice(-4);
			obj_i[i] = new Image(); obj_i[i].src = obj_o;
			if(obj[i].className == "ajm_o") obj[i].src = obj_o;
			else {
				obj[i].onmouseover = function(){
					this.src = this.src.slice(0, -4) +"_o"+ this.src.slice(-4);
				}
				obj[i].onmouseout = function(){
					this.src = this.src.replace("_o.", ".");
				}
			}
		}
	}
}
if(window.addEventListener) window.addEventListener("load", setAjm, false);
else if(window.attachEvent) window.attachEvent("onload", setAjm);


// -------------------- Group -------------------- //

dc_flag = new Array();
function dC(n){
	if(!dc_flag[n] || dc_flag[n] == 0){
		document.getElementById("n"+n).className = "op";
		document.getElementById("c"+n).style.display = "block";
		dc_flag[n] = 1;
	} else {
		document.getElementById("n"+n).className = "cl";
		document.getElementById("c"+n).style.display = "none";
		dc_flag[n] = 0;
	}
	window.focus();
}


// -------------------- Digital Impact Movie -------------------- //

function openMov(s){
	var w = 500;
	var h = 430;
	var e = "resizable=no,scrollbars=no,toolbar=no,menubar=no,directories=no,status=no,location=no";
	var url = "http://golf.dunlop.co.jp/digitalimpact/" + s;

	var p = e + ",width=" +w+ ",height=" +h;
	var win = window.open(url, "movwin", p);
	win.focus();
}

