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_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_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 openWin(URL,NAME)
{
	window.open(URL,NAME,"width=400,height=500,scrollbars=no,location=no,menubar=no");
}

function openRemotesitepolicy()
{
window.open('/sitepolicy/index.html','window01','toolbar=no,location=no,status=no,menubar=no,resizable=no,directories=no,scrollbars=yes,width=460,height=495');
}

function openRemoteprivacy()
{
window.open('/privacy/index.html','window01','toolbar=no,location=no,status=no,menubar=no,resizable=no,directories=no,scrollbars=yes,width=470,height=495');
}

function openRemoteprivacy2()
{
window.open('/privacy/privacy_riyou.html','window01','toolbar=no,location=no,status=no,menubar=no,resizable=no,directories=no,scrollbars=yes,width=470,height=495');
}

function openRemoteprivacy3()
{
window.open('/privacy/index_ssom.html','window02','toolbar=no,location=no,status=no,menubar=no,resizable=no,directories=no,scrollbars=yes,width=450,height=500');
}

function openRemoteprivacy4()
{
window.open('/privacy/privacy_ssom.html','window02','toolbar=no,location=no,status=no,menubar=no,resizable=no,directories=no,scrollbars=yes,width=450,height=500');
}

function openRemotemap()
{
window.open('/company/map.html','window01','toolbar=no,location=no,status=no,menubar=no,resizable=no,directories=no,scrollbars=yes,width=705,height=580');
}

function inq_02()
{
window.open("https://www.022022.net/service/se01010.do","inq02","toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=0,width=700,height=500");
}

function contact01()
{
window.open('https://www.staffservice.co.jp/contact/contact.php?t=01','contact01');
}

function contact02()
{
window.open('https://www.staffservice.co.jp/contact/contact.php?t=02','contact02');
}

function document01()
{
window.open('/client/hatarakikata2008.pdf','document01');
}

function htmlSet(){
	headSet();
	footSet();
	bannerSet();
}

function headSet(){
	var uri = location.href;
	var path = '';
	if(uri.match('cojp-asako.com') || uri.match('sscojp')){
		path = '..';
	}
	var menus = {
		'home'    : new Array('Home','/','common_menu_01','69'),
		'staff'   : new Array('お仕事をお探しの方','/staff/','common_menu_02','190'),
		'client'  : new Array('人材をお探しの企業の方','/client/','common_menu_03','190'),
		'company' : new Array('会社情報','/company/','common_menu_04','117'),
		'recruit' : new Array('採用情報','/recruit/','common_menu_05','117'),
		'contact' : new Array('お問い合わせ','/contact/','common_menu_06','117')
	};
	
	var headHTML = '<table border="0" cellpadding="0" cellspacing="0" width="780" height="65" align="center">'
+'<tr>'
+'<td><a href="/" name="top"><img src="'+path+'/images/common_head_log.gif" alt="スタッフサービスグループ" height="22" width="259"></a></td>'
+'<td align="right">'
+'	<table border="0" cellpadding="0" cellspacing="0">'
+'<tr>'
+'	<td>&nbsp;</td>'
+'	<td align="right" valign="bottom" style="padding-left:10px;"><a href="http://www.staffservice.co.jp/mailnews/info.html" target="_blank" class="lk_icn01">メールニュースのお申込みはこちらから</a></td>'
+'	</tr>'
+'	<tr>'
+'	<td><img src="'+path+'/images/common_head_tel_top.gif" alt="0120-022-022" height="29" width="180"></td>'
+'	<td valign="bottom" style="padding-left:10px;"><a href="https://www.staffservice.co.jp/contact/contact.php?t=01" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'head_b01\',\'\',\''+path+'/images/common_head_b01_on.gif\',1)" target="_blank"><img src="'+path+'/images/common_head_b01.gif" name="head_b01" alt="人材サービスのWEBオーダーはこちらから" height="25" width="222" border="0"></a></td>'
+'	</tr>'
+'	</table>'
+'</td>'
+'</tr>'
+'</table>'
+''
+'<table border="0" cellpadding="0" cellspacing="0" align="center" width="806">'
+'<tr>'
+'<td><img src="'+path+'/images/common_menu_s_l.gif" alt="" height="39" width="3"></td>';

for(i in menus){
	if(uri.match('/'+i+'/')){
		headHTML += '<td><a href="'+path+menus[i][1]+'"><img src="'+path+'/images/'+menus[i][2]+'_on.gif" name="'+menus[i][2]+'" alt="'+menus[i][0]+'" height="39" width="'+menus[i][3]+'"></a></td>';
	}else{
		headHTML += '<td><a href="'+path+menus[i][1]+'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\''+menus[i][2]+'\',\'\',\''+path+'/images/'+menus[i][2]+'_on.gif\',1)"><img src="'+path+'/images/'+menus[i][2]+'.gif" name="'+menus[i][2]+'" alt="'+menus[i][0]+'" height="39" width="'+menus[i][3]+'"></a></td>';
	}
}

headHTML +=
'<td><img src="'+path+'/images/common_menu_s_r.gif" alt="" height="39" width="3"></td>'
+'</tr>'
+'</table>';
	
	document.getElementById('head').innerHTML = headHTML;
}

