function openFullWindow( url ){
	var isWin=(navigator.appVersion.indexOf("Win")!=-1)? true : false;
	var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)? true : false;

	if(screen.availHeight > 2200 || screen.availWidth > 2500){

		var ah=1050;
		var aw=1680;
		var h = Math.floor( (screen.availHeight-ah)/2 );
		var w = Math.floor( (screen.availWidth-aw)/2 );

		var str="screenX=0,screenY=0";
		str = ",top="+h+",left="+w;

		if(window.screen){
			str+=",height="+ah;
			str+=",width="+aw;
		}
      
      str+=", resizable=0";
		var tmp=window.open(url,'hitoeco',str);
		tmp.resizeTo(aw,ah);

	}else{
		if(isWin&&isIE){
			window.open(url,'hitoeco','fullscreen=yes,toolbar=yes,menubar=yes');
		}else{
			var str="left=0,screenX=0,top=0,screenY=0";
			if(window.screen){
				var ah=screen.availHeight;
				var aw=screen.availWidth;
				str+=",height="+ah;
				str+=",width="+aw;
			}

         str+=", resizable=0";
         
			var tmp=window.open(url,'hitoeco',str);
			tmp.moveTo(0,0);
			tmp.resizeTo(aw,ah);
		}
	}
}



function openWindow(url){
	winX = 1024;
	winY = 768;

	winURL=url;
	winName = 'hitoeco-s';
	winTop  = (screen.height-winY)/2;
	winLeft = (screen.width-winX)/2;
 
 newWin=window.open(winURL,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+',scrollbars=0,resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,copyhistory=0');
	newWin.focus();
}




function openLinkAndFocus(url,name,param,isClose){
	//alert(window.opener.closed);	//var url = "http://www.adidas.com/uk/performance/sports.asp";
	if(window.opener && !window.opener.closed){
		window.opener.location.href = url;
		window.opener.focus();
	}else{
		window.open(url,name,param);
	}
	if(isClose) window.close();
}



function linkToOpener(url,name,param,isClose){
	//alert(window.opener.closed);	//var url = "http://www.adidas.com/uk/performance/sports.asp";
	if(window.opener && !window.opener.closed){
		window.opener.location.href = url;
		window.opener.focus();
	}else{
		var w=1024;
		var h=738;
		var opt="toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,left=0,top=0,width="+w+",height="+h;
		window.open(url,"main",opt);
	}
	if(isClose) window.close();
}


//////2006.5.23(t.t)//////

function openPhoto(url, _w, _h){

 var ccount = "___ADIAD";
 
 var cnt = myGetCookie(ccount); 
 
 if(cnt == null){
  mySetCookie(ccount, "1", 1);
  cnt=0;
 }else if (cnt == 1){
  mySetCookie(ccount, "2", 1);
  cnt=1;
 }else cnt=2;
 
 //alert(cnt);
 
 //if(cnt==0 || cnt==1){
  if(cnt<2){
  //alert([url, _w, _h]);
 
 if(_w && _h){
 	winX = _w;
 	winY = _h;
 }else{
 	winX = 400;
 	winY = 250;
 }

	//winURL = 'popup/img/'+no+'.jpg';
	//winURL = 'popup/index_"+ url +.html';
	//winURL='popup/index_ganbare_ad.html';
	//winName = 'popup';

	//winTop  = (screen.height-winY)/2;
	//winLeft = (screen.width-winX)/2;

	//newWin=window.open(winURL,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+',scrollbars=0,resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,copyhistory=0');
	//newWin.focus();
	
	}  //END if
}


function mySetCookie(myCookie,myValue,myDay){
   myExp = new Date();
   myExp.setTime(myExp.getTime()+(myDay*24*60*60*1000));
   myItem = "@" + myCookie + "=" + escape(myValue) + ";";
   myExpires = "expires="+myExp.toGMTString();
   document.cookie =  myItem + myExpires;
}


function myGetCookie(myCookie){
   myCookie = "@" + myCookie + "=";
   myValue = null;
   myStr = document.cookie + ";" ;
   myOfst = myStr.indexOf(myCookie);
   if (myOfst != -1){
      myStart = myOfst + myCookie.length;
      myEnd   = myStr.indexOf(";" , myStart);
      myValue = unescape(myStr.substring(myStart,myEnd));
   }
   return myValue;
}


//add by Takeuchi(06.06.02)
function GoToCampaign(){
	winX = 480;
	winY = 650;

	//test
	//winURL='column_campaign/frame.html';
	//live
	winURL='https://www4.adidas.co.jp/column_campaign/frame.php';
	winName = 'ColumnCampaign';

	winTop  = (screen.height-winY)/2;
	winLeft = (screen.width-winX)/2;

	newWin=window.open(winURL,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+',scrollbars=1,resizable=0,toolbar=0,location=0,directories=0,status=1,menubar=0,copyhistory=0');
	newWin.focus();
}

//////////////////////////////
