if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/Android/i))) {

    if (document.cookie.indexOf("iphone_redirect=false") == -1) {

        window.onload = ARTEMIS;
/* サンプルをそのまま使っています (グローバル変数なし用)*/
;(function(){
var ADC = { sorc:[
'<a href="http://www.nps.ne.jp/ipn/" target="_blank"><img src = "http://www.nps.ne.jp/image/index/sp.jpg" border=0></a>'
], id:'head_top',	loop:0, set:function(O){ var by = function(id){ if(document.getElementById && document.getElementById(id) ){ return document.getElementById(id) }else{ if( document.all && document.all(id)) return document.all(id) } }; if(!by(O.id)){ return false; } if(O.Tid){ clearTimeout(O.Tid); } O.now =-1; var CHG = function(){ if(++O.now >= O.sorc.length || !O.sorc[O.now]){ if(!O.loop){ return false; } O.now = 0; } by(O.id).innerHTML = O.sorc[O.now]; O.Tid = setTimeout(CHG, O.sec); };CHG();},add:function(obj, type, func){ if(obj.addEventListener){ obj.addEventListener(type, func, false); }else{ if(obj.attachEvent) obj.attachEvent('on' + type, func); }},Tid:undefined };ADC.add(window, 'load', function(){ ADC.set(ADC) });
})();

    }

else{ (document.cookie.indexOf("ipad_redirect=false") == -1)

        window.location = "http://www.nps.ne.jp/";

    }

}



/*  site:www.artemis.ac common lib  hidemaru<script> */
if(typeof(ART) == "undefined"){ var ART = new Object(); }	/* site:ARTEMIS uniq Object */

/* error data check for admin */
window.onerror = function(M,F,L){
	if(location.hostname != 'www.artemis.ac'){ return false; }
	var rawdata = function(str){ return str; };
	var encoder = (window.encodeURIComponent || rawdata);
	var img = new Image(); img.src = 'http://www.artemis.ac/jsdata/jserror.cgi?' + encoder('msg:' + M + '&url:' + F + '&line:' + L  );
}

if(document.all){ ART.IE = true; ART.dom = 1; } /* Agent which has all collection ART.dom=1. which has getElementById method ART.dom = 2;  */
if(document.getElementById){ ART.dom = 2; ART.NN = true; }
if(!!window.opera){ ART.IE = false; ART.OPERA = true; }
ART.UA = navigator.userAgent;
if(ART.UA.indexOf('AppleWebKit') > -1 && ART.UA.indexOf('Safari') > -1 ){  ART.IE = false; ART.SAFARI = true; }

ART.statusbar = false;
function ARTEMIS(){
	ART.pagetitle = document.title;
	if(window.status != 'undefined'){ status = 'ARTEMIS'; if(status == 'ARTEMIS'){ defaultStatus= 'ARTEMIS'; ART.statusbar = true; } }
}

/* return Object by element id. use byID('id') */
function byID(id){
	if(ART.dom == 2){ return document.getElementById(id);  }
	if(ART.dom == 1){ return document.all(id);  }
	return undefined;
}

/* id =id, form = form obj*/
function DoCopy(id,form){
	if(form && form[id] && form[id].select){ form[id].select() }
	if(self.clipboardData && byID(id)){
	    var clip = document.body.createTextRange();
	    clip.moveToElementText(byID(id));
		if(clipboardData.setData('text',clip.text)){
			document.title = 'コピー完了';
			setTimeout("document.title = ART.pagetitle",1000);
		}
	}
}

/* point OpenClose() 0:None 1:blcok 2:reverse */
function OCSystem(id,sw){
	if(ART.dom > 0){
		id = byID(id).style;
		switch(sw){
			case 0: id.display = 'none'; break;
			case 1: id.display = 'block'; break;
			case 2:	id.display = (id.display == 'block')? 'none' : 'block';
		}
	}
}

/* add event function */
function aEvent(obj, type, func){ if(obj.addEventListener){ obj.addEventListener(type, func, false); }else{ if(obj.attachEvent) obj.attachEvent('on' + type, func); }}
/* remove event function */
function rEvent(obj, type, func){ if(obj.removeEventListener){ obj.removeEventListener(type, func, false); }else{ if(obj.detachEvent) obj.detachEvent('on' + type, func); }};