function footSet(){
	var uri = location.href;
	var path = '';
	if(uri.match('cojp-asako.com') || uri.match('sscojp')){
		path = '..';
	}
	
	var footHTML = '<table border="0" cellpadding="10" cellspacing="0" class="foot">'
+'<tr>'
+'<td>'
+'	<table border="0" cellpadding="0" cellspacing="0">'
+'	<tr>'
+'	<td><a href="'+path+'/sitemap/"><img src="'+path+'/images/common_foot_b01.gif" alt="サイトマップ" height="19" width="93"></a></td>'
+'	<td><a href="#" onClick="openRemotesitepolicy(); return false;" ><img src="'+path+'/images/common_foot_b02.gif" alt="サイトポリシー" height="19" width="93"></a></td>'
+'	<td><a href="#" onClick="openRemoteprivacy(); return false;"><img src="'+path+'/images/common_foot_b03.gif" alt="個人情報保護方針" height="19" width="103"></a></td>'
+'	</tr>'
+'	</table>'
+'</td>'
+'<td align="right"><img src="'+path+'/images/common_foot_copy.gif" alt="COPYRIGHT 2010 STAFF SERVICE HOLDINGS ALL RIGHT RESERVED." height="8" width="315"></td>'
+'</tr>'
+'</table>'
;
	document.getElementById('foot').innerHTML = footHTML;
}

function bannerSet(){
	var uri = location.href;
	
	var bannerHTML = '<table cellspacing="0" cellpadding="0" border="0" style="margin-top:60px;margin-bottom:30px">'
+'<tr>'
+'<td align="center"><a href="/rd/r38.html" target="_blank"><img src="../images/common_left_banner01.gif" alt="オー人事.net" height="29" width="162" border="0"></a></td>'
+'</tr>'
+'<tr>'
+'<td><img src="../images/spacer.gif" alt="" height="6" width="1"></td>'
+'</tr>'
+'<!-- ここから修正開始　2008.09.18　リンク先変更、リダイレクト設定 -->'
+'<!-- ここから修正開始　2008.06.20　alt　修正 -->'
+'<!-- ここから修正開始　2008.04.25　リンク先　変更 -->'
+'<tr>'
+'<td align="center"><a href="/rd/r49.html" target="_blank"><img src="../images/common_left_banner02.gif" alt="スタッフサービス・エンジニアリング" height="29" width="162" border="0"></a></td>'
+'</tr>'
+'<!-- ここまで修正　2008.04.25　リンク先　変更 -->'
+'<!-- ここまで修正　2008.06.20　alt　修正 -->'
+'<!-- ここまで修正　2008.09.18　リンク先変更、リダイレクト設定 -->'
+'<!-- ここから修正開始　2008.10.28　バナー3点追加-->'
+'<tr>'
+'<td align="center" style="padding:6px 0"><a href="/rd/r55.html" target="_blank"><img src="../images/common_left_banner03.gif" alt="スタッフサービス・ITソリューションIT系のお仕事情報が満載!!" height="29" width="162" border="0"></a></td>'
+'</tr>'
+'<tr>'
+'<td align="center" style="padding-bottom:6px"><a href="/rd/r56.html" target="_blank"><img src="../images/common_left_banner04.gif" alt="スタッフサービス・メディカル" height="29" width="162" border="0"></a></td>'
+'</tr>'
+'<tr>'
+'<td align="center" style="padding-bottom:12px"><a href="/rd/r57.html" target="_blank"><img src="../images/common_left_banner05.gif" alt="働くナビ！" height="29" width="162" border="0"></a></td>'
+'</tr>'
+'<!-- ここまで修正　2008.10.28　バナー3点追加 -->'
+'</table>';

	document.getElementById('left_banner').innerHTML = bannerHTML;
}