﻿/*



          Copyright 2007 i-ra park Allrights Reserved.



*/






/*topNavibar(S)*/
function topNavibar() {

var div1=document.createElement('div');
div1.style.background="rgb(241, 241, 241) url(/contents/bar/bar_bg.gif) repeat-x scroll 0pt 100%";
div1.style.display="block";
div1.style.position="absolute";
div1.style.top="0pt";
div1.style.left="0pt";
div1.style.height="30px";
div1.style.width="100%";
div1.style.minWidth="740px";
div1.style.MozBackgroundClip="-moz-initial";
div1.style.MozBackgroundOrigin="-moz-initial";
div1.style.MozBackgroundInlinePolicy="-moz-initial";
div1.setAttribute('id','topbar');
var div2=document.createElement('div');
div2.style.cssFloat="left";
div2.style.width="170px";
div2.setAttribute('id','barleft');
div1.appendChild(div2);
var p1=document.createElement('p');
div2.appendChild(p1);
var a1=document.createElement('a');
a1.setAttribute('href','http://www.i-ra.jp/');
p1.appendChild(a1);
var img1=document.createElement('img');
img1.setAttribute('border','0');
img1.style.margin="3px 0pt 0pt 3px";
img1.setAttribute('alt','イーラ・パーク');
img1.setAttribute('src','http://www.i-ra.jp/contents/bar/bar_logo2.gif');
a1.appendChild(img1);
var div3=document.createElement('div');
div3.style.cssFloat="right";
div3.style.height="30px";
div3.style.width="180px";
div3.style.fontSize="12px";
div3.style.lineHeight="30px";
div3.setAttribute('id','barright');
div1.appendChild(div3);
var p2=document.createElement('p');
div3.appendChild(p2);
var a2=document.createElement('a');
a2.style.lineHeight="30px";
a2.setAttribute('href','http://www.i-ra.jp/admin/member_regist.php');
p2.appendChild(a2);
var txt7=document.createTextNode('新規登録');
a2.appendChild(txt7);
var txt8=document.createTextNode('｜  ');
p2.appendChild(txt8);
var a3=document.createElement('a');
a3.style.lineHeight="30px";
a3.setAttribute('href','http://www.i-ra.jp/admin/');
p2.appendChild(a3);
var txt9=document.createTextNode('ログイン');
a3.appendChild(txt9);
var txt10=document.createTextNode('｜  ');
p2.appendChild(txt10);
var a4=document.createElement('a');
a4.style.lineHeight="30px";
a4.setAttribute('href','http://help.clog.jp/');
a4.setAttribute('target','_blank');
p2.appendChild(a4);
var txt11=document.createTextNode('ヘルプ');
a4.appendChild(txt11);
var div4=document.createElement('div');
div4.style.margin="0pt";
div4.style.fontSize="12px";
div4.style.lineHeight="30px";
div4.style.height="30px";
div4.style.textAlign="left";
div4.setAttribute('id','barcenter');
div1.appendChild(div4);
var div5=document.createElement('div');
div5.style.clear="both";
div1.appendChild(div5);
var hr1=document.createElement('hr');
hr1.style.display="none";
div5.appendChild(hr1);

    var oBODY=document.getElementsByTagName('body').item(0);
    oBODY.appendChild(div1);

bar_text();
//print randmsg
	
}
/*topNavibar(E)*/




/*randmsg(S)*/
function bar_text(){
	var msgs = new Array;

// ここから設定	Copyright 2007 i-ra park Allrights Reserved.
	msgs[0] = '<span>[PR]<a href="http://www.i-ra.jp/admin/member_regist.php">伊豆・富士・箱根の地域ブログポータルサイト「イーラ・パーク」で無料ブログをはじめよう</a></span>';
	msgs[1] = '<span>[PR]<a href="http://www.i-ra.jp/admin/member_regist.php">みんなでつくるクチコミ情報サイト「イーラ・パーク」で無料ブログをはじめよう</a></span>';

// ここまで設定	Copyright 2007 i-ra park Allrights Reserved.

	var shuffle = Math.floor( Math.random() * msgs.length );
//	document.write( msgs[shuffle] );
	document.getElementById("barcenter").innerHTML = (msgs[shuffle]);

topbarCSS();
// print barCSS

}
/*randmsg(E)*/









/*barCSS(S)*/
function topbarCSS(){

 //document.write ('<link href="http://www.i-ra.jp/contents/bar/styles.css" rel="stylesheet" type="text/css" />');

 if(document.all)
  document.createStyleSheet('http://www.i-ra.jp/contents/bar/styles.css');
   // stylesheet object createStyleSheet([sURL] [, iIndex])
   // iIndexは省略可。省略するとスタイルシート集合の最後に追加。 

 else if(document.styleSheets){
  var nLink=document.createElement('link');
   // Element createElement(in DOMString tagName)
   // raises(DOMException);
  
  nLink.rel="StyleSheet";
  nLink.type="text/css";
  nLink.href="http://www.i-ra.jp/contents/bar/styles.css";
  var oHEAD=document.getElementsByTagName('head').item(0);
  oHEAD.appendChild(nLink);
   // Node appendChild(in Node newChild)
   // raises(DOMException);
 }
}
/*barCSS(E)*/

window.onload = topNavibar;
