// ====================================================================================
// for Subject Browsing
// ====================================================================================
function make_url_ontoug_1(urlstr, xsd_name, ontoid, selectid,nodeid, start_rec, page_size, sort_order, display_mode,pagename) {
	var str = urlstr;
	str += "?xsd_name="+xsd_name;
        str += "&ontoid="+ontoid;
        str += "&nodeid="+nodeid;
	str += "&start_rec="+start_rec;
	str += "&page_size="+page_size;
	str += "&sort_order="+sort_order;
	str += "&display_mode="+display_mode;
        str += "&selectid="+selectid;
        str += "&pagename="+pagename;
	//alert(str);
	window.location = str;
}
//modify by mayh 2006.06.15 for subject browsing
function make_url_ontoug_2(urlstr, xsd_name, ontoid, selectid,nodeid, start_rec, page_size, sort_order, display_mode) {
	var str = urlstr;
	str += "?xsd_name="+xsd_name;
        str += "&ontoid="+ontoid;
        str += "&nodeid="+nodeid;
	str += "&start_rec="+start_rec;
	str += "&page_size="+page_size;
	str += "&sort_order="+sort_order;
	str += "&display_mode="+display_mode;
        str += "&selectid="+selectid;
	//alert(str);
	window.location = str;
}
function do_pgup_ontoug102(urlstr, xsd_name, ontoid, selectid, nodeid, page_size, start_rec, rec_count, sort_order,displaymode) {
	var s_rec = start_rec - page_size;
	var str = urlstr;
	if (s_rec <= 0) s_rec = 1;
	str += "?xsd_name="+xsd_name+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&sort_order="+sort_order;
        str += "&ontoid="+ontoid;
        str += "&nodeid="+nodeid;
        str += "&selectid="+selectid;
	str +="&display_mode="+displaymode;
	//alert(str);
	window.location = str;
}
function do_pgdown_ontoug102(urlstr, xsd_name, ontoid, selectid, nodeid, page_size, start_rec, rec_count, sort_order,displaymode) {
	var s_rec = start_rec + page_size;
	var str = urlstr;
	if (s_rec > rec_count) s_rec = s_rec-page_size;
        if (s_rec<=0) s_rec=1;
	str += "?xsd_name="+xsd_name+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&sort_order="+sort_order;
        str += "&ontoid="+ontoid;
        str += "&nodeid="+nodeid;
        str += "&selectid="+selectid;
	str +="&display_mode="+displaymode;
	//alert(str);
	window.location = str;
}
function do_pgselect_ontoug102(urlstr, xsd_name, ontoid, selectid, nodeid, rec_count, page_size, start_rec, sort_order,displaymode) {
	var pg = document.forms['paging'].page_selector.selectedIndex;
	var s_rec = pg * page_size + 1;
	var str = urlstr;
	if (s_rec > rec_count) s_rec = 1;
	str += "?xsd_name="+xsd_name+"&rec_count="+rec_count+"&page_size="+page_size+"&start_rec="+s_rec+"&sort_order="+sort_order;
        str += "&ontoid="+ontoid;
        str += "&nodeid="+nodeid;
        str += "&selectid="+selectid;
	str +="&display_mode="+displaymode;
//	alert(str);
	window.location = str;
}
// ====================================================================================
// ug-101: com.capstone.xsys
// ====================================================================================
function make_url_ug101(urlstr, xsd_name, start_rec, page_size, sort_order, display_mode) {
	var str = urlstr;
	str += "?xsd_name="+xsd_name;
	str += "&start_rec="+start_rec;
	str += "&page_size="+page_size;
	str += "&sort_order="+sort_order;
	str += "&display_mode="+display_mode;
	//alert(str);
	window.location = str;
}
function do_pgup_ug101(urlstr, topic_class, page_size, start_rec, rec_count, sort_order) {
	var s_rec = start_rec - page_size;
	var str = urlstr;
	if (s_rec <= 0) s_rec = 1;
	str += "?topic_class="+topic_class+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
function do_pgdown_ug101(urlstr, topic_class, page_size, start_rec, rec_count, sort_order) {
	var s_rec = start_rec + page_size;
	var str = urlstr;
	if (s_rec > rec_count) s_rec = s_rec-page_size;
        if (s_rec<=0) s_rec=1;
	str += "?topic_class="+topic_class+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}

// ====================================================================================
// ug-102: com.capstone.xsys
// ====================================================================================
function make_url_ug102(urlstr, xsd_name, handle) {
	var str = urlstr;
	str += "?xsd_name="+xsd_name;
	str += "&handle="+handle;
	//alert(str);
	window.open(str,'_blank','scrollbars=yes,width=600,height=500,status=yes,resizable=yes,scrollbars=yes');
}
function do_pgup_ug102(urlstr, xsd_name, page_size, start_rec, rec_count, sort_order) {
	var s_rec = start_rec - page_size;
	var str = urlstr;
	if (s_rec <= 0) s_rec = 1;
	str += "?xsd_name="+xsd_name+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
function do_pgdown_ug102(urlstr, xsd_name, page_size, start_rec, rec_count, sort_order) {
	var s_rec = start_rec + page_size;
	var str = urlstr;
	if (s_rec > rec_count) s_rec = s_rec-page_size;
        if (s_rec<=0) s_rec=1;
	str += "?xsd_name="+xsd_name+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
function do_pgselect_ug102(urlstr, xsd_name, rec_count, page_size, start_rec, sort_order) {
	var pg = document.forms['paging'].page_selector.selectedIndex;
	var s_rec = pg * page_size + 1;
	var str = urlstr;
	if (s_rec > rec_count) s_rec = 1;
	str += "?xsd_name="+xsd_name+"&rec_count="+rec_count+"&page_size="+page_size+"&start_rec="+s_rec+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}

// ====================================================================================
// ug-202: com.capstone.xsys
// ====================================================================================
function make_url_ug202(urlstr, xsd_name, handle) {
	var str = urlstr;
	str += "?xsd_name="+xsd_name;
	str += "&handle="+handle;
	//alert(str);
	window.open(str,'_blank','scrollbars=yes,width=600,height=500,status=yes,resizable=yes,scrollbars=yes');
}
function do_pgup_ug202(urlstr, xsd_name, query_term, page_size, start_rec, rec_count,searchmode,sort_order) {
	var s_rec = start_rec - page_size;
	var str = urlstr;
	if (s_rec <= 0) s_rec = 1;
	str += "?xsd_name="+xsd_name+"&query_term="+query_term+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&match="+searchmode+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
function do_pgdown_ug202(urlstr, xsd_name, query_term, page_size, start_rec, rec_count,searchmode,sort_order) {
	var s_rec = start_rec + page_size;
	var str = urlstr;
	if (s_rec > rec_count) s_rec = s_rec-page_size;
        if (s_rec<=0) s_rec=1;
	str += "?xsd_name="+xsd_name+"&query_term="+query_term+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&match="+searchmode+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
function do_pgselect_ug202(urlstr, xsd_name, query_term, page_size, start_rec, rec_count,searchmode,sort_order) {
	var pg = document.forms['paging'].page_selector.selectedIndex;
	var s_rec = pg * page_size + 1;
	var str = urlstr;
	if (s_rec > rec_count) s_rec = 1;
	str += "?xsd_name="+xsd_name+"&query_term="+query_term+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&match="+searchmode+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
function do_ug203(urlstr, xsd_name, query_term, page_size, start_rec, rec_count,searchmode,sort_order) {
	var s_rec = start_rec;
	var str = urlstr;
//	if (s_rec > rec_count) s_rec = 1;
	str += "?xsd_name="+xsd_name+"&query_term="+query_term+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&match="+searchmode+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
// ====================================================================================
// ug-211: com.capstone.xsys
// ====================================================================================
function refresh_page_ug211() {
	var xsd_name = document.query_form.xsd_name.options[document.query_form.xsd_name.selectedIndex].value;
	var urlstr = "ug-211.jsp?xsd_name="+xsd_name;
	//alert(str);
	window.location = urlstr;
}

// ====================================================================================
// ug-212: com.capstone.xsys
// ====================================================================================
function make_url_ug212(urlstr, xsd_name, handle) {
	var str = urlstr;
	str += "?xsd_name="+xsd_name;
	str += "&handle="+handle;
	//alert(str);
	window.open(str,'_blank','scrollbars=yes,width=600,height=500,status=yes,resizable=yes,scrollbars=yes');
}
function do_pgup_ug212(urlstr, xsd_name, q1, q2, q3, ap1, ap2, ap3, op1, op2, page_size, start_rec, rec_count,searchMode,sort_order) {
	var s_rec = start_rec - page_size;
	var str = urlstr;
	if (s_rec <= 0) s_rec = 1;
	str += "?xsd_name="+xsd_name+"&query_term1="+q1+"&ap_entry1="+ap1+"&boolean_op1="+op1+"&query_term2="+q2+"&ap_entry2="+ap2+"&boolean_op2="+op2+"&query_term3="+q3+"&ap_entry3="+ap3+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&match="+searchMode+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
function do_pgdown_ug212(urlstr, xsd_name, q1, q2, q3, ap1, ap2, ap3, op1, op2, page_size, start_rec, rec_count,searchMode,sort_order) {
	var s_rec = start_rec + page_size;
	var str = urlstr;
	if (s_rec > rec_count) s_rec = s_rec-page_size;
        if (s_rec<=0) s_rec=1;
	str += "?xsd_name="+xsd_name+"&query_term1="+q1+"&ap_entry1="+ap1+"&boolean_op1="+op1+"&query_term2="+q2+"&ap_entry2="+ap2+"&boolean_op2="+op2+"&query_term3="+q3+"&ap_entry3="+ap3+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&match="+searchMode+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}

function do_ug213(urlstr, xsd_name, q1, q2, q3, ap1, ap2, ap3, op1, op2, page_size, start_rec, rec_count,searchMode,sort_order) {
	var s_rec = start_rec;
	var str = urlstr;
//	if (s_rec > rec_count) s_rec = 1;
	str += "?xsd_name="+xsd_name+"&query_term1="+q1+"&ap_entry1="+ap1+"&boolean_op1="+op1+"&query_term2="+q2+"&ap_entry2="+ap2+"&boolean_op2="+op2+"&query_term3="+q3+"&ap_entry3="+ap3+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&match="+searchMode+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
function do_pgselect_ug212(urlstr, xsd_name, q1, q2, q3, ap1, ap2, ap3, op1, op2, page_size, start_rec, rec_count,searchMode,sort_order){
	var pg = document.forms['paging'].page_selector.selectedIndex;
	var s_rec = pg * page_size + 1;
	var str = urlstr;
	if (s_rec > rec_count) s_rec = 1;
	str += "?xsd_name="+xsd_name+"&query_term1="+q1+"&ap_entry1="+ap1+"&boolean_op1="+op1+"&query_term2="+q2+"&ap_entry2="+ap2+"&boolean_op2="+op2+"&query_term3="+q3+"&ap_entry3="+ap3+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&match="+searchMode+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
// ====================================================================================
// ug-301: com.capstone.xsys
// ====================================================================================
function make_url_ug301(urlstr, xsd_name, start_rec, page_size, sort_order, display_mode) {
	var str = urlstr;
	str += "?xsd_name="+xsd_name;
	str += "&start_rec="+start_rec;
	str += "&page_size="+page_size;
	str += "&sort_order="+sort_order;
	str += "&display_mode="+display_mode;
	//alert(str);
	window.location = str;
}
function do_pgup_ug301(urlstr, topic_class, page_size, start_rec, rec_count, sort_order) {
	var s_rec = start_rec - page_size;
	var str = urlstr;
	if (s_rec <= 0) s_rec = 1;
	str += "?topic_class="+topic_class+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
function do_pgdown_ug301(urlstr, topic_class, page_size, start_rec, rec_count, sort_order) {
	var s_rec = start_rec + page_size;
	var str = urlstr;
	if (s_rec > rec_count) s_rec = s_rec-page_size;
        if (s_rec<=0) s_rec=1;
	str += "?topic_class="+topic_class+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}

// ====================================================================================
// ug-302: com.capstone.xsys
// ====================================================================================
function make_url_ug302(urlstr, xsd_name, handle) {
	var str = urlstr;
	str += "?xsd_name="+xsd_name;
	str += "&handle="+handle;
	//alert(str);
	window.open(str,'_blank','scrollbars=yes,width=600,height=500,status=yes,resizable=yes,scrollbars=yes');
}
function do_pgup_ug302(urlstr, xsd_name, page_size, start_rec, rec_count, sort_order) {
	var s_rec = start_rec - page_size;
	var str = urlstr;
	if (s_rec <= 0) s_rec = 1;
	str += "?xsd_name="+xsd_name+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}
function do_pgdown_ug302(urlstr, xsd_name, page_size, start_rec, rec_count, sort_order) {
	var s_rec = start_rec + page_size;
	var str = urlstr;
	if (s_rec > rec_count) s_rec = s_rec-page_size;
        if (s_rec<=0) s_rec=0;
	str += "?xsd_name="+xsd_name+"&page_size="+page_size+"&start_rec="+s_rec+"&rec_count="+rec_count+"&sort_order="+sort_order;
	//alert(str);
	window.location = str;
}

// ====================================================================================
// ug-9: com.capstone.xsys
// ====================================================================================
function add_to_cart(handle) {
	var urlstr = "ug_add_to_cart.jsp";
	urlstr += "?handle="+handle;
	window.open(urlstr,'_blank','scrollbars=yes,width=1,height=1,status=yes,resizable=yes,scrollbars=yes');
}

function del_for_cart(handle) {
	var urlstr = "ug_del_for_cart.jsp";
	urlstr += "?handle="+handle;
	window.open(urlstr,'_blank','scrollbars=yes,width=1,height=1,status=yes,resizable=yes,scrollbars=yes');
}
// ====================================================================================
// k-9: com.capstone.xsys
// ====================================================================================
function do_pgup_k_9(urlstr, xsd_name, start_rec,handle,page_size) {
	var s_rec = start_rec - page_size;
	var str = urlstr;
	if (s_rec <= 0) s_rec = 0;
	str += "?xsd_name="+xsd_name+"&page_size="+page_size+"&start_rec="+s_rec+"&handle="+handle;
	//alert(str);
	window.location = str;
}
function do_pgdown_k_9(urlstr, xsd_name, start_rec,handle,page_size) {
	var s_rec = start_rec + page_size;
	var str = urlstr;
	str += "?xsd_name="+xsd_name+"&page_size="+page_size+"&start_rec="+s_rec+"&handle="+handle;
	//alert(str);
	window.location = str;
}
