function slideIn(castNum) {	
	if(navigator.appVersion.charAt(0) >=4) {
		var sw=screen.width-20;
		var positionLeft=(sw-440)/2;
		var sh=screen.height;
		var positionTop=(sh-750)/2.5;
	}
	var style = "";
	style += "width=500,";
	style += "height=750,";
	style += "top="+positionTop+",";
	style += "resizable=no,";
	style += "scrollbars=yes,";
	style += "menubar=no,";
	style += "toolbar=no,";
	style += "directories=no,";
	style += "location=no,";
	style += "status=no'";
	var url = "http://www.hi-na.com/cast/profile.php?cast="+castNum;
	newWindow=window.open(url,castNum,style); 
	newWindow.focus();
		
	if(navigator.appVersion.charAt(0) >=4) {
		for(width1 = 1 ; width1 < positionLeft ; width1 = width1 + 10) {
			newWindow.moveTo(width1,positionTop)
		}
	}
}
function profile(castNum) {
	var sh=screen.height;
	var style = "";
	if (sh < 700 ) {
	style += "width=820,";
	style += "height=600,";
	style += "resizable=no,";
	style += "lett="+positionLeft+",";
	style += "top=0,";
	style += "resizable=no,";
	style += "scrollbars=yes,";
	style += "menubar=no,";
	style += "toolbar=no,";
	style += "directories=no,";
	style += "location=no,";
	style += "status=no'";
	}
	else {
	var positionTop=Math.floor(Math.random()*100);
	var positionLeft=Math.floor(Math.random()*100);
	style += "width=800,";
	style += "height=650,";
	style += "resizable=no,";
	style += "lett="+positionLeft+",";
	style += "top="+positionTop+",";
	style += "resizable=no,";
	style += "scrollbars=no,";
	style += "menubar=no,";
	style += "toolbar=no,";
	style += "directories=no,";
	style += "location=no,";
	style += "status=no'";
	}
	var url = "http://www.hi-na.com/cast/profile.php?cast="+castNum;
	newWindow=window.open(url,castNum,style); 
	
}
function disableRightClick(e)
{
  var message = "ダメッ！！(>_<)左しか感じないの(^o^)";
  
  if(!document.rightClickDisabled) // initialize
  {
    if(document.layers) 
    {
      document.captureEvents(Event.MOUSEDOWN);
      document.onmousedown = disableRightClick;
    }
    else document.oncontextmenu = disableRightClick;
    return document.rightClickDisabled = true;
  }
  if(document.layers || (document.getElementById && !document.all))
  {
    if (e.which==2||e.which==3)
    {
      alert(message);
      return false;
    }
  }
  else
  {
    alert(message);
    return false;
  }
}
disableRightClick();

function popUp(ww, wh, url){		//ww:幅 wh:高さ('ww','wh','url')
	if(navigator.appName == "Netscape") wh *= 1.11;
	if(navigator.appVersion.charAt(0) >= 4) {
		var sw = screen.width - 20;
		var positionLeft = (sw - ww) / 2;
		var sh = screen.height;
		var positionTop = (sh - wh) / 2.5;
	}
	var style = "";
	style += "width=" + ww +",";
	style += "height=" + wh + ",";
	style += "left=" + positionLeft + ",";
	style += "top=" + positionTop + ",";
	style += "resizable=no,";
	style += "scrollbars=no,";
	style += "menubar=no,";
	style += "toolbar=no,";
	style += "directories=no,";
	style += "location=no,";
	style += "status=no'";
	newWindow=window.open(url,"popUp",style); 
	newWindow.focus();
}
function popUpNew(ww, wh, url,Name){		//ww:幅 wh:高さ('ww','wh','url','WindowName')
	if(navigator.appName == "Netscape") wh *= 1.11;
	if(navigator.appVersion.charAt(0) >= 4) {
		var sw = screen.width - 20;
		var positionLeft = (sw - ww) / 2;
		var sh = screen.height;
		var positionTop = (sh - wh) / 2.5;
	}
	var style = "";
	style += "width=" + ww +",";
	style += "height=" + wh + ",";
	style += "left=" + positionLeft + ",";
	style += "top=" + positionTop + ",";
	style += "resizable=no,";
	style += "scrollbars=no,";
	style += "menubar=no,";
	style += "toolbar=no,";
	style += "directories=no,";
	style += "location=no,";
	style += "status=no'";
	
	var winName ="";
	winName +=" " + Name + " ";
	
	newWindow=window.open(url,winName,style); 
	newWindow.focus();
}