function writeContent(tabIndex) {
	var tc = $('tabContent');
	tc.innerHTML = tabContent[tabIndex];
}

function changeTabs(tabIndex) {
	var tabs 	= $('tabs');
	tabs.src	= tabImage[tabIndex]; 
	var t 		= $('tabContainer');
	t.style.backgroundImage = '';
	t.style.background = "#8FFFC7";
	var tc 	= $('tabContent');
	tc.style.display = 'none';
	writeContent(tabIndex);
	Effect.Appear('tabContent');
}

function expandTout(tabIndex) {
	var i = $('expandImg_' + tabIndex);
	i.style.display = 'none';
	Effect.SlideDown('tout_' + tabIndex);
}

var Popup = {
  open: function(options)
  {
    this.options = {
      url: '#',
      width: 500,
      height: 430
    }
    Object.extend(this.options, options || {});
    window.open(this.options.url, '', 'width='+this.options.width+',height='+this.options.height);
  }
}

function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}