var $Obj = new Object();

$Obj = {


 //////オブジェクト取得///////////////
 get:function(prm){

  if(document.getElementById && !document.all || document.layers){
   obj = document.getElementById(prm);
  }else if(document.all){
   obj = document.all(prm);
  }

  if(!obj) alert("$Obj.get ID="+ prm +" が見つかりません");

  return obj;
 }

}


//////引き出しメニュ/////////////////////////////////////////////////////////////////////////////
var n = -60;
var timer;
var swt = 0;
		
function moveText(){
	
	var obj = $Obj.get("mainmenu");
	
	if(swt==1){
		n -=5;
	}else{
		n +=5;		
	}
	

	obj.style.top = n + "px";
	
	if(n > 0 && swt==0){
		obj.style.top = 0 ;
		clearInterval(timer);
		swt = 1;
	}
	
	if(n < -60 && swt==1){
		obj.style.top = -60 ;
		clearInterval(timer);
		swt = 0;
	}
	
}

function openMenu(){

	timer = setInterval("moveText()",5);
}

/////トップメニュー//////////////////////////////////////////////////////////////////
function  menutextchange(param){
	comentArray = new Array();
	comentArray[0] ="THE SUIT COMPANYのオンラインショップについてはこちら";
	comentArray[1] ="「THE SUIT COMPANY」のルーツ巡り　VOL.5 についてはこちらから";
	comentArray[2] ="THE SUIT COMPANYのコンセプト・3テイストについてはこちら";
	comentArray[3] ="THE SUIT COMPANYの店舗情報やリクルート情報はこちら";
	comentArray[4] ="THE SUIT COMPANYのメンバーサービスについてはこちらから";
	comentArray[5] ="THE SUIT COMPANYのサポートするアート活動についてはこちらから";
	
	document.getElementById("contentsDes").innerHTML = comentArray[Number(param) -1];
}
/////トップイメージ///////////////////////////////////////////////////////////////////

//var image = new Array();

//for( i = 0 ; i < 6 ; i++ ){
//		image[i] = new Image();
//		image[i].src= "/images/top/im_top0" + (i+1) + ".jpg";
//}


//var filterInt = 0;
//var topImageTimer;

//function fadeIn(){
//	filterInt += 1;

//	document.getElementById("imageArea").style.MozOpacity = filterInt/100;
	
//	if(document.all){ //IE5.5　以降
//			document.getElementById("imageArea").filters.alpha.opacity  = filterInt;
//	}

//	if(filterInt >= 99){
//		clearInterval(topImageTimer);		
//	}
//}


function  topImageChange(){

	imageArray = new Array();
	imageArray[0] ="url(/images/top/im_top01.jpg)";
	imageArray[1] ="url(/images/top/im_top02.jpg)";
	imageArray[2] ="url(/images/top/im_top03.jpg)";
	imageArray[3] ="url(/images/top/im_top04.jpg)";
	imageArray[4] ="url(/images/top/im_top05.jpg)";
	imageArray[5] ="url(/images/top/im_top06.jpg)";
	imageArray[6] ="url(/images/top/im_top07.jpg)";

//	imageInt = 6; 
	imageInt = Math.floor(Math.random() * 6); 

	
//	if(document.all){ //IE5.5　以降
//			document.getElementById("imageArea").style.filter="alpha(opacity=0)"
//	}else{
//			document.getElementById("imageArea").style.MozOpacity = 0;
//	}

	document.getElementById("imageArea").style.backgroundImage = imageArray[imageInt];

//	topImageTimer = setInterval("fadeIn()",5);
}



///////////////////////////////////////////////////////////////////////////////////

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i>a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i>d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/*special*/

function winOpen(url,name,tb,sb,lt,st,resi,mb,sWid,sHei){
	window.open(url,name,'toolbar=' + tb + ',scrollbars=' + sb + ',location=' + lt + ',status=' + st + ',resizable=' + resi + ',menubar=' + mb + ',width=' + sWid + ',height='+ sHei);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  win=window.open(theURL,winName,features);
	win.focus();
}

function openBrWindow(theURL,winName,features) { //v2.0
  win=window.open(theURL,winName,features);
	win.focus();
}

/* */
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}