/* ポップアップ関数 */

function subWin(theURL,winName,features) {
  var winFocus;
  winFocus = window.open(theURL,winName,features);
  winFocus.focus();
}


/* ロールオーバー処理 */

function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'btn') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_o'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_o'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
	var input = document.getElementsByTagName("input");
	
	for(var i=0; i<input.length; i++){
		if (input[i].className == 'btn') {
			var src = input[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_o'+ftype);

			input[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			input[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			input[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_o'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}


window.onload = initRollovers;


/*　ジャンプメニュー　*/

function MenuSelect(lstMenu)
{
url = new Array("",
				"http://eu.callawaygolf.com/au.html", 
				"http://eu.callawaygolf.com/ca.html",
				"http://eu.callawaygolf.com/fr.html",
				"http://eu.callawaygolf.com/de.html",
				"http://eu.callawaygolf.com/it.html",
				"http://callawaygolf.com/ja/index.aspx",
				"http://callawaygolf.com/ko/index.aspx",
				"http://eu.callawaygolf.com/au.html",
				"http://eu.callawaygolf.com/es.html",
				"http://eu.callawaygolf.com/uk.html",
				"http://www.callawaygolf.com/Global/en-US.html");
	if (lstMenu.selectedIndex > 0) {
		w = window.open(url[lstMenu.selectedIndex], "Menu" + lstMenu.selectedIndex);
		w.focus();
	}
}

//WEBカタログPOP UP TOPへ
function catalogPopupWindow() {
	var url = "/catalog/index.html#01";
	popupWindow = window.open(url,"wisebook","width=1024,height=710");
	popupWindow.focus();
	
	if (typeof document.documentElement.style.maxHeight != "undefined") {
	if(typeof popupWindow.data != "undefined")
	{
		popupWindow.location.reload(true);
	}}
	else
	{
	}
}

//WEBカタログPOP UP 2010TOPへ
function catalogPopupWindow2010() {
	var url = "/catalog/index.html";
	popupWindow = window.open(url,"wisebook","width=1024,height=710");
	popupWindow.focus();
	
	if (typeof document.documentElement.style.maxHeight != "undefined") {
	if(typeof popupWindow.data != "undefined")
	{
		popupWindow.location.reload(true);
	}}
	else
	{
	}
}


//WEBカタログPOP UP ページ番号へ
var refreshPopupWindow = function(){
var event = (window.event) ? window.event : arguments.callee.caller.arguments[0];
var self = event.target || event.srcElement;
var url = self.href;
	popupWindow = window.open(url,"wisebook","width=1024,height=710");
	popupWindow.focus();
	
	if (typeof document.documentElement.style.maxHeight != "undefined") {
	if(typeof popupWindow.data != "undefined")
	{
		popupWindow.location.reload(true);
	}}
	else
	{
	}
};