var ankenBangos = new Array;
var totalAnBangos = 0;
var bangoIndex = 0;

function PR6W0020submitSearch(sessionid){
	document.JohoConditionFormEN.action = 'JohoSearchListEN.do;jsessionid='+ sessionid + '?from=search';
	document.JohoConditionFormEN.submit();
}

function confirmShuryo(sessionid){
    if(confirm("Are you sure you want to quit ?")){
		location.assign("/csjs/pr006/JohoToEndPageActionEN.do;jsessionid=" + sessionid);
	}
}

function enterance(path){
	window.location=path;
}


function setAnkenArray(index,value){		
	ankenBangos[index] = value;
}
function setTotalAnkenNum(num){
	totalAnBangos = num;
}
function setBangoIndex (index) {
	bangoIndex = index;
}

function closeWindows(){
	parent.window.close();
}
function PR6W0100topAnken(){
	bangoIndex = 0;
	var path = new String(parent.honbun.location);	
	var tempInd = path.indexOf('#');
	if  (tempInd == -1){
		parent.honbun.location=parent.honbun.location+"#"+ankenBangos[0];
	} else {
		path = path.substring(0,tempInd);
		path = path + "#" +ankenBangos[0];
		parent.honbun.location = path;
	}
}
function PR6W0100prevAnken(){	
	var b = bangoIndex -1;
	if ( b<0 ) return;	
	bangoIndex = b;
	var path = new String(parent.honbun.location);	
	var tempInd = path.indexOf('#');
	if  (tempInd == -1){
		parent.honbun.location=parent.honbun.location+"#"+ankenBangos[bangoIndex];
	} else {
		path = path.substring(0,tempInd);
		path = path + "#" +ankenBangos[b];
		parent.honbun.location = path;
	}
}
	
function PR6W0100nextAnken(){	
	var b = bangoIndex +1;	
	if ( b >= totalAnBangos ) return; 
	bangoIndex = b;
	var path = new String(parent.honbun.location);
	var tempInd = path.indexOf('#');
	if  (tempInd == -1){
		parent.honbun.location=parent.honbun.location+"#"+ankenBangos[bangoIndex];
	} else {
		path = path.substring(0,tempInd);
		path = path + "#" +ankenBangos[b];
		parent.honbun.location = path;
	}
}	
function PR6W0100lastAnken(){
	bangoIndex = totalAnBangos-1;
	var path = new String(parent.honbun.location);	
	var tempInd = path.indexOf('#');
	if  (tempInd == -1){
		parent.honbun.location=parent.honbun.location+"#"+ankenBangos[bangoIndex];
	} else {
		path = path.substring(0,tempInd);
		path = path + "#" +ankenBangos[bangoIndex];
		parent.honbun.location = path;
	}
}	
