/*
 * Ext JS Library 2.2.1
 * Copyright(c) 2006-2009, Ext JS, LLC.
 * licensing@extjs.com
 *
 * http://extjs.com/license
 */
Ext.onReady(function(){
    //alert(location.pathname);
    //alert(location.pathname.split("/").length);
    
    //var pathCnt = location.pathname.split("/").length;
    var addPath = "";
    for (i = 0; i < location.pathname.split("/").length - 3; i++) {
        addPath = addPath + "../";
    }
    
    Ext.QuickTips.init();
    //    topInit();
    //		var header = Ext.get("header");
    //		var hoge = new Ext.Element("<div>aa</div>");
    //    header.appendChild(hoge);
    
    $("#footer").html("Copyright (C) 2000-2010 hamazaki dendal clinic All Rights Reserved.");
    
    
    
});

function topInit(){


    var myPanel = new Ext.Panel({
        id: 'myPanel',
        title: 'アクセス',
        width: 435,
        height: 430,
        renderTo: 'dateBox',
        contentEl: 'map_canvas'
    
    })
    var topimg = Ext.get('topimg');
    topimg.fadeIn({
        easing: 'easeIn',
        duration: 2
    });
    var myPanel2 = new Ext.Panel({
        id: 'myPanel2',
        title: '診療案内',
        width: 435,
        height: 430,
        renderTo: 'accessBox',
        contentEl: 'accessBoxContents'
    
    });
    //alert($("#bestsmile"));
    //$("#bestsmileimg").effect("shake" ,{}, 1000);
    initialize()
    
}

function initialize(){
    if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.addControl(new GLargeMapControl());
        map.setCenter(new GLatLng(34.686449, 133.947468), 18);
        
        var point = new GLatLng(34.686449, 133.947468);
        var marker = new GMarker(point);
        map.addOverlay(marker);
        
        
        
        marker.openInfoWindowHtml("<h1>はまざき歯科医院<h1><br>岡山県岡山市中区八幡４１－１<br>086-238-3718");
        
    }
}



