//////////////////////////////////////////////////////////////////////
//
//
//	シンプルロールオーバー
//
//
//////////////////////////////////////////////////////////////////////

function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}


///////////////////////////////////////////////////////////////////////
//
//
//ドロップダウンメニュー
//
//
//////////////////////////////////////////////////////////////////////

	  $(document).ready(function(){
			$("#Navi li").hover(
				function(){ $("ul", this).fadeIn("fast"); }, 
				function() { } 
			);
	  	if (document.all) {
				$("#Navi li").hoverClass ("sfHover");
			}
	  });
	  
		$.fn.hoverClass = function(c) {
			return this.each(function(){
				$(this).hover( 
					function() { $(this).addClass(c);  },
					function() { $(this).removeClass(c); }
				);
			});
		};


//////////////////////////////////////////////////////////////////////
//
//
//	タブ型ナビゲーション
//
//
//////////////////////////////////////////////////////////////////////

/*-----------------------------------------------------------
 Original
 http://archiva.jp/web/javascript/tab-menu.html

 Customized by WWW WATCH
 http://hyper-text.org/archives/2007/09/javascript_tab.shtml
------------------------------------------------------------*/

/*--setup--*/
//window.onload=function() {
//tab.setup = {
//   tabs: document.getElementById('sysTab').getElementsByTagName('li'),
//   
//   pages: [
//      document.getElementById('s-special'),
//			document.getElementById('special'),
//      document.getElementById('bunri'),
//      document.getElementById('sports')
//   ]
//}

//tab.init();
//}
/*--setup end--*/

//var tab = {
//   init: function(){
//      var tabs = this.setup.tabs;
//      var pages = this.setup.pages;
      
//      for(i=0; i<pages.length; i++) {
//         if(i !== 0) pages[i].style.display = 'none';
//         tabs[i].onclick = function(){ tab.showpage(this); return false; };
//      }
//   },
   
//   showpage: function(obj){
//      var tabs = this.setup.tabs;
//      var pages = this.setup.pages;
//      var num;
      
//      for(num=0; num<tabs.length; num++) {
//         if(tabs[num] === obj) break;
//      }
      
//      for(var i=0; i<pages.length; i++) {
//         if(i == num) {
//            pages[num].style.display = 'block';
//            tabs[num].className = 'selected';
//         }
//         else{
//           pages[i].style.display = 'none';
//            tabs[i].className = null;
//         }
//      }
//   }
//}



///////////////////////////////////////////////////////////////////////
//
//
// google map
//
//
//////////////////////////////////////////////////////////////////////

function load() {
	if (GBrowserIsCompatible()) {

		var pnt =  new GLatLng(35.746978,140.28115);
		var map = new GMap2(document.getElementById("map"));
		map.setCenter(pnt,14);
		
		map.addControl(new GLargeMapControl());      // 拡大縮小バー
		map.addControl(new GMapTypeControl());       // 表示切替ボタン
		map.addControl(new GOverviewMapControl());  // エリア図

		
		var marker = new GMarker(pnt);
		map.addOverlay(marker);
		marker.openInfoWindowHtml('<strong>東京学館高等学校</strong><br />千葉県印旛郡酒々井町伊篠21<br />電話：043-496-3881<br /><a href="http://www.tokyogakkan.ed.jp/">http://www.tokyogakkan.ed.jp/</a>');

	}
}






///////////////////////////////////////////////////////////////////////
//
//
// サイト内検索結果表示用スクリプト
//
//
//////////////////////////////////////////////////////////////////////

  var googleSearchIframeName = "cse-search-results";
  var googleSearchFormName = "cse-search-box";
  var googleSearchFrameWidth = 600;
  var googleSearchDomain = "www.google.com";
  var googleSearchPath = "/cse";
