
//フラッシュ枠

var swfVersion="9";
var swfDirectory="./"

var VBflash="ShockwaveFlash.ShockwaveFlash."+swfVersion;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (plugin){
	plugin = parseInt(plugin.description.match(/\d+\.\d+/)) >= swfVersion;
}else{
	document.write('<script language=VBScript>\n');
	document.write('on error resume next\n');
	document.write('plugin=(IsObject(CreateObject(VBflash)))\n');
	document.write('</script\>');
}


function showSwf(){
	if (plugin){
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+swfWidth+'" height="'+swfHeight+'">');
		document.write('<param name="movie" value="'+ swf +'" /><param name="loop" value="true" /><param name="quality" value="high" /><param name="base" value="'+swfDirectory+'">');
		document.write('<embed src="'+ swf +'" base="'+swfDirectory+'" loop="true" quality="high" swLiveConnect="false" width="'+swfWidth+'" height="'+swfHeight+'" type="application/x-shockwave-flash"></embed>');
		document.write('</object>');
	}else{

	}
}


//ブランク設定

function BLANKfunction(){
	var domainName="highqualityandliteracy.com";
	var aNum=document.getElementsByTagName("a");
	for(i=0;i<aNum.length;i++){
		if(aNum[i].getAttribute("href").indexOf("http://")!=-1 || aNum[i].getAttribute("href").indexOf("https://")!=-1){
			if(aNum[i].getAttribute("href").indexOf(domainName)==-1){
				aNum[i].onclick=new Function('window.open(this.href); return false;');
			}
		}
		if(aNum[i].className.indexOf("Blank")!=-1){
			aNum[i].onclick=new Function('window.open(this.href); return false;');
		}
	}
}
if(window.addEventListener){window.addEventListener("load",BLANKfunction,false);}else if(window.attachEvent){window.attachEvent("onload",BLANKfunction);}else{window.onload = BLANKfunction;}



//css振り分け

var os="win";
var agent=navigator.userAgent;
if(agent.indexOf("Mac")!=-1) os="mac";
if(os=="win"){
	if(agent.indexOf("MSIE 6.0")!=-1){
		document.write ('<style type="text/css">')
		document.write ('.small{')
		document.write ('font-size:70%;')
		document.write ('}')
		document.write ('</style>')
	}
	if(agent.indexOf("MSIE 7.0")!=-1){
		document.write ('<style type="text/css">')
		document.write ('.small{')
		document.write ('font-size:70%;')
		document.write ('}')
		document.write ('</style>')
	}
	if(agent.indexOf("Firefox")!=-1){
		document.write ('<style type="text/css">')
		document.write ('.small{')
		document.write ('font-size:80%;')
		document.write ('}')
		document.write ('div#content .centerarea .works_com{')
		document.write ('font-size:89%;')
		document.write ('}')
		document.write ('</style>')
	}

}else{

	if(agent.indexOf("Safari")!=-1){
		document.write ('<style type="text/css">')

		document.write ('div#content_index .info_area{')
		document.write ('font-size:80%;')
		document.write ('}')
		document.write ('div#content{')
		document.write ('font-size:70%;')
		document.write ('}')
		document.write ('.small{')
		document.write ('font-size:80%;')
		document.write ('}')
		document.write ('</style>')
	}
	if(agent.indexOf("Firefox")!=-1){
		document.write ('<style type="text/css">')
		document.write ('.small{')
		document.write ('font-size:89%;')
		document.write ('}')
		document.write ('div#content .centerarea .works_com{')
		document.write ('font-size:89%;')
		document.write ('}')
		document.write ('</style>')
	}
}

