    function getXmlHttpObject() {
        var xmlhttp;
        /*@cc_on
        @if (@_jscript_version >= 5)
            try {
                xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (E) {
                    xmlhttp = false;
                }
            }
        @else
            xmlhttp = false;
        @end @*/
        if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
            try {
                xmlhttp = new XMLHttpRequest();
                xmlhttp.overrideMimeType("text/xml"); 
            } catch (e) {
                xmlhttp = false;
            }
        }
        return xmlhttp;
    }

    var xmlHttp = getXmlHttpObject();
    
    function fm1Go (link)
    {
    	if (link == null) {
            return false;
        }
        document.fm1.action = link;
        document.fm1.submit();
    }
    
    function fm2Go (link)
    {
    	if (link == null) {
            return false;
        }
        document.fm2.action = link;
        document.fm2.submit();
    }
    
    
//    function startImg ()
//    {
//    	document.getElementById('image_zone').style.background = "url('images/front/sample/" + imgtimes + ".jpg') no-repeat";
//    	document.getElementById('image_zone_a').href = "http://yahoo.co.jp/";
//    	
//    	if(imgtimes == imgtimemax){
//    		imgtimes = 1;
//    	}else{
//    		imgtimes = imgtimes + 1;
//    	}
//    }
    
    var nmin = 99;
    var id = 800;
    	
    function startImg(){

    	var now = new Date();
    	var hour = now.getHours(); // 時
    	var min = now.getMinutes(); // 分

    	// 数値が1桁の場合、頭に0を付けて2桁で表示する指定
    	if(hour < 10) { hour = "0" + hour; }
    	if(min < 10) { min = "0" + min; }

    	// フォーマットを指定（不要な行を削除する）
    	var watch1 = hour + ':' + min; // パターン1
    	
    	// テキストフィールドにデータを渡す処理（不要な行を削除する）
		if(min!=nmin){
			nmin = min;
    		url = window.location.protocol + '//' + window.location.hostname + '/api.php?id=' + id + '&function=getImg';
//    		url = 'http://pdsee.biz/fc-boshu.net/htdocs/api.php?id=' + id + '&function=getImg';
    		xmlHttp.open('GET', url, true);
    		xmlHttp.onreadystatechange = function(){
    			if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
    		        var xmlDoc = xmlHttp.responseXML;
    		        if (xmlDoc.documentElement) {
    		        	id = xmlDoc.getElementsByTagName('id').item(0).firstChild.data;
    		        	var account = xmlDoc.getElementsByTagName('account').item(0).firstChild.data;
    		        	var shop_name = xmlDoc.getElementsByTagName('shop_name').item(0).firstChild.data;
    		        	document.getElementById('image_zone').style.background = "url('upload/" + account + "/shop_main_image.jpg') no-repeat";
    		        	document.getElementById('tokei').innerHTML = watch1;
    		        	document.getElementById('shop_name').innerHTML = shop_name;
    		        	document.getElementById('image_zone_a').href = "honbu-" + id + ".html";
    		        }
    		    }
    		}
    		xmlHttp.send(null);
    	}
    	setTimeout("startImg()", 1000);
    }

