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_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];}
}

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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

// window pop up function
function popWindow(url, myWidth, myHeight) {
	var winWidth, winHeight;
	if (myWidth) {
		winWidth = myWidth;
	} else {
		winWidth = 462;
	}
	
	if (myHeight) {
		winHeight = myHeight;
	} else {
		winHeight = 480;
	}
	
	var optionListing = "HEIGHT=" + winHeight + ",WIDTH=" + winWidth + ",innerHeight=480,innerWidth=462,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=10,screenY=20"
	remote = window.open(url,"sb_popup",optionListing);
	if (remote != null)  {
		remote.focus();
	} // end if
}

function popWindowScroll(url) {
	var optionListing = "HEIGHT=500,WIDTH=477,innerHeight=500,innerWidth=477,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=10,screenY=20"
	remote = window.open(url,"sb_popup",optionListing);
	if (remote != null)  {
		remote.focus();
	} // end if
}

function popWindowLarge(url) {
	var optionListing = "HEIGHT=500,WIDTH=660,innerHeight=500,innerWidth=660,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=10,screenY=20"
	remote = window.open(url,"sb_popup",optionListing);
	if (remote != null)  {
		remote.focus();
	} // end if
}

//親ウィンドウ遷移
function openerURL(URL) {
	if(opener.closed) {
		NewWin = window.open('', 'Win');
		NewWin.location.href = URL;
	} else {
		opener.location.href = URL;
	}
	opener.focus();
}

function sb_validateForm() { //v4.0
  	var i,p,q,nm,test,num,min,max,errors='',args=sb_validateForm.arguments;
  	for (i=0; i<(args.length-2); i+=3) { 
	
		test=args[i+2]; 
		val=MM_findObj(args[i]);
		if (val) { 
	
			var temp_nm=val.name;
			temp_nm=args[i];
			nm = eval(temp_nm+'_label'); 
		
			if ((val=val.value)!="") {
    	  		if (test.indexOf('isEmail')!=-1) { 
					p=val.indexOf('@');
					if (p<1 || p==(val.length-1)) {
						errors+='- '+nm+' '+emailError+'\n';
     				}
				} else if (test!='R') { 
					num = parseFloat(val);
       				if (isNaN(val)) {
       					errors+='- '+nm+' '+numericError+'\n';
	   				}
					if (test.indexOf('inRange') != -1) { 
						p=test.indexOf(':');
        	  			min=test.substring(8,p); 
          				max=test.substring(p+1);
         				if (num<min || max<num) {
         					errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    					}
					} // end if in range
    			} // end if 
    		} else if (test.charAt(0) == 'R') {
    			errors += '- '+nm+' '+nullError+'.\n'; 
			} // end if value != ""
		} // end if val
  	} // end for loop
	
  	if (errors && errmsg != '') {
	alert(validationMessage+'\n'+errors+errmsg);
	}
	if (errors == '' && errmsg != '') {
	alert(validationMessage+'\n'+errmsg);
	}
	if (errors && errmsg == '') {
	alert(validationMessage+'\n'+errors);
	}
  document.MM_returnValue = (errors == '');
}



// Returns the entire query string passed to the current page.
function getQueryString(){ 
        zquery = parent.location.search; 
        zquery = zquery.substring(1,zquery.length); 
        return (zquery); 
} 

// Parses a query string 'queryString' for the variable 'queryName'
// and returns the value associated with that name.
function parseQuery (queryString, queryName) {
	startIndex = queryString.indexOf(queryName);
	if (startIndex == -1) {
		return "";
	}
	
	startIndex = queryString.indexOf("=", startIndex) + 1;
	endIndex = queryString.indexOf("&", startIndex);
	if (endIndex == -1) {
		endIndex = queryString.length;
	}
	return queryString.substring(startIndex, endIndex);
}

function jumpPage(url) {
	if ((url != "none") && (url != "")) {
		// Escape the value of the parameter
		paramName = url.substring(0, url.indexOf("=")+1);
		varName = escape(url.substring(url.indexOf("=") + 1, url.length));
		url =  paramName + varName;
		location.href=url;
	}
}

function changeIframe (baseUrl, defaultPage, iframeNameParam) {
	var iframeName = "externalContent";
	if ((typeof iframeNameParam != 'undefined') && (iframeNameParam != "")) {
		iframeName = iframeNameParam;
	}
	
	var subpage = parseQuery(getQueryString(), "subpage");
	//alert("subpage = " + subpage);
	if (subpage == "") {
		subpage = defaultPage;
	}
	
	iFrameObj = getObj(iframeName);
	iFrameObj.src= "http://" + baseUrl + subpage;
}


