// JavaScript Document
/*
category page
*/

function getScrollPosition() {
	var obj = new Object();
	obj.y = document.documentElement.scrollTop || document.body.scrollTop;
	return obj;
}

function setyscroll(){
	y=document.form.yscroll.value;
	scrollBy(0,y);
}

function go_sub(par) {
	hi=document.form.historys.value;
	hi=hi.replace(/-/g,'');
	hi=hi.replace(/=/g,'-');
	if(par=='WORD'){
		document.form.action='../content/psearch.html?code=' + hi;
	} else {
		document.form.action='../content/pcategory.html?code=' + hi;
	}
	document.form.mode.value=par;
	document.form.yscroll.value=getScrollPosition().y;
	document.form.submit();
}

function go_nex(par1,par2) {
	hi=document.form.historys.value;
	hi=hi.replace(/-/g,'');
	hi=hi.replace(/=/g,'-');
	hi=hi + '-' + par1+par2
	hi=hi.replace(/^-/,'');
	if(par1=='S'){
		document.form.action='../content/ppreview.html?code=' + hi;
		document.form.proid.value=par2;
	}
	if(par1=='C'){
		document.form.action='../content/pcategory.html?code=' + hi;
		document.form.cateid.value=par2;
	}
	if(par1=='I'){
		document.form.action='../content/pindt.html';
	}
	document.form.mode.value='';
	document.form.yscroll.value='0';
	document.form.submit();
}
function go_back(par1,par2) {
	hi=par2;
	hi=hi.replace(/-/g,'');
	hi=hi.replace(/=/g,'-');
	if(par1=='' || par2==''){
		history.back();
	} else {
	document.form.action='index.html';
	if(par1=='C'){
		document.form.action='../content/pcategory.html?code=' + hi;
	}
	if(par1=='S'){
		document.form.action='../content/ppreview.html?code=' + hi;
	}
	if(par1=='I'){
		document.form.action='../content/pindt.html';
	}
	document.form.mode.value='BACK';
	document.form.yscroll.value=0;
	document.form.historys.value=par2;
	document.form.submit();
	}
}

function go_kanpro(par1,par2) {
	hi=document.form.historys.value;
	hi=hi.replace(/-/g,'');
	hi=hi.replace(/=/g,'-');
	hi=hi + '-' + par1+par2
	if(par1=='C'){
		document.form.action='../content/pcategory.html?code=' + hi;
		document.form.cateid.value=par2;
	} else {
		document.form.action='../content/ppreview.html?code=' + hi;
		document.form.proid.value=par2;
	}
	document.form.mode.value='';
	document.form.submit();
}

