/* ブラウザ判別 */
var ie=document.all ? 1 : 0;
var ie6=(navigator.userAgent.indexOf("MSIE 6") != -1)? true : false
var ns6=document.getElementById&&!document.all ? 1 : 0;
var opera=window.opera ? 1 : 0;

/* 関連する求人 */
function folder(num, mode){
	if(mode){
		document.getElementById('close'+num).style.display = "none";
		document.getElementById('open'+num).style.display = "block";
	}else{
		document.getElementById('close'+num).style.display = "block";
		document.getElementById('open'+num).style.display = "none";
	}
	return false;
}
function setcolor(obj0,sw1) {
  if (sw1 == 0) {
    bd = '1px solid #E9F9D9';
    bgc = '';
  } else {
    bd = '1px solid #88CC3E';
    bgc = '#D0F2AE';
  }
  obj0.style.border = bd;
  obj0.style.backgroundColor = bgc;
}

function relationOpenClose(work_id, mode) {
    $$('li.open'+work_id).invoke('toggle');
    $('openText' + work_id).toggle();
    $('closeText' + work_id).toggle();
}


/* 写真切り替え */
var photo_index = {};
function nextPhoto(id) {
	if (photo_index[id] === undefined) photo_index[id] = 0;
	photo_index[id]++;
	if (image_exists[id].length-1 < photo_index[id]) {
		photo_index[id] = 0;
	}
	$('photo_' + id).src = C('JSTAFF_PHOTO_WEB_PATH') + "/" + id + "/" + image_exists[id][photo_index[id]] + ".jpg";
}
function backPhoto(id) {
	if (photo_index[id] === undefined) photo_index[id] = 0;
	photo_index[id]--;
	if (photo_index[id] == -1) {
		photo_index[id] = image_exists[id].length-1;
	}
	$('photo_' + id).src = C('JSTAFF_PHOTO_WEB_PATH') + "/" + id + "/" + image_exists[id][photo_index[id]] + ".jpg";
}