// Writes out the subsection navigation
function sb_writeSubsectionNav () {
	var sHTML = "";
	var currentLocation = location.href;
	currentLocation = currentLocation.slice(currentLocation.lastIndexOf("/")+1);
	currentSection = -1;
	currentIndex = -1;
	
	//alert("currentIndex = "+currentIndex);
	
	for (i=0; (i<subsection.length) && (currentSection < 0); i++) {
		for (j=0; (j<subsection[i].length) && (currentIndex < 0); j++) {
			if (subsection[i][j].indexOf(currentLocation) != -1) {
				//alert ("index found at "+j+" - "+i);
				currentIndex = j;
				currentSection = i;
			}
		}
	}
	
	sHTML += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	sHTML += "<tr>";
	sHTML += "<td><img src=\"/site_images/s.gif\" width=\"1\" height=\"10\" alt=\"\"/></td>"
	sHTML += "<td  align=\"center\" valign=\"middle\" class=\"prevNext\" height=\"10\" nowrap>";
	
	if ((currentIndex-1) < 0) {
		sHTML += "<img src=\"/site_images/s.gif\" width=\"2\" height=\"1\" alt=\"\" /><span class=\"prevNextArrow\">&lt;</span><img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" />" + prevText ;
	} else {
		sHTML += "<img src=\"/site_images/s.gif\" width=\"2\" height=\"1\" alt=\"\" /><span class=\"prevNextArrow\">&lt;</span><img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" /><a href=\""  + subsection[currentSection][currentIndex-1] + "\" class=\"prevNextLink\">" + prevText + "</a>";
	}
	
	if (subsectionIndex == "") {
		sHTML += "<img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" />|<img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" />";
		sHTML += "Index";
		sHTML += "<img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" />|<img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" />";
	} else {
		sHTML += "<img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" />|<img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" />";
		sHTML += "<a href=\"" + subsectionIndex + "\" class=\"prevNextLink\">" + indexText + "</a>";
		sHTML += "<img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" />|<img src=\"/site_images/s.gif\" width=\"5\" height=\"1\" alt=\"\" />";
	}

	if ( (currentIndex < 0) || (currentIndex > (subsection[currentSection].length - 2)) ) {	
		sHTML += nextText + "<img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" /><span class=\"prevNextArrow\">&gt;</span><img src=\"/site_images/s.gif\" width=\"3\" height=\"1\" alt=\"\" />";
	} else {
		sHTML += "<a href=\"" + subsection[currentSection][currentIndex+1] +  "\" class=\"prevNextLink\">" + nextText + "</a><img src=\"/site_images/s.gif\" width=\"4\" height=\"1\" alt=\"\" /><span class=\"prevNextArrow\">&gt;</span><img src=\"/site_images/s.gif\" width=\"3\" height=\"1\" alt=\"\" />";
	}	
	sHTML += "</td>";
	sHTML += "</tr>";
	sHTML += "</table>";

	//alert(sHTML);
	document.write(sHTML);
}

/* *********************************** */
// BEGIN POLL FUNCTIONS
/* *********************************** */


// Turn Display on/off
function poll_showHideLayers() {
	var i,p,v,obj,args=poll_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) 
	if ((obj=MM_findObj(args[i]))!=null) { 
		v=args[i+2];
		if (obj.style.display) { 
			obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; 
		} 
	obj.display=v; 
	}
}

// define the default number of days for cookie expiration
var expDays = 365;

// which page should be popped for the one-time survey
var page = "/secure/GeneralContent/survey/take_survey.html";
var windowprops = "width=600,height=500,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes";

// get the specific value of the cookie
function GetCookie (name) {  
	var arg = name + "=";  
	var alen = arg.length;  
	var clen = document.cookie.length;  
	var i = 0;  
	while (i < clen) {    
		var j = i + alen;    
		if (document.cookie.substring(i, j) == arg)      
		return getCookieVal (j);    
		i = document.cookie.indexOf(" ", i) + 1;    
		if (i == 0) break;   
	}  
	return null;
}

// set the cookie with an expiration equal to what is defined above
function SetCookie (name, value) {  
	var argv = SetCookie.arguments;  
	var argc = SetCookie.arguments.length;  
	var expires = (argc > 2) ? argv[2] : null;  
	var path = (argc > 3) ? argv[3] : null;  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? argv[5] : false;  
	document.cookie = name + "=" + escape (value) + 
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
	((path == null) ? "" : ("; path=" + path)) +  
	((domain == null) ? "" : ("; domain=" + domain)) +    
	((secure == true) ? "; secure" : "");
}

