// インラインフレームの高さ自動取得
function setFrameHeight(){
intInlineFrameHeight = document.getElementById('flame_contents').contentWindow.document.body.offsetHeight;
document.getElementById('flame_contents').height = intInlineFrameHeight + 20;
}
function setFrameHeight2(index){
frameId = "flame_contents"+index;
intInlineFrameHeight = document.getElementById(frameId).contentWindow.document.body.offsetHeight;
document.getElementById(frameId).height = intInlineFrameHeight + 70;
document.getElementById('blog_space').style.paddingBottom='0';

// GETパラメータ取得
var straryQuery = fun_straryGetValue();
// ブログから一覧表示に戻った場合
if(straryQuery['bb'] != undefined){
if(straryQuery['bb'] == 1){
location.hash = "blog_position";
}
}
}

function viewBtnKako(index){

// タブをクリックされたらカテゴリのtopを表示させる
if(index == 2){
document.getElementById('flame_contents2').contentWindow.document.location.href = "http://www.kanazawa-med.ac.jp/blog/";
}
if(index == 3){
document.getElementById('flame_contents3').contentWindow.document.location.href = "http://www.kanazawa-med.ac.jp/blog/cat1.html";
}
if(index == 4){
document.getElementById('flame_contents4').contentWindow.document.location.href = "http://www.kanazawa-med.ac.jp/blog/cat2.html";
}
if(index == 5){
document.getElementById('flame_contents5').contentWindow.document.location.href = "http://www.kanazawa-med.ac.jp/blog/cat3.html";
}
if(index == 6){
document.getElementById('flame_contents6').contentWindow.document.location.href = "http://www.kanazawa-med.ac.jp/blog/cat4.html";
}
if(index == 7){
document.getElementById('flame_contents7').contentWindow.document.location.href = "http://www.kanazawa-med.ac.jp/blog/cat5.html";
}

}

// GETパラメータの取得
function fun_straryGetValue(){
// 変数の初期化
var straryReturnQuery = Array();
// URLの「?」以降の文字列を取得
var strQuery = window.location.search.substring(1);
// 取得した文字列を「&」区切りで配列に格納
var straryQuery = strQuery.split('&');
// 取得配列ループ
for(var i = 0;i < straryQuery.length;i++){
// 文字列中の「=」の位置を取得
var strEqualPosition = straryQuery[i].indexOf('=');
// 「=」の位置が取得できた場合
if (strEqualPosition > 0) {
// キーを取得
var strKey = straryQuery[i].substring(0,strEqualPosition);
// 値を取得
var strValue = straryQuery[i].substring(strEqualPosition + 1);
// キーを添え字として値を連想配列に格納
straryReturnQuery[strKey] = strValue;
}
}
// 取得配列を返却
return straryReturnQuery;
}
