var collection;

function Obj(objContent,objTab) {
 this.content = objContent;
 this.tab = objTab;

 return this;
}

Obj.prototype = {
 appear : function(){
  this.content.style.display = "block";
  this.tab.className = "selectedtab";
 },

 dissappear : function() {
  this.content.style.display = "none";
  this.tab.className = "unselectedtab";
 }

};

function init(){
 collection = [
   new Obj(content1,tab1),
   new Obj(content2,tab2)
 ];
}

function show(i){

 for(var j in collection){
  collection[j].dissappear();
 }

 collection[i].appear();

}


function disp(url){
 
 window.open(url, "window_name", "width=720,height=520,scrollbars=yes");

}

function disp2(url){
 
 window.open(url, "window_name2", "width=720,height=620,scrollbars=yes");

}


function ShowFormGuide(obj,GuideSentence) {
   // 入力案内を表示
   if( obj.value == '' ) {
      obj.value = GuideSentence;
      obj.style.color = '#808080';
      obj.style.background = '#f5f5f5';
   }
}

function HideFormGuide(obj,GuideSentence) {
   // 入力案内を消す
   if( obj.value == GuideSentence ) {
      obj.value='';
      obj.style.color = '#000000';
      obj.style.background = '#ffffff';
   }
}