// set the old cookie to an expired time to delete it if necessary
function DeleteCookie (name) {  
	var exp = new Date();  
	exp.setTime (exp.getTime() - 1);  
	var cval = GetCookie (name);  
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

// add 1 to the cookie if they've been here before
function amt() {
	var count = GetCookie('count')
	if(count == null) {
		SetCookie('count','1')
		return 1
	}
	else {
		var newcount = parseInt(count) + 1;
		DeleteCookie('count')
		SetCookie('count',newcount,exp);
		return count
   }
}

// get the value of the cookie, detect if it's null or not
function getCookieVal(offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

// see if they've received the cookie before now
function checkCount() { 
	var count = GetCookie('count');
	if (count == null) 
	{
		count=1;
		SetCookie('count', count, exp);
		window.open(page, "", windowprops);
	}
	else
	{
		count++;
		SetCookie('count', count, exp);
   }
}

var graphimageP="/site_images/poll/poll_bar.gif";
var thePollName="";

// set the cookie to show the poll has been taken
function takePoll() {
	SetCookie('poll_Name',thePollName, exp);
}

// show the correct DIV for the poll status
function miniInit() {
 setTimeout("setPollLayer();",500);
}

function setPollLayer() {
	SetCookie('cookieEnable', "yes", exp);
	if (GetCookie('cookieEnable') == null) {
		poll_showHideLayers('pollQuestion','','hide','pollResults','','show');
	}
	else {
		if (GetCookie('poll_Name') != thePollName) {
			poll_showHideLayers('pollQuestion','','show','pollResults','','hide');
		}
		else {
			poll_showHideLayers('pollQuestion','','hide','pollResults','','show');
		}
	}
}

//DEFINE GRAPH VALUES [Item name, Percentage value]

function graphitP(grapha, graphb, gwidth) {
	var arrLen = grapha.length;
	var graphc = new Array();
	for (var arrLoop = 0; arrLoop < arrLen; arrLoop++) {
		graphc[arrLoop] = [grapha[arrLoop], graphb[arrLoop]];
	}

	outputP='<table border="0" cellspacing="0" cellpadding="0" width="100%">'
	for (i=0;i<graphc.length;i++) {
		calwidthP=gwidth*(parseInt(graphc[i][1])/100)
		outputP+='<tr><td class="sidebarCopy" colspan="3">'+graphc[i][0]+'&nbsp;:&nbsp;'+graphc[i][1]+'</td></tr><tr><td width="1"><img src="/site_images/poll/poll_left.gif" width="1" height="11"></td><td width="144" background="/site_images/poll/poll_bg.gif"><img src="/site_images/s.gif" width="1" height="2"><img src="'+graphimageP+'" width="'+calwidthP+'" height="7"></td><td width="1"><img src="/site_images/poll/poll_left.gif" width="1" height="11"></td></tr>';
		outputP+='<tr><td colspan="3"><img src="/site_images/s.gif" width="3" height="4" alt="" /></td></tr>';
	}
	outputP+='</table>';
	document.write(outputP);
}

// Disclaimer Functions

function sb_disclaimer(disc,targ,label) {
	window.open(disc + '?targ=' + targ + '&label=' + label,'', 'width=460, height=275');
}

var qsParm = new Array();
function qs() {
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i=0; i<parms.length; i++) {
   var pos = parms[i].indexOf('=');
   if (pos > 0) {
      var key = parms[i].substring(0,pos);
      var val = parms[i].substring(pos+1);
	  val = unescape(val);
      qsParm[key] = val;
      }
   }
}

function discOpen() {
	window.open(qsParm['targ']);
	window.close();
}

qsParm['targ'] = null;
qsParm['label'] = null;
qs(); 

function checkVars(){
	if (qsParm['targ'] && qsParm['label']) {
		MM_showHideLayers('disclaimerLink','','show','error','','hide');
	} else {
		MM_showHideLayers('disclaimerLink','','hide','error','','show');
	}
}


function popMedicine(img) {

sw = window.open('', 'medicine', 'HEIGHT=700,WIDTH=740,innerHeight=500,innerWidth=477,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=10,screenY=20');

var swHTML='';

swHTML += '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n';
swHTML += '<html>\n';
swHTML += '<head>\n';
swHTML += '	<title>くすりの情報 | 万有製薬株式会社</title>\n';
swHTML += '	<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n';
swHTML += '		<meta name=\"keywords\" content=\"くすり,薬,薬品,病気,薬剤,お問い合わせ\" />\n';
swHTML += '		<meta name=\"description\" content=\"万有製薬株式会社のホームページです。\" />\n';
swHTML += '	<script language=\"JavaScript\" src=/scripts/utils.js></script>\n';
swHTML += '	<script language=\"JavaScript\" src=\"/scripts/main_nav.js\"></script>\n';
swHTML += '	<link rel=\"stylesheet\" href=\"/styles/global.css\" type=\"text/css\" />\n';
swHTML += '</head>\n';
swHTML += '<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" bgcolor=\"#ffffff\">\n';
swHTML += '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"35\" class=\"bgPageHeading\">\n';
swHTML += '		<tr bgcolor=\"#009999\">\n';
swHTML += '			<td height=\"35\" valign=\"top\" class=\"bgPageHeading\" rowspan=\"2\"><img src=\"/site_images/header/logo_popup.gif\" alt=\"万有製薬\" /></td>\n';
swHTML += '			<td width=\"251\" height=\"2\"><img src=\"/site_images/s.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n';
swHTML += '			<td width=\"9\" height=\"35\" rowspan=\"2\"><img src=\"/site_images/s.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n';
swHTML += '		</tr>\n';
swHTML += '		<tr bgcolor=\"#009999\">\n';
swHTML += '			<td width=\"251\" height=\"33\" align=\"right\" valign=\"middle\"><span class=\"windowTitle\"><a href=\"javascript:window.close();"><img src=\"/site_images/header/close_popup.gif\" alt=\"ウィンドウを閉じる\" border=\"0\"></a></span></td>	\n';
swHTML += '		</tr>\n';
swHTML += '	</table>\n';
swHTML += '<br/>\n';
swHTML += '<table width=\"452\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n';
swHTML += '<tr>\n';
swHTML += '<td width=\"10\">&nbsp;</td>\n';
swHTML += '<td width=\"432\" valign=\"top\">\n';

swHTML += '<img src=\"' + img + '" alt=\"\">\n';

swHTML += '</td>\n';
swHTML += '<td width=\"10\">&nbsp;</td>\n';
swHTML += '</tr>\n';
swHTML += '</table>\n';
swHTML += '</body>\n';
swHTML += '</html>\n';

	sw.document.open();
	sw.document.write(swHTML);
	sw.document.close();
	swHTML='';

	if (sw != null)  {
		sw.focus();
	} // end if

}


function popMedicine_hcp(img) {

sw = window.open('', 'medicine', 'HEIGHT=700,WIDTH=740,innerHeight=500,innerWidth=477,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=10,screenY=20');

var swHTML='';

swHTML += '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n';
swHTML += '<html>\n';
swHTML += '<head>\n';
swHTML += '	<title>製品関連情報 ｜万有製薬株式会社</title>\n';
swHTML += '	<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n';
swHTML += '		<meta name=\"keywords\" content=\"シングレア,ニューロタン,フォサマック,リポバス,AGA,プロペシア,高血圧,高脂血症,骨粗しょう症,喘息,改訂\" />\n';
swHTML += '		<meta name=\"description\" content=\"万有製薬株式会社のホームページです。\" />\n';
swHTML += '	<script language=\"JavaScript\" src=/scripts/utils.js></script>\n';
swHTML += '	<script language=\"JavaScript\" src=\"/scripts/main_nav.js\"></script>\n';
swHTML += '	<link rel=\"stylesheet\" href=\"/styles/global.css\" type=\"text/css\" />\n';
swHTML += '</head>\n';
swHTML += '<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" bgcolor=\"#ffffff\">\n';
swHTML += '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"35\" class=\"bgPageHeading\">\n';
swHTML += '		<tr bgcolor=\"#009999\">\n';
swHTML += '			<td height=\"35\" valign=\"top\" class=\"bgPageHeading\" rowspan=\"2\"><img src=\"/site_images/header/logo_popup.gif\" alt=\"万有製薬\" /></td>\n';
swHTML += '			<td width=\"251\" height=\"2\"><img src=\"/site_images/s.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n';
swHTML += '			<td width=\"9\" height=\"35\" rowspan=\"2\"><img src=\"/site_images/s.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n';
swHTML += '		</tr>\n';
swHTML += '		<tr bgcolor=\"#009999\">\n';
swHTML += '			<td width=\"251\" height=\"33\" align=\"right\" valign=\"middle\"><span class=\"windowTitle\"><a href=\"javascript:window.close();"><img src=\"/site_images/header/close_popup.gif\" alt=\"ウィンドウを閉じる\" border=\"0\"></a></span></td>	\n';
swHTML += '		</tr>\n';
swHTML += '	</table>\n';
swHTML += '<br/>\n';
swHTML += '<table width=\"452\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n';
swHTML += '<tr>\n';
swHTML += '<td width=\"10\">&nbsp;</td>\n';
swHTML += '<td width=\"432\" valign=\"top\">\n';

swHTML += '<img src=\"' + img + '" alt=\"\">\n';

swHTML += '</td>\n';
swHTML += '<td width=\"10\">&nbsp;</td>\n';
swHTML += '</tr>\n';
swHTML += '</table>\n';
swHTML += '</body>\n';
swHTML += '</html>\n';

	sw.document.open();
	sw.document.write(swHTML);
	sw.document.close();
	swHTML='';

	if (sw != null)  {
		sw.focus();
	} // end if


}


function poplipo(img) {

sw = window.open('', 'medicine', 'HEIGHT=700,WIDTH=740,innerHeight=500,innerWidth=477,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=10,screenY=20');

var swHTML='';

swHTML += '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n';
swHTML += '<html>\n';
swHTML += '<head>\n';
swHTML += '	<title>学術情報 | 万有製薬株式会社</title>\n';
swHTML += '	<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n';
swHTML += '		<meta name=\"keywords\" content=\"セミナー,文献,シングレア,フォサマック,ニューロタン,リポバス\" />\n';
swHTML += '		<meta name=\"description\" content=\"万有製薬株式会社のホームページです。\" />\n';
swHTML += '	<script language=\"JavaScript\" src=/scripts/utils.js></script>\n';
swHTML += '	<script language=\"JavaScript\" src=\"/scripts/main_nav.js\"></script>\n';
swHTML += '	<link rel=\"stylesheet\" href=\"/styles/global.css\" type=\"text/css\" />\n';
swHTML += '</head>\n';
swHTML += '<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" bgcolor=\"#ffffff\">\n';
swHTML += '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"35\" class=\"bgPageHeading\">\n';
swHTML += '		<tr>\n';
swHTML += '			<td height=\"35\" valign=\"top\" class=\"bgPageHeading\" rowspan=\"2\"><img src=\"/site_images/header/logo_popup.gif\" alt=\"万有製薬\" /></td>\n';
swHTML += '			<td width=\"251\" height=\"2\"><img src=\"/site_images/s.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n';
swHTML += '			<td width=\"9\" height=\"35\" rowspan=\"2\"><img src=\"/site_images/s.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n';
swHTML += '		</tr>\n';
swHTML += '		<tr>\n';
swHTML += '			<td width=\"251\" height=\"33\" align=\"right\" valign=\"middle\"><span class=\"windowTitle\"><a href=\"javascript:window.close();"><img src=\"/site_images/header/close_popup.gif\" alt=\"ウィンドウを閉じる\" border=\"0\"></a></span></td>	\n';
swHTML += '		</tr>\n';
swHTML += '	</table>\n';
swHTML += '<br/>\n';
swHTML += '<table width=\"452\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n';
swHTML += '<tr>\n';
swHTML += '<td width=\"10\">&nbsp;</td>\n';
swHTML += '<td width=\"432\" valign=\"top\">\n';

swHTML += '<img src=\"' + img + '" alt=\"\">\n';

swHTML += '</td>\n';
swHTML += '<td width=\"10\">&nbsp;</td>\n';
swHTML += '</tr>\n';
swHTML += '</table>\n';
swHTML += '</body>\n';
swHTML += '</html>\n';

	sw.document.open();
	sw.document.write(swHTML);

	if (sw != null)  {
		sw.focus();
	} // end if


}


//selfcheck

	var gBl = new MakeArrey(21);
	var i;
	cls();

function MakeArrey(n){
	this.length = n;
	var i;
	for(i=0;i<n;++i){
		this[i]=0;
	}
}

function ChkBoxCount(){
	var s = "",i,n = 0;
	for(i=0;i<20;++i){
		if (gBl[i] == true){
			n = n + 1;
		} else {
			n = n;
		}
	}
	s = "正常範囲です。";
	if (n>=6)  s ="ストレス予備状態です。";
	if (n>=11) s ="ストレス状態です。（要注意）";
	if (n>=16) s ="ストレス病です。（要医療）";
	window.document.selfcheck.textfield.value = s; 
	return true;
}

function cls(){
	var i;
	for(i=0;i>=20;++i){
		gBl[i] = false;
		//document.forms[0].elements[i].value = false;
	}
} 

function btn(no){
	gBl[no] =! gBl[no];
//	document.forms[0].elements[i].value = gBl[no];
}


//StressQuiz A04
function ChkBoxCount_q04(){
	var s = "",i,n = 0;
	for(i=0;i<20;++i){
		if (gBl[i] == true){
			n = n + 1;
		} else {
			n = n;
		}
	}
	s = "正常範囲です。";
	if (n>=6) s ="年齢相応です。";
	if (n>=11) s ="精神疲労予備状態です。";
	if (n>=16) s ="精神疲労状態です。";
	document.selfcheck_q04.textfield.value = s;
	return true;
}

//StressQuiz A08

	var gBl_q08 = new MakeArrey(21*3);

function ChkBoxCount_q08(){

	var s = "",i,n = 0,p,e = 0;
	for(i=1;i<21;++i){
		if (gBl_q08[i] == 1) p = 4; 
		if (gBl_q08[i] == 2) p = 3; 
		if (gBl_q08[i] == 3) p = 2; 
		if (gBl_q08[i] == 4) p = 1;
		if (gBl_q08[i] == 0) e = 1;
		n = n + p;
	}
	s = "いまのところ安心。";
	if (n>=31) s ="心の病気に入りかけている人もいるので、用心すること。";
	if (n>=41) s ="要注意！うつ状態の予備軍。";
	if (n>=51) s ="ただちに専門医に。";
	if (e==1) s ="すべての項目をチェックしてください"
	document.selfcheck_q08.textfield.value = s;
	return true;
}

function cls_q08(){
	var i;
	for(i=0;i<20;++i){
		gBl_q08[i] = false;
		//document.forms[0].elements[i].value = false;
	}
}

function btn_q08(no,ans){
	gBl_q08[no] = ans;
	//document.forms[0].elements[i].value = gBl_q08[no];
}

//StressQuiz A09

function ChkBoxCount_q09(){
var s = "",i,n = 0,p,e = 0;
for(i=1;i<12;++i){
if (gBl[i] == 0) { e = 1; } else { n = n + gBl[i]; }
}
n = (n - 24) * 0.25;
s = "タイプA行動者ではありません。";
if (n>=50) s ="あなたはタイプA行動者です。";
if (e==1) s ="すべての項目をチェックしてください"
document.selfcheck_q09.textfield.value = s;
return true;
}

function btn_q09(no,ans){
	gBl[no] = ans;
	//document.forms[0].elements[i].value = gBl[no];
}


//StressQuiz A22

function ChkBoxCount_q22(){
	var s = "",i,n = 0;
	for(i=0;i<20;++i){
		if (gBl[i] == true){
			n = n + 1;
		} else {
			n = n;
		}
	}
	s = "正常です";
	if (n>=3) s ="要注意";
	if (n>=4) s ="アルコール中毒の危険性";
	document.selfcheck_q22.textfield.value = s;
	return true;
}

function cls_q22(){
	var i;
	for(i=0;i<20;++i){
		gBl[i] = false;
		//document.forms[0].elements[i].value = false;
	}
}


//骨粗鬆症
/*
function tomoBlinkSub( objName )
	{
		var obj = MM_findObj( objName );
		if( obj == null ) return;
		if( navigator.appName == "Netscape" )
			{
				if( obj.visibility == "show" )
				obj.visibility = "hide";
			else
				obj.visibility = "show";
			}
		else
			{
				if( obj.style.visibility == "visible" )
						obj.style.visibility = "hidden";
				else
					obj.style.visibility = "visible";
			}
	}
*/

function tomoBlinkSub()
	{
		var obj = document.getElementById("ptbox").style;
		obj.visibility = (obj.visibility == "visible") ? "hidden" : "visible";

	}

function tomoBlink( objName, x, tick )
	{
		if( !document.all && !document.layers ) return;

		var obj = MM_findObj( objName );
		if( obj == null ) return;
		var time;

		if( navigator.appName == "Netscape" )
			{time = obj.BlinkTime;}
		else
			{time = obj.style.BlinkTime;}
		if( time != null )
			clearInterval( time );

		time_id = setInterval( 'tomoBlinkSub()', tick );
//		time_id = setInterval( "tomoBlinkSub(\"" + objName + "\")", tick );

		if( navigator.appName == "Netscape" )
			{obj.BlinkTime = time_id;}
		else
			{obj.style.BlinkTime = time_id;}
	}

	theData   = "";
	theName   = "Age=";
	theData2   = "";
	box   = "Kg=";
	whoData   = "";
	who   = "Whobox=";
	theCookie = document.cookie+";";
	start = theCookie.indexOf(theName);
	start2 = theCookie.indexOf(box);
	start3 = theCookie.indexOf(who);
	if (start != -1)
		{
			end = theCookie.indexOf(";",start);
			end2 = theCookie.indexOf(";",start2);
			end3 = theCookie.indexOf(";",start3);
			theData = unescape(theCookie.substring(start+theName.length,end));
			theData2 = unescape(theCookie.substring(start2+box.length,end2));
			whoData = unescape(theCookie.substring(start3+who.length,end3));
		}

	switch(whoData)
		{
			case "1":{whoData="<p class=p_h2>あなたの危険度はどうですか？</p>";break;}
			case "2":{whoData="<p class=p_h2>あなたのお母さんの危険度はどうですか？</p>";break;}
		}

	x = theData2;
	y = theData;

	var kiken;
	var text_a;
	var text_b;
	var text_c;

	text_a="<strong>まずは一安心。</strong>";
	text_b="<strong>要注意です。骨量の測定をお勧めします。</strong>";
	text_c="<strong>危険です。早めの骨量測定をお勧めします。</strong>";

	if((y<=44)&&(x<=94)){kiken=text_a;}
	else if((y>=45)&&(y<=49)){if(x<=44){kiken=text_b;}else if((x>=45)&&(x<=94)){kiken=text_a;}}
	else if((y>=50)&&(y<=54)){if(x<=49){kiken=text_b;}else if((x>=50)&&(x<=94)){kiken=text_a;}}
	else if((y>=55)&&(y<=59)){if(x<=54){kiken=text_b;}else if((x>=55)&&(x<=94)){kiken=text_a;}}
	else if((y>=60)&&(y<=64)){if(x<=59){kiken=text_b;}else if((x>=60)&&(x<=94)){kiken=text_a;}}
	else if((y>=65)&&(y<=69)){if(x<=44){kiken=text_c;}else if((x>=45)&&(x<=64)){kiken=text_b;}else if(x>=65){kiken=text_a;}}
	else if((y>=70)&&(y<=74)){if(x<=49){kiken=text_c;}else if((x>=50)&&(x<=69)){kiken=text_b;}else if(x>=70){kiken=text_a;}}
	else if((y>=75)&&(y<=79)){if(x<=54){kiken=text_c;}else if((x>=55)&&(x<=74)){kiken=text_b;}else if(x>=75){kiken=text_a;}}
	else if((y>=80)&&(y<=84)){if(x<=59){kiken=text_c;}else if((x>=60)&&(x<=79)){kiken=text_b;}else if(x>=80){kiken=text_a;}}
	else if((y>=85)&&(y<=89)){if(x<=64){kiken=text_c;}else if((x>=65)&&(x<=84)){kiken=text_b;}else if(x>=85){kiken=text_a;}}
	else if((y>=90)&&(y<=94)){if(x<=69){kiken=text_c;}else if((x>=70)&&(x<=89)){kiken=text_b;}else if(x>=90){kiken=text_a;}}
	else if((y>=95)&&(y<=99)){if(x<=74){kiken=text_c;}else if(x>=75){kiken=text_b};}




function mark()
{
		c=""
		x = theData2; //体重
		y = theData; //年齢

os = navigator.userAgent.toUpperCase();
browser = navigator.appName.toUpperCase();

/////////////////// Win Start ///////////////////
	if(os.indexOf("OPERA") >= 0)
	{
	//年齢（top値）
	if(y<=44){y=358; c="#669977";}
	else if((y>=45)&&(y<=49)){y=378;if(x<=44){c="#FFCE4D";}else if(x>=45){c="#669977";}}
	else if((y>=50)&&(y<=54)){y=398;if(x<=49){c="#FFCE4D";}else if(x>=50){c="#669977";}}
	else if((y>=55)&&(y<=59)){y=418;if(x<=54){c="#FFCE4D";}else if(x>=55){c="#669977";}}
	else if((y>=60)&&(y<=64)){y=438;if(x<=59){c="#FFCE4D";}else if(x>=60){c="#669977";}}
	else if((y>=65)&&(y<=69)){y=458;if(x<=44){c="#D21B00";}else if((x>=45)&&(x<=64)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=70)&&(y<=74)){y=478;if(x<=49){c="#D21B00";}else if((x>=50)&&(x<=69)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=75)&&(y<=79)){y=498;if(x<=54){c="#D21B00";}else if((x>=55)&&(x<=74)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=80)&&(y<=84)){y=518;if(x<=59){c="#D21B00";}else if((x>=60)&&(x<=79)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=85)&&(y<=89)){y=538;if(x<=64){c="#D21B00";}else if((x>=65)&&(x<=84)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=90)&&(y<=94)){y=558;if(x<=69){c="#D21B00";}else if((x>=70)&&(x<=89)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=95)&&(y<=99)){y=578;if(x<=74){c="#D21B00";}else if(x>=75){c="#FFCE4D";}}
	//体重（left値）
	if(x<=44){x=216;}
	else if((x>=45)&&(x<=49)){x=251;}
	else if((x>=50)&&(x<=54)){x=286;}
	else if((x>=55)&&(x<=59)){x=321;}
	else if((x>=60)&&(x<=64)){x=356;}
	else if((x>=65)&&(x<=69)){x=391;}
	else if((x>=70)&&(x<=74)){x=426;}
	else if((x>=75)&&(x<=79)){x=461;}
	else if((x>=80)&&(x<=84)){x=496;}
	else if((x>=85)&&(x<=89)){x=531;}
	else if((x>=90)&&(x<=94)){x=566;}

	document.all.ptbox.style.background = c;
	document.all.ptbox.style.posLeft = x;
	document.all.ptbox.style.posTop = y;
	return;
	}
	else if (browser.indexOf("EXPLORER") >= 0)
	{
	//年齢（top値）
	if(y<=44){y=342; c="#669977";}
	else if((y>=45)&&(y<=49)){y=362;if(x<=44){c="#FFCE4D";}else if(x>=45){c="#669977";}}
	else if((y>=50)&&(y<=54)){y=382;if(x<=49){c="#FFCE4D";}else if(x>=50){c="#669977";}}
	else if((y>=55)&&(y<=59)){y=402;if(x<=54){c="#FFCE4D";}else if(x>=55){c="#669977";}}
	else if((y>=60)&&(y<=64)){y=422;if(x<=59){c="#FFCE4D";}else if(x>=60){c="#669977";}}
	else if((y>=65)&&(y<=69)){y=442;if(x<=44){c="#D21B00";}else if((x>=45)&&(x<=64)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=70)&&(y<=74)){y=462;if(x<=49){c="#D21B00";}else if((x>=50)&&(x<=69)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=75)&&(y<=79)){y=482;if(x<=54){c="#D21B00";}else if((x>=55)&&(x<=74)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=80)&&(y<=84)){y=502;if(x<=59){c="#D21B00";}else if((x>=60)&&(x<=79)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=85)&&(y<=89)){y=522;if(x<=64){c="#D21B00";}else if((x>=65)&&(x<=84)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=90)&&(y<=94)){y=542;if(x<=69){c="#D21B00";}else if((x>=70)&&(x<=89)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=95)&&(y<=99)){y=562;if(x<=74){c="#D21B00";}else if(x>=75){c="#FFCE4D";}}
	//体重（left値）
	if(x<=44){x=216;}
	else if((x>=45)&&(x<=49)){x=251;}
	else if((x>=50)&&(x<=54)){x=286;}
	else if((x>=55)&&(x<=59)){x=321;}
	else if((x>=60)&&(x<=64)){x=356;}
	else if((x>=65)&&(x<=69)){x=391;}
	else if((x>=70)&&(x<=74)){x=426;}
	else if((x>=75)&&(x<=79)){x=461;}
	else if((x>=80)&&(x<=84)){x=496;}
	else if((x>=85)&&(x<=89)){x=531;}
	else if((x>=90)&&(x<=94)){x=566;}

	document.all.ptbox.style.background = c;
	document.all.ptbox.style.posLeft = x;
	document.all.ptbox.style.posTop = y;
	return;
	}
	else if(os.indexOf("SAFARI") >= 0)
	{
	//年齢（top値）
	if(y<=44){y=334; c="#669977";}
	else if((y>=45)&&(y<=49)){y=354;if(x<=44){c="#FFCE4D";}else if(x>=45){c="#669977";}}
	else if((y>=50)&&(y<=54)){y=374;if(x<=49){c="#FFCE4D";}else if(x>=50){c="#669977";}}
	else if((y>=55)&&(y<=59)){y=394;if(x<=54){c="#FFCE4D";}else if(x>=55){c="#669977";}}
	else if((y>=60)&&(y<=64)){y=414;if(x<=59){c="#FFCE4D";}else if(x>=60){c="#669977";}}
	else if((y>=65)&&(y<=69)){y=434;if(x<=44){c="#D21B00";}else if((x>=45)&&(x<=64)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=70)&&(y<=74)){y=454;if(x<=49){c="#D21B00";}else if((x>=50)&&(x<=69)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=75)&&(y<=79)){y=474;if(x<=54){c="#D21B00";}else if((x>=55)&&(x<=74)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=80)&&(y<=84)){y=494;if(x<=59){c="#D21B00";}else if((x>=60)&&(x<=79)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=85)&&(y<=89)){y=514;if(x<=64){c="#D21B00";}else if((x>=65)&&(x<=84)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=90)&&(y<=94)){y=534;if(x<=69){c="#D21B00";}else if((x>=70)&&(x<=89)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=95)&&(y<=99)){y=554;if(x<=74){c="#D21B00";}else if(x>=75){c="#FFCE4D";}}
	//体重（left値）
	if(x<=44){x=216;}
	else if((x>=45)&&(x<=49)){x=251;}
	else if((x>=50)&&(x<=54)){x=286;}
	else if((x>=55)&&(x<=59)){x=321;}
	else if((x>=60)&&(x<=64)){x=356;}
	else if((x>=65)&&(x<=69)){x=391;}
	else if((x>=70)&&(x<=74)){x=426;}
	else if((x>=75)&&(x<=79)){x=461;}
	else if((x>=80)&&(x<=84)){x=496;}
	else if((x>=85)&&(x<=89)){x=531;}
	else if((x>=90)&&(x<=94)){x=566;}

	document.getElementById("ptbox").style.background = c;
	document.getElementById("ptbox").style.left = x;
	document.getElementById("ptbox").style.top = y;
	return;
	}
	else if(browser.indexOf("NETSCAPE") >= 0)
	{
	//年齢（top値）
	if(y<=44){y=347; c="#669977";}
	else if((y>=45)&&(y<=49)){y=367;if(x<=44){c="#FFCE4D";}else if(x>=45){c="#669977";}}
	else if((y>=50)&&(y<=54)){y=387;if(x<=49){c="#FFCE4D";}else if(x>=50){c="#669977";}}
	else if((y>=55)&&(y<=59)){y=407;if(x<=54){c="#FFCE4D";}else if(x>=55){c="#669977";}}
	else if((y>=60)&&(y<=64)){y=427;if(x<=59){c="#FFCE4D";}else if(x>=60){c="#669977";}}
	else if((y>=65)&&(y<=69)){y=447;if(x<=44){c="#D21B00";}else if((x>=45)&&(x<=64)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=70)&&(y<=74)){y=467;if(x<=49){c="#D21B00";}else if((x>=50)&&(x<=69)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=75)&&(y<=79)){y=487;if(x<=54){c="#D21B00";}else if((x>=55)&&(x<=74)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=80)&&(y<=84)){y=507;if(x<=59){c="#D21B00";}else if((x>=60)&&(x<=79)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=85)&&(y<=89)){y=527;if(x<=64){c="#D21B00";}else if((x>=65)&&(x<=84)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=90)&&(y<=94)){y=547;if(x<=69){c="#D21B00";}else if((x>=70)&&(x<=89)){c="#FFCE4D";}else{c="#669977";}}
	else if((y>=95)&&(y<=99)){y=567;if(x<=74){c="#D21B00";}else if(x>=75){c="#FFCE4D";}}
	//体重（left値）
	if(x<=44){x=216;}
	else if((x>=45)&&(x<=49)){x=251;}
	else if((x>=50)&&(x<=54)){x=286;}
	else if((x>=55)&&(x<=59)){x=321;}
	else if((x>=60)&&(x<=64)){x=356;}
	else if((x>=65)&&(x<=69)){x=391;}
	else if((x>=70)&&(x<=74)){x=426;}
	else if((x>=75)&&(x<=79)){x=461;}
	else if((x>=80)&&(x<=84)){x=496;}
	else if((x>=85)&&(x<=89)){x=531;}
	else if((x>=90)&&(x<=94)){x=566;}

	document.getElementById("ptbox").style.background = c;
	document.getElementById("ptbox").style.left = x;
	document.getElementById("ptbox").style.top = y;
	return;
	}





}

function sb_saveCookie(name,cvalue,days) {
        if (days) {
            var date = new Date();
            date.setTime(date.getTime()+(days*24*60*60*1000))
            var expires = "; expires="+date.toGMTString()
        }
        else expires = ""
        document.cookie = name+"="+cvalue+expires+"; path=/"
}   

    // Returns the entire query string passed to the current page.
    function getQueryString(){ 
            zquery = parent.location.search; 
            zquery = zquery.substring(1,zquery.length); 
            return (zquery); 
    } 

    // Parses a query string 'queryString' for the variable 'queryName'
    // and returns the value associated with that name.
    function parseQuery (queryString, queryName) {
            startIndex = queryString.indexOf(queryName);
            if (startIndex == -1) {
                    return "";
            }

            startIndex = queryString.indexOf("=", startIndex) + 1;
            endIndex = queryString.indexOf("&", startIndex);
            if (endIndex == -1) {
                    endIndex = queryString.length;
            }
            return queryString.substring(startIndex, endIndex);
    }

    function save_requested_url(){
        //alert(parseQuery(getQueryString(), 'request_url'));
        var requestUrl = parseQuery(getQueryString(), 'request_url');
        if( requestUrl != ''){
            sb_saveCookie( 'request_url', requestUrl);
        }
    }

function getCookieVal (offset) 
{  
	var endstr = document.cookie.indexOf (";", offset);  
	if (endstr == -1)    
	endstr = document.cookie.length;  
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) 
{  
	var arg = name + "=";  
	var alen = arg.length;  
	var clen = document.cookie.length;  
	var i = 0;  
	while (i < clen) 
	{    
		var j = i + alen;    
		if (document.cookie.substring(i, j) == arg)      
			return getCookieVal (j);    
		i = document.cookie.indexOf(" ", i) + 1;    
		if (i == 0) break;   
	}  
	return null;
}
