/*----------------------------------------------------グローバルJavascriptファイル*/
function viewSwf(URL,width,height){
	document.writeln("<object type='application/x-shockwave-flash' width='"+width+"' height='"+height+"' data='"+URL+"'>");
	document.writeln("<param name='movie' value='"+URL+"' />");
	document.writeln("<param name='wmode' value='transparent' />");
	document.writeln("<param name='quality' value='high' />");
	document.writeln("</object>");
}
function viewYoutube(URL,width,height){
	document.writeln("<object width='"+width+"' height='"+height+"'>");
	document.writeln("<param name='movie' value='"+URL+"' />");
	document.writeln("<embed src='"+URL+"' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"' />");
	document.writeln("</object>");
}
function myChgPic(myPicURL){
	document.getElementById("myBigImage").src = myPicURL;
}
function popUp(URL,width,height){
	window.open(URL, '', 'width='+ width +', height='+ height +', menubar=no, toolbar=no, scrollbars=no');
	return false;
}
function manGa(URL,width,height){
	window.open(URL, '', 'width='+ width +', height='+ height +', menubar=no, toolbar=no, scrollbars=yes');
	return false;
}
function preLoad(val){
    for (var i = 0; i < 5; i++){
		document.img = new Image();
		document.img.src = './img/girl/pc_main_'+ val +'_'+ i +'.jpg';
	}
}
function JumpToCourse(course){
        var url= 'reservation.php?course=' + course;
        if (url != "-") location.href = url;
}
function hyperMail(URL){
	window.open(URL, 'MailMagazine', 'width=450, height=300, menubar=no, toolbar=no, scrollbars=no');
	return false;
}
function scroll_information(msg) {
	var max_length = 70;
	if(typeof $("tick").textContent != "undefined") {
		$("tick").textContent = msg.substring(0, max_length);
	} else {
		$("tick").innerText = msg.substring(0, max_length);
	}
	setTimeout("scroll_information('" + msg.substring(1) + msg.substring(0, 1) + "')", 250); 
}
function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") &&
			anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
}
function load() {
	externalLinks();
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map_area"));
		var point = new GLatLng(35.735087,139.599152);
		map.setCenter(point, 17);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.addOverlay(new GMarker(point));
	}
}
window.onload = externalLinks;