function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var target_flash_Ver = 6;

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i){
		if (isNaN(parseInt(words[i])))
		continue;
		var PluginVersion = words[i]; 
	}

	var FlashCanPlay = PluginVersion >= target_flash_Ver;

}else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {

	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & target_flash_Ver)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

function dispContent (flaMenuObj,  gifMenuObj) {
	if ( FlashCanPlay ) {
		swfW = flaMenuObj.swfW;
		swfH = flaMenuObj.swfH;
		swfBg = flaMenuObj.swfBg;
		swfSrc = flaMenuObj.swfSrc;
		flash_play(swfSrc,swfW, swfH, swfBg);
	} else{
		gif_img(gifMenuObj);
	}
}

function flash_play(swfSrc,swfW, swfH, swfBg){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width=" + swfW + " height=" + swfH + ">");
	document.write("<param name=movie value=" + swfSrc + ">");
	document.write("<param name=bgcolor value=" + swfBg + ">");
	document.write("<param name=quality value=high>");
	document.write("<param name=menu value=false>");
	document.write("<embed src=" + swfSrc + " menu=false quality=high pluginspage='http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' bgcolor=" + swfBg + " width=" + swfW + " height=" + swfH + "></embed>"); 
	document.write("</object>");
}

function gif_img(gifMenuObj) {
	document.write(gifMenuObj);
}

function Form_siryou() { //v2.0
  window.open('https://secure.art-shonan-kohoku.jp/mail/mail.cgi?id=ask','new','resizable=yes,scrollbars=yes');
}

function Form_siryou2() { //v2.0
  window.open('https://secure.art-shonan-kohoku.jp/sas_form2.html','new','resizable=yes,scrollbars=yes,width=600,height=700');
}

function Form_siryou3() { //lZ
  window.open('https://secure.art-shonan-kohoku.jp/mail/mail.cgi?id=ask','new','resizable=yes,scrollbars=yes');
}

function Form_siryou4() { //`k
  window.open('https://secure.art-shonan-kohoku.jp/mail/mail.cgi?id=ask','new','resizable=yes,scrollbars=yes');
}

function Form_ask() { //v2.0
  window.open('https://secure.art-shonan-kohoku.jp/s_ask.html','new','resizable=yes,scrollbars=yes,width=600,height=500');
}

function Form_muryou() { //無体平日無し
  window.open('https://secure.art-shonan-kohoku.jp/mail/mail.cgi?id=ktrial ','new','resizable=yes,scrollbars=yes');
}

function Form_muryou2() { //無体平日有り
  window.open('https://secure.art-shonan-kohoku.jp/ktr2_form.html ','new','resizable=yes,scrollbars=yes,width=600,height=700');
}

function Form_muryou3() { //lZ
  window.open('https://secure.art-shonan-kohoku.jp/mail/mail.cgi?id=yask','new','resizable=yes,scrollbars=yes');
}

function Form_muryou4() { //lZƑ̌
  window.open('https://secure.art-shonan-kohoku.jp/ytr_form2.html','new','resizable=yes,scrollbars=yes,width=600,height=700');
}

function Form_muryou5() { //lZƑ̌
  window.open('https://secure.art-shonan-kohoku.jp/str_form.html','new','resizable=yes,scrollbars=yes,width=600,height=700');
}


function Form_ws() { //Ó샏[NVbv
  window.open('https://secure.art-shonan-kohoku.jp/sws_form.html','new','resizable=yes,scrollbars=yes,width=600,height=700');
}

function OpenMobileWin(){
  window.open("", "mobileaccess","width=525,height=400,location=no,menubar=no,status=no,scrollbars=yes,toolbar=no");
}

function OpenGinfoWin(){
  window.open("", "ginfo","width=650,height=600,location=no,menubar=no,status=no,scrollbars=yes,toolbar=no");
}

function OpenMapWin(){ //}bvir
  window.open('/map/map.html',"map","width=600,height=460,location=no,menubar=no,status=no,scrollbars=no,toolbar=no");
}

function OpenMapWin2(){ //Ó}bv
  window.open('/map/map_l.html',"map","width=500,height=480,location=no,menubar=no,status=no,scrollbars=no,toolbar=no");
}

function OpenMapWin3(){ //l}bv
  window.open('/map/map_y.html',"map","width=500,height=460,location=no,menubar=no,status=no,scrollbars=no,toolbar=no");
}

function OpenMapWin4(){ //`k}bv
  window.open('/map/map_k_l.html',"map","width=500,height=460,location=no,menubar=no,status=no,scrollbars=no,toolbar=no");
}

function OpenPrivacyWin(){
  window.open('http://www.artshonan.jp/common/privacy.html','new','resizable=yes,scrollbars=yes,width=600,height=700');
}

function OpenInstructorWin(url){
  window.open('/instructor/staff/'+url+'.html', "instructor","width=525,height=220,location=no,menubar=no,status=no,scrollbars=yes,toolbar=no");
	return false;
}

function spevent() { //CxgΉ
  window.open('http://www.artshonan.jp/map/event_07.html ','new','resizable=yes,scrollbars=yes,width=610,height=600');
}
function spevent2() { //CxgΉ
  window.open('http://www.artshonan.jp/map/event_070827.html ','new','resizable=yes,scrollbars=yes,width=610,height=350');
}
function spevent3() { //CxgΉ
  window.open('http://www.artshonan.jp/map/event_070827_y.html ','new','resizable=yes,scrollbars=yes,width=610,height=250');
}


function openForm() { //
  window.open('https://secure.art-shonan-kohoku.jp/str3_form.html','new','resizable=yes,scrollbars=yes,width=600,height=700');
}
